/* Panel theme: friendly and cute, still calm and professional.
   Loaded after panel.css and type.css. A floating rounded sidebar, a pastel icon tile per page (each page has its
   own colour), softly tinted stat tiles, pill buttons with a gentle press, pastel badges and round, bouncy details.
   Surfaces stay dimmed blue-grey, never stark white. The pixel font is only a small accent. */

body.panel {
  --ink: #1b2440;
  --gold: #ffcb3d; --gold-hi: #ffd65c;
  --bg: #dce2ea; --bg-2: #d4dbe5;
  --surface: #edf0f4; --surface-2: #e4e8ee; --surface-3: #d9dfe7;
  --line: #d2d9e3; --line-2: #c0c9d6;
  --side: #e8ecf1; --glass: rgba(220,226,234,.82);
  --r-box: 20px; --r-ctl: 12px;
  --sh-1: 0 1px 2px rgba(27,36,64,.06), 0 6px 18px -8px rgba(27,36,64,.16);
  --sh-2: 0 2px 4px rgba(27,36,64,.06), 0 16px 36px -14px rgba(27,36,64,.26);
  /* Pastel pairs: a soft tile colour and the glyph colour on it */
  --mint: #d3efdf;  --mint-ink: #1d8a53;
  --sky: #d5e4fa;   --sky-ink: #2c66c7;
  --butter: #f8e7b0; --butter-ink: #946500;
  --peach: #f9dacb; --peach-ink: #bf5128;
  --lilac: #e2dbf6; --lilac-ink: #6549c0;
  --rose: #f6d6e2;  --rose-ink: #b23d69;
  --aqua: #cdecec;  --aqua-ink: #1b7f80;
  --slate: #dde2ea; --slate-ink: #3f4a66;
  background: radial-gradient(1100px 520px at 75% -12%, rgba(130,175,255,.20), transparent 70%), var(--bg);
}
body.panel :focus-visible { outline: 3px solid rgba(44,102,199,.45); outline-offset: 2px; border-radius: 10px; }

/* ---------- Layout: the sidebar floats as its own rounded card ---------- */
body.panel .app { grid-template-columns: 256px 1fr; gap: 0; padding: 12px 0 12px 12px; }
.side {
  background: var(--side); border: 1px solid rgba(255,255,255,.35); border-radius: 24px;
  box-shadow: var(--sh-1); padding: 14px 12px; gap: 10px;
}
.side-top .brand span { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-top .brand-mark { filter: none; }
.side .badge.violet { background: var(--butter); color: var(--butter-ink); border-color: transparent; }

.ws-btn, .switch-btn { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1); }
.ws-btn:hover, .switch-btn:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }
.ws-ico { border-radius: 12px; }
.srv-ico.srv-logo { border-radius: 10px; }
.ws-switch { margin-bottom: -4px; }
.ws-btn small { font: 600 10.5px var(--sans); letter-spacing: .06em; }

/* Navigation: every page gets its own pastel icon tile */
.nav-label { font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.nav-list { gap: 2px; }
.nav-item { gap: 11px; padding: 5px 8px; border-radius: 14px; color: var(--text-2); font-size: 14px; transition: background .15s, color .15s, box-shadow .2s; }
/* Pixel sprites instead of line icons (sprites.js): a soft shadow under each, a little hop on hover and when picked */
.nav-item .spr { flex: none; width: 24px; height: 24px; margin: 0 2px; filter: drop-shadow(0 2px 0 rgba(27,36,64,.12)); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.nav-item .ico { width: 18px; height: 18px; margin: 0 5px; color: var(--ti, var(--slate-ink)); }
.nav-item:hover { background: rgba(var(--tint, 27, 36, 64),.045); color: var(--text); }
.nav-item:hover .spr { transform: translateY(-2px) rotate(-5deg); }
.nav-item.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--sh-1); }
.nav-item.on .spr { animation: spr-hop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes spr-hop { 40% { transform: translateY(-4px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .nav-item .spr { transition: none; animation: none; } }
.nav-item[data-view="home"]         { --t: var(--sky);    --ti: var(--sky-ink); }
.nav-item[data-view="tools"]        { --t: var(--lilac);  --ti: var(--lilac-ink); }
.nav-item[data-view="studio"]       { --t: var(--butter); --ti: var(--butter-ink); }
.nav-item[data-view="assistant"]    { --t: var(--mint);   --ti: var(--mint-ink); }
.nav-item[data-view="overview"]     { --t: var(--sky);    --ti: var(--sky-ink); }
.nav-item[data-view="console"]      { --t: var(--slate);  --ti: var(--slate-ink); }
.nav-item[data-view="files"]        { --t: var(--butter); --ti: var(--butter-ink); }
.nav-item[data-view="players"]      { --t: var(--peach);  --ti: var(--peach-ink); }
.nav-item[data-view="backups"]      { --t: var(--aqua);   --ti: var(--aqua-ink); }
.nav-item[data-view="integrations"] { --t: var(--rose);   --ti: var(--rose-ink); }
.nav-item[data-view="settings"]     { --t: var(--slate);  --ti: var(--slate-ink); }
.nav-item .count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); text-align: center; font: 600 11.5px var(--sans); color: var(--text-2); }
.nav-item.on .count { background: var(--t, var(--surface-2)); color: var(--ti, var(--text-2)); }
.nav-item .new-dot { background: var(--peach-ink); box-shadow: 0 0 0 3px var(--peach); }
body.panel .pro-tag { background: var(--butter); color: var(--butter-ink); border-radius: 999px; font: 600 10.5px var(--sans); letter-spacing: .02em; }

/* Usage card: a little sunny box */
.usage { padding: 10px 12px; gap: 6px; border-radius: 16px; background: linear-gradient(160deg, var(--butter), var(--surface) 75%); border: 1px solid rgba(148,101,0,.14); box-shadow: none; }
.usage-row b { font-weight: 600; }
.demo-note { border-radius: 14px; }
.user-row .avatar { border-radius: 10px; }

/* ---------- Meters: round and smooth ---------- */
body.panel .meter { height: 8px; border-radius: 999px; background: rgba(var(--tint, 27, 36, 64),.09); }
body.panel .meter i { border-radius: 999px; background: linear-gradient(90deg, #5cc98f, #2fb06d); }
body.panel .usage .meter i { background: linear-gradient(90deg, #ffd65c, #f4b400); }

/* ---------- Top bar: light and airy ---------- */
.top { height: 62px; background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 20px; }
.crumbs b { font: 700 16px var(--display); letter-spacing: -.01em; }
body.panel .status-pill { border-radius: 999px; padding: 4px 11px 4px 9px; font-weight: 600; background: var(--mint); color: var(--mint-ink); border-color: transparent; }
body.panel .status-pill.off { background: var(--slate); color: var(--slate-ink); }
body.panel .status-pill.busy { background: var(--butter); color: var(--butter-ink); }
body.panel .status-pill.sleep { background: var(--lilac); color: var(--lilac-ink); }
body.panel .status-pill.sleep svg { flex: none; }
body.panel .status-pill .dot { background: currentColor; }
.search { height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1); padding: 0 8px 0 14px; }
.search:hover { border-color: var(--line-2); background: var(--surface); box-shadow: var(--sh-2); }
body.panel kbd { border-radius: 6px; }
.power { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: var(--sh-1); padding: 2px; gap: 2px; }
.power button { width: 34px; height: 34px; border-radius: 999px; background: transparent; }
.power button + button { border-left: 0; }
.power button:hover { background: var(--surface-2); }
/* A sleeping free server: one clear way to wake it */
.power button.wake { width: auto; padding: 0 12px 0 10px; gap: 6px; display: inline-flex; align-items: center; background: var(--lilac); color: var(--lilac-ink); font-weight: 600; font-size: 13px; }
.power button.wake:hover { filter: brightness(.97); background: var(--lilac); }
.burger { border-radius: 12px; background: var(--surface); box-shadow: var(--sh-1); }

/* ---------- Buttons: soft pills with a gentle press ---------- */
body.panel .btn {
  border-radius: 999px;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .15s, border-color .15s;
}
body.panel .btn:hover { transform: translateY(-1px); }
body.panel .btn:active { transform: translateY(1px) scale(.97); }
body.panel .btn-primary { background: var(--gold); color: var(--ink); border: 0; box-shadow: inset 0 -3px 0 rgba(148,101,0,.22), 0 6px 16px -8px rgba(230,160,0,.75); }
body.panel .btn-primary:hover { background: var(--gold-hi); box-shadow: inset 0 -3px 0 rgba(148,101,0,.22), 0 10px 22px -8px rgba(230,160,0,.8); }
body.panel .btn-primary:active { box-shadow: inset 0 -1px 0 rgba(148,101,0,.22); }
body.panel .btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: inset 0 -2px 0 rgba(27,36,64,.06), var(--sh-1); }
body.panel .btn-ghost:hover { background: var(--surface); border-color: var(--line-2); box-shadow: inset 0 -2px 0 rgba(27,36,64,.06), var(--sh-2); }
body.panel .btn-danger { background: var(--bad-bg, #f7d9d4); color: var(--bad-ink, #a3372b); border: 0; box-shadow: inset 0 -2px 0 rgba(163,55,43,.15); }
body.panel .btn-glow { background: var(--ink-fill, var(--ink)); color: #f3f5f9; border: 0; box-shadow: inset 0 -3px 0 rgba(0,0,0,.3), 0 8px 20px -10px rgba(27,36,64,.7); }
body.panel .btn-glow::before, body.panel .btn-glow::after { display: none; }
body.panel .btn-glow:hover { background: #26315a; }
body.panel .icon-btn { border-radius: 10px; }

/* ---------- Cards ---------- */
body.panel :is(.panel-card, .tile, .rcard, .plan-card, .int, .add-box, .studio-hero, .modal, .palette, .rec, .srv-card) { border-radius: var(--r-box); border-color: var(--line); background: var(--surface); box-shadow: var(--sh-1); }
.panel-card > header { padding: 15px 18px; font: 600 14.5px var(--display); border-bottom-color: var(--line); }
.panel-card > header small { font: 400 12.5px var(--sans); }
.rcard { border-radius: 18px; }
.rcard h4 { font: 600 12.5px var(--sans); color: var(--text-2); }

/* Stat tiles: each one softly tinted, with its icon in a little bubble */
.tile { position: relative; overflow: hidden; padding: 18px; background: linear-gradient(165deg, var(--t, var(--sky)) 0%, var(--surface) 78%); border-color: transparent; }
.tiles .tile:nth-child(1) { --t: var(--mint);   --ti: var(--mint-ink); }
.tiles .tile:nth-child(2) { --t: var(--peach);  --ti: var(--peach-ink); }
.tiles .tile:nth-child(3) { --t: var(--sky);    --ti: var(--sky-ink); }
.tiles .tile:nth-child(4) { --t: var(--lilac);  --ti: var(--lilac-ink); }
.tile small { font: 600 13px var(--sans); color: var(--text-2); gap: 8px; }
.tile small .spr { flex: none; width: 24px; height: 24px; filter: drop-shadow(0 2px 0 rgba(27,36,64,.12)); }
.tile small .ico { width: 18px; height: 18px; color: var(--ti, var(--sky-ink)); }
.tile b { margin-top: 4px; }

/* Lists inside cards */
.feed-row { border-radius: 14px; }
.feed-row:hover { background: var(--surface-2); }
.feed-row .fi, .act i, .pc-items .k, .rec-list .k { border-radius: 10px; border: 0; background: var(--sky); color: var(--sky-ink); }
.feed-row .fi.ai, .act i.ai { background: var(--mint); color: var(--mint-ink); }
.act i.warn { background: var(--butter); color: var(--butter-ink); }
.pc-items .k.store { background: var(--lilac); color: var(--lilac-ink); }
.pc-items .k.discord { background: var(--sky); color: var(--sky-ink); }
.pc-items .k.warn { background: var(--butter); color: var(--butter-ink); }
body.panel :is(.cat-item, .known-card, .studio-item, .int li, .rec-list li, .diag div) { border-radius: 16px; background: var(--surface-2); border-color: transparent; }
.can-list .ico { width: 22px; height: 22px; padding: 4px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); }

/* Badges and chips: soft pastel pills */
body.panel .badge { border-radius: 999px; border-color: transparent; background: var(--slate); color: var(--slate-ink); font: 600 11.5px var(--sans); text-transform: none; letter-spacing: 0; padding: 3px 10px; }
body.panel .badge.good { background: var(--mint); color: var(--mint-ink); }
body.panel .badge.warn, body.panel .badge.violet { background: var(--butter); color: var(--butter-ink); }
body.panel .badge.bad { background: var(--bad-bg, #f7d9d4); color: var(--bad-ink, #a3372b); }
body.panel .srv-meta span { border-radius: 999px; }
body.panel .tool-trace span { border-radius: 999px; background: var(--surface); }
body.panel .tool-trace span .ok { color: var(--mint-ink); }

/* ---------- Views ---------- */
.view-head h1 { letter-spacing: -.025em; }

/* All servers */
body.panel .ws-hero { border-radius: 24px; border: 0; background: linear-gradient(120deg, color-mix(in srgb, var(--ws, #22b36b) 20%, var(--surface)), var(--surface) 70%); box-shadow: var(--sh-1); }
body.panel .srv-card { border-radius: 22px; }
body.panel .srv-card:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: var(--sh-2); }
body.panel .srv-new { border-radius: 22px; border: 2px dashed var(--line-2); background: rgba(var(--glass-rgb, 237,240,244),.5); box-shadow: none; }
body.panel .srv-new:hover { border-color: var(--sky-ink); background: rgba(213,228,250,.45); transform: none; }
body.panel .srv-new-ico { border-radius: 18px; background: var(--sky); color: var(--sky-ink); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
body.panel .srv-new:hover .srv-new-ico { transform: scale(1.1) rotate(8deg); }
body.panel .world-card { border-radius: 22px; }
body.panel .world-card .wc-label { font-family: var(--sans); }

/* Assistant */
body.panel .welcome h2 { letter-spacing: -.025em; }
body.panel .suggest button { border-radius: 18px; border-color: transparent; padding: 14px; gap: 12px; align-items: center; }
body.panel .suggest button:hover { transform: translateY(-2px); border-color: transparent; }
/* Pixel sprites on the suggestion cards: a soft shadow and a little hop when you hover the card */
body.panel .suggest button .spr { flex: none; width: 28px; height: 28px; margin: 0 4px 0 2px; filter: drop-shadow(0 2px 0 rgba(27,36,64,.12)); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
body.panel .suggest button:hover .spr { transform: translateY(-3px) rotate(-6deg); }
body.panel .suggest button .ico { width: 20px; height: 20px; margin: 0 8px 0 6px; color: var(--sky-ink); }
@media (prefers-reduced-motion: reduce) { body.panel .suggest button .spr { transition: none; } }
body.panel .m.user .bubble { background: var(--ink-fill, var(--ink)); color: #f1f4f9; border-radius: 20px 20px 6px 20px; }
body.panel .composer { border-radius: 24px; border-color: var(--line); }
body.panel .composer:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 4px rgba(255,203,61,.35), var(--sh-2); }
body.panel .send { border-radius: 999px; background: var(--gold); color: var(--ink); box-shadow: inset 0 -2px 0 rgba(148,101,0,.25); }
body.panel .send:disabled { background: var(--surface-3); color: var(--muted); opacity: 1; box-shadow: none; }
body.panel .send.stop { background: var(--ink-fill, var(--ink)); }
body.panel .quick .chip, body.panel .c-chips .chip { border-color: transparent; }
body.panel .rail { background: transparent; border-left: 0; }
body.panel .plan-card { border-radius: 22px; overflow: hidden; }
body.panel .plan-card.done { box-shadow: 0 0 0 2px var(--mint), var(--sh-1); }

/* Console and code: soft dark islands */
body.panel .con-out { border-radius: 20px; border: 0; box-shadow: var(--sh-2); }
body.panel .con-in { border-radius: 999px; border-color: var(--line); box-shadow: var(--sh-1); padding-left: 18px; }
body.panel .con-in:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 4px rgba(255,203,61,.35), var(--sh-1); }
body.panel .con-in input:focus-visible { outline: none; }
body.panel .con-in span { color: var(--mint-ink); }
body.panel .pal-in input:focus-visible { outline: none; }

/* Files */
body.panel .files { padding: 0 20px 20px; gap: 12px; }
body.panel .tree { border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--sh-1); }
body.panel .tree button { border-radius: 10px; }
body.panel .files .viewer { border-radius: 20px; overflow: hidden; box-shadow: var(--sh-2); background: #141b31; }
body.panel .viewer-head { background: #1b2440; color: #b8c0d4; border-bottom-color: rgba(255,255,255,.08); }
body.panel .viewer-head .badge { background: rgba(255,255,255,.08); color: #b8c0d4; }

/* Tables */
body.panel .table th { font: 600 12px var(--sans); color: var(--muted); }
body.panel .table tbody tr:hover { background: var(--surface-2); }

/* Forms */
body.panel :is(.field input, .field select, .field .with-suffix, .modal input, .add-form input, .chats-search) { border-radius: 12px; background: var(--surface-2); border-color: var(--line); }
body.panel :is(.field input, .field select, .add-form input):focus { border-color: var(--line-2); box-shadow: 0 0 0 4px rgba(255,203,61,.3); }
body.panel .switch { width: 42px; height: 24px; }
body.panel .switch i { border-radius: 999px; background: var(--surface-3); }
body.panel .switch i::after { top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 3px rgba(27,36,64,.3); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
body.panel .switch input:checked + i { background: #2fb06d; }
body.panel .switch input:checked + i::after { transform: translateX(18px); }

/* Studio */
body.panel .studio-title .pro-tag { font-size: 12px; padding: 3px 10px; }

/* Menus, pop-ups and toasts */
body.panel :is(.menu, .chat-menu, .slash-menu, .mode-menu) { border-radius: 18px; border-color: var(--line); box-shadow: var(--sh-2); }
body.panel :is(.menu button, .slash-menu button, .mode-menu button, .pal-item) { border-radius: 12px; }
body.panel :is(.tree button.on, .pal-item.on, .slash-menu button.on, .slash-menu button:hover) { background: var(--sky); color: var(--text); }
body.panel :is(.pal-item.on .ico, .tree button.on .ico) { color: var(--sky-ink); }
body.panel .toast { border-radius: 16px; }
body.panel .palette { border-radius: 22px; }
body.panel .overlay { background: rgba(var(--tint, 27, 36, 64),.28); }

/* Phone */
@media (max-width: 860px) {
  body.panel .app { padding: 0; grid-template-columns: minmax(0, 1fr); }
  .top { padding: 0 12px; }
  .side { border-radius: 0 24px 24px 0; box-shadow: none; }
  .side.open { box-shadow: var(--sh-2); }
  body.panel .files { padding: 0 12px 12px; }
}

/* Keep the whole sidebar on screen at laptop height */
.demo-note { padding: 6px 10px; font-size: 11.5px; line-height: 1.35; }
.usage-row:last-child span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-row:last-child { min-width: 0; }
.ws-btn, .switch-btn { padding-block: 6px; }
.user-row { padding: 2px 6px; }

/* ---------- New server wizard: soft, chunky choices over the pixel world ---------- */
body.panel {
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  --gold-edge: rgba(148, 101, 0, .22);
  --frost: rgba(237, 240, 244, .94); /* card colour over the world: dim, never white */
}
body.panel .create-glow { background: radial-gradient(closest-side, rgba(226, 232, 240, .8), rgba(226, 232, 240, .45) 55%, rgba(226, 232, 240, 0)); }
body.panel .wiz-back { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--frost); box-shadow: var(--sh-1); color: var(--text); font-weight: 600; text-decoration: none; }
body.panel .wiz-back:hover { background: var(--surface); box-shadow: var(--sh-2); }
body.panel .wiz-dots { gap: 7px; }
body.panel .wiz-dots i { width: 10px; height: 10px; border-radius: 999px; background: rgba(var(--tint, 27, 36, 64), .18); }
body.panel .wiz-dots i.done { background: #2fb06d; }
body.panel .wiz-dots i.on { width: 30px; background: var(--gold); box-shadow: inset 0 -2px 0 var(--gold-edge); }

/* Big choices: chunky cards that lift, wiggle their picture and turn gold with a green tick when picked */
body.panel .wiz-card, body.panel .wiz-wish {
  position: relative; border: 2px solid transparent; background: var(--frost);
  box-shadow: inset 0 -4px 0 rgba(27, 36, 64, .07), var(--sh-1);
  transition: transform .25s var(--pop), box-shadow .2s, border-color .2s, background .2s;
}
body.panel .wiz-card { border-radius: 26px; padding: 26px 16px 22px; }
body.panel :is(.wiz-card, .wiz-wish):hover:not([disabled]), body.panel :is(.wiz-card, .wiz-wish):focus-visible { transform: translateY(-4px); border-color: transparent; box-shadow: inset 0 -4px 0 rgba(27, 36, 64, .07), var(--sh-2); }
body.panel :is(.wiz-card, .wiz-wish):active:not([disabled]) { transform: translateY(0) scale(.98); }
body.panel .wiz-card > img:first-child, body.panel .wiz-card > svg:first-child { width: 46px; height: 46px; margin-bottom: 6px; transition: transform .3s var(--pop); }
body.panel :is(.wiz-card, .wiz-wish):hover:not([disabled]) :is(img, .spr) { transform: translateY(-3px) rotate(-8deg) scale(1.08); }
body.panel .wiz-card.on, body.panel .wiz-wish.on { background: var(--warn-bg, #fbefc9); border-color: #f1b928; box-shadow: inset 0 -4px 0 var(--gold-edge), 0 12px 24px -12px rgba(230, 160, 0, .8); }
body.panel .wiz-card.on::after {
  content: ""; position: absolute; top: -8px; left: -8px; width: 26px; height: 26px; border-radius: 999px;
  background: #22a463 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='%23f2fff7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: 0 0 0 3px var(--frost); animation: tick-pop .35s var(--pop);
}
@keyframes tick-pop { from { transform: scale(0); } }

/* Who's going to play: a little crowd of faces over the number */
body.panel .wiz-crowd { display: flex; justify-content: center; margin-bottom: 4px; transition: transform .3s var(--pop); }
body.panel .wiz-crowd .spr { width: 36px; height: 36px; filter: drop-shadow(0 2px 0 rgba(27, 36, 64, .12)); }
body.panel .wiz-crowd .spr + .spr { margin-left: -12px; }
body.panel .wiz-card:hover .wiz-crowd { transform: translateY(-3px); }
body.panel .wiz-card:hover .wiz-crowd .spr { transform: none; }
body.panel .wiz-card .wiz-num { font: 750 30px/1 var(--display); letter-spacing: -.02em; margin: 2px 0 2px; }

/* Wishes: a sprite, the words, and a round tick on the right */
body.panel .wiz-wish { border-radius: 20px; padding: 13px 16px; gap: 12px; }
body.panel .wiz-wish .spr { flex: none; width: 28px; height: 28px; filter: drop-shadow(0 2px 0 rgba(27, 36, 64, .12)); transition: transform .3s var(--pop); }
body.panel .wiz-wish .ww-t { flex: 1; min-width: 0; }
body.panel .wiz-wish .tick { width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--line-2); background: transparent; }
body.panel .wiz-wish.on .tick { background: #22a463; border-color: #22a463; animation: tick-pop .3s var(--pop); }
body.panel .wiz-wish.on .tick::after { border-color: #f2fff7; }
body.panel .wiz-other { border-radius: 999px; border: 2px solid transparent; background: var(--frost); box-shadow: inset 0 -3px 0 rgba(27, 36, 64, .06), var(--sh-1); padding: 0 22px; }
body.panel .wiz-other:focus, body.panel .wiz-name:focus { border-color: #f1b928; box-shadow: 0 0 0 4px rgba(255, 203, 61, .35), var(--sh-1); }

/* Name and summary */
body.panel .wiz-name { border-radius: 999px; border: 2px solid transparent; background: var(--frost); box-shadow: inset 0 -4px 0 rgba(27, 36, 64, .06), var(--sh-1); }
body.panel .wiz-addr { justify-self: center; padding: 6px 8px 6px 16px; border-radius: 999px; background: var(--frost); box-shadow: var(--sh-1); }
body.panel .wiz-summary { border-radius: 24px; border: 0; background: var(--frost); }
body.panel .wiz-summary li .spr { width: 24px; height: 24px; flex: none; filter: drop-shadow(0 2px 0 rgba(27, 36, 64, .1)); }
body.panel .wiz-summary li > img:first-child { width: 22px; height: 22px; margin: 0 1px; }
body.panel .wiz-form .eula, body.panel .eula { border-radius: 20px; }
body.panel :is(.wiz-note, .wiz-form .wiz-note) { background: var(--frost); box-shadow: var(--sh-1); }

/* Building: a candy-striped bar that moves, and the steps in a soft card */
body.panel .wiz-bar { height: 18px; padding: 3px; border-radius: 999px; background: var(--frost); box-shadow: inset 0 2px 3px rgba(27, 36, 64, .14); }
body.panel .wiz-bar i {
  border-radius: 999px; background: repeating-linear-gradient(-45deg, #ffcb3d 0 10px, #ffdc75 10px 20px);
  background-size: 28.28px 28.28px; box-shadow: inset 0 -2px 0 var(--gold-edge); animation: candy .9s linear infinite;
}
@keyframes candy { to { background-position: 28.28px 0; } }
body.panel .wiz-steps { max-width: 380px; padding: 14px 20px; border-radius: 22px; background: var(--frost); box-shadow: var(--sh-1); gap: 12px; }

/* Done */
body.panel .done-hero.wiz .addr { border: 0; border-radius: 999px; padding: 8px 8px 8px 20px; background: var(--frost); box-shadow: var(--sh-2); }
body.panel .done-hero.wiz .icon-btn { border-radius: 999px; }
body.panel .wiz-next { border-radius: 20px; align-items: center; }
body.panel .wiz-next .spr { flex: none; width: 24px; height: 24px; margin: 0; }

@media (prefers-reduced-motion: reduce) { body.panel .wiz-bar i { animation: none; } }

/* The live file editor in the dark code viewer */
body.panel #lf-view .lf-editor { background: #141b31; }
body.panel #lf-view .lf-gutter { color: #56617f; border-right-color: rgba(255,255,255,.06); }
body.panel #lf-view .lf-gutter span.bad { color: #ff9b8f; background: rgba(255,123,114,.16); }
body.panel #lf-view .lf-hl { color: #d7deec; }
body.panel #lf-view .lf-code textarea { caret-color: #ffcb3d; }
body.panel #lf-view .lf-code textarea::selection { background: rgba(255,203,61,.28); }
body.panel #lf-view .lf-hl .c { color: #7d879f; } body.panel #lf-view .lf-hl .k { color: #ffcb3d; }
body.panel #lf-view .lf-hl .v { color: #6ee7b7; } body.panel #lf-view .lf-hl .s { color: #ffb38a; } body.panel #lf-view .lf-hl .n { color: #79a8ff; }
body.panel #lf-view .lf-empty-view { color: #b8c0d4; }
body.panel #lf-view .lf-empty-view b { color: #fff; }
body.panel #lf-view .lf-empty-view code { color: #ffcb3d; }
body.panel #lf-view .lf-history { background: #1b2440; color: #b8c0d4; border-top-color: rgba(255,255,255,.08); }
body.panel #lf-view .lf-history b { color: #fff; }
body.panel #lf-view .lf-ver { border-top-color: rgba(255,255,255,.08); }
body.panel #lf-view .lf-head .lf-path { color: #e6e9f0; }

/* ---------- Networks (Minecraft workspace home) ---------- */
.nets { display: grid; gap: 12px; margin: 18px 0; }
.nets-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.nets-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; }
.nets-head p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
.nets code, .in-modal code { font: 12.5px var(--mono); background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
.net { display: grid; gap: 10px; padding: 16px; }
.net-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.net-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.net-members li { display: grid; grid-template-columns: 1fr auto 34px; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }
.net-name { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.net-acts select { padding: 6px 10px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 13px; }
.net-down { margin-left: auto; }
.net-pick { display: grid; gap: 4px; }
.srv-net-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; color: var(--lilac-ink); }
.net-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.net-lobby { font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) { .net-members li { grid-template-columns: 1fr 34px; } .net-members li code { grid-column: 1; grid-row: 2; justify-self: start; } }

/* ---------- Discord bot: rank -> role picker ---------- */
.dbot-map { display: grid; gap: 6px; margin: 4px 0; }
.dbot-row { display: grid; grid-template-columns: minmax(90px, 160px) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.dbot-row select { min-width: 0; padding: 6px 10px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 13px; }
.in-sub code { font: 12.5px var(--mono); background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }

/* A card in the assistant's chat on free servers (panel.js promo()): under an answer, never inside it.
   Lined up with the answers (past the avatar), a soft lilac wash, the pixel sprite in its own tile. */
body.panel .promo {
  position: relative; margin-left: 40px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  padding: 14px 44px 14px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(120deg, color-mix(in srgb, var(--lilac) 70%, var(--surface)) 0%, var(--surface) 62%);
  box-shadow: var(--sh-1); animation: promo-in .5s var(--ease) both; transition: opacity .2s, transform .2s;
}
@keyframes promo-in { from { opacity: 0; transform: translateY(8px) scale(.99); } }
body.panel .promo.leaving { opacity: 0; transform: translateY(4px); }
body.panel .promo-art {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); box-shadow: inset 0 -3px 0 rgba(27,36,64,.05);
}
body.panel .promo-art svg { image-rendering: pixelated; }
body.panel .promo-main { min-width: 0; }
body.panel .promo-label {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--lilac-ink); margin-bottom: 3px;
}
body.panel .promo-sponsored .promo-label { color: var(--muted); }
body.panel .promo b { display: block; color: var(--text); font-size: 15px; font-weight: 650; line-height: 1.35; }
body.panel .promo p { margin: 3px 0 11px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
body.panel .promo-cta { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
body.panel .promo-cta svg { transition: transform .15s; }
body.panel .promo-cta:hover svg { transform: translateX(2px); }
body.panel .promo-x {
  position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; border-radius: 999px; border: 0;
  display: grid; place-items: center; background: transparent; color: var(--muted); cursor: pointer;
}
body.panel .promo-x:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 640px) {
  body.panel .promo { margin-left: 0; grid-template-columns: 1fr; padding-right: 14px; }
  body.panel .promo-art { width: 44px; height: 44px; border-radius: 13px; }
}
@media (prefers-reduced-motion: reduce) { body.panel .promo { animation: none; } }
body.panel .promo-house .promo-cta { background: var(--lilac); color: var(--lilac-ink); border-color: transparent; box-shadow: none; }
body.panel .promo-house .promo-cta:hover { background: color-mix(in srgb, var(--lilac) 82%, var(--lilac-ink)); }
/* "Asleep: nobody was playing…" above a page (and in the Assistant's chat column) */
body.panel .preview-note.sleep { border-style: solid; border-color: transparent; background: var(--lilac); color: var(--lilac-ink); }
body.panel .chat > .preview-note { margin: 12px 16px 0; flex: none; }

/* ---------- Folding sidebar (desktop): rolls up, then folds into a tile with the Wisp ----------
   Closing: the contents lift away bottom-first, the card rolls up to its top edge, narrows into a 56px tile, and the
   Wisp pops in. Opening plays it backwards: the tile widens, rolls down, and the contents cascade in top-first.
   panel.js flips body.side-folded (the "Hide the sidebar" button, the tile, or "["), and adds .side-moving while it runs. */
.side-fold, .side-unfold { display: none; }
@media (min-width: 861px) {
  body.panel { --fold: cubic-bezier(.65, 0, .25, 1); --pop: cubic-bezier(.34, 1.56, .64, 1); }
  body.panel .app { transition: grid-template-columns .32s var(--fold); }
  body.panel.side-folded .app { grid-template-columns: 68px 1fr; transition: grid-template-columns .32s var(--fold) .46s; }

  body.panel .side {
    position: relative; align-self: start; width: 256px; height: calc(100svh - 24px);
    transition: width .32s var(--fold), height .44s var(--fold) .2s, border-radius .32s var(--fold), box-shadow .2s;
  }
  body.panel.side-folded .side, body.panel.side-moving .side { overflow: hidden; }
  body.panel.side-folded .side, body.panel.side-moving .side > :not(.side-unfold) { flex-shrink: 0; }
  body.panel.side-folded .side > :not(.side-unfold), body.panel.side-moving .side > :not(.side-unfold) { min-width: 230px; }
  body.panel.side-folded .side {
    width: 56px; height: 56px; border-radius: 18px; padding: 0; cursor: pointer;
    transition: height .4s var(--fold) .14s, width .32s var(--fold) .46s, border-radius .32s var(--fold) .46s, padding 0s .46s, box-shadow .2s;
  }
  body.panel.side-folded .side:hover { box-shadow: var(--sh-2); }

  /* The contents: in from the top when opening (after the card is back), away from the bottom when closing. */
  .side > .side-top { --i: 0; } .side > .ws-switch { --i: 1; } .side > #switcher { --i: 2; } .side > .nav-list { --i: 3; } .side > .side-foot { --i: 4; }
  body.panel .side > :not(.side-unfold) {
    transition: opacity .24s ease calc(.52s + var(--i, 0) * .05s), transform .36s var(--fold) calc(.52s + var(--i, 0) * .05s);
  }
  body.panel.side-folded .side > :not(.side-unfold) {
    opacity: 0; transform: translateY(-14px) scale(.97);
    transition: opacity .14s ease calc((4 - var(--i, 0)) * .03s), transform .22s ease-in calc((4 - var(--i, 0)) * .03s);
  }

  /* The tile: the Wisp from the logo, popping in once the card has folded. */
  .side-fold {
    display: grid; place-items: center; width: 30px; height: 30px; margin-left: 4px; border: 0; border-radius: 10px;
    background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
  }
  .side-fold:hover { background: var(--surface-2); color: var(--text); }
  .side-top .badge { margin-left: auto; }
  .side-unfold {
    display: grid; place-items: center; position: absolute; inset: 0 auto auto 0; width: 56px; height: 56px; padding: 0;
    border: 0; background: transparent; cursor: pointer; opacity: 0; transform: scale(.4) rotate(-14deg); pointer-events: none;
    transition: opacity .12s ease, transform .2s ease-in;
  }
  .side-unfold svg { width: 26px; height: 31px; color: var(--text); transition: transform .25s var(--pop); }
  body.panel.side-folded .side-unfold {
    opacity: 1; transform: none; pointer-events: auto;
    transition: opacity .2s ease .66s, transform .5s var(--pop) .66s;
  }
  body.panel.side-folded .side-unfold:hover svg { transform: translateY(-3px) rotate(-4deg); }

  /* A fold remembered from last time shows at once; reduced motion: no movement at all. */
  body.panel.side-instant .app, body.panel.side-instant .side, body.panel.side-instant .side > *,
  body.panel.side-instant .side-unfold { transition: none !important; }
}
@media (min-width: 861px) and (prefers-reduced-motion: reduce) {
  body.panel .app, body.panel .side, body.panel .side > *, body.panel .side-unfold { transition: none !important; }
}
.power:empty { display: none; }

/* Settings › Plan: Premium through Paddle */
body.panel .plan-live { display: grid; gap: 8px; }
body.panel .plan-live p { margin: 0; font-size: 13.5px; }
body.panel .plan-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
body.panel .plan-warn { color: var(--butter-ink); background: var(--butter); border-radius: 12px; padding: 10px 12px; display: flex; gap: 8px; align-items: flex-start; }

/* Confirm your email: a slim bar above the page until it's done */
body.panel .verify-bar { display: flex; align-items: center; gap: 10px; margin: 0 12px 10px; padding: 9px 14px; border-radius: 14px;
  background: var(--butter); color: var(--butter-ink); font-size: 13.5px; }
body.panel .verify-bar span { flex: 1; min-width: 0; }
body.panel .verify-bar .link-btn { color: inherit; font-weight: 600; white-space: nowrap; }

/* An unused free server's removal date, with Keep it */
body.panel .removal-note { flex-wrap: wrap; }
body.panel .removal-note span { flex: 1 1 280px; }
body.panel .removal-note .btn { padding: 5px 12px; }
