:root {
      --bg:#161922;
      --header:#16161a;
      --surface:#1a1c1f;
      --surface2:#25252b;
      --line:#2c3038;
      --text:#e1e3e5;
      --muted:#8b8f97;
      --dim:#757575;
      --acc:#f8cf03;
      --acc-text:#1a1a12;
      --cta:#ff8c00;
      --cta-text:#1a1208;
      --hot:#ff2a14;
      --ok:#3dd68c;
      --danger:#ff8b8b;
      --warn:#f5c16c;
      --shadow:0 8px 24px rgba(0,0,0,.35);
      --side:320px;
      --bar:64px;
      --radius:8px;
      --poster-r:5px;
    }
    * { box-sizing:border-box; }
    html,body { margin:0; min-height:100%; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
      background:var(--bg); color:var(--text); line-height:1.55;
    }
    a { color:var(--text); text-decoration:none; cursor:pointer; }
    a:hover { color:#fff; }
    button, input, select, textarea { font:inherit; }
    button { cursor:pointer; }
    button:disabled { opacity:.45; cursor:not-allowed; }
    img { max-width:100%; display:block; }
    h1,h2,h3 { font-weight:650; letter-spacing:.02em; }
    .muted, .meta { color:var(--muted); }
    .dim { color:var(--dim); }
    .warn { color:var(--warn); }
    .danger { color:var(--danger); }
    .vip { color:var(--acc); font-size:12px; }

    /* ----- top bar: single row on wide, wrap (not overflow) on mid/small ----- */
    .topbar {
      position:sticky; top:0; z-index:50;
      min-height:var(--bar);
      height:auto;
      display:flex; align-items:center; flex-wrap:nowrap;
      gap:8px 12px;
      padding:0 24px;
      background:rgba(16,18,24,.94);
      backdrop-filter:blur(12px);
      border-bottom:1px solid rgba(255,255,255,.04);
      min-width:0; width:100%; max-width:100%;
    }
    .brand {
      flex:0 0 auto;
      font-weight:800; font-size:22px; color:var(--acc);
      letter-spacing:.06em; line-height:1; padding:4px 0;
      white-space:nowrap;
    }
    .brand:hover { color:var(--acc); filter:brightness(1.08); }
    .top-nav {
      display:flex; align-items:center; gap:0 2px;
      flex:1 1 auto; min-width:0; flex-wrap:nowrap;
    }
    .top-nav > a, .nav-drop > .nav-lab {
      flex:0 0 auto;
      color:var(--muted); padding:8px 9px; font-size:14px; white-space:nowrap;
      border-radius:6px; background:none; border:0;
      position:relative;
    }
    .top-nav > a:hover, .nav-drop > .nav-lab:hover {
      color:#fff;
    }
    .top-nav > a.active, .nav-drop.active > .nav-lab,
    .nav-drop.open > .nav-lab {
      color:#fff;
    }
    .nav-drop { position:relative; flex:0 0 auto; }
    .nav-drop > .nav-lab { display:inline-flex; align-items:center; gap:4px; }
    .nav-drop .nav-lab .caret { font-size:10px; opacity:.7; }
    .nav-menu {
      display:none;
      position:absolute; top:calc(100% + 8px); left:0;
      background:#1c2028; border:1px solid rgba(255,255,255,.06);
      border-radius:10px; padding:8px;
      min-width:216px;
      grid-template-columns:1fr 1fr; gap:4px;
      box-shadow:var(--shadow); z-index:60;
    }
    .nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu, .nav-drop.open .nav-menu {
      display:grid;
    }
    .nav-menu a {
      display:block; padding:8px 12px; border-radius:6px;
      color:var(--text); font-size:13px; white-space:nowrap;
    }
    .nav-menu a:hover { background:#ffffff12; color:#fff; }
    .badge {
      display:inline-flex; align-items:center; justify-content:center;
      min-width:16px; height:16px; padding:0 4px; margin-left:4px;
      border-radius:8px; background:var(--hot); color:#fff; font-size:10px; line-height:16px;
      vertical-align:super;
    }
    .badge[hidden] { display:none !important; }

    .search-wrap { position:relative; flex:0 1 220px; min-width:120px; max-width:260px; }
    .search-wrap form { display:flex; align-items:center; margin:0; position:relative; }
    .search-wrap input {
      width:100%; height:36px;
      border:0; border-radius:18px;
      background:rgba(255,255,255,.08); color:var(--text);
      padding:0 36px 0 14px;
      outline:none;
    }
    .search-wrap input::placeholder { color:#9aa0aa; }
    .search-wrap input:hover, .search-wrap input:focus { background:rgba(255,255,255,.12); }
    .search-wrap form > button {
      position:absolute; right:4px; top:50%; transform:translateY(-50%);
      width:28px; height:28px; border:0; border-radius:14px;
      background:transparent; color:var(--muted); font-size:14px;
      padding:0;
    }
    .search-wrap form > button:hover { color:var(--text); }
    .suggest {
      display:none; position:absolute; top:calc(100% + 8px); left:0; right:0;
      background:var(--surface2); border:1px solid var(--line); border-radius:10px;
      padding:10px; z-index:70; box-shadow:var(--shadow);
      min-width:220px;
    }
    .search-wrap:focus-within .suggest.open, .suggest.open { display:block; }
    .suggest h4 { margin:0 0 8px; font-size:12px; color:var(--muted); font-weight:600; }
    .suggest a, .suggest button.sugg {
      display:block; width:100%; text-align:left; border:0; background:none;
      color:var(--text); padding:6px 8px; border-radius:6px; font-size:13px;
    }
    .suggest a:hover, .suggest button.sugg:hover { background:#ffffff12; }

    .top-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; margin-left:auto; }
    .iconbtn, button.ghost, a.iconbtn {
      background:transparent; color:var(--text);
      border:1px solid #ffffff22; border-radius:18px;
      height:36px; padding:0 12px; font-size:13px; white-space:nowrap;
    }
    .iconbtn:hover, button.ghost:hover, a.iconbtn:hover { border-color:#ffffff44; background:#ffffff0d; color:#fff; }
    .hist-btn { display:inline-flex; align-items:center; gap:6px; }
    .hist-btn .hist-ico { flex:0 0 auto; }
    button.primary, button:not(.ghost):not(.iconbtn):not(.nav-lab):not(.sugg):not(.nav-toggle):not(.play-fab):not(.day-tab):not(.pg-btn):not(.cta-block):not(.dlg-x):not(.linkish) {
      background:var(--acc); color:var(--acc-text); border:0; border-radius:8px;
      padding:8px 16px; font-weight:700;
    }
    button.primary { border-radius:20px; padding:9px 18px; }
    a.btn-login, .btn-login {
      display:inline-flex; align-items:center; justify-content:center;
      height:36px; padding:0 16px; border-radius:18px;
      background:var(--cta); color:var(--cta-text) !important; font-weight:700; font-size:13px;
    }
    a.btn-login:hover { filter:brightness(1.06); color:var(--cta-text) !important; }
    .drop { position:relative; }
    .drop-menu {
      display:none; position:absolute; right:0; top:calc(100% + 8px);
      width:320px; max-width:min(92vw, 320px); max-height:360px; overflow:auto;
      background:var(--surface2); border:1px solid var(--line); border-radius:12px;
      padding:12px; box-shadow:var(--shadow); z-index:70;
    }
    .drop.open .drop-menu, .drop:focus-within .drop-menu { display:block; }
    .drop-menu .empty { color:var(--muted); font-size:13px; padding:12px 4px; }
    .hist-item { display:flex; gap:10px; align-items:center; padding:8px; border-radius:8px; color:var(--text); }
    .hist-item:hover { background:#ffffff10; }
    .hist-item img, .hist-item .mini-ph {
      width:40px; height:56px; border-radius:4px; object-fit:cover; background:#2a2d36; flex:0 0 auto;
      display:flex; align-items:center; justify-content:center; font-weight:700;
    }
    .hist-item .t { font-size:13px; }
    .hist-item .s { font-size:12px; color:var(--muted); }

    /* mid-width: second row for nav, never collide like ref 40 */
    @media (max-width: 1280px) {
      .topbar { flex-wrap:wrap; height:auto; padding:8px 16px 0; gap:8px 10px; }
      .brand { order:1; }
      .search-wrap { order:2; flex:1 1 160px; max-width:none; min-width:0; }
      .top-actions { order:3; margin-left:0; }
      .top-nav {
        order:4; flex:1 1 100%;
        width:100%;
        overflow-x:auto; overflow-y:hidden;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
        padding:0 0 8px;
        gap:0 2px;
      }
      .top-nav::-webkit-scrollbar { display:none; }
      .nav-menu { left:0; right:auto; }
    }
    @media (max-width: 640px) {
      .topbar { padding:8px 12px 0; gap:8px; }
      .brand { font-size:18px; }
      .hist-label { display:none; }
      .search-wrap { flex:1 1 auto; }
      .drop-menu { right:0; width:min(92vw,320px); }
      .suggest { left:auto; right:0; min-width:min(92vw, 260px); }
    }

    main#app { min-height:calc(100vh - var(--bar) - 80px); padding:20px 40px 48px; }
    @media (max-width: 899px) { main#app { padding:16px 16px 40px; } }

    .page-head { margin:8px 0 18px; }
    .page-head h1 { margin:0 0 4px; font-size:28px; }
    .page-kicker { font-size:11px; letter-spacing:.14em; color:var(--acc); text-transform:uppercase; font-weight:700; }
    .crumb { color:var(--muted); font-size:13px; margin:0 0 12px; }
    .crumb a { color:var(--muted); }
    .crumb a:hover { color:var(--acc); }

    /* hero */
    .hero {
      position:relative; border-radius:16px; overflow:hidden;
      height:clamp(200px, 28vw, 480px);
      background:linear-gradient(120deg,#25253a,#1a1c28 50%,#2a2030);
      margin-bottom:28px;
    }
    .hero-slide { position:absolute; inset:0; opacity:0; transition:opacity .4s ease; }
    .hero-slide.on { opacity:1; z-index:1; }
    .hero-slide img { width:100%; height:100%; object-fit:cover; }
    .hero-slide .shade {
      position:absolute; inset:0;
      background:linear-gradient(90deg, rgba(10,12,18,.88) 0%, rgba(10,12,18,.45) 46%, rgba(10,12,18,.1) 100%);
    }
    .hero-body { position:absolute; left:40px; right:40px; bottom:36px; z-index:2; max-width:640px; }
    .hero-body h2 { margin:0 0 8px; font-size:clamp(22px, 3vw, 36px); }
    .hero-tags { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; }
    .tag {
      display:inline-flex; align-items:center;
      padding:2px 8px; border-radius:4px; font-size:12px;
      background:#ffffff18; color:#d4d6d8;
    }
    .hero-desc { color:#d4d6d8; font-size:13px; max-height:3.2em; overflow:hidden; margin:0 0 14px; }
    .hero-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
    .hero-actions a.play {
      display:inline-flex; align-items:center; gap:6px;
      background:var(--acc); color:var(--acc-text); font-weight:700;
      padding:9px 18px; border-radius:20px;
    }
    .hero-actions a.more {
      display:inline-flex; align-items:center;
      color:#fff; padding:8px 14px;
    }
    .hero-dots { position:absolute; right:24px; bottom:18px; z-index:3; display:flex; gap:6px; }
    .hero-dots button {
      width:8px; height:8px; border-radius:4px; border:0; padding:0; background:#ffffff55;
    }
    .hero-dots button.on { width:18px; background:var(--acc); }
    @media (max-width: 640px) {
      .hero-body { left:16px; right:16px; bottom:24px; }
      .hero { height:clamp(180px, 52vw, 320px); }
    }

    /* floors */
    .floor { margin:0 0 32px; }
    .floor-hd, .sec-hd {
      display:flex; align-items:baseline; justify-content:space-between; gap:12px;
      margin:0 0 14px;
    }
    .floor-hd h2, .sec-hd h2 { margin:0; font-size:20px; }
    .floor-hd .sub { color:var(--muted); font-size:13px; margin-left:8px; font-weight:400; }
    .more-link { color:var(--muted); font-size:13px; white-space:nowrap; }
    .more-link:hover { color:var(--acc); }

    .home-split {
      display:grid; grid-template-columns: 1fr var(--side); gap:32px;
      margin-bottom:8px;
    }
    @media (max-width: 1024px) {
      .home-split { grid-template-columns:1fr; }
    }

    .day-tabs { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 16px; }
    .day-tab {
      border:0; background:transparent; color:var(--muted);
      padding:6px 12px; border-radius:16px; font-size:13px;
    }
    .day-tab.on { background:var(--acc); color:var(--acc-text); font-weight:700; }

    /* poster grid */
    .poster-grid {
      display:grid;
      grid-template-columns:repeat(8, minmax(0,1fr));
      gap:18px;
    }
    .home-split .poster-grid, .floor .poster-grid { grid-template-columns:repeat(6, minmax(0,1fr)); }
    @media (max-width:1789px) { .poster-grid { grid-template-columns:repeat(7,minmax(0,1fr)); } }
    @media (max-width:1549px) { .poster-grid, .home-split .poster-grid, .floor .poster-grid { grid-template-columns:repeat(6,minmax(0,1fr)); } }
    @media (max-width:1024px) { .poster-grid, .home-split .poster-grid, .floor .poster-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
    @media (max-width:899px) { .poster-grid, .home-split .poster-grid, .floor .poster-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
    @media (max-width:640px) { .poster-grid, .home-split .poster-grid, .floor .poster-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; } }
    @media (max-width:420px) { .poster-grid, .home-split .poster-grid, .floor .poster-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }

    .poster { display:block; color:var(--text); min-width:0; }
    .poster:hover { color:#fff; }
    .poster-cover {
      position:relative; padding-top:140%;
      border-radius:var(--poster-r); overflow:hidden;
      background:#22242c;
    }
    .poster:hover .poster-cover { box-shadow:0 6px 16px rgba(0,0,0,.4); }
    .poster-cover img, .poster-ph {
      position:absolute; inset:0; width:100%; height:100%;
      object-fit:cover;
    }
    .poster-ph {
      display:flex; align-items:center; justify-content:center;
      font-size:36px; font-weight:800; color:#ffffff55;
      background:linear-gradient(160deg,#2a3040,#3a2a48);
    }
    .badge-new {
      position:absolute; left:6px; top:6px; z-index:2;
      background:var(--acc); color:var(--acc-text);
      font-size:10px; font-weight:800; letter-spacing:.04em;
      padding:2px 6px; border-radius:3px; text-transform:uppercase;
    }
    .poster-foot {
      position:absolute; left:0; right:0; bottom:0; z-index:2;
      padding:22px 8px 6px;
      background:linear-gradient(transparent, rgba(0,0,0,.82));
      color:#fff; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }
    .poster-title {
      margin:8px 0 2px; font-size:14px; font-weight:600;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }
    .poster-meta {
      color:var(--muted); font-size:12px;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }

    /* rank */
    .rank-box { background:var(--surface); border-radius:12px; padding:16px 14px; }
    .rank-item {
      display:flex; gap:10px; align-items:center;
      padding:8px 4px; border-radius:8px; color:var(--text);
    }
    .rank-item:hover { background:#ffffff0a; }
    .rank-no {
      width:22px; height:22px; border-radius:11px; flex:0 0 auto;
      display:flex; align-items:center; justify-content:center;
      font-size:12px; font-weight:800; background:#ffffff14; color:var(--muted);
    }
    .rank-item:nth-child(-n+3) .rank-no { background:var(--acc); color:var(--acc-text); }
    .rank-item .ri { flex:1; min-width:0; }
    .rank-item .rt { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .rank-item .rs { font-size:12px; color:var(--muted); }

    /* rank page cards */
    .rank-hero {
      border-radius:16px; padding:28px 28px 20px;
      background:radial-gradient(circle at 90% 20%, rgba(248,207,3,.18), transparent 40%), var(--surface);
      margin-bottom:20px;
    }
    .rank-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
    @media (max-width:1024px){ .rank-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
    @media (max-width:640px){ .rank-grid { grid-template-columns:1fr; } }
    .rank-card {
      display:flex; gap:12px; background:var(--surface); border-radius:12px; padding:12px;
      color:var(--text);
    }
    .rank-card:hover { background:var(--surface2); }
    .rank-card .pc { width:86px; flex:0 0 auto; }
    .rank-card .pc .poster-cover { border-radius:6px; }
    .rank-card h3 { margin:0 0 6px; font-size:16px; }
    .rank-card p { margin:0 0 8px; font-size:12px; color:var(--muted); max-height:3.2em; overflow:hidden; }
    .rank-card .go {
      display:inline-flex; align-items:center; gap:4px;
      background:var(--acc); color:var(--acc-text); font-weight:700;
      font-size:12px; padding:5px 12px; border-radius:14px;
    }

    .chan-row { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:8px 0 28px; }
    @media (max-width:799px){ .chan-row { grid-template-columns:1fr; } }
    .chan {
      display:block; border-radius:12px; padding:28px 20px;
      background:var(--surface); min-height:110px;
      background-image:linear-gradient(120deg, rgba(248,207,3,.08), transparent 50%);
    }
    .chan h3 { margin:0 0 6px; }
    .chan p { margin:0; color:var(--muted); font-size:13px; }

    /* filters */
    .filter-box {
      background:var(--surface); border-radius:12px; padding:16px 18px; margin-bottom:20px;
    }
    .filter-row { display:flex; gap:10px 16px; margin:0 0 10px; font-size:13px; }
    .filter-row .lab { flex:0 0 48px; color:var(--muted); padding-top:4px; }
    .filter-row .vals { display:flex; flex-wrap:wrap; gap:6px; flex:1; }
    .chip {
      display:inline-flex; align-items:center; padding:4px 10px; border-radius:14px;
      background:#ffffff10; color:var(--text); font-size:12px; border:0;
    }
    a.chip, button.chip { cursor:pointer; }
    .chip.on { background:var(--acc); color:var(--acc-text); font-weight:700; }
    .tabs { display:flex; gap:16px; margin:0 0 14px; }
    .tabs a, .tabs button {
      background:none; border:0; color:var(--muted); padding:6px 0; font-size:14px;
      border-bottom:2px solid transparent;
    }
    .tabs a.on, .tabs button.on { color:var(--acc); border-bottom-color:var(--acc); font-weight:700; }

    .pager { display:flex; justify-content:center; gap:6px; flex-wrap:wrap; margin:28px 0 8px; }
    .pg-btn {
      min-width:36px; height:36px; padding:0 10px; border:0; border-radius:8px;
      background:var(--surface2); color:var(--text);
    }
    .pg-btn.on { background:var(--acc); color:var(--acc-text); font-weight:700; }

    /* detail */
    .detail-hero {
      display:grid; grid-template-columns:180px 1fr; gap:24px;
      background:var(--surface); border-radius:16px; padding:20px;
      margin-bottom:20px;
    }
    @media (max-width:699px){ .detail-hero { grid-template-columns:1fr; } }
    .detail-poster .poster-cover { border-radius:8px; }
    .detail-hero h1 { margin:0 0 6px; font-size:28px; }
    .aka { color:var(--muted); margin:0 0 10px; font-size:13px; }
    .detail-actions { display:flex; gap:10px; flex-wrap:wrap; margin:14px 0 0; }
    .info-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:20px; }
    @media (max-width:899px){ .info-grid { grid-template-columns:1fr; } }
    .info-card { background:var(--surface); border-radius:12px; padding:16px 18px; }
    .info-card h2 { margin:0 0 10px; font-size:16px; }
    .kv { display:grid; grid-template-columns:64px 1fr; gap:6px 10px; font-size:13px; }
    .kv .k { color:var(--muted); }
    .syn { font-size:14px; color:#d4d6d8; margin:0; }

    .eps-box { background:var(--surface); border-radius:12px; padding:16px 18px; margin-bottom:20px; }
    .eps { display:grid; grid-template-columns:repeat(auto-fill, minmax(88px,1fr)); gap:8px; }
    .eps a, .eps span {
      display:flex; align-items:center; justify-content:center; text-align:center;
      min-height:38px; padding:6px 8px; border-radius:8px;
      background:var(--surface2); color:var(--text); font-size:13px;
    }
    .eps a:hover { background:#2e313a; }
    .eps a.now { background:var(--acc); color:var(--acc-text); font-weight:700; }
    .row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

    /* player */
    .play-layout { display:grid; grid-template-columns:1fr 340px; gap:16px; align-items:start; }
    @media (max-width:1024px){ .play-layout { grid-template-columns:1fr; } }
    .player {
      background:#000; border-radius:12px; min-height:220px;
      display:flex; align-items:center; justify-content:center;
      color:var(--muted); margin:0; padding:0; text-align:center; overflow:hidden;
    }
    .player video { width:100%; max-height:70vh; background:#000; display:block; }
    .player .state { padding:32px 24px; }
    .player .state h2 { margin:0 0 8px; color:#fff; }
    .player-shell { position:relative; width:100%; background:#000; }
    .player-shell video { width:100%; max-height:70vh; min-height:200px; background:#000; display:block; object-fit:contain; }
    .play-fab {
      position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
      min-width:96px; min-height:96px; border-radius:48px; font-size:18px; z-index:2;
      touch-action:manipulation; box-shadow:0 4px 18px rgba(0,0,0,.45);
      background:var(--acc); color:var(--acc-text); border:0; font-weight:800;
    }
    .play-fab[hidden] { display:none !important; }
    .play-side { background:var(--surface); border-radius:12px; padding:14px; }
    .play-side h3 { margin:0 0 10px; font-size:15px; }
    .play-side .eps { max-height:48vh; overflow:auto; }
    .play-info { display:flex; gap:16px; margin-top:18px; background:var(--surface); border-radius:12px; padding:16px; }
    .play-info .pc { width:80px; flex:0 0 auto; }
    .line-btns { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
    .line-btns button.now { border-color:var(--acc); color:var(--acc-text); background:var(--acc); }

    /* auth / forms */
    .auth-wrap { min-height:60vh; display:flex; align-items:center; justify-content:center; padding:20px 0 40px; }
    .auth-card {
      width:min(420px, 100%); background:var(--surface); border:1px solid var(--line);
      border-radius:16px; padding:28px 24px; box-shadow:var(--shadow);
    }
    .auth-card h1 { margin:0 0 6px; text-align:center; font-size:22px; }
    .auth-card .lead { text-align:center; color:var(--muted); font-size:13px; margin:0 0 18px; }
    form.stack, .auth-card form, form { display:grid; gap:10px; }
    .auth-card form, form.stack { max-width:none; }
    input, select, textarea {
      background:#10141b; color:var(--text); border:1px solid var(--line);
      border-radius:8px; padding:10px 12px; width:100%;
    }
    textarea { resize:vertical; }
    .auth-links { display:flex; justify-content:space-between; font-size:13px; margin-top:4px; }
    .auth-links a { color:var(--muted); }
    .auth-links a:hover { color:var(--acc); }
    .plan-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; }
    .plan {
      background:var(--surface); border-radius:12px; padding:18px;
      border:1px solid var(--line);
    }
    .plan h2 { margin:0 0 8px; }
    pre { overflow:auto; background:#10141b; padding:10px; border-radius:8px; font-size:12px; }

    .toast {
      position:fixed; right:16px; bottom:16px; z-index:80;
      background:var(--surface2); border:1px solid var(--line);
      padding:10px 14px; border-radius:8px; box-shadow:var(--shadow);
    }
    .api-chip { color:var(--muted); font-size:12px; }

    footer.site {
      padding:28px 40px 32px; border-top:1px solid #ffffff0c;
      display:flex; align-items:flex-start; justify-content:space-between;
      gap:24px 40px; flex-wrap:wrap;
      color:var(--muted); font-size:13px; background:#101217;
    }
    footer.site .fb {
      color:var(--acc); font-weight:800; font-size:20px;
      letter-spacing:.06em; line-height:1.2; flex:0 0 auto;
    }
    footer.site .foot-main { flex:1 1 320px; min-width:0; text-align:right; }
    footer.site .foot-links {
      display:flex; flex-wrap:wrap; gap:6px 0;
      justify-content:flex-end; align-items:center;
    }
    footer.site .foot-links .sep { color:#4a4e57; margin:0 8px; }
    footer.site a { color:var(--muted); }
    footer.site a:hover { color:var(--acc); }
    footer.site .foot-legal {
      margin:10px 0 0; font-size:12px; line-height:1.7;
      color:#6b6f78; max-width:52em; margin-left:auto;
    }
    @media (max-width:640px){
      footer.site { padding:20px 16px 24px; }
      footer.site .foot-main { text-align:left; flex-basis:100%; }
      footer.site .foot-links { justify-content:flex-start; }
      footer.site .foot-legal { margin-left:0; }
    }

    /* global dialogs: announcement + login entry (no captcha) */
    .dlg-mask {
      position:fixed; inset:0; z-index:120;
      background:rgba(6,8,14,.62);
      display:flex; align-items:center; justify-content:center;
      padding:24px 16px;
    }
    .dlg-mask[hidden] { display:none !important; }
    .announce-card, .login-card {
      position:relative;
      width:min(440px, 100%);
      background:#1a1e27;
      border:1px solid rgba(255,255,255,.06);
      border-radius:14px;
      padding:22px 22px 20px;
      box-shadow:0 16px 48px rgba(0,0,0,.5);
    }
    .announce-card h3, .login-card h3 {
      margin:0 0 14px; text-align:center; font-size:16px; font-weight:700;
    }
    .announce-body { font-size:14px; color:#d5d8de; }
    .announce-body p { margin:0 0 12px; }
    .announce-body strong { color:#ff4d4f; font-weight:700; }
    .announce-body ul { margin:0 0 12px; padding:0 0 0 1.1em; }
    .announce-body li { margin:0 0 6px; }
    .announce-body a { color:#6ea8ff; }
    .announce-body a:hover { color:#9cc4ff; }
    .announce-body .hint { color:var(--muted); font-size:12px; margin:8px 0 0; padding-top:10px; border-top:1px solid #ffffff14; }
    .announce-hl {
      margin:14px 0 16px;
      background:#ffc107;
      color:#2a1d00;
      border-radius:6px;
      padding:10px 12px;
      font-size:13px;
    }
    .announce-hl p { margin:0; }
    .announce-hl a { color:#0b57d0; font-weight:700; }
    .cta-block {
      display:inline-flex; align-items:center; justify-content:center;
      width:100%; height:42px; border:0; border-radius:21px;
      background:var(--cta); color:#fff; font-weight:700; font-size:14px;
    }
    .cta-block:hover { filter:brightness(1.06); }
    .dlg-x {
      position:absolute; top:10px; right:12px;
      width:32px; height:32px; border:0; border-radius:16px;
      background:transparent; color:#9aa0aa; font-size:22px; line-height:1;
      padding:0;
    }
    .dlg-x:hover { color:#fff; background:#ffffff10; }
    .login-card { width:min(400px, 100%); padding:28px 24px 22px; }
    .login-card .lead { margin:0 0 14px; font-size:13px; color:var(--muted); text-align:center; }
    .login-form { display:grid; gap:12px; margin:0; }
    .login-form input {
      width:100%; height:42px; padding:0 12px;
      border:0; border-radius:6px;
      background:#fff; color:#1a1a1a;
    }
    .login-form input::placeholder { color:#8b8f97; }
    .login-links {
      display:flex; justify-content:space-between; align-items:center;
      margin-top:12px; font-size:13px;
    }
    .login-links a, .login-links .linkish { color:var(--muted); }
    .login-links a:hover, .login-links .linkish:hover { color:var(--acc); }
    button.linkish {
      background:none; border:0; padding:0; color:var(--muted);
      font-weight:400; height:auto; border-radius:0;
    }
    @media (max-width:640px){
      .announce-card, .login-card { padding:20px 16px 16px; }
    }

    .empty-floor { color:var(--muted); font-size:13px; padding:12px 0; }
    .cmt { padding:8px 0; border-bottom:1px solid #ffffff0c; }
