:root { --bg: #0f172a; --panel: #1e293b; --panel-2: #273449; --text: #e2e8f0; --muted: #94a3b8; --border: #334155; --accent: #38bdf8; --accent-strong: #0ea5e9; --danger: #f87171; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: dark; } * { box-sizing: border-box; } body { margin: 0; background: var(--bg); color: var(--text); } .app { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; } .app-header h1 { margin: 0 0 4px; font-size: 1.7rem; letter-spacing: -0.02em; } .app-header p { margin: 0 0 8px; color: var(--muted); } a { color: var(--accent); } .panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-top: 18px; } .panel h2 { margin: 0 0 12px; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); } /* ── Sample picker ───────────────────────────────── */ .picker-row { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; } .picker-divider { flex: 0 0 auto; align-self: stretch; width: 1px; background: var(--border); margin: 6px 2px; } .sample-wrap { position: relative; flex: 0 0 auto; } .sample-delete { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(8, 15, 30, 0.7); color: #e2e8f0; font-size: 0.85rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; opacity: 0; transition: opacity 0.12s; } .sample-wrap:hover .sample-delete, .sample-delete:focus-visible { opacity: 1; } .sample-delete:hover:not(:disabled) { background: var(--danger); color: #fff; } .sample { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; width: 88px; padding: 8px 6px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); cursor: pointer; transition: border-color 0.12s, transform 0.12s; } .sample:hover:not(:disabled) { border-color: var(--accent); } .sample:disabled { opacity: 0.5; cursor: default; } .sample-selected { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong); } .thumb-canvas { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; background: #0b1120; display: block; } .sample-name { font-size: 0.72rem; color: var(--muted); text-align: center; line-height: 1.1; max-width: 76px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sample-upload .upload-plus { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 6px; } /* ── Script panel ────────────────────────────────── */ .script-toolbar { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; } .field { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--muted); } .field select { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 0.85rem; } .run-btn { margin-left: auto; background: var(--accent-strong); color: #04222f; border: none; border-radius: 8px; padding: 9px 18px; font-size: 0.9rem; font-weight: 600; cursor: pointer; } .run-btn:disabled { opacity: 0.6; cursor: default; } .editor { width: 100%; min-height: 220px; resize: vertical; background: #0b1120; color: #d7e3f4; border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-family: "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: 0.86rem; line-height: 1.5; tab-size: 2; } .editor:focus { outline: none; border-color: var(--accent); } .editor-hint { margin-top: 8px; font-size: 0.76rem; color: var(--muted); } .editor-hint code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; } kbd { background: var(--panel-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; font-size: 0.72rem; } /* ── Viewers ─────────────────────────────────────── */ .viewers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 720px) { .viewers { grid-template-columns: 1fr; } } .imageview { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel-2); } .imageview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 10px; font-size: 0.78rem; border-bottom: 1px solid var(--border); } .imageview-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .imageview-dims { color: var(--muted); white-space: nowrap; } .imageview-body { position: relative; display: flex; align-items: center; justify-content: center; min-height: 200px; background-image: linear-gradient(45deg, #16203360 25%, transparent 25%), linear-gradient(-45deg, #16203360 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #16203360 75%), linear-gradient(-45deg, transparent 75%, #16203360 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; } .imageview-canvas { max-width: 100%; max-height: 460px; display: block; image-rendering: auto; } .imageview-placeholder { color: var(--muted); font-size: 0.85rem; padding: 40px; } .running-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 15, 30, 0.55); color: var(--text); font-weight: 600; } /* ── Status / console ────────────────────────────── */ .error-banner { background: #7f1d1d40; border: 1px solid var(--danger); color: #fecaca; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 0.85rem; white-space: pre-wrap; } .status-row { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; } .timing { font-size: 0.78rem; color: var(--muted); } .console { margin: 0; background: #0b1120; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, monospace; font-size: 0.8rem; color: #cbd5e1; white-space: pre-wrap; max-height: 160px; overflow: auto; } .app-footer { margin-top: 28px; font-size: 0.76rem; color: var(--muted); text-align: center; }