@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

  /* Layout concept: a white workspace. Menu on the left (pinned, icons only, or hidden), a slim top bar, content as quiet cards.
     Colour is reserved for what needs action: one accent chosen by each user, plus soft status colours.
     Tokens first, everything else derives from them. */
  :root {
    --font-body: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic", Meiryo, Roboto, sans-serif;
    --font-display: "Space Grotesk", "Inter", "Noto Sans JP", system-ui, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
    --bg: #fbfbfa; --surface: #ffffff; --surface-2: #f6f6f4; --ink: #17181c; --ink-2: #4a4d57; --muted: #80838e;
    --line: #ececea; --line-2: #e0e0dd; --shadow: 0 1px 2px rgba(20,20,25,.04), 0 10px 30px -18px rgba(20,20,25,.18);
    --accent: #f26b3a; --accent-ink: #ffffff;
    --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--surface));
    --accent-mid: color-mix(in srgb, var(--accent) 22%, var(--surface));
    --accent-line: color-mix(in srgb, var(--accent) 30%, var(--surface));
    --accent-strong: color-mix(in srgb, var(--accent) 86%, #000);
    --accent2: #3c4350; --accent2-vis: var(--accent2); --accent2-soft: color-mix(in srgb, var(--accent2-vis) 13%, var(--surface));
    --ok: #2c9a69; --warn: #b9770e; --bad: #d4574a; --info: #4570d6;
    --ok-bg: color-mix(in srgb, var(--ok) 11%, var(--surface)); --warn-bg: color-mix(in srgb, var(--warn) 12%, var(--surface));
    --bad-bg: color-mix(in srgb, var(--bad) 10%, var(--surface)); --info-bg: color-mix(in srgb, var(--info) 10%, var(--surface));
    --r-card: 18px; --r-ctl: 11px; --fs: 14px; --pad: 20px; --row: 54px; --gap: 18px;
    --side-w: 248px; --rail-w: 68px;
    --ease: cubic-bezier(.22,.8,.26,1); --dur: .28s;
  }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --bg: #0f1013; --surface: #17181c; --surface-2: #1e2025; --ink: #f2f2f0; --ink-2: #c4c6cd; --muted: #8d909b;
    --line: #25272d; --line-2: #31343b; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -18px rgba(0,0,0,.7);
    --ok: #4cc08e; --warn: #e0a043; --bad: #ee7b6e; --info: #7b9bf0; --accent2-vis: color-mix(in srgb, var(--accent2) 45%, #ffffff); color-scheme: dark; } }
  :root[data-theme="dark"] {
    --bg: #0f1013; --surface: #17181c; --surface-2: #1e2025; --ink: #f2f2f0; --ink-2: #c4c6cd; --muted: #8d909b;
    --line: #25272d; --line-2: #31343b; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -18px rgba(0,0,0,.7);
    --ok: #4cc08e; --warn: #e0a043; --bad: #ee7b6e; --info: #7b9bf0; --accent2-vis: color-mix(in srgb, var(--accent2) 45%, #ffffff); color-scheme: dark; }
  :root[data-density="compact"] { --pad: 14px; --row: 40px; --gap: 12px; }
  :root[data-radius="sharp"] { --r-card: 7px; --r-ctl: 5px; }
  :root[data-radius="round"] { --r-card: 26px; --r-ctl: 16px; }
  :root[data-motion="reduced"] { --dur: .01s; }
  :root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }

  * { box-sizing: border-box; }
  html, body { height: 100%; margin: 0; }
  body { background: var(--bg); color: var(--ink); font: 400 var(--fs)/1.5 var(--font-body); -webkit-font-smoothing: antialiased; overflow: hidden; }
  button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
  input, select, textarea { font: inherit; color: inherit; }
  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
  .num { font-variant-numeric: tabular-nums; }
  .disp { font-family: var(--font-display); letter-spacing: -.02em; }
  svg.i { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

  /* ---------- shell ---------- */
  .app { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100%; transition: grid-template-columns var(--dur) var(--ease); }
  .app[data-menu="rail"] { grid-template-columns: var(--rail-w) 1fr; }
  .app[data-menu="hidden"] { grid-template-columns: 0 1fr; }
  .sidebar { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; overflow: hidden auto; z-index: 40; transition: transform var(--dur) var(--ease), box-shadow var(--dur); }
  .app[data-menu="hidden"] .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); transform: translateX(-102%); }
  .app[data-menu="hidden"].peek .sidebar { transform: none; box-shadow: 24px 0 60px -20px rgba(0,0,0,.25); }
  .edge { display: none; position: fixed; inset: 0 auto 0 0; width: 10px; z-index: 39; }
  .app[data-menu="hidden"] .edge { display: block; }
  .brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 8px; height: 64px; }
  .logo { width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: var(--surface); display: grid; place-items: center; font: 700 16px var(--font-display); flex: 0 0 34px; }
  .brand b { font: 600 15px var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
  .brand small { display: block; font: 400 11.5px var(--font-body); color: var(--muted); }
  .nav { padding: 8px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
  .nav h6 { margin: 16px 10px 6px; font: 600 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
  .nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: var(--r-ctl); color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
  .nav a:hover { background: var(--surface-2); color: var(--ink); }
  .nav a.on { background: var(--accent-soft); color: var(--accent-strong); }
  .nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
  .nav a .badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
  .nav a.on .badge, .nav a .badge.hot { background: var(--accent); color: var(--accent-ink); }
  .side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); }
  .me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-ctl); }
  .me:hover { background: var(--surface-2); }
  .me small { color: var(--muted); display: block; font-size: 12px; }
  .app[data-menu="rail"] .brand b, .app[data-menu="rail"] .brand small, .app[data-menu="rail"] .nav h6, .app[data-menu="rail"] .nav a span.t, .app[data-menu="rail"] .nav a .badge, .app[data-menu="rail"] .me > div { display: none; }
  .app[data-menu="rail"] .nav a { justify-content: center; padding: 0; }
  .app[data-menu="rail"] .nav a.on::before { left: -12px; }
  .app[data-menu="rail"] .brand { justify-content: center; padding: 18px 0 8px; }
  .app[data-menu="rail"] .me { justify-content: center; }
  .app[data-menu="rail"] .nav a:hover::after { content: attr(data-tip); position: fixed; left: calc(var(--rail-w) + 6px); background: var(--ink); color: var(--surface); padding: 5px 10px; border-radius: 8px; font-size: 12.5px; z-index: 80; pointer-events: none; }
  .hnav { display: none; align-items: center; gap: 4px; height: 46px; flex: 0 0 46px; padding: 0 22px; border-bottom: 1px solid var(--line); background: var(--surface); overflow-x: auto; scrollbar-width: none; }
  .app[data-menu="top"] .hnav { display: flex; } .app[data-menu="top"] { grid-template-columns: 0 1fr; } .app[data-menu="top"] .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); transform: translateX(-102%); } .app[data-menu="top"] #menuBtn { display: none; }
  .hnav a { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 99px; color: var(--ink-2); text-decoration: none; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
  .hnav a:hover { background: var(--surface-2); color: var(--ink); } .hnav a.on { background: var(--accent-soft); color: var(--accent-strong); }
  .hnav a .badge { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: 11px; display: grid; place-items: center; } .hnav a.on .badge, .hnav a .badge.hot { background: var(--accent); color: var(--accent-ink); }
  .hnav i { width: 1px; height: 18px; background: var(--line-2); margin: 0 6px; flex: 0 0 1px; }
  .gear { position: fixed; right: 0; top: 46%; width: 38px; height: 46px; border-radius: 14px 0 0 14px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; z-index: 30; box-shadow: -8px 10px 24px -10px var(--accent); transition: width .2s var(--ease); } .gear:hover { width: 48px; } .gear svg { animation: spin 14s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(10,10,14,.28); z-index: 35; opacity: 0; transition: opacity var(--dur); }

  .app > .main { grid-column: 2; }      /* always the second column: when the menu is hidden or on a phone the menu is fixed (out of the grid) and the page must not slide into the 0-width first column */
  .main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }      /* min-height 0: lets the page area scroll instead of growing past the window and being cut off */
  .top { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 28px; flex: 0 0 64px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .ibtn { width: 38px; height: 38px; border-radius: var(--r-ctl); display: grid; place-items: center; color: var(--ink-2); position: relative; transition: background .15s, color .15s, transform .15s; }
  .ibtn:hover { background: var(--surface-2); color: var(--ink); }
  .ibtn:active { transform: scale(.94); }
  .ibtn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
  .crumbs { color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .crumbs b { color: var(--ink); font-weight: 600; }
  .search { margin-left: auto; display: flex; align-items: center; gap: 10px; height: 38px; width: min(380px, 38vw); padding: 0 12px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--muted); transition: border-color .15s, box-shadow .15s; }
  .search:hover { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
  .search kbd, kbd { font: 600 11px var(--font-body); padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
  .search span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .view { flex: 1; min-height: 0; overflow: auto; padding: 28px 28px 24px; scroll-behavior: smooth; display: flex; flex-direction: column; }
  .pfoot { flex: none; width: 100%; max-width: 1480px; margin: 72px auto 0; padding: 22px 0 18px; border-top: 1px solid var(--line); display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
  .pfoot .sp { flex: 1; }
  .page { max-width: 1480px; margin: 0 auto; width: 100%; flex: 1 0 auto; }
  .page.enter > * { animation: rise .45s var(--ease) backwards; }
  .page.enter > *:nth-child(2) { animation-delay: .04s; } .page.enter > *:nth-child(3) { animation-delay: .08s; } .page.enter > *:nth-child(4) { animation-delay: .12s; } .page.enter > *:nth-child(5) { animation-delay: .16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }

  /* ---------- building blocks ---------- */
  .head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
  .head h1 { margin: 0; font: 600 28px/1.15 var(--font-display); letter-spacing: -.03em; }
  .head p { margin: 4px 0 0; color: var(--muted); }
  .head .sp { flex: 1; }
  .btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
  .btn:hover { background: var(--surface-2); }
  .btn:active { transform: translateY(1px) scale(.99); }
  .btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 18px -10px var(--accent); }
  .btn.pri:hover { background: var(--accent-strong); }
  .btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
  .btn.ghost { border-color: transparent; background: transparent; }
  .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--pad); box-shadow: var(--shadow); min-width: 0; }
  .card > h3, .card .ch h3 { margin: 0; font: 600 15px var(--font-display); letter-spacing: -.01em; }
  .ch { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
  .ch .sp { flex: 1; }
  .ch small { color: var(--muted); }
  .grid { display: grid; gap: var(--gap); }
  .pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
  .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .pill.act { background: var(--accent-soft); color: var(--accent-strong); }
  .pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
  .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--info); }
  .pill.live::before { animation: beat 2.2s ease-out infinite; }
  @keyframes beat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
  .chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
  .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 30px; background: var(--accent-soft); color: var(--accent-strong); }
  .av.a6 { background: var(--accent2-soft); color: var(--accent2-vis); } .av.a2 { background: var(--info-bg); color: var(--info); } .av.a3 { background: var(--ok-bg); color: var(--ok); } .av.a4 { background: var(--warn-bg); color: var(--warn); } .av.a5 { background: var(--bad-bg); color: var(--bad); }
  .thumb { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 38px; background: linear-gradient(135deg, var(--accent2-soft), var(--accent-soft)); color: var(--accent-strong); font: 700 14px var(--font-display); border: 1px solid var(--line); }
  .muted { color: var(--muted); } .right { text-align: right; } .row { display: flex; align-items: center; gap: 10px; } .sp { flex: 1; }
  .tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .tab { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: all .15s; }
  .tab:hover { border-color: var(--accent-line); }
  .tab.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
  .tab small { font-weight: 600; opacity: .65; }
  .tab.hot small { color: var(--accent); opacity: 1; } .tab.on.hot small { color: var(--surface); opacity: .8; }
  .field { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); }
  .field input { border: 0; outline: 0; background: transparent; width: 100%; min-width: 0; }
  .field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .tbl { overflow-x: auto; }
  table { width: 100%; border-collapse: separate; border-spacing: 0; }
  th { text-align: left; font: 600 11.5px var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 24px; height: 40px; white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; }
  td { padding: 12px 24px; height: var(--row); border-bottom: 1px solid var(--line); white-space: nowrap; transition: background .12s; }
  th:first-child, td:first-child { padding-left: var(--pad); } th:last-child, td:last-child { padding-right: var(--pad); }
  .pill + .pill { margin-left: 6px; } td.wrap { white-space: normal; min-width: 180px; }
  tbody tr { cursor: pointer; } tbody tr:hover td { background: var(--surface-2); } tbody tr.sel td { background: var(--accent-soft); }
  tbody tr:last-child td { border-bottom: 0; }
  th.center, td.center { text-align: center; } th.right, td.right { text-align: right; }
  table.etable td { padding-top: 8px; padding-bottom: 8px; vertical-align: middle; } table.etable tbody tr { cursor: default; } table.etable tbody tr:hover td { background: transparent; }
  table.etable td .in { width: 100%; min-width: 0; } table.etable tbody tr:last-child td { padding-bottom: 20px; } table.etable td.right .in { text-align: right; } table.etable td.center .switch { margin: 0 auto; display: block; }
  td.act-cell { opacity: 0; transition: opacity .15s; } tr:hover td.act-cell { opacity: 1; }
  input[type=checkbox] { appearance: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; vertical-align: middle; transition: all .15s; }
  input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
  input[type=checkbox]:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
  /* ON/OFF switch (class "switch", also every .ctoggle). Whole-pixel sizes only (52 x 28, 1px border, knob 20, 3px clear around it) so the curves
     stay crisp at every zoom level. OFF = neutral (white track, grey border, grey word, knob left). ON = the user's accent colour, knob right.
     The word sits in the free half, centred on the capital letters (text-box trim), not on the font's line box. English ON/OFF in every language. */
  input[type=checkbox].switch, .ctoggle input[type=checkbox] { --sw-w: 52px; --sw-h: 28px; --sw-knob: 20px; --sw-pad: 3px;
    position: relative; flex: none; display: inline-block; box-sizing: border-box; width: var(--sw-w); height: var(--sw-h); margin: 0; padding: 0;
    border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); box-shadow: none; cursor: pointer; vertical-align: middle;
    transition: background-color .18s, border-color .18s; -webkit-appearance: none; appearance: none; }
  input[type=checkbox].switch:hover, .ctoggle input[type=checkbox]:hover { border-color: var(--muted); }
  input[type=checkbox].switch::before, .ctoggle input[type=checkbox]::before { content: ""; position: absolute; top: var(--sw-pad); left: var(--sw-pad); width: var(--sw-knob); height: var(--sw-knob);
    box-sizing: border-box; border-radius: 10px; background: var(--muted); box-shadow: none; transition: left .18s, background-color .18s; }
  input[type=checkbox].switch::after, .ctoggle input[type=checkbox]::after { content: "OFF"; position: absolute; top: 0; bottom: 0; left: 26px; right: 2px; display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; width: auto; height: auto; border: 0; transform: none; font: 700 9px/1 var(--font-body); letter-spacing: .04em; color: var(--muted);
    text-box: trim-both cap alphabetic; }
  input[type=checkbox].switch:checked, .ctoggle input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
  input[type=checkbox].switch:checked::before, .ctoggle input[type=checkbox]:checked::before { left: calc(var(--sw-w) - 2px - var(--sw-pad) - var(--sw-knob)); background: var(--accent-ink); box-shadow: 0 1px 2px rgba(0,0,0,.18); }
  input[type=checkbox].switch:checked::after, .ctoggle input[type=checkbox]:checked::after { content: "ON"; left: 2px; right: 26px; color: var(--accent-ink); }
  input[type=checkbox].switch:disabled, .ctoggle input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
  input[type=checkbox].switch:focus-visible, .ctoggle input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .bulk { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 90px); display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; background: var(--ink); color: var(--surface); border-radius: 99px; box-shadow: 0 20px 50px -14px rgba(0,0,0,.5); transition: transform .35s var(--ease); z-index: 30; }
  .bulk.show { transform: translate(-50%, 0); } .bulk .btn { background: transparent; color: inherit; border-color: color-mix(in srgb, var(--surface) 30%, transparent); }
  .bulk .btn.pri { background: var(--accent); border-color: var(--accent); }
  .drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -30px 0 60px -30px rgba(0,0,0,.25); transform: translateX(104%); transition: transform .38s var(--ease); z-index: 60; display: flex; flex-direction: column; }
  .drawer.open { transform: none; } .drawer .dh { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); } .drawer .db { padding: 20px; overflow: auto; flex: 1; } .drawer .df { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
  .kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
  .stepper { display: flex; gap: 0; margin: 4px 0 4px; }
  .step { flex: 1; position: relative; text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 500; }
  .step i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 8px; background: var(--surface-2); border: 2px solid var(--line-2); position: relative; z-index: 1; font-style: normal; font-size: 12px; font-weight: 700; transition: all .4s var(--ease); }
  .step::before { content: ""; position: absolute; top: 12px; left: -50%; right: 50%; height: 2px; background: var(--line-2); } .step:first-child::before { display: none; }
  .step.done i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .step.done::before, .step.cur::before { background: var(--accent); }
  .step.cur i { background: var(--surface); border-color: var(--accent); color: var(--accent-strong); box-shadow: 0 0 0 5px var(--accent-soft); } .step.cur, .step.done { color: var(--ink); }
  .tl { list-style: none; margin: 0; padding: 0; } .tl li { position: relative; padding: 0 0 18px 24px; } .tl li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent2-vis); } .tl li::after { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 1px; background: var(--line-2); } .tl li:last-child::after { display: none; } .tl small { color: var(--muted); display: block; }
  .bar-h { height: 8px; border-radius: 9px; background: var(--surface-2); overflow: hidden; } .bar-h i { display: block; height: 100%; background: var(--accent2-vis); border-radius: 9px; transition: width .8s var(--ease); }
  .dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; } .dots div { display: grid; gap: 5px; justify-items: center; } .dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); transition: background .4s, transform .4s var(--ease); } .dots span.f { background: var(--accent2-vis); } .dots div.today span.f { background: var(--accent); opacity: 1; } .dots small { color: var(--muted); font-size: 11.5px; margin-top: 4px; } .dots div.today small { color: var(--accent-strong); font-weight: 700; }
  .hatch { fill: url(#hatchp); } .hatch-on { fill: var(--accent); }
  .toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 100; } .toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ink); color: var(--surface); border-radius: 14px; box-shadow: 0 18px 40px -14px rgba(0,0,0,.5); animation: rise .35s var(--ease); max-width: 360px; } .toast .ic { color: var(--accent); }
  .overlay { position: fixed; inset: 0; background: rgba(10,10,14,.35); display: none; z-index: 90; align-items: flex-start; justify-content: center; padding-top: 12vh; opacity: 0; transition: opacity .2s; } .overlay.show { display: flex; opacity: 1; }
  .pal { width: min(620px, 94vw); background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.5); overflow: hidden; animation: pop .25s var(--ease); } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
  .pal input { width: 100%; height: 56px; padding: 0 22px; border: 0; outline: 0; background: transparent; font-size: 16px; border-bottom: 1px solid var(--line); }
  .pal ul { list-style: none; margin: 0; padding: 8px; max-height: 360px; overflow: auto; } .pal li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; } .pal li.on { background: var(--accent-soft); color: var(--accent-strong); } .pal li small { margin-left: auto; color: var(--muted); } .pal .hint { padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; display: flex; gap: 14px; }
  .panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); background: var(--surface); border-left: 1px solid var(--line); z-index: 95; transform: translateX(104%); transition: transform .4s var(--ease); display: flex; flex-direction: column; box-shadow: -30px 0 70px -30px rgba(0,0,0,.35); } .panel.open { transform: none; }
  .panel .pb { padding: 6px 22px 24px; overflow: auto; flex: 1; } .panel h4 { margin: 22px 0 10px; font: 600 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .pairs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .pair { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); font-weight: 600; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; } .pair:hover { transform: translateY(-1px); } .pair.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } .pair i { width: 18px; height: 18px; border-radius: 50%; display: inline-block; border: 2px solid var(--surface); } .pair i + i { margin-left: -14px; } .pair span { margin-left: 4px; font-size: 13px; }
  .sw { display: flex; flex-wrap: wrap; gap: 10px; } .sw button { width: 34px; height: 34px; border-radius: 50%; background: var(--c); position: relative; transition: transform .2s var(--ease); } .sw button:hover { transform: scale(1.12); } .sw button.on::after { content: ""; position: absolute; inset: -5px; border: 2px solid var(--c); border-radius: 50%; }
  .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 13px; } .seg button { height: 34px; border-radius: 10px; font-weight: 600; color: var(--ink-2); transition: all .2s; } .seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
  .menu-pop { position: absolute; top: 46px; right: 0; width: 220px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); display: none; z-index: 50; } .menu-pop.show { display: block; animation: pop .2s var(--ease); } .menu-pop button { width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; display: flex; gap: 10px; align-items: center; } .menu-pop button:hover { background: var(--surface-2); }
  .scan { position: relative; display: flex; align-items: center; gap: 16px; padding: 22px 26px; border-radius: var(--r-card); background: var(--surface); border: 1.5px solid var(--accent-line); box-shadow: 0 0 0 6px var(--accent-soft); } .scan .ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); position: relative; flex: 0 0 54px; } .scan .ring::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ping 2.4s ease-out infinite; } @keyframes ping { 0% { opacity: .6; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.35); } }
  .scan input { border: 0; outline: 0; background: transparent; font: 600 26px var(--font-display); letter-spacing: -.02em; width: 100%; min-width: 0; }
  .match { animation: pop .4s var(--ease); }
  .ok-burst { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); animation: pop .5s var(--ease); }
  .big { font: 600 34px/1.1 var(--font-display); letter-spacing: -.03em; } .big small { font: 500 14px var(--font-body); color: var(--muted); letter-spacing: 0; }
  .delta { font-size: 12.5px; font-weight: 600; color: var(--ok); } .delta.dn { color: var(--bad); }
  .q { display: flex; flex-direction: column; gap: 6px; text-align: left; transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; } .q:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: 0 18px 36px -22px var(--accent); }
  .q .big { color: var(--ink); } .q.hot .big { color: var(--accent-strong); }
  .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } .split-r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); align-items: start; }
  .stat { display: flex; flex-direction: column; gap: 6px; } .stat .big { margin: 2px 0; } .stat small, .stat .muted { line-height: 1.4; }
  .cell-note { margin-top: 6px; }

  /* user menu, help guide, assistant */
  .me { width: 100%; text-align: left; transition: background .15s; } .me:hover { background: var(--surface-2); } .me .chev { margin-left: auto; color: var(--muted); width: 16px; height: 16px; flex: 0 0 16px; }
  .app[data-menu="rail"] .me .chev { display: none; }
  .menu-pop.up { top: auto; bottom: calc(100% + 6px); left: 12px; right: auto; width: 232px; }
  .app[data-menu="rail"] .menu-pop.up { position: fixed; left: calc(var(--rail-w) + 8px); bottom: 14px; }
  .menu-pop .mm-h { font: 600 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 4px; } .menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
  .menu-pop button[data-lang] { justify-content: space-between; } .menu-pop button.on { color: var(--accent-strong); font-weight: 600; } .menu-pop button .i { width: 18px; height: 18px; }
  .help-grid { grid-template-columns: 270px minmax(0, 1fr) 360px; align-items: start; gap: var(--gap); }
  html:not([data-w="lg"]) .help-grid { grid-template-columns: minmax(0, 1fr); }
  .help-list h6 { margin: 18px 6px 8px; font: 600 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); } .help-list h6:first-child { margin-top: 4px; }
  .hitem { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; line-height: 1.35; color: var(--ink-2); transition: background .15s, color .15s; } .hitem:hover { background: var(--surface-2); color: var(--ink); } .hitem.on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
  .help-note { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 12.5px; line-height: 1.5; }
  .help-article { padding: 28px 32px 30px; min-height: 420px; } .art-h { margin: 0 0 12px; font: 600 26px/1.2 var(--font-display); letter-spacing: -.02em; } .lead { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 8px; }
  .help-article h4 { margin: 26px 0 10px; font: 600 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); } .help-article p { line-height: 1.65; margin: 0; }
  .steps-l { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; } .steps-l li { counter-increment: s; position: relative; padding-left: 40px; line-height: 1.6; } .steps-l li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font: 600 13px/26px var(--font-body); text-align: center; }
  .art-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; } .art-foot .chip { margin-left: 4px; }
  .help-chat { display: flex; flex-direction: column; gap: 16px; } .msgs { display: flex; flex-direction: column; gap: 12px; max-height: 360px; min-height: 120px; overflow: auto; padding: 2px; }
  .msg { padding: 11px 15px; border-radius: 16px; max-width: 94%; line-height: 1.55; animation: pop .25s var(--ease); } .msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; } .msg.ai { background: var(--surface-2); border-bottom-left-radius: 6px; }
  .msg .src { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; } .chip-btn { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; line-height: 1.3; text-align: left; transition: border-color .15s, background .15s; } .chip-btn:hover { border-color: var(--accent-line); background: var(--accent-soft); }
  .ask { display: flex; gap: 10px; align-items: center; } .ask input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); outline: none; } .ask input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .dots3 { display: inline-flex; gap: 5px; padding: 4px 2px; } .dots3 i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bob 1s infinite ease-in-out; } .dots3 i:nth-child(2) { animation-delay: .15s; } .dots3 i:nth-child(3) { animation-delay: .3s; } @keyframes bob { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
  .split.wide { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); } table.dense th, table.dense td { padding-left: 14px; padding-right: 14px; } table.dense th:first-child, table.dense td:first-child { padding-left: var(--pad); } table.dense th:last-child, table.dense td:last-child { padding-right: var(--pad); }
  .numpop { animation: numpop .55s var(--ease) backwards; } @keyframes numpop { from { opacity: .35; transform: translateY(8px) scale(.96); } }
  .sticker { display: inline-flex; padding: 4px 10px; border-radius: 99px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 12px; }
  .empty { text-align: center; padding: 70px 20px; color: var(--muted); } .empty .big { color: var(--ink); margin-bottom: 8px; }

  /*bp*/
    html:not([data-w="lg"]) .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html:not([data-w="lg"]) .split, html:not([data-w="lg"]) .split-r, html:not([data-w="lg"]) .split.wide { grid-template-columns: minmax(0, 1fr); }
    html:not([data-w="lg"]) .cols-3 { grid-template-columns: minmax(0, 1fr); } 
  @media (max-width: 860px) { html { zoom: 1 !important; } }
  /*bp*/
    html[data-w="sm"] .hide-s { display: none; }
    html[data-w="sm"] .hnav, html[data-w="sm"] .app[data-menu="top"] .hnav { display: none; }
    html[data-w="sm"] .app[data-menu="top"] #menuBtn { display: grid; }
    html[data-w="sm"] .gear { top: auto; bottom: 90px; }
    html[data-w="sm"] .app, html[data-w="sm"] .app[data-menu="rail"], html[data-w="sm"] .app[data-menu="hidden"] { grid-template-columns: 0 1fr; }
    html[data-w="sm"] .sidebar { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-102%); }
    html[data-w="sm"] .app.peek .sidebar { transform: none; box-shadow: 24px 0 60px -20px rgba(0,0,0,.35); }
    html[data-w="sm"] .app.peek .scrim { display: block; opacity: 1; }
    html[data-w="sm"] .app[data-menu="rail"] .brand b, html[data-w="sm"] .app[data-menu="rail"] .brand small, html[data-w="sm"] .app[data-menu="rail"] .nav h6, html[data-w="sm"] .app[data-menu="rail"] .nav a span.t, html[data-w="sm"] .app[data-menu="rail"] .nav a .badge, html[data-w="sm"] .app[data-menu="rail"] .me > div { display: revert; }
    html[data-w="sm"] .app[data-menu="rail"] .nav a { justify-content: flex-start; padding: 0 10px; }
    html[data-w="sm"] .top { padding: 0 14px; }
    html[data-w="sm"] .view { padding: 18px 14px 24px; }
    html[data-w="sm"] .search { width: auto; }
    html[data-w="sm"] .search span, html[data-w="sm"] .search kbd { display: none; }
    html[data-w="sm"] .search { width: 38px; padding: 0; justify-content: center; border-radius: var(--r-ctl); }
    html[data-w="sm"] .head h1 { font-size: 23px; }
    html[data-w="sm"] .cols-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    html[data-w="sm"] .kv { grid-template-columns: 1fr; gap: 2px; }
    html[data-w="sm"] .kv dd { margin-bottom: 8px; }
    html[data-w="sm"] .crumbs { display: none; }
    html[data-w="sm"] .scan input { font-size: 20px; }
  
/* ---- additions for the real (not prototype) page ---- */
.logo.img { background: none; border-radius: 0; padding: 0; } .logo.img img { width: 34px; height: 34px; display: block; }
.auth { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; padding: 24px; overflow: auto; z-index: 200; }
.auth[hidden] { display: none; } .auth .card { width: min(440px, 100%); padding: 32px; } .auth .wordmark { height: 30px; display: block; margin: 0 0 26px; }
.auth h1 { margin: 0 0 6px; font: 600 26px/1.15 var(--font-display); letter-spacing: -.03em; } .auth p { margin: 0 0 18px; color: var(--ink-2); }
.l { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 13px; }
.in { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); outline: none; }
textarea.in { height: 92px; padding: 10px 12px; resize: vertical; } .in:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.msg { margin: 16px 0 0; padding: 11px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; } .msg.err { background: var(--bad-bg); color: var(--bad); } .msg.ok { background: var(--ok-bg); color: var(--ok); } .msg.info { background: var(--info-bg); color: var(--info); } .msg.warn { background: var(--warn-bg); color: var(--warn); }
.btn.wide { width: 100%; height: 42px; } .btn[disabled] { opacity: .55; cursor: default; } .link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; }
.sep { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 22px 0; font-size: 12px; } .sep::before, .sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.card.flush { padding: 0; } .pills { display: flex; flex-wrap: wrap; gap: 8px; } .small { font-size: 12.5px; }
.stack > * + * { margin-top: 12px; } .block { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); } .block h3 { margin: 0 0 14px; font: 600 15px var(--font-display); }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } .checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; } .check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.note { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; line-height: 1.5; } .note b { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: block; margin-bottom: 4px; }
.list { list-style: none; margin: 0; padding: 0; } .list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); } .list li:last-child { border-bottom: 0; }
.drawer .db .block:first-child { margin-top: 0; padding-top: 0; border-top: 0; } .drawer { width: min(520px, 100vw); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; } .bars i { flex: 1; min-width: 3px; background: var(--accent); opacity: .75; border-radius: 2px; }
.crumbs { white-space: nowrap; } .hide { display: none !important; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; } td.wrap .pills { min-width: 150px; }
@media (max-width: 860px) { .g2, .checks { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }

.brand .rail-only { display: none; } .brand .wm > img, .brand .wm > .doko-logo { height: 22px; display: block; margin-bottom: 3px; }
.app[data-menu="rail"] .brand .rail-only { display: block; } .app[data-menu="rail"] .brand .wm { display: none; }
@media (max-width: 860px) { html[data-w="sm"] .app[data-menu="rail"] .brand .wm { display: block; } html[data-w="sm"] .app[data-menu="rail"] .brand .rail-only { display: none; } }

/* Design rule: number fields never show the little up/down arrows (and the mouse wheel never changes them) */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.auth .wordmark-text { font-weight: 700; font-size: 22px; letter-spacing: -.01em; margin: 0 0 26px; }

/* ---------- shop content screens ---------- */
.ctabs { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; }
.ctab { height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2, inherit); font: 500 13px var(--font-body, inherit); cursor: pointer; }
.ctab.on { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.cfields { display: grid; gap: 14px; }
.cfield { display: grid; gap: 6px; align-content: start; }
.cfield textarea.in { min-height: 90px; line-height: 1.5; padding-top: 10px; resize: vertical; }
.cfield textarea.in.cbody { min-height: 340px; font: 14px/1.55 var(--font-mono, ui-monospace, monospace); }
.cpic { display: block; max-width: 100%; max-height: 190px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); object-fit: contain; }
.clist { display: grid; gap: 16px; margin-bottom: 28px; }
.citem, .cadd, .cgroup { display: grid; gap: 14px; }
.cadd { margin-bottom: 22px; }
.cadd h3 { margin: 0; }
.cgrid { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 24px; align-items: start; }
.crow { align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.ctoggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.csub { font: 600 15px var(--font-display, inherit); margin: 26px 0 12px; }
.ctiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 4px 0 16px; }
.ctile { display: grid; gap: 14px; align-content: start; }
.save-status { font-size: 12.5px; color: var(--muted, #6b7280); min-width: 70px; }
.save-status.ok { color: var(--ok); } .save-status.err, .err-text { color: var(--bad); }
.btn.danger { color: var(--bad); }
.drawer.wide { width: min(760px, 100vw); }
.drawer .dbody { padding: 18px 22px 28px; display: grid; gap: 16px; align-content: start; overflow-y: auto; }
@media (max-width: 760px) { .cgrid { grid-template-columns: 1fr; } }

.cdetails > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.ckids { display: grid; gap: 14px; margin-top: 12px; }
.ckid { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }

/* customers and fee tiers */
.krow { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.krow .kval { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.dsec { margin: 28px 0 8px; font: 600 14px var(--font-display, inherit); }
.drawer .db > :last-child { margin-bottom: 36px; }

/* quiet scrollbars: scrolling is done with the mouse wheel; bars are thin and only appear while hovering */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
*:hover { scrollbar-color: color-mix(in srgb, var(--muted, #888) 45%, transparent) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
*:hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted, #888) 40%, transparent); }
::-webkit-scrollbar-corner, ::-webkit-scrollbar-button { display: none; }
#nav, .nav, #sidebar, .sidebar { scrollbar-width: none; } #nav::-webkit-scrollbar, .nav::-webkit-scrollbar, .sidebar::-webkit-scrollbar { display: none; }

/* compact content tables, pop-ups, pagers */
.ctable td, .ctable th { vertical-align: middle; }
.ctable .num-col { width: 44px; } .ctable code { font-size: 12.5px; color: var(--muted); }
.nowrap { white-space: nowrap; } .right { text-align: right; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.trunc.w-q { max-width: 380px; } .trunc.w-a { max-width: 420px; } .trunc.w-url { max-width: 300px; } .trunc.w-name { max-width: 420px; } .trunc.w-parent { max-width: 240px; } .trunc.indent { padding-left: 18px; }
.cthumb { display: block; height: 40px; width: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); } .cthumb.wide { width: 96px; height: 44px; }
.mv { width: 28px; height: 28px; margin-left: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink, inherit); cursor: pointer; font-size: 14px; line-height: 1; } .mv:disabled { opacity: .3; cursor: default; } .mv:hover:not(:disabled) { background: var(--surface-2); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px var(--pad) 12px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px var(--pad) 18px; }
.lang-dot { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 4px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.lang-dot.ok { background: var(--accent-soft); color: var(--accent-strong); } .lang-dot.no { background: transparent; color: var(--muted); border: 1px dashed var(--line-2, var(--line)); }
.ghead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 2px 10px; } .cgroupbox { margin-bottom: 26px; }
.cgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } @media (max-width: 760px) { .cgrid2 { grid-template-columns: 1fr; } }
.mdl-ov { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(8, 10, 14, .5); }
.mdl { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); color: var(--ink, inherit); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); } .mdl.wide { width: min(760px, 100%); }
.mdl-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 16px; }
.mdl-b { padding: 20px 22px 22px; overflow-y: auto; } .mdl-stack { display: grid; gap: 18px; }
.mdl-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 4px; }

.ctable.fixed { table-layout: fixed; width: 100%; } .ctable.fixed td, .ctable.fixed th { overflow: hidden; text-overflow: ellipsis; }

/* orders: item pictures (our own copies) */
.othumbs { display: flex; align-items: center; flex: none; }
.othumbs img, .othumbs .noimg { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); box-shadow: 0 0 0 2px var(--surface); }
.othumbs > * + * { margin-left: -14px; }
.othumbs .more { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ithumb { width: 64px; height: 64px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; display: block; }
.ithumb.sm { width: 36px; height: 36px; border-radius: 7px; }
.noimg { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface-2) !important; }
.noimg .i { width: 18px; height: 18px; }
.ellip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
td .ellip { max-width: 340px; }

/* items page */
.selbar { gap: 12px; flex-wrap: wrap; padding: 12px var(--pad); background: var(--accent-soft); border-top: 1px solid var(--accent-line); border-bottom: 1px solid var(--accent-line); }
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 16px; align-items: end; }
.igrid .cfield:has(textarea) { grid-column: 1 / -1; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pcell { display: flex; flex-direction: column; gap: 6px; }
.pcell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); display: block; }

/* Roles and access */
.acc-tabs { max-width: 360px; margin: 0 0 20px; } .acc-sum { min-width: 260px; } .chip.part { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); } .chip i { font-style: normal; font-weight: 500; margin-left: 6px; color: var(--muted); }
.acc-mods { margin-top: 4px; } .acc-mod { padding: 24px 0; border-top: 1px solid var(--line); } .acc-mod:first-child { border-top: 0; padding-top: 8px; }
.acc-mh { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; } .acc-mh b { font: 600 15px var(--font-display, inherit); } .acc-mh .muted { margin-top: 4px; max-width: 46ch; }
.acc-act { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0 0 18px; } .acc-act .t { min-width: 0; } .acc-act .t b { font-weight: 600; font-size: 14px; }
.acc-act .t .muted { display: block; margin-top: 4px; font-size: 12.5px; max-width: 52ch; } .acc-act .ctoggle { flex: none; }
.acc-pg + .acc-pg { margin-top: 14px; } .acc-pg .pills { margin-top: 6px; } .acc-foot { margin-bottom: 8px; } .drawer .acc-foot .btn { min-height: 38px; }
.acc-note { padding: 16px var(--pad) 14px; } .acc-cmp th.acc-role { text-align: center; white-space: normal; min-width: 112px; padding: 10px 14px; line-height: 1.3; text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.acc-cmp .acc-first { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 250px; white-space: normal; } .acc-cmp thead .acc-first { background: var(--surface-2, var(--surface)); z-index: 2; }
.acc-cmp tr.acc-modrow td { background: var(--surface-2); font: 600 13px var(--font-display, inherit); height: 42px; padding-top: 0; padding-bottom: 0; } .acc-cmp tr.acc-modrow .acc-first { background: var(--surface-2); }
.acc-cmp td.acc-cell { text-align: center; } .acc-cmp tbody tr { cursor: default; } .acc-yes { display: inline-flex; color: var(--ok); } .acc-yes svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .acc-act { padding-left: 0; } .acc-mh .muted, .acc-act .t .muted { max-width: none; } .acc-cmp .acc-first { min-width: 190px; } }
.acc-sum-m { display: none; margin-top: 12px; } @media (max-width: 860px) { .acc-hide-m { display: none; } .acc-sum-m { display: flex; } }

/* compact forms: a 12-column grid, each field says how many columns it takes (--s); short help sits behind a "?" next to the label */
.fgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.fgrid > * { grid-column: span var(--s, 12); min-width: 0; }
.cfield .l { display: inline-flex; align-items: center; gap: 6px; }
.tip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--muted); font: 600 10px/1 var(--font-body); cursor: help; flex: none; }
.tip:hover, .tip:focus { color: var(--ink); border-color: var(--muted); outline: none; }
.fnote { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.fsec { font-weight: 600; font-size: 12px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 4px 0 -4px; }
@media (max-width: 760px) { .fgrid > * { grid-column: span 12; } .fgrid > .half-m { grid-column: span 6; } }

/* Roles > Compare: a filled tick in the user's accent colour (easy to scan), a clear grey dash for "no" */
.acc-cmp .acc-yes { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); }
.acc-cmp .acc-yes svg { width: 15px; height: 15px; stroke-width: 2.6; }
.acc-cmp .acc-cell .muted { display: inline-block; width: 12px; height: 2px; border-radius: 1px; background: var(--line-2); font-size: 0; vertical-align: middle; }
/* switches that are on but locked (e.g. a module set to Full access): keep the colour readable, just softer */
input[type=checkbox].switch:checked:disabled, .ctoggle input[type=checkbox]:checked:disabled { opacity: 1; background: color-mix(in srgb, var(--accent) 60%, var(--surface)); border-color: transparent; }
input[type=checkbox].switch:checked:disabled::after, .ctoggle input[type=checkbox]:checked:disabled::after { color: var(--accent-ink); }
input[type=checkbox].switch:checked:disabled::before, .ctoggle input[type=checkbox]:checked:disabled::before { background: var(--surface); }

/* Roles editor: every switch in one column at the right edge; a module's "Full access" word sits to the LEFT of its switch */
.acc-mh .acc-full { flex-direction: row-reverse; flex: none; gap: 10px; }
.acc-mh .acc-full .muted { margin-top: 0; }
.acc-act { align-items: center; }

/* the orders list: the picture stack always takes the same width, so order numbers line up whether an order has 1 item or 5 */
.othumbs { width: 122px; }
/* slim checkbox column */
th.cb, td.cb { width: 1%; padding-right: 4px !important; }
/* folded filters */
.fpanel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 12px var(--pad) 14px; border-top: 1px dashed var(--line); background: var(--surface-2); }
.fpanel[hidden] { display: none; }
.fgroup { display: inline-flex; align-items: center; gap: 8px; }
.flabel { font-size: 12px; color: var(--muted); }
.in.sm { height: 32px; padding: 0 10px; font-size: 13px; width: auto; }
.fcount { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; margin-left: 2px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
input[type=date].in:invalid { color: var(--muted); }
input[type=date].in::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }

/* ---------- warehouse scanner (Receive parcels): one compact scan bar with a small live icon ---------- */
.wh { max-width: 720px; }
.wh .scan { padding: 10px 10px 10px 12px; gap: 12px; box-shadow: 0 0 0 4px var(--accent-soft); }
.wh .scan .ring { width: 40px; height: 40px; flex: 0 0 40px; }
.wh .scan .ring svg { width: 20px; height: 20px; }
.wh .scan input { font: 600 19px var(--font-display); letter-spacing: 0; padding: 6px 0; color: var(--ink); }
.wh .scan input::placeholder { font: 400 15px var(--font-body); color: var(--muted); }
.wh .scan.busy .ring::after { animation-duration: .9s; }
.scan-btn { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--accent); color: var(--accent-ink); }
.scan-btn svg { width: 19px; height: 19px; }
.wh-cam { width: 100%; height: 52px; margin-top: 12px; justify-content: center; font-size: 16px; gap: 10px; }
.scan-cam { position: relative; margin-top: 12px; height: min(62vw, 340px); border-radius: 14px; overflow: hidden; background: #000; }
.scan-cam video { width: 100%; height: 100%; object-fit: cover; }
.scan-cam::after { content: ""; position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.scan-hint { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); text-align: center; }
.scan-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.wh-res { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.wh-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; box-shadow: var(--shadow); }
.wh-head { display: flex; gap: 14px; align-items: flex-start; }
.wh-pic { flex: 0 0 132px; width: 132px; height: 132px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.wh-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wh-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.wh-ref { font-size: 15px; }
.wh-title { font-size: 14px; line-height: 1.4; word-break: break-word; color: var(--ink); }
.wh-note { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.wh-form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.wh-f { grid-column: span 2; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wh-f.w2 { grid-column: span 3; }
.wh-f.w6 { grid-column: span 6; }
.wh-f .l { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.wh-f .in { height: 48px; font-size: 17px; padding: 0 12px; }
.wh-photos { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.wh-big { height: 48px; padding: 0 18px; font-size: 15px; gap: 8px; }
.wh-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.wh-thumbs:empty { display: none; }
.wh-thumb { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.wh-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wh-thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.wh-thumb button svg { width: 14px; height: 14px; }
.wh-go { width: 100%; height: 54px; margin-top: 16px; font-size: 17px; justify-content: center; }
.wh-recent { margin-top: 22px; padding-bottom: 20px; }
.wh-recent h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px 2px; }
.wh-row { display: flex; gap: 10px; align-items: center; padding: 9px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; font-size: 13px; }
.wh-row .ok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
@media (max-width: 640px) {
  .wh-card { padding: 14px; }
  .wh-head { flex-direction: column; }
  .wh-pic { flex: none; width: 100%; height: min(56vw, 240px); }
  .wh-title { font-size: 15px; }
  .wh-f .in { height: 54px; font-size: 19px; }
  .wh-f .l { font-size: 13px; }
  .wh-photos .wh-big { flex: 1; height: 52px; }
  .wh-go { height: 58px; font-size: 18px; }
  .wh .scan input { font-size: 17px; }
}

/* History lists in drawers (orders, items, shipments, requests): fixed date column, wrapping text, who did it underneath */
.hist { border-top: 1px solid var(--line); }
.hist-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist-at { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-t { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hist-by { margin-top: 2px; font-size: 12.5px; color: var(--muted); }

/* Dokolink logo: light or dark version follows the theme */
.doko-logo { display: inline-block; line-height: 0; } .doko-logo img { height: 100%; width: auto; max-width: 100%; } .doko-logo .dl-dark { display: none; }
:root[data-theme="dark"] .doko-logo .dl-light { display: none; } :root[data-theme="dark"] .doko-logo .dl-dark { display: inline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .doko-logo .dl-light { display: none; } :root:not([data-theme="light"]) .doko-logo .dl-dark { display: inline; } }
