
html, body { height: 100%; }
body { margin: 0; overflow-x: hidden; background: var(--ink); color: var(--text); font-family: var(--ui); font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased; overflow: hidden; }

.app { height: 100dvh; display: grid; grid-template-rows: var(--top-h) minmax(0, 1fr); }

/* ---------- top bar ---------- */
:root { --top-h: 68px; }
.topbar { display: flex; align-items: center; gap: 24px; padding: 0 20px 0 16px; position: relative; z-index: 5;
  background: radial-gradient(420px 120px at 90px -30px, rgba(var(--brand-glow), 0.13), transparent 70%), linear-gradient(180deg, #15121f, #0d0b14); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--brand-2), rgba(var(--brand-glow), 0.35) 18%, var(--line) 46%); }
.steps { list-style: none; margin: 0 auto; padding: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--faint); white-space: nowrap; transition: color 0.2s; }
.steps li + li::before { content: ""; width: 34px; height: 1px; background: var(--line-2); margin-right: 2px; }
.steps i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-style: normal; font-size: 11px; border: 1px solid var(--line-2); color: var(--muted); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.steps li.now { color: var(--text); }
.steps li.now i { border-color: var(--brand-hi); color: var(--brand-hi); box-shadow: 0 0 0 3px rgba(var(--brand-glow), 0.14); }
.steps li.done { color: var(--muted); }
.steps li.done i { background: var(--brand); border-color: var(--brand-hi); color: var(--brand-ink); font-size: 0; }
.steps li.done i::before { content: "✓"; font-size: 12px; font-weight: 700; }
.actions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.steps + .actions { margin-left: 0; }
.group { display: inline-flex; }
.group .group .btn:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.group .btn:last-child { border-radius: 0 10px 10px 0; }
.group .btn:not(:first-child):not(:last-child) { border-radius: 0; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); font-weight: 600; font-size: 13px; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.1s; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 392px minmax(0, 1fr) 372px; min-height: 0; }
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.wardrobe { border-right: 1px solid var(--line); }
.editor { border-left: 1px solid var(--line); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 18px 10px; }
.panel-head h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.count { font-family: var(--mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }

/* tabs */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 14px; }
.tab { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 10px 8px; border-radius: 11px; border: 1px solid var(--line); background: transparent; text-align: left; transition: background 0.15s, border-color 0.15s; }
.tab b { font-weight: 700; font-size: 12.5px; }
.tab i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.tab:hover { background: var(--panel-2); }
.tab.on { background: var(--panel-3); border-color: var(--line-2); }
.tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
.tab .eq { position: absolute; bottom: 10px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }

.filters { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 9px; border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.search svg { width: 15px; height: 15px; fill: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; }
.search:focus-within { border-color: var(--brand-hi); }
.hues { display: flex; gap: 6px; }
.hue { flex: 1; height: 20px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.14); padding: 0; transition: transform 0.12s; }
.hue:hover { transform: translateY(-2px); }
.hue.on { outline: 2px solid var(--brand-hi); outline-offset: 2px; }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
select, .field input, .field textarea, .field select, .taginput, #designName { height: 34px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); padding: 0 9px; min-width: 0; width: 100%; outline: none; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 26px; font-size: 12.5px; text-overflow: ellipsis; }
select:focus, .field input:focus, .field textarea:focus, .taginput:focus, #designName:focus { border-color: var(--brand-hi); }

/* grid */
.grid-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 24px; scrollbar-width: thin; scrollbar-color: #2c2c36 transparent; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid.n { grid-template-columns: 1fr; gap: 6px; }
.tile { position: relative; display: flex; flex-direction: column; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); overflow: hidden; text-align: left; transition: border-color 0.15s, transform 0.15s, background 0.15s; animation: tile-in 0.28s ease both; }
@keyframes tile-in { from { opacity: 0; transform: translateY(6px); } }
.tile:hover { border-color: rgba(255, 255, 255, 0.3); background: var(--panel-3); transform: translateY(-2px); }
.tile.on { border-color: var(--brand-hi); box-shadow: inset 0 0 0 1px var(--brand-hi); }
.tile.on::after { content: "ON"; position: absolute; top: 6px; right: 6px; font-family: var(--mono); font-size: 9.5px; font-weight: 600; padding: 1px 5px; border-radius: 5px; background: var(--brand); color: var(--brand-ink); }
.tile .pic { position: relative; width: 100%; background: radial-gradient(120% 90% at 50% 0%, #26262f, #16161c); display: grid; place-items: center; overflow: hidden; }
.tile.d .pic { aspect-ratio: 1; }
.tile.d .pic .av { width: 58%; height: 58%; border-radius: 50%; object-fit: cover; background: #31323a; }
.tile.d .pic .dec { position: absolute; width: 69.6%; height: 69.6%; }
.tile.e .pic { aspect-ratio: 132 / 190; background: #1b1b22; }
.tile.e .pic img, .tile.f .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.tile.f .pic { aspect-ratio: 168 / 240; }
.tile.f .pic img { object-fit: contain; padding: 4px; }
.tile.n { flex-direction: row; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; }
.tile.n .pic { width: 196px; height: 36px; flex: none; border-radius: 8px; background: #1b1b22; display: block; }
.tile.n .pic img { position: absolute; right: 0; top: 0; height: 100%; width: auto; }
.tile.n .pic .ph { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 7px; }
.tile.n .pic .ph i { width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.tile.n .pic .ph b { width: 54px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.5); }
.tile .cap { padding: 7px 8px 8px; min-width: 0; width: 100%; }
.tile.n .cap { padding: 0; }
.tile .nm { font-size: 12px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .pr { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.tile .pr u { text-decoration: none; display: inline-flex; gap: 2px; }
.tile .pr u i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255, 255, 255, 0.2); }
.tile.none .pic { color: var(--faint); font-size: 22px; }
.empty { grid-column: 1 / -1; padding: 40px 10px; text-align: center; color: var(--muted); }
.sentinel { height: 1px; }

/* ---------- stage ---------- */
.stage { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; background:
  radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 22px 22px, #0c0a12; }
.glow { position: absolute; inset: -10%; z-index: -1; pointer-events: none; opacity: 0.9; filter: blur(70px);
  background: radial-gradient(38% 46% at 42% 40%, var(--g1), transparent 70%), radial-gradient(34% 40% at 64% 62%, var(--g2), transparent 70%); transition: background 0.6s; }
.stage-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px 0; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(17, 17, 22, 0.8); border: 1px solid var(--line); }
.seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--panel-3); color: var(--text); }
.seg button { display: inline-flex; align-items: center; gap: 5px; }
.seg button svg { width: 12px; height: 12px; fill: currentColor; }
.seg.nitro button.on[data-nitro="1"] { background: var(--nitro); color: #fff; }
.seg.nitro button.on[data-nitro="0"] { background: var(--text); color: #121216; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(17, 17, 22, 0.8); font-size: 12px; font-weight: 600; color: var(--text); }
.chip:hover { border-color: var(--line-2); }
.toggle input, .check input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span, .check span { width: 26px; height: 15px; border-radius: 10px; background: #33333d; position: relative; flex: none; transition: background 0.15s; }
.toggle span::after, .check span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #9b9aa5; transition: transform 0.15s, background 0.15s; }
.toggle input:checked + span, .check input:checked + span { background: var(--brand); }
.toggle input:checked + span::after, .check input:checked + span::after { transform: translateX(11px); background: var(--brand-ink); }
.toggle, .check { cursor: pointer; user-select: none; }
.toggle input:focus-visible + span, .check input:focus-visible + span { outline: 2px solid var(--brand-hi); outline-offset: 2px; }
.nudge { font-size: 12px; color: var(--muted); padding: 0 6px; }
.nudge::before { content: "↓ "; color: var(--brand-hi); }
.try { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--brand-ink); background: var(--brand); padding: 4px 9px; border-radius: 8px; }

.stage-canvas { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 64px); padding: 18px 24px; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #2c2c36 transparent; }
.popout-holder { flex: none; display: grid; place-items: center; margin: auto 0; }
.popout-zoom { transform-origin: center center; }
.context { flex: none; width: 300px; display: flex; flex-direction: column; gap: 8px; margin: auto 0; }
.ctx-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 6px; }
.ctx-label:first-child { margin-top: 0; }
.ctx-label span { text-transform: none; letter-spacing: 0; color: var(--faint); }

/* dock */
.dock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--line); background: rgba(13, 13, 17, 0.86); backdrop-filter: blur(14px); }
.slot { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 9px; border-radius: 12px; border: 1px dashed var(--line-2); background: rgba(23, 23, 29, 0.6); }
.slot.full { border-style: solid; background: var(--panel-2); }
.slot .ic { width: 38px; height: 38px; border-radius: 9px; background: #1b1b22; overflow: hidden; flex: none; display: grid; place-items: center; color: var(--faint); font-size: 18px; }
.slot .ic img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.slot .meta { min-width: 0; flex: 1; }
.slot .k { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); }
.slot .v { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .v.empty-v { color: var(--muted); font-weight: 500; }
.slot .p { font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.slot .p a { color: var(--brand-hi); text-decoration: none; font-weight: 600; }
.slot .p a:hover { text-decoration: underline; }
.slot .rm { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; }
.slot .rm:hover { background: var(--panel-3); color: var(--text); }
.slot.empty-slot { cursor: pointer; }
.slot.empty-slot:hover { border-color: var(--brand-hi); }
.total { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 3px; padding: 4px 6px 4px 14px; min-width: 150px; }
.total .sum { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; line-height: 1; }
.total .sub { font-size: 11px; color: var(--muted); text-align: right; }
.total .check { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); position: relative; }
.total .bundle { font-size: 11px; color: var(--brand-hi); text-align: right; max-width: 220px; }
.total .bundle a { color: inherit; }

/* ---------- editor ---------- */
.editor-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 18px; scrollbar-width: thin; scrollbar-color: #2c2c36 transparent; }
.sec { border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); margin-bottom: 10px; }
.sec > summary { list-style: none; cursor: pointer; padding: 12px 14px; font-family: var(--display); font-weight: 700; font-size: 14.5px; display: flex; align-items: center; justify-content: space-between; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::after { content: "+"; font-family: var(--mono); color: var(--muted); font-weight: 500; }
.sec[open] > summary::after { content: "–"; }
.sec > *:not(summary) { margin: 0 14px 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 120px; }
.media { display: flex; gap: 12px; align-items: center; }
.drop { position: relative; overflow: hidden; background: #1b1b22; border: 1px dashed var(--line-2); display: grid; place-items: center; cursor: grab; touch-action: none; }
.drop:active { cursor: grabbing; }
.drop.over { border-color: var(--brand-hi); background: #1d1830; }
.drop img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.drop .hint { position: absolute; inset: auto 0 0 0; padding: 4px; font-size: 10.5px; text-align: center; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.drop:hover .hint, .drop.empty .hint { opacity: 1; }
.drop.empty .hint { position: static; background: none; color: var(--muted); font-size: 12px; }
.avatar-drop { width: 92px; height: 92px; border-radius: 50%; flex: none; }
.banner-drop { height: 96px; border-radius: 12px; }
.media-ctl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.mini { height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-3); font-size: 12px; font-weight: 600; white-space: nowrap; }
.mini:hover { border-color: rgba(255, 255, 255, 0.28); }
.mini.ghost { background: none; color: var(--muted); }
.slider { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.slider input { flex: 1; min-width: 0; accent-color: var(--brand); }
.ntag { font-family: var(--mono); font-style: normal; font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px 1px; border-radius: 5px; margin-left: 8px; color: #fff; background: var(--nitro); vertical-align: 2px; }
.nitro-note { display: none; margin: 0 14px 12px; padding: 8px 10px; border-radius: 9px; font-size: 11.5px; line-height: 1.4; color: #ffd9e6; background: rgba(255, 95, 168, 0.1); border: 1px solid rgba(255, 95, 168, 0.32); }
.app[data-nitro="0"] .nitro-note { display: block; }
.app[data-nitro="0"] .nitro-only > *:not(summary):not(.nitro-note) { opacity: 0.45; }
.tip { margin: 0; font-size: 11.5px; color: var(--faint); line-height: 1.35; }
.swatch { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.swatch input { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line-2); border-radius: 9px; background: none; cursor: pointer; }
.swatch input::-webkit-color-swatch-wrapper { padding: 2px; }
.swatch input::-webkit-color-swatch { border: 0; border-radius: 6px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; position: relative; }
.moods { display: flex; flex-wrap: wrap; gap: 7px; }
.moods button { height: 30px; min-width: 30px; border-radius: 9px; border: 1px solid var(--line-2); padding: 0; position: relative; transition: transform 0.12s; }
.moods button:hover { transform: translateY(-2px); }
.moods button.on { outline: 2px solid var(--text); outline-offset: 2px; }
.moods .av { padding: 0 10px 0 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: var(--panel-3); }
.moods .av i { width: 14px; height: 14px; border-radius: 50%; display: block; border: 1px solid rgba(255, 255, 255, 0.25); }
.palette { display: flex; gap: 6px; flex-wrap: wrap; }
.palette button { display: inline-flex; height: 24px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); padding: 0; }
.palette button i { width: 22px; height: 100%; display: block; }
.palette .lbl { font-size: 11px; color: var(--faint); align-self: center; margin-right: 2px; }
.fontgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fontgrid button { height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0 4px; min-width: 0; }
.fontgrid button span { font-size: 17px; line-height: 1.1; color: var(--text); white-space: nowrap; }
.fontgrid button i { font-style: normal; font-size: 9.5px; font-family: var(--mono); color: var(--faint); }
.fontgrid button.on, .fxrow button.on { border-color: var(--brand-hi); box-shadow: inset 0 0 0 1px var(--brand-hi); }
.fxrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fxrow button { height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); flex: 1; min-width: 0; }
.field textarea { height: auto; padding: 8px 9px; resize: vertical; line-height: 1.35; }
.field input, .field textarea, .field select { color: var(--text); font-size: 13px; }
.field.narrow { flex: 1.4; }
.field.tiny { flex: 0 0 64px; }
.taginput { width: 84px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.badges label { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line); font-size: 12px; cursor: pointer; }
.badges label:has(input:checked) { border-color: var(--brand-hi); }
.badges input { accent-color: var(--brand); }
.badges img { width: 18px; height: 18px; }
.legal { padding: 6px 4px 0; }
.legal p { margin: 0 0 6px; font-size: 11px; line-height: 1.45; color: var(--faint); }
.legal b { color: var(--muted); }
.scan { font-family: var(--mono); font-size: 10px !important; }

/* ---------- drawer + toasts ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(5, 5, 8, 0.66); backdrop-filter: blur(6px); display: flex; justify-content: flex-end; }
.drawer-card { width: min(440px, 100%); height: 100%; background: var(--panel); border-left: 1px solid var(--line-2); padding: 18px; display: flex; flex-direction: column; gap: 12px; animation: slide 0.22s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-card header { display: flex; align-items: center; justify-content: space-between; }
.drawer-card h3 { margin: 0; font-family: var(--display); font-size: 21px; }
.x { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: none; font-size: 20px; line-height: 1; }
#designName { flex: 1; min-width: 160px; height: 36px; }
.designs { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.designs li { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.designs .sw { width: 42px; height: 42px; border-radius: 50%; flex: none; overflow: hidden; background: #26262f; }
.designs .sw img { width: 100%; height: 100%; object-fit: cover; }
.designs .dm { flex: 1; min-width: 0; }
.designs .dm b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.designs .dm span { font-size: 11.5px; color: var(--muted); }
.designs .none { justify-content: center; color: var(--muted); border-style: dashed; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; pointer-events: none; align-items: center; }
.toast { background: var(--text); color: #121216; padding: 9px 14px; border-radius: 11px; font-weight: 600; font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: toast 0.25s ease; max-width: min(90vw, 520px); text-align: center; }
@keyframes toast { from { transform: translateY(8px); opacity: 0; } }

.mobile-tabs { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1640px) {
  .dock { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .total { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-end; gap: 14px; padding: 0 4px; min-width: 0; }
  .total .sum { font-size: 22px; order: 3; }
  .total .bundle { max-width: none; }
}
@media (max-width: 1500px) { .shell { grid-template-columns: 352px minmax(0, 1fr) 340px; } .steps { display: none; } .actions { margin-left: auto; } }
@media (max-width: 1280px) {
  .context { display: none; }
  .dock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  body { overflow: auto; }
  .app { grid-template-rows: var(--top-h) minmax(0, 1fr) 54px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell > * { display: none; }
  .app[data-view="wardrobe"] .wardrobe, .app[data-view="stage"] .stage, .app[data-view="editor"] .editor { display: flex; }
  .app[data-view="stage"] .stage { display: grid; }
  .wardrobe, .editor { border: 0; }
  .mobile-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--panel); }
  .mobile-tabs button { border: 0; background: none; font-weight: 700; color: var(--muted); }
  .mobile-tabs button.on { color: var(--brand-hi); }
  .actions .btn:not(.lime) { padding: 0 10px; }
  .actions .btn.ghost { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .context { display: flex; }
  .stage-canvas { flex-direction: column; align-items: center; justify-content: flex-start; }
  .popout-holder, .context { margin: 0; }
}
@media (max-width: 560px) {
  :root { --top-h: 58px; }
  .topbar { gap: 10px; padding: 0 12px 0 10px; }
  .logo { width: 34px; height: 34px; border-radius: 10px; }
  .word { font-size: 18px; }
  .word em, .brand-sub { display: none; }
  .group .btn { margin-left: 0; border-radius: 10px !important; }
  .group { gap: 6px; }
  .btn { height: 34px; padding: 0 10px; font-size: 12px; }
  .actions .btn:not(.lime) { font-size: 0; gap: 0; width: 36px; padding: 0; justify-content: center; }
  .actions { gap: 6px; }
  .total { flex-wrap: wrap; justify-content: space-between; }
  .total .sub { display: none; }
  .dock { grid-template-columns: 1fr 1fr; padding: 8px; }
  .tile.n .pic { width: 150px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; } }
.total .pmode { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.app[data-nitro="1"] .total .pmode { color: #ffa3c7; }

/* ---------- dialog (import, publish) ---------- */
.drawer.center { justify-content: center; align-items: center; padding: 16px; }
.modal-card { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: toast 0.2s ease; }
.modal-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-card h3 { margin: 0; font-family: var(--display); font-size: 22px; }
.modal-card #modalBody { display: flex; flex-direction: column; gap: 10px; }
.modal-card .tip { margin: 0; font-size: 13px; line-height: 1.5; }
.modal-card .tip.big { font-size: 15px; color: var(--text); }
.modal-card .tip b { color: var(--text); }
.modal-card .row.end { justify-content: flex-end; gap: 8px; margin-top: 6px; }
.modal-card .field input { width: 100%; }
#account { display: inline-flex; }
@media (max-width: 1280px) { .actions .btn.ghost.keep { display: none; } }
@media (max-width: 560px) { .acct-login span, .acct-chip span, .acct-chip svg { display: none; } .acct-login { padding: 0; width: 36px; justify-content: center; } .acct-chip { padding: 0 4px; } .acct-menu { position: fixed; right: 8px; top: 56px; } }
@media (max-width: 1500px) { .steps + .actions { margin-left: auto; } }
@media (max-width: 560px) { #btnPublish { display: none; } .topbar { gap: 8px; } }
@media (max-width: 430px) { .actions .btn.lime { font-size: 0; gap: 0; width: 36px; padding: 0; justify-content: center; } }

/* import dialog: likely effect / frame candidates */
.sugg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; font-size: 13.5px; }
.sugg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.sugg button { padding: 4px 4px 5px; border-radius: 11px; border: 1.5px solid var(--line-2); background: var(--panel-2); min-width: 0; transition: border-color 0.15s, transform 0.1s; }
.sugg button:hover { border-color: rgba(255, 255, 255, 0.3); }
.sugg button.on { border-color: var(--brand-hi); box-shadow: 0 0 0 3px rgba(var(--brand-glow), 0.3); }
.sugg img { display: block; width: 100%; aspect-ratio: 132 / 190; object-fit: cover; border-radius: 7px; background: #15121d; }
.sugg span { display: block; margin-top: 4px; font-size: 10.5px; font-weight: 600; line-height: 1.15; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg button.on span { color: var(--text); }
.modal-card { width: min(540px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
@media (max-width: 560px) { .sugg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.legal [data-tipjar] a { color: var(--brand-hi); font-weight: 600; }

.legal a[href^='mailto:'] { color: var(--brand-hi); font-weight: 600; }

.check.orbs { margin-top: 8px; font-size: 12.5px; color: var(--muted); } .check.orbs em { font-style: normal; color: var(--faint); }
