
:root {
  --espresso: #2B2420; --ink: #2B2420; --ink-2: #5F564F; --ink-3: #8C837A;
  --linen: #FAF8F4; --linen-2: #EFEBE3; --line: #E2DCD1; --line-2: #D3CBBE;
  --accent: #B86B4B; --accent-2: #9C5538; --ok: #4E7A54; --warn: #B7791F;
  --radius: 10px; --shadow: 0 1px 2px rgba(43,36,32,.06), 0 4px 14px rgba(43,36,32,.06);
  --top: 64px; --bottom: 64px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--linen-2); font-size: 14px; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0; font-weight: 700; }
h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
small { color: var(--ink-3); font-size: 12px; }

/* ---------- top nav ---------- */
.topnav { height: var(--top); background: var(--espresso); color: #fff; display: flex; align-items: center; padding: 0 28px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 21px; letter-spacing: .01em; }
.brand-mark { width: 44px; height: 44px; }
.mainnav { margin-left: auto; display: flex; gap: 64px; margin-right: 56px; }
.mainnav a { color: #E9E2D8; text-decoration: none; font-size: 17px; letter-spacing: .12em; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.mainnav a:hover { color: #fff; }
.mainnav a.active { color: #fff; border-bottom-color: var(--accent); }
.signin { color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; border: 1px solid rgba(255,255,255,.35); padding: 7px 16px; border-radius: 999px; }
.signin:hover { background: rgba(255,255,255,.08); }

/* ---------- workspace grid ---------- */
.workspace { height: calc(100vh - var(--top) - var(--bottom)); display: grid; grid-template-columns: 330px 92px minmax(0, 1fr) 272px; grid-template-rows: minmax(0, 1fr); background: var(--linen-2); }
.workspace > * { min-height: 0; }
.left { overflow-y: auto; padding: 12px 10px 16px 14px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--line); background: var(--linen-2); scrollbar-width: thin; }
.panel { background: var(--linen); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side-pill, .count-pill { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--linen-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; color: var(--ink-2); }
.count-pill.has { background: var(--espresso); color: #fff; border-color: var(--espresso); }

/* upload */
.dropzone { display: block; border: 2px dashed #CDB9A6; border-radius: 12px; background: #fff; padding: 20px 14px; text-align: center; cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: #FFF9F5; }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-2); }
.dz-empty strong { color: var(--ink); font-weight: 600; }
.dz-empty span { font-size: 12.5px; }
.dz-icon { width: 44px; height: 44px; color: #fff; background: var(--accent); border-radius: 50%; padding: 10px; margin-bottom: 6px; box-shadow: 0 4px 12px rgba(184,107,75,.35); }
.dz-empty strong { font-size: 17px; }
.dz-empty em { font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.dropzone.has-art { padding: 10px 12px; border-width: 1.5px; }
.dz-file { display: flex; align-items: center; gap: 12px; text-align: left; }
.dz-file img { width: 54px; height: 54px; object-fit: contain; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 10px 10px; border-radius: 6px; border: 1px solid var(--line); }
.dz-file div { display: flex; flex-direction: column; min-width: 0; }
.dz-file strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.dz-file span { font-size: 12px; color: var(--ink-3); }
.dz-file .link { color: var(--accent-2); text-decoration: underline; }
.samples { display: flex; align-items: center; gap: 6px; margin: 9px 0 4px; font-size: 12px; color: var(--ink-3); }
.samples div { display: flex; gap: 5px; }
.samples button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px; width: 34px; height: 30px; display: grid; place-items: center; }
.samples button:hover { border-color: var(--accent); }
.samples img { max-width: 28px; max-height: 24px; }
.size-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; margin: 8px 0 6px; }
.size-row label { font-weight: 600; font-size: 13px; }
.size-row small { grid-column: 2; }
.size-inputs { display: flex; align-items: center; gap: 6px; color: var(--ink-3); }
.size-inputs input { width: 66px; padding: 5px 6px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; text-align: center; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 4px 8px; min-height: 30px; flex-wrap: wrap; }
.toggle-row small { flex-basis: 100%; padding-left: 41px; margin-top: -4px; }
.toggle-row select { max-width: 150px; padding: 4px; border-radius: 6px; border: 1px solid var(--line-2); background: #fff; font-size: 12.5px; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; user-select: none; }
.switch input { display: none; }
.switch span { width: 32px; height: 18px; border-radius: 999px; background: #D7CFC3; position: relative; transition: .15s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--espresso); }
.switch input:checked + span::after { left: 16px; }

/* ink list */
.ink-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ink-list .empty { color: var(--ink-3); font-size: 13px; padding: 6px 0; }
.ink { display: grid; grid-template-columns: 20px 34px 1fr auto; gap: 8px; align-items: center; padding: 6px 6px 6px 4px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.ink .num { font-weight: 700; color: var(--ink-3); text-align: center; font-size: 13px; }
.swatch { width: 34px; height: 34px; border-radius: 7px; border: 1px solid rgba(0,0,0,.15); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); padding: 0; position: relative; }
.swatch:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.ink .pname { font-weight: 600; font-size: 13.5px; line-height: 1.15; }
.ink .sub { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.alts { display: flex; gap: 4px; margin-top: 3px; align-items: center; }
.alts .lbl { font-size: 10.5px; color: var(--ink-3); margin-right: 1px; }
.alt { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.18); padding: 0; }
.alt:hover { transform: scale(1.15); }
.ink .rm { border: none; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; width: 22px; height: 22px; border-radius: 5px; }
.ink .rm:hover { background: var(--linen-2); color: var(--ink); }
.ink.knock { background: repeating-linear-gradient(-45deg, #fff 0 6px, #F6F2EC 6px 12px); }
.ink.knock .pname { color: var(--ink-2); }
.tag { display: inline-block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 4px; background: var(--linen-2); color: var(--ink-2); margin-top: 2px; }
.tag.ko { background: #E9F0E7; color: var(--ok); }
.tag.ub { background: #FFF3E0; color: #8A5A12; }
.ink.underbase { border-style: dashed; background: #FFFDF9; }
.ink.underbase .swatch { background: #fff; }
.ink-total { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 4px 0; font-weight: 600; }
.disclaimer { font-size: 11.5px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.35; }
.disclaimer b { color: var(--ink-2); font-weight: 600; }

/* advisory */
.advisory { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.advisory p { margin: 0; line-height: 1.4; font-size: 13px; color: var(--ink-2); }
.advisory .adv-note { margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.adv-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--linen-2); }
.adv-icon svg { width: 18px; height: 18px; }
.advisory.need { border-color: #E9CFA6; background: #FFFBF4; }
.advisory.need .adv-icon { background: #FBE8C9; color: #8A5A12; }
.advisory.ok .adv-icon { background: #E3EDE1; color: var(--ok); }
.check { display: flex; gap: 6px; align-items: center; font-size: 12.5px; margin-top: 6px; cursor: pointer; }

/* edit colors */
.slider-row label { display: flex; align-items: baseline; gap: 6px; font-weight: 600; font-size: 13px; }
.slider-row small { font-weight: 400; }
input[type=range] { width: 100%; accent-color: var(--espresso); }
.ticks { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-3); padding: 0 4px; margin-top: -2px; }
.merge-row { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 6px; align-items: center; margin-top: 10px; font-size: 12.5px; }
.merge-row label { font-weight: 600; font-size: 13px; }
.merge-row select { min-width: 0; padding: 4px; border-radius: 6px; border: 1px solid var(--line-2); background: #fff; font-size: 12px; }
.merge-row .btn { grid-column: 1 / -1; justify-self: end; }
.hint { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.35; }
.restore-row { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 8px 2px 3px; background: #fff; font-size: 12px; }
.chip i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.link-btn { border: none; background: none; color: var(--accent-2); font-weight: 600; font-size: 12.5px; padding: 0; text-decoration: underline; }

/* add product */
.add-product { text-align: center; }
.add-product h4 { color: #4B57A6; font-weight: 500; font-size: 15px; margin-bottom: 8px; }
.search { position: relative; }
.search input { width: 100%; padding: 8px 36px 8px 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; }
.search > svg { position: absolute; right: 12px; top: 9px; width: 18px; height: 18px; color: var(--ink-2); }
.search-results { position: absolute; z-index: 20; left: 0; right: 0; bottom: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.15); text-align: left; max-height: 260px; overflow: auto; }
.search-results li { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.search-results li:hover, .search-results li.hl { background: var(--linen-2); }
.search-results img { width: 30px; height: 30px; }
.search-results small { margin-left: auto; }
.add-product .btn { margin-top: 10px; }

/* buttons */
.btn { border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 8px 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; transition: .12s; }
.btn:hover { border-color: var(--ink-2); }
.btn svg { width: 17px; height: 17px; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.primary { background: var(--espresso); color: #fff; border-color: var(--espresso); }
.btn.primary:hover { background: #40362F; }
.btn.outline { background: transparent; border-color: var(--ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--linen-2); }
.btn[aria-pressed=true] { background: var(--linen-2); border-color: var(--line-2); }
.btn:disabled { opacity: .45; cursor: default; }

/* tools column */
.tools { border-right: 1px solid var(--line); padding: 12px 8px; display: flex; flex-direction: column; gap: 12px; background: var(--linen); overflow-y: auto; }
.tool-group { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }
.tool { border: none; background: transparent; border-radius: 7px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.tool:hover:not(:disabled) { background: var(--linen-2); color: var(--ink); }
.tool:disabled { opacity: .35; cursor: default; }
.tool svg { width: 20px; height: 20px; }
.side-btn { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 4px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); position: relative; }
.side-btn img { width: 56px; height: 56px; background: var(--linen-2); border-radius: 6px; }
.side-btn svg { width: 30px; height: 30px; }
.side-btn.sleeve span { text-align: center; line-height: 1.1; }
.side-btn:hover { background: var(--linen); }
.side-btn.active { border-color: var(--espresso); color: var(--ink); background: var(--linen); }
.side-btn:disabled { opacity: .35; cursor: default; }
.side-btn .dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: none; }
.side-btn .dot.on { display: block; }
.zoom { align-items: center; }
.tool-label { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.tool.sq { width: 34px; height: 30px; font-size: 18px; padding: 0; justify-content: center; border: 1px solid var(--line); }
.zoom-val { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--ink-3); }

/* stage */
.stage { position: relative; display: flex; flex-direction: column; background: #fff; min-width: 0; }
.stage-top { position: absolute; z-index: 5; top: 12px; left: 14px; right: 14px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.stage-top > * { pointer-events: auto; }
.icon-btn { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); }
.icon-btn:hover { border-color: var(--ink-2); }
.icon-btn svg { width: 20px; height: 20px; }
.seg { display: inline-flex; background: var(--linen-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: var(--shadow); }
.seg button { border: none; background: transparent; padding: 6px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg button.active { background: var(--espresso); color: #fff; }
.stage-meta { font-size: 12px; color: var(--ink-3); text-align: right; min-width: 140px; line-height: 1.3; background: rgba(255,255,255,.85); padding: 3px 6px; border-radius: 6px; }
.stage-meta b { color: var(--ink); font-weight: 600; }
.canvas-wrap { flex: 1; overflow: auto; position: relative; display: grid; place-items: center; background: radial-gradient(ellipse at center, #fff 0%, #FBFAF7 70%, #F5F2EC 100%); }
#stageCanvas { display: block; touch-action: none; }
.busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(250,248,244,.7); font-weight: 600; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--espresso); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); background: rgba(43,36,32,.85); color: #fff; font-size: 13px; padding: 7px 14px; border-radius: 999px; pointer-events: none; }
.canvas-wrap.drag { outline: 3px dashed var(--accent); outline-offset: -10px; }

/* films */
.films { flex: 1; overflow: auto; padding: 66px 22px 22px; background: #F3F1ED; }
.films-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.films-head p { margin: 3px 0 0; color: var(--ink-3); font-size: 13px; }
.film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.film { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.film .film-img { background: #fff; padding: 10px; aspect-ratio: 1 / 1; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.film canvas { max-width: 100%; max-height: 100%; image-rendering: auto; }
.film .film-meta { padding: 9px 11px; display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; }
.film .film-meta i { width: 24px; height: 24px; border-radius: 5px; border: 1px solid rgba(0,0,0,.15); }
.film .film-meta strong { display: block; font-size: 13px; line-height: 1.15; }
.film .film-meta span { font-size: 11.5px; color: var(--ink-3); }
.film .dl { border: 1px solid var(--line-2); background: #fff; border-radius: 7px; width: 32px; height: 32px; display: grid; place-items: center; }
.film .dl svg { width: 16px; height: 16px; }
.film .dl:hover { border-color: var(--ink); }
.films-empty { color: var(--ink-3); padding: 40px; text-align: center; }

/* right column */
.right { border-left: 1px solid var(--line); background: var(--linen-2); display: flex; flex-direction: column; min-height: 0; }
.right-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 14px 8px; }
.right-head span { font-size: 12px; color: var(--ink-3); }
.cards { overflow-y: auto; padding: 0 12px 14px; display: flex; flex-direction: column; gap: 9px; scrollbar-width: thin; }
.card { position: relative; background: var(--linen); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; grid-template-columns: 74px 1fr; gap: 10px; cursor: pointer; box-shadow: var(--shadow); transition: .12s; }
.card:hover { border-color: var(--line-2); }
.card.active { border-color: var(--espresso); box-shadow: 0 0 0 1px var(--espresso), var(--shadow); }
.card img { width: 74px; height: 74px; background: var(--linen-2); border-radius: 7px; }
.card .c-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-right: 16px; }
.card .c-style { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.card .c-name { font-weight: 600; font-size: 14px; line-height: 1.15; }
.card .c-color { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.card .c-color i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.card .c-change { margin-top: auto; align-self: flex-start; border: none; background: none; padding: 0; font-size: 12px; font-weight: 600; color: var(--accent-2); text-decoration: underline; }
.card .c-x { position: absolute; top: 4px; right: 6px; border: none; background: none; font-size: 17px; color: var(--ink-3); width: 22px; height: 22px; border-radius: 5px; line-height: 1; }
.card .c-x:hover { background: var(--linen-2); color: var(--ink); }
.card .colors { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.cdot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); padding: 0; position: relative; }
.cdot.sel { box-shadow: 0 0 0 2px var(--linen), 0 0 0 4px var(--espresso); }
.cdot.heather { background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1.2px), radial-gradient(rgba(0,0,0,.18) 1px, transparent 1.2px); background-size: 4px 4px, 5px 5px; }

/* bottom bar */
.bottombar { height: var(--bottom); display: grid; grid-template-columns: 422px minmax(0,1fr) 272px; border-top: 1px solid var(--line); background: var(--linen); }
.bottombar > div { display: flex; align-items: center; gap: 8px; padding: 0 14px; }
.bb-left { border-right: 1px solid var(--line); }
.bb-center { justify-content: space-between; }
.bb-right { border-left: 1px solid var(--line); justify-content: space-between; }
.bb-right .btn { flex: 1; justify-content: center; }
.rotation { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 6px 12px; }
.rotation label { font-weight: 600; font-size: 13px; }
.rotation input { width: 190px; }
.rotation span { width: 38px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-2); }

/* popover / modal / toast */
.popover { position: fixed; z-index: 50; width: 290px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 14px 40px rgba(43,36,32,.22); padding: 12px; }
.popover h4 { display: flex; justify-content: space-between; align-items: center; }
.popover .orig { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.popover .orig i { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); }
.opt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; max-height: 220px; overflow: auto; }
.opt-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.opt-list li:hover { background: var(--linen-2); }
.opt-list li.sel { background: var(--linen-2); font-weight: 600; }
.opt-list li i { width: 26px; height: 20px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); }
.opt-list li small { font-variant-numeric: tabular-nums; }
.popover input { width: 100%; margin: 8px 0 6px; padding: 6px 9px; border-radius: 7px; border: 1px solid var(--line-2); }
.popover .sec { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 6px 0 3px; font-weight: 600; }
.modal-back { position: fixed; inset: 0; background: rgba(43,36,32,.45); display: grid; place-items: center; z-index: 60; }
.modal { position: relative; width: 480px; max-width: calc(100vw - 40px); background: var(--linen); border-radius: 14px; padding: 22px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h2 { margin: 0 0 6px; font-size: 22px; }
.modal p { color: var(--ink-2); line-height: 1.45; margin: 6px 0; }
.modal-x { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 22px; color: var(--ink-3); }
.spec { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin: 10px 0; font-size: 13px; }
.spec div { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed var(--line); gap: 12px; }
.spec div:last-child { border-bottom: none; }
.spec span:first-child { color: var(--ink-3); }
.spec span:last-child { text-align: right; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background: var(--espresso); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; z-index: 70; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

#bgInfo.warn { color: #8A5A12; font-weight: 600; }

/* per-screen strip (separation results are the hero) */
.screen-strip { position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 6; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; box-shadow: 0 8px 24px rgba(43,36,32,.12); max-width: calc(100% - 28px); overflow-x: auto; }
.screen-strip .ss-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); line-height: 1.15; padding-right: 4px; white-space: nowrap; }
.screen-strip .ss-label b { display: block; font-size: 20px; letter-spacing: 0; color: var(--ink); }
.ss-item { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 62px; flex: none; }
.ss-item:hover { border-color: var(--ink-2); }
.ss-item canvas { width: 54px; height: 44px; object-fit: contain; border-radius: 4px; }
.ss-item span { display: flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; color: var(--ink-2); max-width: 56px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-item i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); flex: none; }
.ss-more { white-space: nowrap; }
