/* Metre2 Scanner - "the light bar". Night-blue glass over drifting light, scan-light blue to sky accents. */
@font-face { font-family: 'Inter'; src: url('fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --a1: #0a5cf0; --a2: #3fb4ff; --a3: #8fe3ff;
  --glow: 0 10px 34px rgba(10, 92, 240, .45);
  --bg: #070b16; --ink: #eef3ff; --dim: #9aa8c7; --faint: #66749a;
  --glass: rgba(20, 30, 58, .58); --glass-2: rgba(30, 44, 82, .62); --line: rgba(160, 190, 255, .14); --line-2: rgba(160, 190, 255, .26);
  --ok: #3ddc97; --warn: #ffc24d; --bad: #ff6b6b;
  --r: 16px; --r-sm: 10px;
  --ks-surface: #131c34; --ks-raise: #1b2747; --ks-border: rgba(160, 190, 255, .18); --ks-text: #eef3ff; --ks-dim: #9aa8c7; --ks-accent: #3fb4ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, "Segoe UI", system-ui, sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* drifting light behind the glass */
.backdrop { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: drift 38s ease-in-out infinite alternate; }
.backdrop .b1 { width: 60vw; height: 60vw; left: -18vw; top: -24vw; background: radial-gradient(circle, #1d4fd8 0%, transparent 65%); }
.backdrop .b2 { width: 50vw; height: 50vw; right: -14vw; top: 20vh; background: radial-gradient(circle, #0e7fbf 0%, transparent 65%); animation-duration: 46s; }
.backdrop .b3 { width: 46vw; height: 46vw; left: 30vw; bottom: -26vw; background: radial-gradient(circle, #3b2a9e 0%, transparent 65%); animation-duration: 52s; opacity: .4; }
@keyframes drift { to { transform: translate(6vw, 4vh) scale(1.12); } }

.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 18px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05); }

#app { position: relative; z-index: 1; height: 100vh; display: grid; grid-template-columns: 318px minmax(0, 1fr); grid-template-rows: 58px minmax(0, 1fr) 176px; grid-template-areas: "top top" "deck stage" "deck tray"; gap: 12px; padding: 12px; }
.top { grid-area: top; position: relative; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; border-radius: 14px; }
.deck { grid-area: deck; padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.stage { grid-area: stage; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 90% at 50% 0%, rgba(40, 70, 140, .35), rgba(10, 16, 34, .55)); }
.tray { grid-area: tray; padding: 12px 10px; overflow: hidden; }

/* top bar */
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; stroke: none; }
.brand .pg { fill: #e9f0ff; } .brand .ln { stroke: #9cb4e6; stroke-width: 1.6; } .brand .lt { fill: var(--a2); filter: drop-shadow(0 0 6px var(--a2)); }
.docname { flex: 0 1 340px; min-width: 120px; }
.docname input { width: 100%; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .05); font-weight: 600; outline: none; text-overflow: ellipsis; }
.docname input:hover { border-color: var(--line); } .docname input:focus { border-color: var(--a2); background: rgba(255, 255, 255, .08); }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(63, 180, 255, .12); color: #bfe6ff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.top-gap { flex: 1; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s; }
.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .07); border-color: var(--line); }
.ghost.icon { width: 36px; padding: 0; }
.ghost.danger:hover:not(:disabled) { color: var(--bad); }
.ghost.wide, .primary.wide { width: 100%; }
.ghost.wide { border-color: var(--line); background: rgba(255, 255, 255, .04); }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border: 0; border-radius: 10px; color: #fff; font-weight: 650; text-decoration: none; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: var(--glow); }
.primary:hover:not(:disabled) { filter: brightness(1.08); }
.link { border: 0; background: none; padding: 0; color: var(--a3); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 13px; text-align: left; }
.save-split { position: relative; display: flex; }
.save-split #save { border-radius: 10px 0 0 10px; }
.save-split .caret { border-radius: 0 10px 10px 0; padding: 0 9px; margin-left: 1px; box-shadow: var(--glow); }
.menu { position: absolute; right: 0; top: 44px; min-width: 230px; padding: 6px; z-index: 30; display: flex; flex-direction: column; background: rgba(18, 26, 50, .96); }
.menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; }
.menu button:hover, .menu button.on { background: rgba(63, 180, 255, .14); }
.menu small { color: var(--dim); }
#proPill { margin: 0 2px; }

/* deck */
.deck-title { margin: 8px 2px 2px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.deck-title:first-child { margin-top: 0; }
.device-row { display: flex; gap: 6px; }
select, input[type=text], input[type=number] { height: 36px; border-radius: 10px; border: 1px solid var(--line); background: rgba(8, 14, 30, .55); padding: 0 10px; outline: none; min-width: 0; }
select:focus, input:focus { border-color: var(--a2); }
select option { background: #121a33; }
.device-row select { flex: 1; }
.device-note { font-size: 12.5px; color: var(--dim); padding: 8px 10px; border-radius: 10px; background: rgba(255, 194, 77, .08); border: 1px solid rgba(255, 194, 77, .25); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 12px; background: rgba(8, 14, 30, .55); border: 1px solid var(--line); }
.seg button { height: 32px; border: 0; border-radius: 9px; background: none; color: var(--dim); font-weight: 600; font-size: 13px; }
.seg button.on { color: #fff; background: linear-gradient(135deg, rgba(10, 92, 240, .9), rgba(63, 180, 255, .85)); box-shadow: 0 4px 16px rgba(10, 92, 240, .4); }
.seg button:disabled { opacity: .3; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--dim); }
.field > select, .field > input { color: var(--ink); font-size: 13.5px; width: 100%; }
.field.sub { padding-left: 46px; }
.toggle { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; font-size: 13.5px; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle span { position: relative; flex: none; width: 36px; height: 20px; border-radius: 99px; background: rgba(255, 255, 255, .12); transition: background .2s; }
.toggle span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #dfe7ff; transition: transform .2s; }
.toggle input:checked + span { background: linear-gradient(135deg, var(--a1), var(--a2)); }
.toggle input:checked + span::after { transform: translateX(16px); background: #fff; }
.toggle input:focus-visible + span { outline: 2px solid var(--a3); outline-offset: 2px; }
.pro-box { margin-top: 6px; border-radius: 12px; border: 1px solid rgba(255, 196, 77, .22); background: linear-gradient(160deg, rgba(255, 196, 77, .07), rgba(63, 180, 255, .04)); padding: 2px 10px 10px; }
.pro-box summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 9px 0 6px; font-weight: 650; }
.pro-box summary::-webkit-details-marker { display: none; }
.pro-box .spark { color: #ffc24d; }
.pro-box > *:not(summary) { margin-top: 6px; }
.naming { display: flex; flex-direction: column; gap: 6px; padding-left: 46px; }
.hint { font-size: 12px; color: var(--faint); }
.profiles { margin-bottom: 4px; }
.profile-row { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 4px 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); font-size: 12.5px; font-weight: 600; }
.profile-chip.on { border-color: transparent; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: var(--glow); }
.profile-chip .x { width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: inherit; opacity: .6; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.profile-chip .x:hover { opacity: 1; background: rgba(0, 0, 0, .25); }
.profile-chip .x svg { width: 12px; height: 12px; }
.deck-gap { flex: 1; min-height: 8px; }
.scan-btn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; border: 0; border-radius: 16px; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .01em; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 14px 40px rgba(10, 92, 240, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
.scan-btn svg { width: 22px; height: 22px; }
.scan-btn .scan-glow { position: absolute; left: -40%; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); animation: sheen 3.6s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { left: -40%; } 100% { left: 120%; } }
.scan-btn.is-scanning { background: linear-gradient(135deg, #24345e, #2d4a80); box-shadow: none; }
.scan-btn.is-scanning .scan-glow { animation-duration: 1.2s; }
.web-only { display: none !important; }
html.web .web-only { display: revert !important; }
html.web .desk-only { display: none !important; }
html.web .web-card { display: block !important; }
.web-card { padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(63, 180, 255, .07); }
.web-card p { margin: 6px 0 12px; color: var(--dim); font-size: 13px; }

/* the glass */
.empty-state { text-align: center; max-width: 520px; padding: 24px; }
.empty-state h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 26px 0 8px; }
.empty-state h1 b { background: linear-gradient(135deg, var(--a2), var(--a3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty-state p { color: var(--dim); margin: 0; }
.glass-art { position: relative; width: 210px; height: 150px; margin: 0 auto; border-radius: 18px; background: linear-gradient(180deg, rgba(140, 180, 255, .16), rgba(140, 180, 255, .04)); border: 1px solid var(--line-2); overflow: hidden; }
.art-page { position: absolute; left: 50%; top: 18px; width: 92px; height: 120px; margin-left: -46px; border-radius: 6px; background: #f3f6ff; box-shadow: 0 10px 28px rgba(0, 0, 0, .4); padding: 16px 12px; display: flex; flex-direction: column; gap: 9px; transform: rotate(-3deg); }
.art-page i { display: block; height: 6px; border-radius: 3px; background: #c4d0ea; }
.art-page i:nth-child(2) { width: 70%; } .art-page i:nth-child(4) { width: 55%; }
.art-light, .lightbar { position: absolute; left: -10%; right: -10%; height: 16px; top: 0; background: linear-gradient(180deg, transparent, rgba(143, 227, 255, .95) 50%, transparent); box-shadow: 0 0 40px 12px rgba(63, 180, 255, .55); animation: sweep 3.2s ease-in-out infinite alternate; mix-blend-mode: screen; }
@keyframes sweep { from { top: -10%; } to { top: 100%; } }
.lightbar { display: none; z-index: 2; left: 0; right: 0; height: 44px; mix-blend-mode: normal; background: linear-gradient(180deg, rgba(63, 180, 255, 0), rgba(63, 180, 255, .3) 42%, rgba(200, 244, 255, .95) 50%, rgba(63, 180, 255, .3) 58%, rgba(63, 180, 255, 0)); box-shadow: 0 0 34px 8px rgba(63, 180, 255, .3); }
#app.scanning .lightbar { display: block; animation-duration: 1.8s; }
.viewer { position: absolute; inset: 0; display: flex; flex-direction: column; }
.page-tools { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 14px; background: rgba(18, 28, 56, .78); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.page-tools .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; flex: none; }
.tool-toggle.on { color: #fff; background: rgba(63, 180, 255, .2); border-color: rgba(63, 180, 255, .45); }
.view-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 68px 24px 40px; }
.view-page { position: relative; overflow: hidden; border-radius: 3px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); background: #fff; line-height: 0; }
.view-page canvas { display: block; }
.view-page.separator canvas { opacity: .35; }
.sep-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 14px; border-radius: 99px; background: rgba(255, 194, 77, .95); color: #3a2600; font-weight: 700; font-size: 13px; line-height: 1.3; white-space: nowrap; }
.view-info { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 12px; color: var(--dim); pointer-events: none; }
.view-info b { color: var(--ink); font-weight: 600; }
.scan-status { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 99px; background: rgba(18, 28, 56, .88); white-space: nowrap; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 0 0 rgba(63, 180, 255, .7); animation: pulse 1.4s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(63, 180, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 180, 255, 0); } }
.error-card { position: absolute; z-index: 7; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); padding: 18px; background: rgba(28, 22, 40, .94); border-color: rgba(255, 107, 107, .35); }
.error-card b { font-size: 16px; } .error-card p { color: var(--dim); }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* tray */
.tray-strip { height: 100%; display: flex; align-items: center; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 4px 6px 6px; scrollbar-width: thin; }
.thumb { position: relative; flex: none; height: 132px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: grab; border-radius: 10px; padding: 4px; border: 2px solid transparent; outline: none; }
.thumb img { height: 108px; width: auto; max-width: 140px; border-radius: 3px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); pointer-events: none; }
.thumb .num { font-size: 11.5px; font-weight: 650; color: var(--dim); }
.thumb.sel { border-color: var(--a2); background: rgba(63, 180, 255, .12); }
.thumb.sel .num { color: var(--ink); }
.thumb:focus-visible { border-color: var(--a3); }
.thumb.separator img { opacity: .35; }
.thumb.separator::after { content: 'Separator'; position: absolute; top: 46px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 99px; background: var(--warn); color: #3a2600; font-size: 10.5px; font-weight: 700; }
.thumb.dragging { opacity: .35; }
.thumb.drop-before::before { content: ''; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--a2); box-shadow: 0 0 10px var(--a2); }
.thumb .ocr-dot { position: absolute; top: 8px; right: 8px; padding: 1px 6px; border-radius: 99px; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; color: #062a14; background: var(--ok); }
.thumb.arriving img { animation: arrive .45s ease-out; }
@keyframes arrive { from { transform: translateY(-14px) scale(.96); opacity: 0; } }
.file-mark { flex: none; align-self: stretch; display: flex; align-items: center; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--a3); border-left: 2px dashed rgba(143, 227, 255, .45); padding-left: 4px; max-height: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-tile { flex: none; width: 92px; height: 120px; border-radius: 10px; border: 1.5px dashed var(--line-2); background: rgba(255, 255, 255, .03); color: var(--dim); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; }
.add-tile:hover { color: var(--ink); border-color: var(--a2); }
.tray-empty { color: var(--faint); font-size: 13px; padding-left: 8px; }

/* overlays and dialogs */
.drop-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(7, 11, 22, .7); backdrop-filter: blur(6px); }
.drop-overlay div { padding: 28px 40px; border: 2px dashed var(--a2); border-radius: 20px; font-size: 18px; font-weight: 650; }
.busy { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(7, 11, 22, .55); }
.busy-card { display: flex; align-items: center; gap: 14px; padding: 18px 24px; background: rgba(18, 26, 50, .95); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--a2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-radius: 12px; background: rgba(22, 32, 62, .97); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); max-width: calc(100% - 32px); }
.toast button { height: 30px; }
dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 22px; color: var(--ink); background: rgba(16, 24, 46, .97); border-color: var(--line-2); }
dialog::backdrop { background: rgba(4, 7, 16, .55); backdrop-filter: blur(2px); }
dialog h2 { margin: 0 0 10px; font-size: 19px; letter-spacing: -.01em; }
dialog p { color: var(--dim); margin: 0 0 12px; }
dialog .field { margin-bottom: 10px; }
#settings { width: min(860px, calc(100vw - 32px)); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.settings-grid section { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.folder-row { display: flex; align-items: center; gap: 6px; color: var(--ink); min-width: 0; }
.folder-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 10px; border-radius: 10px; background: rgba(8, 14, 30, .55); border: 1px solid var(--line); font-size: 13px; }
.saved-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.saved-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); min-width: 0; }
.saved-list .nm { flex: 1; min-width: 0; }
.saved-list .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-list .nm small { color: var(--faint); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-list .ghost { height: 30px; padding: 0 10px; border-color: var(--line); }
.handoff-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.handoff { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(63, 180, 255, .1), rgba(255, 255, 255, .02)); text-align: left; }
.handoff:hover { border-color: var(--a2); }
.handoff small { color: var(--dim); font-size: 12px; }
.help-list { padding-left: 20px; margin: 0 0 8px; color: var(--dim); display: flex; flex-direction: column; gap: 8px; }
.help-list b { color: var(--ink); }
.note { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 107, 107, .1); border: 1px solid rgba(255, 107, 107, .3); color: #ffd0d0; }
.phone-grid { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.qr { width: 220px; height: 220px; padding: 12px; border-radius: 14px; background: #fff; }
.qr svg { width: 100%; height: 100%; stroke: none; }
.phone-status { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; font-weight: 600; }
.phone-status.on .pulse { background: var(--ok); }
#phone-url { word-break: break-all; }
.tok { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.tok td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--dim); }
.tok td:first-child { white-space: nowrap; color: var(--a3); font-family: ui-monospace, Consolas, monospace; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, .08); color: var(--ink); }
.ks-pro-badge { font-size: 9.5px; }

/* narrow windows and phones (browser edition) */
@media (max-width: 980px) {
  #app { grid-template-columns: 270px minmax(0, 1fr); }
  .top #import span, .top #recent-open span { display: none; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  #app { height: auto; min-height: 100vh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 62vh 168px auto; grid-template-areas: "top" "stage" "tray" "deck"; padding: 10px; gap: 10px; }
  .top { flex-wrap: wrap; padding: 8px 10px; gap: 8px; }
  .top .brand span { display: none; }
  .docname { flex: 1 1 160px; }
  .chip { display: none; }
  .top-gap { display: none; }
  .phone-grid, .settings-grid, .handoff-row { grid-template-columns: 1fr; }
  .qr { margin: 0 auto; }
  .view-wrap { padding: 64px 10px 36px; }
}
