:root{
  --bg:#050a18;--panel:#0a1226;--panel-2:#070d1e;--line:rgba(147,197,253,.09);--line-2:rgba(147,197,253,.16);
  --ink:#e8eefc;--ink-2:#d3def5;--dim:#9fb0d0;--mute:#7f90b3;--faint:#6f7fa3;
  --ac:#2563eb;--ac-hi:rgb(96,165,250);--on-ac:#fff;--ac-soft:rgba(37,99,235,.16);--ac-edge:rgba(96,165,250,.38);--ac-text:rgb(147,197,253);
  --ink-hi:#f4f8ff;--wash:rgba(147,197,253,.05);--wash-2:rgba(147,197,253,.08);
  --surf:#0e1a33;--surf-2:#040812;--surf-3:#0b1630;--surf-4:#0a1426;--top-bg:rgba(5,10,24,.85);
  --label:#b4c3e0;--ok-text:#86efac;--bad-text:#fca5a5;--warn-text:#fcd34d;--code-ink:#dbeafe;--shadow:rgba(0,0,0,.55);--ac-fill:var(--ac);
  --ok:#22c55e;--warn:#f59e0b;--bad:#ef4444;
  --radius-mark:11px;
  --f-body:'Inter',system-ui,sans-serif;--f-display:'Space Grotesk',system-ui,sans-serif;--f-mono:'JetBrains Mono',ui-monospace,monospace;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:14px;-webkit-font-smoothing:antialiased}
a{color:var(--ac-text)}a:hover{color:var(--ink-hi)}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--ac-hi);outline-offset:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* layout */
/* 100dvh, not 100vh. On a phone the browser's own toolbars are counted in 100vh but not actually
   visible, so the bottom of the shell — which is where the save buttons are — sits underneath
   them. dvh is the height that is really there, and the vh line before it keeps older browsers
   working. */
.shell{display:flex;height:100vh;height:100dvh;overflow:hidden}
.side{width:256px;flex-shrink:0;padding:22px 16px;display:flex;flex-direction:column;gap:20px;background:var(--panel-2);border-right:1px solid var(--line);overflow-y:auto}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.top{height:76px;flex-shrink:0;padding:0 32px;display:flex;align-items:center;gap:16px;border-bottom:1px solid var(--line);background:var(--top-bg)}
.content{flex:1;overflow:auto;padding:28px 32px 48px}

.brand{display:flex;align-items:center;gap:12px;padding:0 6px}
.mark{width:38px;height:38px;border-radius:var(--radius-mark);background:var(--ac-fill);color:var(--on-ac);display:flex;align-items:center;justify-content:center;font-family:var(--f-display);font-weight:700;font-size:19px;flex-shrink:0;overflow:hidden;box-shadow:0 0 18px var(--ac-soft)}
.mark img{width:100%;height:100%;object-fit:cover}
.brand-name{font-family:var(--f-display);font-size:17px;font-weight:700;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status-line{display:flex;align-items:center;gap:6px;font-family:var(--f-mono);font-size:11px;color:var(--mute)}
.dot{width:7px;height:7px;border-radius:50%;background:var(--faint);flex-shrink:0}
.dot.on{background:var(--ok);box-shadow:0 0 8px var(--ok)}
.dot.warn{background:var(--warn)}
.dot.bad{background:var(--bad);box-shadow:0 0 8px var(--bad)}

.lbl{font-family:var(--f-mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}
.nav{display:flex;flex-direction:column;gap:3px}
.nav .lbl{padding:6px 8px 8px}
.nav-btn{display:flex;align-items:center;gap:12px;height:42px;padding:0 12px;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--dim);font-size:14px;font-weight:500;text-align:left;width:100%}
.nav-btn:hover{background:var(--wash);color:var(--ink)}
.nav-btn.active{background:var(--ac-soft);border-color:var(--ac-edge);color:var(--ink-hi)}
.nav-btn svg{flex-shrink:0}
.pill-count{margin-left:auto;font-family:var(--f-mono);font-size:11px;padding:2px 7px;border-radius:999px;background:rgba(239,68,68,.14);color:var(--bad-text)}

.me{margin-top:auto;display:flex;align-items:center;gap:10px;padding:12px;background:var(--panel);border:1px solid var(--line);border-radius:12px}
.avatar{width:34px;height:34px;border-radius:50%;background:#2e1453;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;overflow:hidden;flex-shrink:0}
.avatar img{width:100%;height:100%}
.icon-btn{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--dim)}
.icon-btn:hover{color:var(--ink);background:var(--wash)}

.crumb{font-family:var(--f-mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}
h1.title{margin:2px 0 0;font-family:var(--f-display);font-size:24px;font-weight:700;letter-spacing:-.02em}
.top-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.unsaved{display:inline-flex;align-items:center;gap:8px;font-family:var(--f-mono);font-size:12px;color:var(--warn-text)}

/* primitives */
.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:20px}
.card.flush{padding:20px 8px 8px}
.h2{margin:0;font-family:var(--f-display);font-size:17px;font-weight:600;letter-spacing:-.01em}
.dim{color:var(--dim);font-size:13px;line-height:1.55}
.mono{font-family:var(--f-mono)}
.stack{display:flex;flex-direction:column;gap:16px}
.row-b{display:flex;align-items:center;justify-content:space-between;gap:16px}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.line-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-top:1px solid var(--line)}
.card-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.card.flush .card-head{padding:0 12px}

.btn{height:40px;padding:0 16px;border-radius:9px;border:1px solid var(--line-2);background:var(--surf);color:var(--ink);font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;text-decoration:none}
.btn:hover{border-color:var(--ac-edge);color:var(--ink)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.p{background:var(--ac-fill);border-color:var(--ac-hi);color:var(--on-ac)}
.btn.p:hover{filter:brightness(.92)}
.btn.d{background:rgba(239,68,68,.08);border-color:rgba(239,68,68,.45);color:var(--bad-text)}
.btn.sm{height:32px;padding:0 12px;font-size:12px}
.chip{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:999px;background:var(--ac-soft);border:1px solid var(--ac-edge);color:var(--ac-text);font-size:12px;font-weight:500}
.chip button{border:0;background:none;padding:0;color:inherit;opacity:.7;line-height:1}
.chip button:hover{opacity:1}
.chip.bad{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.35);color:var(--bad-text)}
.chip.warn{background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.35);color:var(--warn-text)}

.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field>label,.field>.flabel{font-size:12px;font-weight:500;color:#b4c3e0}
.help{font-size:11.5px;color:var(--faint)}
.inp{height:40px;padding:0 12px;border-radius:9px;background:var(--panel-2);border:1px solid var(--line-2);color:var(--ink);font-size:13px;outline:none;width:100%;min-width:0}
.inp.mono{font-family:var(--f-mono)}
.inp:focus{border-color:var(--ac-hi);box-shadow:0 0 0 3px var(--ac-soft)}
textarea.inp{height:auto;padding:10px 12px;line-height:1.55;resize:vertical}
select.inp{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--dim) 50%),linear-gradient(135deg,var(--dim) 50%,transparent 50%);background-position:calc(100% - 17px) 17px,calc(100% - 12px) 17px;background-size:5px 5px;background-repeat:no-repeat;padding-right:30px}
select option,select optgroup,select.inp option,select.inp optgroup{background:var(--panel);color:var(--ink)}
input[type=color].swatch-in{width:40px;height:40px;padding:0;border:1px solid var(--line-2);border-radius:9px;background:none}

.sw{position:relative;width:44px;height:24px;border-radius:999px;border:1px solid var(--line-2);background:var(--surf);flex-shrink:0;padding:0;transition:background .2s}
.sw::after{content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#776f82;transition:transform .2s,background .2s}
.sw[aria-pressed=true]{background:var(--ac);border-color:rgba(255,255,255,.25)}
.sw[aria-pressed=true]::after{transform:translateX(20px);background:#fff}

table.t{width:100%;border-collapse:collapse}
.t th{font-family:var(--f-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--mute);text-align:left;padding:0 12px 10px;font-weight:500}
.t td{padding:12px;border-top:1px solid var(--line);font-size:13px;color:var(--ink-2);vertical-align:middle}
.t td.r{text-align:right;white-space:nowrap}

.stat{display:flex;flex-direction:column;gap:10px}
.stat .v{font-family:var(--f-display);font-size:34px;font-weight:700;letter-spacing:-.03em;line-height:1}
.empty{padding:28px;text-align:center;color:var(--dim);font-size:13px;line-height:1.6}
.banner{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:12px;background:rgba(245,158,11,.08);border:1px solid rgba(245,158,11,.3);color:#fde68a;font-size:13px;margin-bottom:16px}

/* embed builder */
.eb{display:grid;grid-template-columns:240px minmax(0,1fr) 440px;gap:16px;align-items:start}
.chan-list{display:flex;flex-direction:column;gap:1px;max-height:calc(100vh - 260px);overflow:auto}
.chan-cat{font-family:var(--f-mono);font-size:10px;letter-spacing:.12em;color:var(--faint);padding:10px 8px 4px;text-transform:uppercase}
.chan{display:flex;align-items:center;gap:8px;width:100%;height:32px;padding:0 10px;border-radius:7px;border:1px solid transparent;background:transparent;color:var(--dim);font-size:13px;text-align:left}
.chan:hover{background:var(--wash);color:var(--ink)}
.chan.active{background:var(--ac-soft);border-color:var(--ac-edge);color:var(--ink-hi)}
.chan.locked{opacity:.45}
.chan span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(40px,1fr));gap:6px;max-height:188px;overflow:auto;padding:2px}
.emo{width:100%;aspect-ratio:1;border-radius:9px;border:1px solid var(--line);background:var(--panel-2);display:flex;align-items:center;justify-content:center;position:relative;padding:0}
.emo:hover{border-color:var(--ac-hi)}
.emo img{width:26px;height:26px;object-fit:contain}
.emo .gif{position:absolute;right:2px;bottom:2px;font-family:var(--f-mono);font-size:7px;padding:0 2px;border-radius:2px;background:var(--ink);color:#050a18}
.seg{display:flex;gap:4px;padding:3px;background:var(--panel-2);border:1px solid var(--line);border-radius:8px}
.seg button{height:26px;padding:0 10px;border-radius:6px;border:0;background:transparent;color:var(--dim);font-size:11px;font-weight:600}
.seg button.on{background:var(--ac);color:var(--on-ac)}
.sub-item{display:grid;gap:8px;padding:12px;border-radius:10px;border:1px solid var(--line);background:var(--panel-2)}
.sticky{position:sticky;top:0}

/* discord preview */
.dc{background:#313338;border-radius:10px;padding:16px 16px 18px;display:flex;gap:14px;font-family:'gg sans','Noto Sans',var(--f-body)}
.dc-av{width:40px;height:40px;border-radius:50%;background:var(--ac);color:var(--on-ac);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-weight:700;overflow:hidden}
.dc-av img{width:100%;height:100%;object-fit:cover}
.dc-body{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.dc-name{display:flex;align-items:center;gap:6px}
.dc-name b{font-size:15px;font-weight:600;color:#f2f3f5}
.dc-app{font-size:10px;font-weight:600;padding:1px 5px;border-radius:3px;background:#5865f2;color:#fff}
.dc-time{font-size:12px;color:#949ba4}
.dc-text{font-size:15px;line-height:1.375;color:#dbdee1;word-wrap:break-word}
.dc-embed{border-left:4px solid #1e1f22;background:#2b2d31;border-radius:4px;padding:8px 16px 16px 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;max-width:432px}
.dc-embed>*{grid-column:1}
.dc-author{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:14px;font-weight:600;color:#f2f3f5}
.dc-author img{width:24px;height:24px;border-radius:50%;object-fit:cover}
.dc-title{font-size:16px;font-weight:600;color:#f2f3f5}
.dc-title a{color:#00a8fc;text-decoration:none}
.dc-desc{font-size:14px;line-height:1.375;color:#dbdee1;white-space:pre-wrap;word-wrap:break-word}
.dc-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.dc-field{grid-column:1/-1;display:flex;flex-direction:column;gap:2px;font-size:14px}
.dc-field.inl{grid-column:auto}
.dc-field b{font-size:14px;color:#f2f3f5}
.dc-field span{color:#dbdee1;white-space:pre-wrap}
.dc-img{max-width:100%;border-radius:4px;margin-top:8px;display:block}
.dc-thumb{grid-column:2;grid-row:1 / span 4;width:80px;height:80px;border-radius:4px;object-fit:cover;margin-top:8px}
.dc-foot{font-size:12px;color:#b5bac1;margin-top:8px}
.dc-btns{display:flex;gap:8px;flex-wrap:wrap}
.dc-btn{height:32px;padding:0 16px;border-radius:4px;background:#4e5058;color:#fff;font-size:14px;font-weight:500;display:inline-flex;align-items:center;gap:6px}
.dc-btn img{width:18px;height:18px}
.dc-emoji{width:22px;height:22px;vertical-align:-5px;object-fit:contain}
.dc-code{background:#1e1f22;border-radius:3px;padding:0 3px;font-family:var(--f-mono);font-size:85%}
.dc-mention{background:rgba(88,101,242,.3);color:#c9cdfb;border-radius:3px;padding:0 2px}

/* logs */
.console{background:#040812;padding:14px 18px;font-family:var(--f-mono);font-size:12.5px;line-height:1.6;height:calc(100vh - 230px);overflow:auto}
.console .ln{display:flex;gap:14px;white-space:pre-wrap}
.console .t{color:#6f7fa3;flex-shrink:0}
.console .lv{width:48px;flex-shrink:0}
.console .md{color:var(--mute);width:96px;flex-shrink:0;overflow:hidden;text-overflow:ellipsis}
.console .src{width:44px;flex-shrink:0;color:#6f7fa3}
.lv.info{color:#86efac}.lv.warn{color:var(--warn-text)}.lv.error{color:var(--bad-text)}.lv.debug{color:#94a3b8}

/* branding */
.accent-opts{display:flex;gap:10px;flex-wrap:wrap}
.accent-opt{display:flex;align-items:center;gap:10px;height:44px;padding:0 14px 0 8px;border-radius:10px;border:1px solid var(--line);background:var(--panel-2);color:var(--ink);font-size:13px;font-weight:500}
.accent-opt.on{border-color:#fff;background:var(--wash-2)}
.accent-opt i{width:28px;height:28px;border-radius:7px;display:block}
.drop{flex:1;min-height:84px;border-radius:12px;border:1px dashed var(--line-2);display:flex;align-items:center;justify-content:center;gap:10px;color:var(--dim);font-size:13px;padding:12px;text-align:center}
.drop.over{border-color:var(--ac-hi);background:var(--ac-soft)}

/* toast */
.toasts{position:fixed;right:24px;bottom:24px;display:flex;flex-direction:column;gap:8px;z-index:50}
.toast{min-width:260px;max-width:420px;padding:12px 16px;border-radius:10px;background:var(--surf-3);border:1px solid var(--ac-edge);color:var(--ink);font-size:13px;box-shadow:0 12px 40px var(--shadow);animation:tin .25s ease-out}
.toast.bad{border-color:rgba(239,68,68,.5)}
.toast a{margin-left:6px}
@keyframes tin{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

@media (max-width:1280px){.eb{grid-template-columns:220px minmax(0,1fr)}.eb>.preview-col{grid-column:1/-1}.g4{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* ── phones and small tablets ──
   The sidebar used to be `display:none` here with nothing in its place, which left a phone with
   no way to change section at all — every page but the one it opened on was unreachable. It is
   now a drawer: the same element, the same nav, slid in from the left over the content. */
@media (max-width:900px){
  .g2,.g3{grid-template-columns:1fr}
  .eb{grid-template-columns:1fr}
  .top{padding:0 12px;padding-left:max(12px,env(safe-area-inset-left));gap:10px;height:62px}
  .content{padding:16px 16px 40px;padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));
    /* Clear of the home indicator, and of the keyboard's accessory bar. */
    padding-bottom:calc(40px + env(safe-area-inset-bottom))}

  .side{
    position:fixed;z-index:60;top:0;bottom:0;left:0;width:min(290px,84vw);
    padding-top:max(22px,env(safe-area-inset-top));
    padding-left:max(16px,env(safe-area-inset-left));
    padding-bottom:max(22px,env(safe-area-inset-bottom));
    border-right:1px solid var(--line-2);box-shadow:0 0 60px var(--shadow);
    transform:translateX(-102%);transition:transform .22s ease;
    overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  }
  .side.open{transform:none}
  /* Shut to a screen reader as well as to the eye, so the nav behind the backdrop is not
     reachable by swiping through the page while it is closed. */
  .side[aria-hidden="true"]{visibility:hidden}
  .side.open[aria-hidden="false"]{visibility:visible}

  .nav-scrim{position:fixed;inset:0;z-index:55;background:rgba(2,4,3,.6);backdrop-filter:blur(2px);
    opacity:0;pointer-events:none;transition:opacity .22s ease}
  .nav-scrim.open{opacity:1;pointer-events:auto}

  /* Rows people tap rather than click, at the size both Apple and Android ask for. */
  .nav-btn{min-height:46px}
  .side .inp,.side .btn{height:46px}
}

/* The menu button exists for the drawer, so it is shown by default and hidden once the sidebar is
   permanently on screen. Written the other way round — hidden by default, shown in the max-width
   block — the later rule won at equal specificity and the button never appeared at all. */
.menu-btn{display:inline-flex;width:44px;height:44px;flex-shrink:0;align-items:center;justify-content:center;
  border-radius:10px;border:1px solid var(--line-2);background:var(--surf);color:var(--ink)}
.menu-btn:active{background:#1b1621}

@media (min-width:901px){.menu-btn{display:none}.nav-scrim{display:none}}

/* Below this the sidebar is nearly the whole screen, and two columns of anything is one column. */
@media (max-width:560px){
  .side{width:min(300px,88vw)}
  .g4{grid-template-columns:1fr}
  .top{height:58px}
  .h2{font-size:17px}
}

/* ── overlay dialogs (wizard, pop-up forms) ── */
.overlay{position:fixed;inset:0;z-index:40;background:rgba(2,4,3,.72);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:24px}
.dialog{width:min(980px,100%);max-height:calc(100vh - 48px);display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line-2);border-radius:18px;box-shadow:0 30px 90px var(--shadow);overflow:hidden}
.dialog.sm{width:min(520px,100%)}
.dlg-head{display:flex;align-items:center;gap:12px;padding:18px 22px;border-bottom:1px solid var(--line)}
.dlg-body{padding:22px;overflow:auto;flex:1}
.dlg-foot{display:flex;align-items:center;gap:10px;padding:14px 22px;border-top:1px solid var(--line);background:var(--panel-2)}
.steps{display:flex;gap:6px;flex-wrap:wrap}
.step{display:flex;align-items:center;gap:8px;height:30px;padding:0 12px 0 6px;border-radius:999px;border:1px solid var(--line);background:transparent;color:var(--dim);font-size:12px;font-weight:600}
.step i{width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-style:normal;font-family:var(--f-mono);font-size:11px;background:var(--surf)}
.step.on{border-color:var(--ac-edge);color:var(--ink-hi);background:var(--ac-soft)}.step.on i{background:var(--ac);color:var(--on-ac)}
.step.done i{background:var(--ac-soft);color:var(--ac-text)}
.pick{display:flex;flex-direction:column;gap:6px;padding:14px;border-radius:12px;border:1px solid var(--line);background:var(--panel-2);text-align:left;color:var(--ink);cursor:pointer}
.pick b{font-family:var(--f-mono);font-size:20px}
.pick.on{border-color:var(--ac-hi);background:var(--ac-soft)}
.ph{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px}
.ph-item{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 10px;border-radius:9px;border:1px solid var(--line);background:var(--panel-2)}
.ph-item button.ins{border:0;background:none;padding:0;color:var(--ac-text);font-family:var(--f-mono);font-size:12.5px;font-weight:600;text-align:left}
.ph-item span{flex:1;font-size:11.5px;color:var(--faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.copy{border:1px solid var(--line);background:transparent;color:var(--dim);border-radius:7px;height:26px;padding:0 8px;font-size:11px;font-weight:600;display:inline-flex;align-items:center;gap:5px}
.copy:hover{color:var(--ink);border-color:var(--ac-edge)}
.codebox{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;background:var(--surf-2);border:1px solid var(--line);font-family:var(--f-mono);font-size:13px}
.codebox code{flex:1;color:var(--code-ink);overflow:auto;white-space:nowrap}
.cc-card{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:12px;border:1px solid var(--line);background:var(--panel-2)}
.trig{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:22px;padding:0 6px;border-radius:6px;background:var(--ac-soft);border:1px solid var(--ac-edge);color:var(--ac-text);font-family:var(--f-mono);font-size:12px;font-weight:600}

/* ── Use console ── */
.use{display:grid;grid-template-columns:420px minmax(0,1fr);gap:16px;align-items:start}
.cmd-list{display:flex;flex-direction:column;gap:2px;max-height:300px;overflow:auto;margin-top:8px}
.cmd-row{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 10px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--ink);text-align:left}
.cmd-row:hover{background:var(--wash)}
.cmd-row b{font-family:var(--f-mono);font-size:13px}
.cmd-row span{font-size:12px;color:var(--dim)}
.cmd-row.on{border-color:var(--ac-edge);background:var(--ac-soft)}
.chipset{display:flex;gap:6px;flex-wrap:wrap}
.chipset button{height:30px;padding:0 12px;border-radius:8px;border:1px solid var(--line);background:var(--panel-2);color:var(--dim);font-family:var(--f-mono);font-size:12px;font-weight:600}
.chipset button.on{border-color:var(--ac-hi);background:var(--ac-soft);color:var(--ink-hi)}
.suggest{position:relative}
.suggest-list{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:10;background:var(--surf-3);border:1px solid var(--line-2);border-radius:10px;padding:4px;max-height:220px;overflow:auto;box-shadow:0 12px 30px var(--shadow)}
.suggest-list button{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);font-size:13px;text-align:left}
.suggest-list button:hover,.suggest-list button:focus{background:var(--ac-soft)}
.suggest-list img{width:22px;height:22px;border-radius:50%}
.cmdline{font-family:var(--f-mono);font-size:12.5px;color:var(--code-ink);background:var(--surf-2);border:1px solid var(--line);border-radius:10px;padding:10px 12px;word-break:break-all}
.feed{display:flex;flex-direction:column;gap:12px;min-height:520px;max-height:calc(100vh - 200px);overflow:auto;padding:16px;background:#1e1f22;border-radius:14px;border:1px solid var(--line)}
.feed-empty{margin:auto;text-align:center;color:#80848e;font-size:14px;line-height:1.6;max-width:360px}
.ran{display:flex;align-items:center;gap:8px;font-size:12.5px;color:#949ba4;font-family:var(--f-mono)}
.ran b{color:#dbdee1;font-weight:600}
.note{font-size:13px;color:#b5bac1;padding:8px 12px;border-radius:8px;background:#2b2d31;border-left:3px solid #80848e}
.note.bad{border-left-color:var(--bad);color:var(--bad-text)}
.eph{display:flex;align-items:center;gap:6px;font-size:12px;color:#949ba4;margin-top:4px}
.eph a{color:#00a8fc}
.dc-comp{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.dcb{height:32px;padding:0 14px;border-radius:4px;border:0;color:#fff;font-size:14px;font-weight:500;display:inline-flex;align-items:center;gap:6px;cursor:pointer;text-decoration:none}
.dcb:disabled{opacity:.5;cursor:not-allowed}
.dcb.s1{background:#5865f2}.dcb.s2{background:#4e5058}.dcb.s3{background:#248046}.dcb.s4{background:#da373c}.dcb.s5{background:#4e5058}
.dcb:hover:not(:disabled){filter:brightness(1.1)}
.dcb img{width:18px;height:18px}
.dcs{min-width:260px;max-width:400px;height:40px;border-radius:4px;background:#1e1f22;border:1px solid #111214;color:#dbdee1;padding:0 10px;font-size:14px}
.thinking{display:flex;align-items:center;gap:8px;color:#949ba4;font-size:14px;font-style:italic}
.thinking::before{content:'';width:8px;height:8px;border-radius:50%;background:#949ba4;animation:blink 1s infinite}
@keyframes blink{50%{opacity:.25}}
@media (max-width:1100px){.use{grid-template-columns:1fr}}

/* ── Staff chat ── */
.chat{display:grid;grid-template-columns:280px minmax(0,1fr);gap:16px;height:calc(100vh - 156px)}
.chat-rooms{display:flex;flex-direction:column;gap:2px;padding:14px 8px;overflow:auto}
.room{display:flex;align-items:center;gap:10px;width:100%;padding:7px 8px;border-radius:9px;border:1px solid transparent;background:transparent;color:var(--dim);font-size:14px;text-align:left}
.room:hover{background:var(--wash);color:var(--ink)}
.room.on{background:var(--ac-soft);border-color:var(--ac-edge);color:var(--ink-hi)}
.chat-main{display:flex;flex-direction:column;padding:0;overflow:hidden;min-height:0}
.chat-head{padding:14px 18px;border-bottom:1px solid var(--line)}
.chat-msgs{flex:1;overflow:auto;padding:12px 8px;display:flex;flex-direction:column;min-height:0}
.chat-msg{position:relative;display:flex;gap:12px;padding:6px 44px 2px 10px;border-radius:8px}
.chat-msg:not(.grouped){margin-top:10px}
.chat-msg:hover{background:var(--wash)}
.chat-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--faint)}
.chat-meta b{font-size:14px;color:var(--ink)}
.chat-text{font-size:14px;line-height:1.45;color:var(--ink-2);white-space:pre-wrap;word-wrap:break-word}
.chat-time-side{width:38px;flex-shrink:0;font-size:10px;color:transparent;text-align:right;padding-top:3px}
.chat-msg:hover .chat-time-side{color:var(--faint)}
.chat-del{position:absolute;right:6px;top:4px;opacity:0;width:28px;height:28px}
.chat-msg:hover .chat-del,.chat-del:focus{opacity:1}
.chat-day{display:flex;align-items:center;gap:12px;margin:18px 10px 4px;font-size:11px;color:var(--faint);font-family:var(--f-mono)}
.chat-day::before,.chat-day::after{content:'';flex:1;height:1px;background:var(--line)}
.chat-typing{height:20px;padding:0 18px;font-size:12px;color:var(--dim);font-style:italic}
.chat-compose{display:flex;gap:8px;padding:10px 14px 14px;align-items:flex-end}
.chat-compose textarea{resize:none;min-height:42px;max-height:160px;line-height:1.45;padding:10px 12px}
@media (max-width:900px){.chat{grid-template-columns:1fr;height:auto}.chat-main{height:70vh}}
.perm{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--panel-2);cursor:pointer}
.perm input{margin-top:3px;accent-color:var(--ac)}
.perm span{display:flex;flex-direction:column;gap:2px;font-size:13px}
.perm span .dim{font-size:11.5px}
.perm.on{border-color:var(--ac-edge);background:var(--ac-soft)}
.perm.off{opacity:.45;cursor:not-allowed}

/* Card layout preview (Discord Components V2) */
.dc-card{border-left:4px solid #1e1f22;background:#2b2d31;border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px;max-width:440px}
.dc-card .dc-img{margin:0;width:100%;border-radius:8px}
.dc-hr{border:0;border-top:1px solid #3f4147;margin:2px 0;width:100%}
.dc-h2{font-size:20px;font-weight:700;color:#f2f3f5;line-height:1.25}
.dc-h2 a{color:#00a8fc;text-decoration:none}
.dc-h3{font-size:16px;font-weight:700;color:#f2f3f5;line-height:1.3}
.dc-sub{font-size:12px;color:#949ba4}
.dc-section{display:flex;align-items:center;justify-content:space-between;gap:12px}
.dc-section>div{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.dc-section .dc-btn{flex-shrink:0}
.dc-thumb2{width:72px;height:72px;border-radius:8px;object-fit:cover;flex-shrink:0}
.guide summary{display:flex;align-items:baseline;gap:10px;cursor:pointer;list-style:none}
.guide summary::-webkit-details-marker{display:none}
.guide summary::before{content:'▸';color:var(--dim);transition:transform .15s}
.guide[open] summary::before{transform:rotate(90deg)}
.guide[open]{display:flex;flex-direction:column;gap:12px}
.guide-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:13px;line-height:1.5;color:var(--ink,#dbdee1)}
.guide code{font-family:var(--f-mono);font-size:12px;background:var(--wash-2);padding:1px 5px;border-radius:4px}
@media (max-width:520px){.dc-section{flex-direction:column;align-items:flex-start}}

/* Ticket Panel Builder */
.tkb{display:grid;grid-template-columns:minmax(0,1fr) 460px;gap:16px;align-items:start}
@media (max-width:1180px){.tkb{grid-template-columns:1fr}}
.tk-emo{width:38px;height:36px;font-size:18px;display:inline-flex;align-items:center;justify-content:center}
.tk-emo img,.tk-bemo img{width:20px;height:20px;object-fit:contain;vertical-align:middle}
.tk-bemo{display:inline-flex;align-items:center}
.tk-quote{border-left:4px solid #4e5058;padding-left:10px;font-size:14px;color:#dbdee1;line-height:1.4}
.tk-quote ul{margin:2px 0 0;padding-left:18px}
.dc-hr.big{border-top-width:2px;margin:4px 0}
.tk-select{display:flex;align-items:center;justify-content:space-between;gap:8px;height:40px;padding:0 12px;border-radius:6px;background:#1e1f22;border:1px solid #1e1f22;color:#949ba4;font-size:14px;margin-top:6px;max-width:440px}
.tk-avatar{display:flex;align-items:center;justify-content:center;background:#5865f2;color:#fff;font-weight:700;font-size:26px;border-radius:50%}
.chip.warn{color:var(--warn-text);border-color:rgba(252,211,77,.35)}

/* Games Store */
.gs-game>summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none}
.gs-game>summary::-webkit-details-marker{display:none}
.gs-num{width:22px;text-align:right;font-size:12px;color:var(--faint);font-family:var(--f-mono,monospace)}
.gs-cap{width:64px;height:30px;border-radius:4px;object-fit:cover;background:var(--panel);flex-shrink:0}
.gs-sum{display:flex;flex-direction:column;min-width:0}
.gs-sum b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.gs-sum b img{width:18px;height:18px;vertical-align:middle}
.gs-row{cursor:pointer;border-radius:6px}
.gs-row:hover{background:var(--wash)}
.gs-nav{border:0;cursor:pointer;font-family:inherit}
.gs-nav:disabled{opacity:.5;cursor:default}
@media (max-width:900px){.eb,.tkb{grid-template-columns:minmax(0,1fr)}}
#gsEditor .row-b,#tkEditor .row-b{flex-wrap:wrap;gap:8px}

/* OAuth Verify (vauth) — tabbed redesign */
.vauth-card{padding:0;overflow:hidden}
.vauth-tabs{display:flex;border-bottom:1px solid var(--line);background:var(--surf-4)}
.vauth-tab{flex:1;padding:12px 16px;font-size:13px;font-weight:500;color:var(--dim);background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;transition:color .15s,border-color .15s;margin-bottom:-1px}
.vauth-tab:hover{color:var(--ink)}
.vauth-tab.active{color:var(--ink-hi);border-bottom-color:#5865f2}
.vauth-tab-body{padding:24px}

/* Settings tab */
.vauth-settings-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.vauth-link-row{display:flex;align-items:center;gap:10px;background:var(--surf-4);border:1px solid var(--border);border-radius:8px;padding:10px 14px}
.vauth-link-label{font-size:11px;color:var(--dim);margin-bottom:3px;letter-spacing:.04em;text-transform:uppercase}
.vauth-link-code{display:block;font-size:12.5px;color:#7dd3fc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.vauth-step-box{background:var(--surf-4);border:1px solid var(--border);border-radius:8px;padding:14px 18px}
.vauth-step-title{font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--dim);margin-bottom:8px}
.vauth-steps{margin:0;padding-left:20px;color:var(--ink);font-size:13.5px;line-height:2}
.vauth-stats-row{display:flex;gap:24px}
.vauth-stat{display:flex;flex-direction:column;gap:2px}
.vauth-stat-num{font-size:22px;font-weight:700;line-height:1}
.vauth-stat-label{font-size:12px;color:var(--dim)}
.vauth-disabled-msg{background:var(--surf-4);border:1px dashed var(--border);border-radius:8px;padding:20px;text-align:center;color:var(--dim);font-size:13.5px;margin-top:16px}

/* IP Log tab */
.vauth-filter-row{display:flex;align-items:center;gap:12px;margin-bottom:4px}
.vauth-table td,.vauth-table th{font-size:13px;padding:8px 10px;vertical-align:middle}
.vauth-user{display:flex;align-items:center;gap:10px}
.vauth-avatar{width:28px;height:28px;border-radius:50%;object-fit:cover;flex-shrink:0}
.vauth-name{font-size:13px;font-weight:600;white-space:nowrap}
.vauth-id{font-size:11px;color:var(--dim);white-space:nowrap}
.vauth-ip{font-size:12px}
.vauth-isp{display:block;font-size:11px;color:var(--dim)}
.vauth-inviter{font-size:12px}
.vauth-time{font-size:12px;color:var(--dim);white-space:nowrap}
.vauth-days{font-size:12px;color:var(--dim)}
.vauth-empty{padding:40px;text-align:center;color:var(--dim);font-size:13.5px}

/* Verify Log Setup tab */
.vauth-log-current{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--surf-4);border:1px solid #22c55e44;border-radius:8px;padding:12px 16px}
.vauth-log-ch-info{display:flex;align-items:center;gap:12px}
.vauth-log-empty-msg{background:var(--surf-4);border:1px dashed var(--border);border-radius:8px;padding:14px 18px;color:var(--dim);font-size:13.5px}
.vauth-log-setup-form{border-top:1px solid var(--line);padding-top:20px}
.vauth-form-row{display:flex;flex-direction:column;gap:4px}
.vauth-form-label{font-size:12px;font-weight:600;color:var(--dim);letter-spacing:.04em;text-transform:uppercase}
.vauth-log-info-box{background:var(--surf-4);border:1px solid var(--border);border-radius:8px;padding:16px 20px}
.vauth-log-info-title{font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--dim);margin-bottom:12px}
.vauth-log-info-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}
.vauth-log-info-item{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink)}

/* Badges */
.vauth-badge{display:inline-block;font-size:11px;font-weight:700;padding:1px 7px;border-radius:5px;vertical-align:middle;letter-spacing:.02em;margin-right:4px}
.vauth-badge.red{background:#3d1515;color:#f87171}
.vauth-badge.yellow{background:#3d2e00;color:#fbbf24}
.vauth-badge.green{background:#152d1e;color:#4ade80}
.vauth-badge.teal{background:#0e2930;color:#22d3ee}
.vauth-badge.dim{background:transparent;color:var(--dim)}

/* Toggle */
.toggle-wrap{display:inline-flex;align-items:center;cursor:pointer;flex-shrink:0;padding-top:2px}
.toggle-wrap input{position:absolute;opacity:0;width:0;height:0}
.toggle{width:42px;height:24px;background:#374151;border-radius:12px;position:relative;transition:background .2s}
.toggle::after{content:'';position:absolute;width:18px;height:18px;top:3px;left:3px;background:#fff;border-radius:50%;transition:transform .2s}
.toggle-wrap input:checked+.toggle{background:#5865f2}
.toggle-wrap input:checked+.toggle::after{transform:translateX(18px)}

/* ── Links/Buy Embed Customization ── */
.links-loading{padding:24px;color:var(--dim);font-size:13.5px}
.links-card{padding:0;overflow:hidden}
.links-tabs{display:flex;border-bottom:1px solid var(--line)}
.links-tab{background:none;border:none;padding:12px 18px;font-size:13px;color:var(--dim);cursor:pointer;border-bottom:2px solid transparent;transition:color .15s,border-color .15s;white-space:nowrap}
.links-tab:hover{color:var(--ink)}
.links-tab.active{color:var(--ink-hi);border-bottom-color:#5865f2}
.links-tab-body{padding:20px 24px}
.links-info-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.links-stores-list{display:flex;flex-direction:column;gap:12px}
.links-store-row{background:var(--surf-4);border:1px solid var(--border);border-radius:8px;padding:12px 14px;display:flex;flex-direction:column;gap:0}
.links-store-fields{display:flex;gap:8px;flex-wrap:wrap}
.links-inp{font-size:13px}
.links-form{display:flex;flex-direction:column;gap:14px}
.links-field-row{display:flex;flex-direction:column;gap:4px}
.links-label{font-size:12px;font-weight:600;color:var(--dim);letter-spacing:.04em;text-transform:uppercase}
.links-empty-msg{padding:18px;text-align:center;color:var(--dim);font-size:13px;background:var(--surf-4);border:1px dashed var(--border);border-radius:8px}
.links-save-row{display:flex;align-items:center;gap:12px;margin-top:18px;border-top:1px solid var(--line);padding-top:16px}
.links-save-status{font-size:13px;color:var(--dim)}
.btn-sm.danger-link{background:none;border:none;color:#f87171;font-size:12px;padding:2px 4px;cursor:pointer;opacity:.7}
.btn-sm.danger-link:hover{opacity:1}

/* Sidebar dropdown groups */
.nav-group-head{display:flex;align-items:center;justify-content:space-between;width:100%;height:36px;padding:0 12px;border:0;background:transparent;color:var(--dim);font-family:var(--f-mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;border-radius:8px;cursor:pointer}
.nav-group-head:hover{color:var(--ink);background:var(--wash)}
.nav-group-head svg{transition:transform .15s}
.nav-group.open>.nav-group-head svg{transform:rotate(180deg)}
.nav-group-body{display:none;flex-direction:column;gap:3px;padding:2px 0 6px 6px}
.nav-group.open>.nav-group-body{display:flex}
.nav-group[hidden]{display:none}

/* ─────────────────────────────────────────────────────────────────────────────
   Phones and tablets.
   Collected here rather than scattered through the file, because these are all
   answers to the same question — what this panel does on a touch screen — and
   each one is a thing that was actually wrong on a phone rather than a guess.
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width:900px){
  /* Safari zooms into any field whose text is under 16px the moment it is focused, and it does
     not zoom back out afterwards: one tap on a search box and the rest of the panel is stranded
     off to the side at 1.3×. Every field in here was 13px. 16px is the threshold, not a
     preference — this is the fix for the zoom, and it reads better on a phone anyway. */
  .inp,select.inp,textarea.inp,input,select,textarea{font-size:16px}
  textarea.inp{line-height:1.45}

  /* Both Apple and Android ask for 44px of tappable height. These were 32–34px, which is fine
     for a mouse and a coin-toss for a thumb. The visible box is left alone where making it
     bigger would wreck the layout; the tappable area grows instead. */
  .btn{min-height:44px}
  .btn.sm{min-height:44px;padding:0 14px;font-size:13px}
  .icon-btn{width:44px;height:44px}
  .chan,.nav-btn,.row-pick{min-height:46px}
  /* The group headers in the menu are tapped to open a group, so they are targets too. */
  .nav-group-head{height:46px}
  /* Segmented pickers (shape, layout, mode) were 26px chips — fine to click, a guess to tap. */
  .seg button{height:44px;padding:0 14px;font-size:13px}
  .seg{flex-wrap:wrap}
  /* An inline × or similar sitting inside a row: keep its looks, grow what the thumb has to hit. */
  .icon-btn.tight{width:34px;height:34px;position:relative}
  .icon-btn.tight::after{content:'';position:absolute;inset:-6px}

  /* The on/off switches. A switch is drawn 44×24, and the drawing is right — a taller pill would
     look wrong next to its label — so the box stays and the target grows around it. These are the
     most-tapped control in the panel: every setting on Showcase, Verification, Security, Commands
     and Bot Settings is one of them, and 24px of height is a coin toss for a thumb. */
  .sw{position:relative}
  .sw::before{content:'';position:absolute;top:-10px;bottom:-10px;left:-6px;right:-6px}

  /* A field with its size written into the markup. Inline styles beat a stylesheet, so the 16px
     rule above lost to `style="font-size:12px"` on the Embed Builder's three search boxes — and
     12px is under the threshold where Safari zooms the page in on focus and never zooms back.
     The one place !important is the correct tool: it is overriding an inline style, and the value
     is a platform constraint rather than a design choice.
     `min-height` needs no !important, because nothing sets that inline — it grows a 28px box to a
     thumb's worth without fighting the height the page asked for. */
  .inp,input:not([type=color]):not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important}
  .inp,select.inp{min-height:44px}
  textarea.inp{min-height:88px}

  /* Rows in a list that are tapped to pick something — chat rooms, saved panels, presets. */
  .room,.room.on,.pick-row,.list-row{min-height:44px}

  /* The Embed Builder's colour swatches are 32px squares written inline. A pseudo-element cannot
     help the colour input — browsers do not render them on form controls — so both grow instead,
     using min-width/min-height, which nothing sets inline and so needs no !important. */
  [data-ecolor],.swatch-in,input[type=color]{min-width:44px;min-height:44px}

  /* The emoji picker fits as many 40px cells per row as it can, which on a 360px screen lands at
     42px — two short of a thumb's worth. Asking for 44 makes the row fit one fewer and every cell
     reach the minimum, and the panel gets taller so fewer are hidden behind a scroll. */
  .emoji-grid{grid-template-columns:repeat(auto-fill,minmax(44px,1fr));max-height:240px}

  /* A table at phone width pushes the whole page sideways, and then every page scrolls
     horizontally, not just the table. It scrolls inside its own box instead. */
  .t-wrap,.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  table.t{min-width:520px}

  /* Anything laid out as two or more fixed columns becomes one. The pages that set this inline
     are handled in their own files; this catches the shared classes. */
  .grid[style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr)!important}
  .row-b{flex-wrap:wrap;gap:10px}
  .top-actions{margin-left:auto;gap:8px}

  /* A centred dialog with a fixed margin is a desktop shape. On a phone it is a sheet: full
     width, up from the bottom, clear of the home indicator, and scrollable inside. */
  .overlay{padding:0;align-items:flex-end}
  .dialog,.dialog.sm{width:100%;max-width:none;max-height:92dvh;border-radius:18px 18px 0 0;border-bottom:0}
  .dlg-head{padding:16px;position:sticky;top:0;background:var(--panel);z-index:1}
  .dlg-body{padding:16px}
  .dlg-foot{padding:12px 16px;padding-bottom:calc(12px + env(safe-area-inset-bottom));flex-wrap:wrap;position:sticky;bottom:0}
  .dlg-foot .btn{flex:1 1 auto}

  /* Long values — IDs, keys, addresses — used to run off the side of the screen. */
  .mono,code,.key{word-break:break-all}
  pre{overflow-x:auto}
  img,video{max-width:100%;height:auto}
}

/* Toasts sit above the home indicator rather than under it, and span the width on a phone. */
@media (max-width:560px){
  .toast,#toast{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));max-width:none}
}

/* A pointer that is not a mouse gets no hover styling: on a touch screen a :hover state sticks
   after the tap, leaving the last thing touched looking selected. */
@media (hover:none){
  .btn:hover,.nav-btn:hover,.icon-btn:hover,.chan:hover{background:inherit;border-color:inherit}
  .btn.p:hover{background:var(--ac);filter:none}
}

/* ── the editor pages' two-column layouts ──
   Eight pages used to collapse their own grid with a one-off `window.innerWidth` read when they
   painted. Turning a phone sideways, or resizing a window, left the layout wrong until you
   navigated away and back — the check never ran again. It belongs in a media query, which does.
   The thresholds are the ones each page chose for itself; `!important` because the width these
   override is set inline by the page. */
@media (max-width:1300px){
  #mxGrid,#rrGrid,#smGrid{grid-template-columns:minmax(0,1fr)!important}
}
@media (max-width:1100px){
  #cheatGrid,#pfGrid,#rewardGrid,#shopGrid{grid-template-columns:minmax(0,1fr)!important}
}
@media (max-width:1000px){
  #bkGrid{grid-template-columns:minmax(0,1fr)!important}
}

/* The "install this as an app" prompt is pinned to the bottom of the screen, which on a phone is
   on top of the open menu — it was covering two nav rows. It waits while the menu is open. */
body.nav-open #vInstall{display:none}

/* ── the one-line note at the top of a page ──
   Sits in the flow rather than over the page: nothing is covered, nothing has to be dismissed
   before the panel can be used, and a page that has been seen before simply does not draw one. */
.tip-bar{display:flex;align-items:flex-start;gap:10px;margin:0 0 16px;padding:11px 12px;
  background:var(--ac-soft);border:1px solid var(--ac-edge);border-radius:10px;color:var(--ink-2);line-height:1.5}
.tip-bar[hidden]{display:none}
.tip-icon{flex-shrink:0;line-height:1.5}
.tip-text{flex:1;min-width:0}
.tip-x{flex-shrink:0;margin:-4px -4px 0 0;background:none;border:0;color:var(--dim);font-size:17px;line-height:1}
.tip-x:hover{color:var(--ink)}
#tipAgain{font-weight:700}
@media (max-width:560px){ .tip-bar{margin-bottom:12px} }

/* Bug Reports */
.forum-row{display:flex;gap:14px;align-items:flex-start;cursor:pointer;padding:14px 16px}
.forum-row:hover,.forum-row:focus-visible{border-color:var(--ac-edge)}
.forum-main{min-width:0;flex:1}
.forum-title{font-weight:600;overflow-wrap:anywhere}
.forum-prev{margin-top:2px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.forum-meta{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;margin-top:8px}
.forum-vote{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:48px;min-height:52px;padding:6px 8px;border-radius:10px;border:1px solid var(--line-2);background:var(--surf);color:var(--ink);font-size:12px}
.forum-vote b{font-size:15px}
.forum-vote.on{background:var(--ac-soft);border-color:var(--ac-edge);color:var(--ac-text)}
.forum-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55}
.forum-reply.staff{border-color:var(--ac-edge)}
/* changelog */
.cl-day{font-family:var(--f-mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--mute);margin:8px 2px 0}
.cl-entry{padding:14px 16px}
.cl-top{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.cl-title{overflow-wrap:anywhere}
.cl-ver{font-size:12px;color:var(--dim)}
.cl-when{margin-left:auto;font-size:12px}
.cl-body{margin-top:8px;color:var(--dim);overflow-wrap:anywhere}
.cl-body p{margin:4px 0}
.cl-list{margin:6px 0 4px 18px;padding:0}
.cl-list li{margin:2px 0}
.cl-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}

/* ── themes ── */
.theme-wrap{position:relative}
.theme-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:60;width:min(340px,calc(100vw - 24px));padding:12px;border-radius:14px;background:var(--panel);border:1px solid var(--line-2);box-shadow:0 18px 50px var(--shadow)}
.theme-h{font-family:var(--f-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--dim);margin:2px 4px 10px}
.theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.theme-opt{display:flex;flex-direction:column;gap:8px;align-items:flex-start;padding:8px;border-radius:10px;border:1px solid var(--line-2);background:var(--panel-2);color:var(--ink);font:inherit;font-size:13px;font-weight:500;text-align:left;cursor:pointer;min-height:44px}
.theme-opt:hover{border-color:var(--ac-edge)}
.theme-opt.on{border-color:var(--ac-hi);box-shadow:0 0 0 2px var(--ac-soft)}
.theme-sw{display:flex;width:100%;height:26px;border-radius:7px;overflow:hidden;border:1px solid var(--line)}
.theme-sw i{flex:1}
.theme-name{padding:0 2px}
.theme-note{font-size:12px;color:var(--mute);margin:10px 4px 0}

/* ── dual window ── */
.pane{flex:0 0 46%;min-width:0;border-left:1px solid var(--line-2);background:var(--bg)}
.pane iframe{display:block;width:100%;height:100%;border:0;background:var(--bg)}
.shell.dual .main{flex:1 1 0}
.pane-nav{display:flex;gap:8px;align-items:center;margin-left:auto;min-width:0}
.pane-nav .inp{height:36px;max-width:180px}
@media (max-width:1179px){#dualBtn,.pane{display:none}}
.shell.dual .top-actions .btn-txt{display:none}
.shell.dual .top-actions .btn{padding:0 12px}
/* inside the second window: no menu, the pickers in the header take its place */
html.in-pane .side,html.in-pane .nav-scrim,html.in-pane .menu-btn,html.in-pane #dualBtn,html.in-pane #themeBtn,html.in-pane .install-bar,html.in-pane #installPrompt{display:none!important}
html.in-pane .top{padding:0 16px;height:64px}
html.in-pane .top-actions{margin-left:12px}
html.in-pane .content{padding:20px 18px 40px}
html.in-pane .pane-nav{margin-left:auto}
@media (max-width:900px){.top-actions .btn-txt{display:none}.top-actions #themeBtn,.top-actions #notesBtn{padding:0 12px}}
html.in-pane .crumb{display:none}

/* Applications: editor on the left, live preview that stays in view on the right */
.ap-split{display:grid;grid-template-columns:minmax(0,1fr) 470px;gap:16px;align-items:start}
.ap-split>.ap-side{position:sticky;top:84px}
@media (max-width:1100px){.ap-split{grid-template-columns:1fr}.ap-split>.ap-side{position:static;order:-1}}

/* AI assistant drawer */
.ai-tab{position:fixed;right:0;top:50%;transform:translateY(-50%);z-index:48;width:26px;height:84px;border:1px solid var(--line-2);border-right:0;border-radius:12px 0 0 12px;background:var(--panel);color:var(--ink-2);font-size:20px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:-6px 0 24px rgba(0,0,0,.35);transition:right .25s ease,background .15s}
.ai-tab:hover{background:var(--ac-soft);color:var(--ac-text)}
.ai-tab.open{right:min(440px,100vw)}
.ai-drawer{position:fixed;top:0;right:0;bottom:0;width:min(440px,100vw);z-index:49;background:var(--panel);border-left:1px solid var(--line-2);display:flex;flex-direction:column;transform:translateX(100%);transition:transform .25s ease;box-shadow:-18px 0 60px rgba(0,0,0,.45)}
.ai-drawer.open{transform:none}
.ai-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line)}
.ai-msgs{flex:1;overflow:auto;padding:14px 16px;display:flex;flex-direction:column;gap:14px;overscroll-behavior:contain}
.ai-empty{display:flex;flex-direction:column;gap:8px;padding:8px 0}
.ai-m{display:flex;flex-direction:column;gap:4px}
.ai-who{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--mute)}
.ai-m.user .ai-body{background:var(--ac-soft);border:1px solid var(--ac-edge);border-radius:12px;padding:9px 12px;align-self:flex-end;max-width:92%}
.ai-m.user .ai-who{align-self:flex-end}
.ai-body{font-size:14px;line-height:1.6;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;min-width:0}
.ai-body a{color:var(--ac-text)}
.ai-code{font-family:var(--f-mono);font-size:12.5px;background:var(--panel-2);border:1px solid var(--line);border-radius:5px;padding:1px 5px}
.ai-pre{position:relative;background:var(--panel-2);border:1px solid var(--line-2);border-radius:10px;padding:12px;margin:8px 0;overflow:auto;white-space:pre}
.ai-pre code{font-family:var(--f-mono);font-size:12.5px}
.ai-copy{position:absolute;top:6px;right:6px;font-size:11px;padding:2px 8px;border-radius:6px;border:1px solid var(--line-2);background:var(--panel);color:var(--ink-2);cursor:pointer}
.ai-h{display:block;margin-top:6px}.ai-li{display:block;padding-left:4px}.ai-q{display:block;border-left:3px solid var(--line-2);padding-left:10px;color:var(--dim)}
.ai-err{margin-top:6px;color:var(--bad-text,#ff8a8a);font-size:13px}
.ai-form{display:flex;gap:8px;align-items:flex-end;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}
.ai-form textarea{flex:1;resize:none;max-height:160px;min-height:40px}
@media (max-width:700px){.ai-tab{height:64px}.ai-tab.open{right:min(440px,100vw);opacity:0;pointer-events:none}}

/* ── help box (the circled ?) ── */
.help-q{width:32px;height:32px;border-radius:50%;border:1.5px solid var(--ac-edge);background:var(--ac-soft);color:var(--ac-text);font:700 15px/1 var(--f-body);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;flex-shrink:0}
.help-q:hover,.help-q[aria-expanded="true"]{background:var(--ac);color:var(--on-ac);border-color:var(--ac)}
.help-q:focus-visible{outline:2px solid var(--ac-hi);outline-offset:2px}
.help-box{position:fixed;top:60px;right:16px;width:min(400px,calc(100vw - 24px));height:min(560px,calc(100vh - 84px));background:var(--surf);border:1px solid var(--line-2);border-radius:14px;box-shadow:0 18px 50px var(--shadow);z-index:900;display:flex;flex-direction:column;overflow:hidden}
.help-box[hidden]{display:none}
.help-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line)}
.help-thread{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:10px}
.help-msg{max-width:92%;padding:9px 12px;border-radius:12px;font-size:13px;line-height:1.55}
.help-msg.bot{background:var(--wash);align-self:flex-start}
.help-msg.me{background:var(--ac);color:var(--on-ac);align-self:flex-end}
.help-msg ol{margin:6px 0 6px 18px;padding:0}.help-msg li{margin:2px 0}
.help-title{font-weight:700;margin-bottom:4px;color:var(--ink-hi)}
.help-tipline{margin-top:6px;font-size:12px;color:var(--dim)}
.help-actions,.help-rel{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;font-size:12px;color:var(--dim);align-items:center}
.help-chips{display:flex;flex-wrap:wrap;gap:6px;padding:6px 12px 0}
.help-chip{border:1px solid var(--ac-edge);background:var(--ac-soft);color:var(--ac-text);border-radius:999px;padding:4px 10px;font-size:12px;cursor:pointer}
.help-chip:hover{background:var(--ac);color:var(--on-ac)}
.help-form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--line);margin-top:6px}.help-form .inp{flex:1}
.help-ring{position:fixed;z-index:950;border:2px solid var(--ac-hi);border-radius:10px;box-shadow:0 0 0 9999px rgba(0,0,0,.55);pointer-events:none;transition:all .2s}
.help-tip{position:fixed;z-index:960;width:min(320px,calc(100vw - 24px));background:var(--surf);border:1px solid var(--ac-edge);border-radius:12px;padding:12px;box-shadow:0 12px 40px var(--shadow);font-size:13px;line-height:1.5}
.help-tip-row{display:flex;justify-content:space-between;align-items:center;margin-top:10px}
@media(max-width:640px){.help-box{top:56px;right:8px;left:8px;width:auto}}

@media(max-width:860px){.st-two{grid-template-columns:minmax(0,1fr)!important}}

/* ── plans ── */
.nav-btn.locked{opacity:.62}.pl-lock{margin-left:auto;font-size:12px}
.pl-ov{position:fixed;inset:0;z-index:1200;background:rgba(6,5,8,.88);backdrop-filter:blur(8px);overflow-y:auto;display:flex;padding:24px 16px}
.pl-x{position:fixed;top:14px;right:18px;font-size:22px}
.pl-stage{width:min(1040px,100%);margin:auto}
.pl-hello{text-align:center;opacity:0;transform:translateY(14px);transition:opacity .7s ease,transform .7s ease}
.pl-hello.in{opacity:1;transform:none}.pl-hello.out{opacity:0;transform:translateY(-60px);transition:opacity .6s ease-in,transform .6s ease-in}
.pl-hello h1{font:700 clamp(30px,6vw,52px)/1.1 var(--f-display);margin:8px 0;color:var(--ink-hi)}.pl-hello p{font-size:clamp(16px,2.4vw,22px);color:var(--dim);margin:0}
.pl-wave{font-size:56px}.pl-skip{margin-top:26px;background:none;border:0;color:var(--mute);cursor:pointer;font-size:13px}
.pl-head{text-align:center;margin-bottom:22px}.pl-head h2{font:700 clamp(24px,4vw,34px) var(--f-display);margin:0 0 6px;color:var(--ink-hi)}.pl-head p{margin:0;color:var(--dim)}
.pl-note{display:inline-block;margin-top:10px;padding:8px 12px;border-radius:10px;background:var(--ac-soft);border:1px solid var(--ac-edge);font-size:13px}
.pl-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
.pl-grid.enter .pl-card{animation:plIn .7s cubic-bezier(.2,.8,.2,1) both}.pl-grid.enter .pl-card:nth-child(2){animation-delay:.12s}.pl-grid.enter .pl-card:nth-child(3){animation-delay:.24s}
@keyframes plIn{from{opacity:0;transform:translateY(46px)}to{opacity:1;transform:none}}
.pl-card{position:relative;display:flex;flex-direction:column;gap:10px;padding:26px 22px 22px;border-radius:18px;background:var(--surf);border:1px solid var(--line-2);box-shadow:0 10px 36px rgba(0,0,0,.35)}
.pl-card.hot{border-color:var(--ac);box-shadow:0 0 0 1px var(--ac),0 14px 44px rgba(37,99,235,.25)}.pl-card.hl{outline:2px solid var(--ac-hi);outline-offset:3px}
.pl-badge{position:absolute;top:-12px;left:50%;transform:translateX(-50%);background:var(--ac);color:var(--on-ac);border-radius:999px;padding:3px 12px;font-size:12px;font-weight:700;white-space:nowrap}
.pl-card h3{margin:0;font:700 20px var(--f-display);color:var(--ink-hi)}
.pl-price b{font:700 34px var(--f-display);color:var(--ink-hi)}.pl-price span{color:var(--dim);font-size:13px}
.pl-tag{margin:0;color:var(--dim);font-size:13px;min-height:2.6em}.pl-srv{font-size:13px;color:var(--ac-text);font-weight:600}
.pl-feats{list-style:none;margin:6px 0 10px;padding:12px 0 0;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:7px;flex:1;font-size:13px}
.pl-feats li{display:flex;gap:8px;align-items:flex-start}.pl-ck{width:16px;flex-shrink:0;color:var(--ok-text);font-weight:700}
.pl-feats li.no{color:var(--faint)}.pl-feats li.no s{text-decoration-thickness:1.5px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.pl-card .btn{width:100%;justify-content:center;height:42px}
.pl-pay{max-width:560px;margin:auto;background:var(--surf);border:1px solid var(--line-2);border-radius:18px;padding:26px;display:flex;flex-direction:column;gap:12px;animation:plIn .5s both}
.pl-pay.center{text-align:center;align-items:center}.pl-pay h2{margin:0;font:700 26px var(--f-display);color:var(--ink-hi)}.pl-pay h4{margin:6px 0 0}
.pl-back{align-self:flex-start;background:none;border:0;color:var(--dim);cursor:pointer;padding:0}
.pl-methods{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.pl-m{display:flex;gap:8px;align-items:center;justify-content:center;padding:12px;border-radius:12px;border:1px solid var(--line-2);background:var(--wash);color:var(--ink);cursor:pointer;font-weight:600}
.pl-m.on{border-color:var(--ac);background:var(--ac-soft)}
.pl-detail{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:12px;background:var(--panel-2);border:1px solid var(--line)}.pl-ins{font-size:13px;line-height:1.6;color:var(--ink-2)}
@media(max-width:860px){.pl-grid{grid-template-columns:1fr;max-width:420px;margin:0 auto}.pl-card{padding-top:30px}}
@media(prefers-reduced-motion:reduce){.pl-hello,.pl-hello.out,.pl-grid.enter .pl-card,.pl-pay{animation:none;transition:none}}
.pl-pill{margin-left:auto;background:var(--ac);color:var(--on-ac);border-radius:999px;font-size:11px;padding:1px 7px;font-weight:700}

/* plans on a phone: one plan at a time behind tabs, the button right under the price, a tidy header */
.pl-tabs{display:none}
@media(max-width:860px){
  .pl-ov{padding:16px 12px calc(24px + env(safe-area-inset-bottom))}
  .pl-head{margin-bottom:14px}.pl-head h2{font-size:24px}
  .pl-tabs{display:flex;gap:6px;padding:4px;border-radius:12px;background:var(--wash);margin:0 auto 14px;max-width:420px}
  .pl-tab{flex:1;height:40px;border:0;border-radius:9px;background:transparent;color:var(--dim);font-weight:600;font-size:14px;cursor:pointer}
  .pl-tab[aria-selected="true"]{background:var(--ac);color:var(--on-ac)}
  .pl-grid{max-width:420px}
  .pl-grid .pl-card{display:none}
  .pl-grid[data-sel="free"] .pl-card[data-plan="free"],.pl-grid[data-sel="pro"] .pl-card[data-plan="pro"],.pl-grid[data-sel="premium"] .pl-card[data-plan="premium"]{display:flex}
  .pl-card .btn{order:4;height:48px;font-size:15px}.pl-feats{order:5;margin-top:10px}
  .pl-pay{padding:20px 16px}.pl-m{min-height:48px}
  .pl-detail .inp,.pl-pay .inp{font-size:16px;height:46px}
  .pl-x{top:max(10px,env(safe-area-inset-top));right:12px;width:44px;height:44px}
}

/* ── phone polish: header that never overlaps the title, toasts inside the screen, no iOS zoom ── */
.top>div:has(#title){flex:1 1 auto;min-width:0}
#title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-actions{flex-shrink:0}
@media(max-width:900px){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),select,textarea{font-size:16px}
  .toasts{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));align-items:stretch}
  .toast{min-width:0;max-width:none;width:100%}
  .help-box{height:min(560px,calc(100dvh - 76px))}
  .top-actions{gap:8px}
  .top-actions .btn,.top-actions .icon-btn{min-height:40px}
}
@media(max-width:560px){
  .crumb{display:none}
  .top>div:has(#title) .title{font-size:19px}
  #planBtn .pl-lbl{display:none}#planBtn{padding:0 12px}
  .top-actions #saveBtn,.top-actions #discardBtn{padding:0 12px}
  .top-actions .unsaved{display:none}
  .help-q{width:40px;height:40px}
}
@media(max-width:560px){.g4{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}.g4>.card{padding:14px}}
.btn.is-idle{opacity:.55}.btn.is-idle:hover{opacity:.8}
.cheat-drop{outline:2px dashed var(--ac,#60a5fa);outline-offset:2px;border-radius:10px;background:rgba(96,165,250,.08)}
.cheat-x{position:absolute;top:5px;right:6px;width:20px;height:20px;line-height:18px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--dim);font-size:16px;cursor:pointer;opacity:.55}.cheat-row:hover .cheat-x,.cheat-x:focus-visible{opacity:1}.cheat-x:hover{background:rgba(255,90,90,.18);color:#ff8a8a}
/* cheats: a calmer list for hundreds of cheats */
.cheat-grid{grid-template-columns:340px minmax(0,1fr);align-items:start;gap:16px}
.c-listcard{position:sticky;top:12px;max-height:calc(100vh - 28px);display:flex;flex-direction:column}
.cheat-top{display:flex;flex-direction:column;gap:8px}
.cheat-scroll{overflow:auto;flex:1 1 auto;min-height:220px;margin:4px -6px 0;padding:0 6px;display:flex;flex-direction:column;gap:2px;scrollbar-width:thin}
.cheat-row{position:relative;display:flex;align-items:center;gap:6px}.cheat-row.picked .chan{background:rgba(96,165,250,.12)}
.cheat-row .chan{flex:1;min-width:0;height:auto;padding:7px 28px 7px 10px;display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;gap:10px;text-align:left;cursor:grab}
.cheat-row .ct{font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.cheat-row .cp{font-size:11.5px;color:var(--dim);white-space:nowrap;flex:none;max-width:46%;overflow:hidden;text-overflow:ellipsis}
.cheat-pick{flex:none;width:16px;height:16px;accent-color:var(--ac,#60a5fa)}
.cheat-group{border-radius:10px;margin-bottom:2px}.cg-head{display:flex;align-items:center;gap:6px}
.cg-head .nav-group-head{display:flex;align-items:center;gap:8px;flex:1;min-width:0;background:none;border:0;color:var(--dim);padding:7px 4px;cursor:pointer;text-align:left}
.cg-head .nav-group-head:hover{color:var(--ink)}.cg-arrow{display:inline-block;transition:transform .15s;flex:none}.cg-name{font-weight:600;letter-spacing:.02em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cg-count{margin-left:auto;flex:none}
.cg-edit{border:0;background:none;color:var(--dim);cursor:pointer;opacity:0;width:22px;height:22px;border-radius:6px;flex:none}.cheat-group:hover .cg-edit,.cg-edit:focus-visible{opacity:.9}.cg-edit:hover{background:var(--wash);color:var(--ink)}
.cg-body{display:flex;flex-direction:column;gap:2px;padding:0 0 6px 8px;border-left:1px solid var(--line);margin-left:7px}.cg-more{align-self:flex-start;margin:4px 0 0 6px}
.cheat-newgroup{margin-top:8px;border:1px dashed var(--line);border-radius:10px;padding:9px;text-align:center;color:var(--dim);font-size:12.5px}
.cheat-bulk{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:rgba(96,165,250,.07)}
.cheat-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.cheat-stat{display:flex;flex-direction:column;gap:2px;text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel-2,transparent);color:var(--ink);cursor:pointer}.cheat-stat b{font-size:22px}.cheat-stat span{font-size:12px;color:var(--dim)}.cheat-stat:hover:not(.flat){border-color:var(--ac,#60a5fa)}.cheat-stat.flat{cursor:default}
.cheat-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.cheat-tile{display:flex;flex-direction:column;gap:3px;text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:transparent;color:var(--ink);cursor:pointer}.cheat-tile:hover{border-color:var(--ac,#60a5fa);background:rgba(96,165,250,.06)}.cheat-tile b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cheat-tile-ex{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.75}
.cheat-tips summary{cursor:pointer;font-weight:600}.cheat-tips ul{margin:10px 0 0;padding-left:20px;color:var(--dim);line-height:1.7;font-size:13.5px}.cheat-tips b{color:var(--ink)}
@media(max-width:900px){.cheat-grid{grid-template-columns:1fr}.c-listcard{position:static;max-height:none}.cheat-scroll{max-height:60vh}}
.cheat-x{top:50%;transform:translateY(-50%)}

.ov-slogan{margin:4px 0 0;color:var(--ac-text);font-weight:600;font-size:13px}

.mark:has(img){background:transparent;box-shadow:none}.mark img{object-fit:contain}

/* ── Notepad ── */
.np-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.np-quick .inp{width:100%}
.np-grid{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:16px;align-items:start}
.np-side{display:flex;flex-direction:column;gap:10px}
.np-tags{display:flex;gap:6px;flex-wrap:wrap}
.np-tags .chip{cursor:pointer;border:0}
.np-tags .chip.on{background:var(--ac);color:#fff}
.np-list{display:flex;flex-direction:column;gap:6px;max-height:60vh;overflow:auto}
.np-item{display:flex;flex-direction:column;gap:2px;text-align:left;width:100%;padding:9px 11px;border-radius:10px;border:1px solid var(--line);background:var(--panel-2,transparent);color:inherit;cursor:pointer}
.np-item:hover{border-color:var(--ac-hi)}
.np-item.on{border-color:var(--ac);background:color-mix(in srgb,var(--ac) 14%,transparent)}
.np-item b{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.np-item .dim{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.np-when{font-size:11px!important}
.np-title{font-size:17px;font-weight:700}
.np-body{min-height:260px;resize:vertical;line-height:1.55}
@media (max-width:820px){.np-grid{grid-template-columns:1fr}.np-list{max-height:240px}}
.ov-open{margin:6px 0 0;font-size:12.5px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ov-open .inp{height:30px;padding:0 8px;width:auto}
