:root {
  color-scheme: dark;
  --ink: #161513;
  --surface: #211f1c;
  --border: #3a3630;
  --paper: #fff7e9;
  --muted: #c5b9a9;
  --accent: #ff9555;
  font-family: Inter, system-ui, sans-serif;
  background: var(--ink);
  color: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.masthead {
  height: 76px; padding: 0 clamp(16px, 4vw, 54px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.brand, .header-actions { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 39px; height: 39px; border-radius: 11px; background: var(--accent); display: grid; place-items: center; flex: none; }
.brand-icon i { display: block; width: 13px; height: 22px; border-radius: 3px; border: 2px solid var(--ink); position: relative; }
.brand-icon i::before { content: ""; position: absolute; inset: 2px 2px auto; height: 8px; background: var(--ink); border-radius: 1px; }
.brand-icon i::after { content: ""; position: absolute; left: -5px; right: -5px; bottom: -4px; height: 2px; background: var(--ink); border-radius: 2px; }
.brand-name { font-size: 15px; font-weight: 780; letter-spacing: -.025em; }
.brand-caption { color: var(--muted); font-size: 12px; margin-top: 2px; }
.primary, .secondary, .text-button {
  border: 1px solid transparent; border-radius: 8px; padding: 10px 13px; font-size: 13px; font-weight: 700;
}
.primary { background: var(--accent); color: var(--ink); }
.primary span { margin-left: 6px; }
.primary:hover:enabled { background: #ffae7c; }
.secondary { background: transparent; border-color: var(--border); color: var(--paper); }
.secondary:hover:enabled { border-color: var(--muted); }
.text-button { background: transparent; color: var(--muted); padding-inline: 0; }
.text-button:hover { color: var(--accent); }
.workspace {
  width: min(100% - 36px, 1300px); margin: 22px auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 358px);
  align-items: start; gap: 18px;
}
.stage, .inspector { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; overflow: hidden; }
.stage-bar, .stage-footer { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stage-bar h1 { margin: 0; font-size: 15px; }
.dimensions, .stage-footer { font-size: 12px; color: var(--muted); }
.stage-floor {
  display: grid; place-items: center; padding: 18px;
  min-height: 280px;
  background: radial-gradient(ellipse at center, #38312a 0%, transparent 72%), #141311;
}
.canvas-wrap { position: relative; width: min(100%, clamp(210px, 50vh, 560px)); aspect-ratio: 3 / 4; overflow: hidden; border-radius: 6px; box-shadow: 0 12px 30px #0009; }
canvas#mainCanvas, canvas#overlayCanvas { display: block; width: 100%; height: 100%; }
#overlayCanvas { position: absolute; inset: 0; pointer-events: none; }
.inspector { padding: 20px; }
.inspector-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.inspector p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--ink); border-radius: 9px; padding: 4px; margin: 20px 0; }
.tabs button { color: var(--muted); border: 0; border-radius: 6px; background: transparent; font-weight: 700; padding: 9px 3px; font-size: 12px; }
.tabs [aria-pressed="true"] { color: var(--ink); background: var(--accent); }
.layer h3 { font-size: 15px; margin: 0; }
.upload-target {
  display: grid; place-items: center; position: relative; min-height: 86px; margin-top: 14px;
  overflow: hidden; border: 1px dashed #766557; border-radius: 9px; background: #191715;
}
.upload-target:hover, .upload-target:focus-within, .upload-target.dragging { border-color: var(--accent); background: #33251c; }
.upload-target input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.thumb { display: grid; place-items: center; width: 100%; min-height: 84px; color: var(--accent); font-weight: 700; font-size: 13px; }
.active .logo-thumb { background: repeating-conic-gradient(#28241f 0% 25%, #191715 0% 50%) 0 0 / 18px 18px; }
.thumb canvas { max-width: 94%; height: auto; }
.sliders { display: none; margin-top: 15px; }
.sliders.show { display: block; }
.check, .color-label { font-size: 13px; color: var(--paper); }
.color-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 9px 0 12px; }
select { background: var(--ink); color: var(--paper); border: 1px solid var(--border); border-radius: 6px; padding: 6px; font-size: 12px; }
input[type="checkbox"], input[type="range"] { accent-color: var(--accent); vertical-align: middle; }
input[type="color"] { border: 1px solid var(--border); background: var(--ink); border-radius: 4px; padding: 2px; height: 30px; }
.slider-row { display: grid; grid-template-columns: 78px 1fr 45px; align-items: center; gap: 7px; min-height: 32px; font-size: 12px; color: var(--muted); }
.slider-row input { margin: 0; min-width: 0; }
.slider-row output { text-align: right; color: var(--accent); font-variant-numeric: tabular-nums; }
.layer-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.inspector .privacy { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 11px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.led-options { min-inline-size: 0; margin: 15px 0 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.led-choice { display: flex; align-items: center; min-height: 44px; gap: 9px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border); color: var(--paper); background: var(--ink); font-size: 12px; line-height: 1.25; cursor: pointer; position: relative; }
.led-choice:has(input:checked) { border-color: var(--accent); background: #34271e; }
.led-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.led-choice:hover { border-color: var(--muted); }
.led-chip { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 50%; background: var(--chip); border: 1px solid #ffffff50; }
.toast { position: fixed; z-index: 2; bottom: 18px; left: 50%; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: .18s; background: #25342a; color: var(--paper); border-radius: 9px; padding: 10px 16px; text-align: center; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #582c23; }
@media (max-width: 720px) {
  .masthead { height: auto; min-height: 72px; flex-wrap: wrap; padding-block: 10px; }
  .workspace { width: min(100% - 24px, 520px); grid-template-columns: minmax(0, 1fr); margin-block: 12px; gap: 12px; }
  .stage-floor { min-height: 0; padding: 12px; }
  .canvas-wrap { width: min(100%, clamp(170px, 36vh, 320px)); }
  .stage-bar, .stage-footer { padding: 11px 13px; }
  .inspector { padding: 16px; }
}
