/* Foxy Creators — desktop-style shell */
:root {
  --bg: #F7F1EA;
  --wall-a: #FCE3CF; --wall-b: #E9E3FF; --wall-c: #D8F1EC;
  --glass: rgba(255, 252, 248, .72);
  --glass-strong: rgba(255, 253, 250, .9);
  --panel: #FFFFFF;
  --panel-2: #FBF8F4;
  --ink: #1C1A22;
  --ink-2: #4A4654;
  --sub: #85808F;
  --line: rgba(30, 24, 40, .09);
  --line-2: rgba(30, 24, 40, .15);
  --accent: #F26B1D;
  --accent-ink: #fff;
  --accent-soft: #FFE8DA;
  --focus: 0 0 0 3px rgba(242, 107, 29, .28);
  --shadow-1: 0 1px 2px rgba(30, 20, 10, .06), 0 2px 8px rgba(30, 20, 10, .05);
  --shadow-2: 0 10px 40px -10px rgba(40, 20, 10, .22), 0 2px 6px rgba(40, 20, 10, .06);
  --shadow-3: 0 30px 80px -20px rgba(40, 20, 10, .35);
  --r: 14px; --r-lg: 20px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --menubar: 34px; --side: 268px; --dock-h: 74px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121118; --wall-a: #2A1A16; --wall-b: #1B1830; --wall-c: #0F2424;
    --glass: rgba(28, 26, 36, .72); --glass-strong: rgba(30, 28, 38, .92);
    --panel: #1D1C25; --panel-2: #23222C;
    --ink: #F3F1F6; --ink-2: #CFCBD8; --sub: #8E899B; --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
    --accent-soft: rgba(242, 107, 29, .16);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 10px 40px -10px rgba(0, 0, 0, .6); --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121118; --wall-a: #2A1A16; --wall-b: #1B1830; --wall-c: #0F2424;
  --glass: rgba(28, 26, 36, .72); --glass-strong: rgba(30, 28, 38, .92);
  --panel: #1D1C25; --panel-2: #23222C;
  --ink: #F3F1F6; --ink-2: #CFCBD8; --sub: #8E899B; --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
  --accent-soft: rgba(242, 107, 29, .16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 10px 40px -10px rgba(0, 0, 0, .6); --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.mono { font-family: var(--mono); }
.ic { width: 18px; height: 18px; flex: none; display: block; }
kbd { font: 600 11px/1 var(--mono); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--sub); background: var(--panel-2); }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: rgba(242, 107, 29, .25); }

.wall { position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(60vw 60vh at 8% 0%, var(--wall-a), transparent 70%),
  radial-gradient(55vw 55vh at 100% 10%, var(--wall-b), transparent 70%),
  radial-gradient(60vw 60vh at 60% 110%, var(--wall-c), transparent 70%), var(--bg); }

/* ---------- menubar ---------- */
.menubar { position: fixed; top: 0; left: 0; right: 0; height: var(--menubar); display: flex; align-items: center; gap: 18px; padding: 0 14px; z-index: 40;
  background: var(--glass); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border-bottom: 1px solid var(--line); font-size: 13px; }
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; letter-spacing: -.01em; }
.brand b { font-weight: 800; }
.brand span:last-child { color: var(--sub); font-weight: 600; }
.brand-mark { width: 20px; height: 20px; border-radius: 6px; background: url(../favicon.svg) center/cover; box-shadow: var(--shadow-1); }
.mb-nav { display: flex; gap: 4px; }
.mb-nav a, .mb-nav button { border: 0; background: none; padding: 4px 9px; border-radius: 7px; text-decoration: none; font-weight: 500; }
.mb-nav a:hover, .mb-nav button:hover, .mb-nav a.on { background: var(--line); }
.mb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.mb-btn { border: 0; background: none; padding: 4px; border-radius: 7px; display: grid; place-items: center; }
.mb-btn:hover { background: var(--line); }
.mb-btn .ic, .mb-ic .ic { width: 17px; height: 17px; }
.clock { font-size: 12.5px; font-weight: 500; font-family: var(--sans); white-space: nowrap; }
.only-mobile { display: none; }

/* ---------- sidebar ---------- */
.side { position: fixed; top: calc(var(--menubar) + 10px); bottom: 10px; left: 10px; width: var(--side); z-index: 30; display: flex; flex-direction: column;
  background: var(--glass); backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.side-search { margin: 10px 10px 6px; display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 34px; border-radius: 10px; background: var(--line); color: var(--sub); }
.side-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); }
.side-search .ic { width: 15px; height: 15px; }
.side-nav { flex: 1; overflow: auto; padding: 4px 8px 12px; scrollbar-width: thin; }
.side-foot { padding: 10px 14px; font-size: 11.5px; color: var(--sub); border-top: 1px solid var(--line); }
.nav-i { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: 13.5px; text-decoration: none; }
.nav-i:hover { background: var(--line); }
.nav-i.on { background: var(--accent-soft); color: var(--ink); font-weight: 650; }
.nav-i .cnt { margin-left: auto; font: 500 11px var(--mono); color: var(--sub); }
.nav-i .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .1); }
.tile .ic { width: 15px; height: 15px; }
.tile.ghost { background: var(--line); color: var(--ink-2); box-shadow: none; }
.cat-h { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 6px 8px; border: 0; background: none; font: 700 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--sub); border-radius: 8px; }
.cat-h:hover { background: var(--line); }
.cat-h .dot { width: 7px; height: 7px; border-radius: 50%; }
.cat-h .cnt { margin-left: auto; font: 500 11px var(--mono); letter-spacing: 0; }
.cat-h .ic { width: 14px; height: 14px; transition: transform .2s; }
.cat.closed .cat-h .ic { transform: rotate(-90deg); }
.cat.closed .cat-items { display: none; }
.side-empty { padding: 18px 10px; color: var(--sub); font-size: 13px; }
.side-scrim { display: none; }

/* ---------- window ---------- */
.win { position: fixed; top: calc(var(--menubar) + 10px); left: calc(var(--side) + 22px); right: 12px; bottom: calc(var(--dock-h) + 14px); z-index: 20;
  display: flex; flex-direction: column; background: var(--glass-strong); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; transition: left .25s ease, bottom .25s ease; }
body.focus .win { left: 12px; bottom: 12px; }
body.focus .side, body.focus .dock { opacity: 0; pointer-events: none; transform: translateY(8px); }
.side, .dock { transition: opacity .2s, transform .2s; }
.win-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 52px; border-bottom: 1px solid var(--line); flex: none; }
.lights { display: flex; gap: 8px; flex: none; }
.l { width: 13px; height: 13px; border-radius: 50%; border: 0; padding: 0; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .15); position: relative; }
.l.red { background: #FF5F57; } .l.yellow { background: #FEBC2E; } .l.green { background: #28C840; }
.lights:hover .l::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: rgba(0, 0, 0, .3); }
.win-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; min-width: 0; }
.win-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.win-actions:empty { display: none; }
.win-search { display: flex; align-items: center; gap: 8px; height: 34px; width: 230px; padding: 0 6px 0 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--sub); flex: none; }
.win-actions:empty + .win-search { margin-left: auto; }
.win-search .ph { flex: 1; text-align: left; font-size: 13px; }
.win-search .ic { width: 15px; height: 15px; }
.win-body { flex: 1; overflow: auto; padding: 22px 24px 40px; scroll-behavior: smooth; }
.win-body.fade { animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-1); white-space: nowrap; transition: transform .08s, background .15s, box-shadow .15s; }
.btn:hover { background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 6px 16px -6px rgba(242, 107, 29, .7), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.btn.busy { opacity: .7; pointer-events: none; }
.btn.busy span::after { content: '\2026'; }
.btn:disabled { opacity: .55; cursor: default; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.linkbtn { border: 0; background: none; padding: 2px 0; color: var(--accent); font-weight: 600; font-size: 12.5px; text-align: left; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- home ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--sub); font-size: 13px; margin-bottom: 6px; }
.crumbs b { color: var(--ink); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 4px 0 20px; }
.hero h1 { margin: 0; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.05; letter-spacing: -.03em; font-weight: 850; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 8px 0 0; color: var(--ink-2); max-width: 540px; font-size: 15px; }
.hero-search { display: flex; align-items: center; gap: 10px; height: 46px; width: min(380px, 100%); padding: 0 12px 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--shadow-1); color: var(--sub); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: 14.5px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; text-align: left; color: var(--ink); min-width: 0; }
button.card { font: inherit; display: block; width: 100%; }
.card.click { cursor: pointer; }
.card.click:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.card h3 { margin: 0; font-size: 17px; letter-spacing: -.015em; font-weight: 750; line-height: 1.2; }
.card p { margin: 6px 0 0; color: var(--sub); font-size: 13.5px; }
.card .num { position: absolute; top: 16px; right: 16px; font: 600 11px var(--mono); padding: 3px 7px; border-radius: 7px; background: var(--c-soft, var(--line)); color: var(--c, var(--sub)); }
.c-6 { grid-column: span 6; } .c-3 { grid-column: span 3; } .c-4 { grid-column: span 4; } .c-8 { grid-column: span 8; } .c-2 { grid-column: span 2; } .c-12 { grid-column: span 12; } .c-5 { grid-column: span 5; } .c-7 { grid-column: span 7; }
.feat { display: grid; grid-template-columns: 1fr; gap: 12px; }
.mini-slide { border-radius: 14px; padding: 16px 18px; background: linear-gradient(135deg, #FFF4EC, #FFE6D6); border: 1px solid #FBD3BB; color: #2A1A10; }
.mini-slide .tagrow { display: flex; gap: 6px; margin-bottom: 8px; }
.mini-slide b { display: block; font-size: 19px; line-height: 1.2; font-weight: 850; letter-spacing: -.02em; }
.mini-slide small { color: #9A6B4E; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650; background: var(--line); color: var(--ink-2); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.feat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mini-tier { display: grid; gap: 6px; margin-top: 12px; }
.mini-tier div { display: flex; gap: 5px; align-items: center; padding: 5px; border-radius: 9px; }
.mini-tier b { width: 24px; text-align: center; font-weight: 850; }
.mini-tier i { width: 22px; height: 18px; border-radius: 6px; background: rgba(255, 255, 255, .75); }
.mini-quad { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.mini-quad span { border-radius: 10px; padding: 10px 6px; font-size: 11.5px; font-weight: 650; text-align: center; line-height: 1.25; }
.dropcard { display: flex; flex-direction: column; gap: 10px; }
.dropzone { flex: 1; min-height: 90px; border: 1.5px dashed var(--line-2); border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--sub); text-align: center; padding: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.dropzone b { color: var(--ink); }
.small-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.small-card .tile { width: 40px; height: 40px; border-radius: 12px; }
.small-card .tile .ic { width: 21px; height: 21px; }
.small-card h3 { font-size: 14.5px; }
.small-card p { font-size: 12.5px; margin: 0; }
.small-card .go { color: var(--c); font-weight: 700; font-size: 12.5px; margin-top: auto; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.catbtn { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 600; font-size: 13px; text-align: left; }
.catbtn:hover { border-color: var(--line-2); background: var(--panel); }
.catbtn .cnt { margin-left: auto; font: 500 11px var(--mono); color: var(--sub); }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; }
.sec-title h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.sec-title a, .sec-title button { color: var(--sub); font-size: 13px; text-decoration: none; border: 0; background: none; }
.recent { display: flex; gap: 10px; flex-wrap: wrap; }
.recent .nav-i { width: auto; border: 1px solid var(--line); background: var(--panel); padding: 7px 12px 7px 8px; }

/* ---------- directory ---------- */
.dir-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dir-head h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.dir-head p { margin: 4px 0 0; color: var(--sub); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; font-size: 13px; }
.chip small { font: 500 11px var(--mono); color: var(--sub); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on small { color: inherit; opacity: .7; }
.dir-filter { display: flex; align-items: center; gap: 8px; height: 40px; width: min(320px, 100%); padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--sub); margin-bottom: 16px; }
.dir-filter input { flex: 1; border: 0; outline: 0; background: none; color: var(--ink); min-width: 0; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tcard { display: flex; flex-direction: column; gap: 8px; }
.tcard .top { display: flex; align-items: center; gap: 8px; }
.tcard .tile { width: 32px; height: 32px; border-radius: 10px; }
.tcard .tile .ic { width: 18px; height: 18px; }
.tcard .num { position: static; margin-left: auto; }
.tcard p { flex: 1; }
.tcard .btn { align-self: flex-start; margin-top: 6px; }
.tcard .btn.c { background: var(--c); color: #fff; border-color: transparent; }
.empty { padding: 50px 10px; text-align: center; color: var(--sub); }

/* ---------- privacy / prose ---------- */
.prose { max-width: 720px; }
.prose h1 { font-size: 32px; letter-spacing: -.03em; margin: 4px 0 12px; }
.prose h2 { font-size: 18px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.prose .callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--accent-soft); margin: 18px 0; }

/* ---------- tool layout ---------- */
.tool-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: nowrap; }
.tool-head > div:not(.tile) { min-width: 0; flex: 1; }
.tool-head .tile { flex: none; }
.tool-head .tile { width: 40px; height: 40px; border-radius: 12px; }
.tool-head .tile .ic { width: 22px; height: 22px; }
.tool-head h1 { margin: 0; font-size: 23px; letter-spacing: -.025em; line-height: 1.15; }
.tool-head p { margin: 2px 0 0; color: var(--sub); font-size: 13.5px; }
.tool-head .num { font: 600 12px var(--mono); color: var(--c); }
.tool-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.tool-grid.wide { grid-template-columns: 1fr; }
.ctrl { display: flex; flex-direction: column; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-1); }
.tool-grid.wide .ctrl { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: start; }
.stage { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tool-grid.wide .stage { position: static; order: -1; }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec + .sec { padding-top: 12px; border-top: 1px solid var(--line); }
.sec-h { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--sub); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.flabel { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.fval { color: var(--sub); font-size: 11.5px; }
.field input[type=text], .field input[type=number], .field input:not([type]), .field select, .field textarea, .color input[type=text] {
  width: 100%; border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 10px; padding: 8px 10px; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 36px; }
.field textarea { resize: vertical; line-height: 1.5; font-size: 13px; font-family: var(--sans); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: var(--focus); }
.field input[type=range] { accent-color: var(--accent); width: 100%; }
.field.check { flex-direction: row; align-items: center; gap: 9px; cursor: pointer; }
.field.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.field.check .flabel { font-weight: 550; }
.help { color: var(--sub); font-size: 11.5px; }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.color { display: flex; align-items: center; gap: 6px; }
.color input[type=color] { width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; background: var(--panel-2); flex: none; cursor: pointer; }
.color input[type=text] { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--line); border-radius: 11px; }
.seg button { flex: 1 1 auto; border: 0; background: none; border-radius: 8px; padding: 6px 9px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.fdrop { display: flex; align-items: center; gap: 10px; border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.fdrop:hover, .fdrop.over { border-color: var(--accent); background: var(--accent-soft); }
.fdrop-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--line); color: var(--ink-2); flex: none; }
.fdrop-t { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; }
.fdrop-t b { font-size: 13px; }
.fname { color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field.has .fdrop { border-style: solid; }
.note { margin: 0; color: var(--sub); font-size: 12.5px; line-height: 1.5; }
.note b { color: var(--ink-2); }
hr.div { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.cvbox { border-radius: 16px; border: 1px solid var(--line); padding: 14px; display: flex; justify-content: center; align-items: center; background: var(--panel); box-shadow: var(--shadow-1); overflow: hidden; }
.cvbox.checker { background-color: var(--panel); background-image: linear-gradient(45deg, var(--line) 25%, transparent 25%), linear-gradient(-45deg, var(--line) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--line) 75%), linear-gradient(-45deg, transparent 75%, var(--line) 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.cv { max-width: 100%; max-height: min(72vh, 900px); height: auto; border-radius: 6px; box-shadow: 0 6px 24px -8px rgba(0, 0, 0, .25); display: block; }
.cv.click { cursor: crosshair; }
.cv.grab { cursor: grab; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumbs figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.thumbs canvas, .thumbs img { width: 100%; height: auto; border-radius: 6px; display: block; cursor: pointer; }
.thumbs figcaption { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--sub); }
.out { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-1); min-width: 0; }
.out:empty { display: none; }
.status { display: none; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); font-weight: 600; font-size: 13px; }
.status.on { display: flex; }
.status .bar { flex: 1; height: 6px; border-radius: 9px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.status .bar i { display: block; height: 100%; background: var(--accent); transition: width .15s; }
.player { display: flex; align-items: center; gap: 10px; }
.player input[type=range] { flex: 1; accent-color: var(--accent); }
.player .t { font: 500 12px var(--mono); color: var(--sub); min-width: 90px; text-align: right; }
.post { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--panel-2); margin-bottom: 10px; }
.post .meta { display: flex; justify-content: space-between; gap: 8px; font: 500 11.5px var(--mono); color: var(--sub); margin-bottom: 6px; }
.post .meta .over { color: #EF4444; font-weight: 700; }
.post .txt { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.5; }
.post .acts { display: flex; gap: 6px; margin-top: 8px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.kv div { padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.kv b { display: block; font-size: 22px; letter-spacing: -.02em; }
.kv span { color: var(--sub); font-size: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--sub); }
mark.flag { background: rgba(239, 68, 68, .16); color: inherit; border-bottom: 2px solid #EF4444; border-radius: 3px; padding: 0 1px; }
mark.flag.w { background: rgba(245, 158, 11, .18); border-color: #F59E0B; }
.scan-text { white-space: pre-wrap; line-height: 1.7; font-size: 14.5px; }
.doc-frame { background: #fff; color: #17151C; border-radius: 12px; box-shadow: 0 8px 30px -10px rgba(0, 0, 0, .25); padding: 44px 48px; max-width: 820px; margin: 0 auto; width: 100%; }

/* ---------- dock ---------- */
.dock { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 35; display: flex; align-items: center; gap: 6px; padding: 8px; max-width: calc(100vw - 20px); overflow-x: auto; scrollbar-width: none;
  background: var(--glass); backdrop-filter: blur(28px) saturate(1.6); -webkit-backdrop-filter: blur(28px) saturate(1.6); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-2); }
body:not(.focus) .dock { margin-left: calc(var(--side) / 2 + 6px); }
.dock::-webkit-scrollbar { display: none; }
.dk { position: relative; width: 48px; height: 48px; border-radius: 14px; border: 0; display: grid; place-items: center; color: #fff; flex: none; transition: transform .18s cubic-bezier(.3, 1.6, .6, 1); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .12); }
.dk .ic { width: 24px; height: 24px; }
.dk:hover { transform: translateY(-6px) scale(1.12); }
.dk.out { background: var(--panel); color: var(--c); box-shadow: inset 0 0 0 1px var(--line-2); }
.dk.on::after { content: ''; position: absolute; bottom: -6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--ink); }
.dk-sep { width: 1px; height: 36px; background: var(--line-2); margin: 0 4px; flex: none; }
.dk[data-tip]:hover::before { content: attr(data-tip); position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 5px 9px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; pointer-events: none; }

/* ---------- palette ---------- */
.palette { position: fixed; inset: 0; z-index: 80; background: rgba(20, 14, 10, .28); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.pal-box { width: min(620px, 100%); background: var(--glass-strong); backdrop-filter: blur(30px); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow-3); overflow: hidden; animation: pop .16s ease; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); color: var(--sub); }
.pal-in input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); min-width: 0; }
.pal-list { max-height: 52vh; overflow: auto; padding: 6px; }
.pal-i { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 12px; }
.pal-i .tile { width: 30px; height: 30px; border-radius: 9px; }
.pal-i b { display: block; font-size: 14px; font-weight: 650; }
.pal-i small { display: block; color: var(--sub); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-i > span:nth-child(2) { flex: 1; min-width: 0; }
.pal-i .cat { font-size: 11px; color: var(--sub); white-space: nowrap; }
.pal-i.on { background: var(--accent-soft); }

/* ---------- drop veil + toasts ---------- */
.drop-veil { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: rgba(242, 107, 29, .14); backdrop-filter: blur(3px); pointer-events: none; }
.drop-veil.on { display: flex; }
.drop-veil > div { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 44px; border-radius: 24px; border: 2px dashed var(--accent); background: var(--glass-strong); }
.drop-veil .ic { width: 34px; height: 34px; color: var(--accent); }
.drop-veil small { color: var(--sub); }
.toasts { position: fixed; top: calc(var(--menubar) + 14px); right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 13px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13px; box-shadow: var(--shadow-2); animation: tin .25s ease; transition: opacity .4s, transform .4s; max-width: 340px; }
.toast .ic { width: 16px; height: 16px; color: var(--accent); }
.toast.err .ic { color: #FF6B6B; }
.toast.out { opacity: 0; transform: translateY(-6px); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* teleprompter */
.prompter { position: relative; height: min(64vh, 640px); overflow: hidden; border-radius: 18px; background: #0A0A0D; color: #fff; }
.prompter .roll { position: absolute; left: 50%; transform: translateX(-50%); top: 0; padding: 45% 0 60%; font-weight: 700; line-height: 1.35; text-align: center; white-space: pre-wrap; will-change: transform; }
.prompter .guide { position: absolute; left: 0; right: 0; top: 38%; height: 0; border-top: 2px solid rgba(242, 107, 29, .55); pointer-events: none; }
.prompter.mirror .roll { transform: translateX(-50%) scaleX(-1); }
.prompter:fullscreen { height: 100vh; border-radius: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .tool-grid { grid-template-columns: 1fr; }
  .stage { position: static; order: -1; }
  .c-6, .c-8, .c-7, .c-5 { grid-column: span 12; }
  .c-3 { grid-column: span 6; } .c-4 { grid-column: span 6; } .c-2 { grid-column: span 4; }
}
@media (max-width: 860px) {
  :root { --side: 280px; }
  .only-mobile { display: grid; }
  .hide-mobile { display: none; }
  .mb-nav { display: none; }
  .side { transform: translateX(calc(-100% - 20px)); transition: transform .25s ease; z-index: 60; }
  body.side-open .side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .25); }
  .win { left: 8px; right: 8px; top: calc(var(--menubar) + 8px); bottom: calc(var(--dock-h) + 10px); border-radius: 16px; }
  body:not(.focus) .dock { margin-left: 0; }
  .win-search { width: 40px; padding: 0; justify-content: center; }
  .win-search .ph, .win-search kbd { display: none; }
  .win-body { padding: 16px 16px 40px; }
  .win-bar { flex-wrap: wrap; }
  .win-actions { order: 5; width: 100%; justify-content: flex-start; margin-left: 0; }
  .c-3, .c-4 { grid-column: span 6; } .c-2 { grid-column: span 6; }
  .dk { width: 42px; height: 42px; border-radius: 12px; }
  .dk .ic { width: 21px; height: 21px; }
  .dock .dk.out, .dock .dk-sep { display: none; }
  .doc-frame { padding: 24px 20px; }
}
@media (max-width: 480px) {
  .c-3, .c-4, .c-2 { grid-column: span 12; }
  .clock { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
