/* swift — "evening flight".
   A swallow at dusk: deep indigo surfaces, one sky-blue accent, Figtree for the interface and Yellowtail for
   the name. Radius follows hierarchy (8px controls, 14px panels, the URL bar is the only pill). No glass, no
   glow. The one loud moment is the bird's flight on the home page (intro.js). */

:root {
  --night: #0c1022;     /* page */
  --deep: #121733;      /* panels, sidebars */
  --ridge: #1a2044;     /* raised, hover */
  --ridge-2: #222a55;   /* pressed, selected */
  --wire: #283058;      /* borders */
  --wire-soft: #1e2549; /* dividers inside panels */
  --mist: #9aa3c7;      /* secondary text */
  --mist-2: #6d759b;    /* tertiary text */
  --paper: #eef0fa;     /* text */
  --sky: #8fa8ff;       /* the accent: active, primary, focus */
  --sky-ink: #0c1022;   /* text on sky */
  --danger: #ff8b8b;
  --ok: #6fd39a;

  --r-ctl: 8px;
  --r-panel: 14px;

  --f-ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-name: 'Yellowtail', 'Figtree', cursive;

  --t-12: 12px; --t-13: 13px; --t-15: 15px; --t-18: 18px; --t-23: 23px; --t-29: 29px; --t-36: 36px;

  --ease: cubic-bezier(.2, .8, .2, 1);

  /* wave palette from Settings > Appearance (themes.js) */
  --theme-horizon: #07173f; --theme-wave: #1d4fd8; --theme-crest: #7fb2ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
button, input, textarea, select { font: inherit; color: inherit; }
html, body { height: 100%; }
body {
  background: var(--night);
  color: var(--paper);
  font-family: var(--f-ui);
  font-size: var(--t-15);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: rgba(143, 168, 255, .35); }
* { scrollbar-width: thin; scrollbar-color: var(--wire) transparent; }

/* waves: the home page only */
#bg { position: fixed; inset: 0; z-index: 0; transition: opacity .35s ease; }
body[data-view]:not([data-view="home"]) #bg { opacity: 0; visibility: hidden; }
.gradient-waves-container { overflow: hidden; }
.gradient-waves-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ===================================================================== menu + dial (the white scrolling dial, as before the theme) */
.menu-btn {
  position: fixed;
  left: 22px;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  z-index: 5;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.18)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.9));
  transition: color 0.2s, filter 0.2s, transform 0.35s cubic-bezier(.3, 1.5, .5, 1);
}
.menu-btn svg { width: 32px; height: 26px; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] {
  color: #fff;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.9));
}
.menu-btn:active { transform: scale(0.88); transition-duration: 0.1s; }

/* ---------- the same mark, sitting beside the wordmark ---------- */
.lockup {
  position: relative; /* the word alone sets the row width, so the wordmark centres on the page */
}
.hero-mark {
  position: absolute;
  top: 50%;
  right: 100%;
  margin-right: clamp(10px, 1.2vw, 18px);
  display: flex;
  /* same scale as the wordmark, so mark and type grow together */
  font-size: clamp(48px, 8vw, 104px);
  color: #fff;
  /* same three-layer glow as the wordmark, so mark and type share one light source */
  filter:
    drop-shadow(0 0 0.08em rgba(255, 255, 255, 0.45))
    drop-shadow(0 0 0.32em rgba(255, 255, 255, 0.28))
    drop-shadow(0 0 0.9em rgba(125, 175, 255, 0.35));
  /* centre on the word's em box, then drop the bird's ink onto the text baseline */
  transform: translateY(calc(-50% + 0.085em));
}
.hero-mark svg {
  /* matched to the wordmark's cap height (Inter caps run ~0.68em), so mark and type read as one size */
  --mark-h: 0.7em;
  height: var(--mark-h);
  width: calc(var(--mark-h) * 24 / 19); /* the mark's own aspect ratio */
}

/* ---------- dial: bare icons on a circle around the button; scroll to spin, click to open ---------- */
.dial {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 480px;          /* area that listens for scroll + cursor while open */
  z-index: 4;
  user-select: none;
  pointer-events: none;
}
.dial.open { pointer-events: auto; }
.dial.open .dial-item { pointer-events: auto; }
/* bigger invisible hit target than the icon itself */
.dial-item::before { content: ''; position: absolute; width: 44px; height: 44px; left: -22px; top: -22px; }

.dial-item {
  --s: 1;                /* magnification, from app.js */
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  cursor: pointer;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.18)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.9));
  transition: color 0.2s, filter 0.2s;
  will-change: transform, opacity;
  pointer-events: none;
}
.dial-item svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  transform: scale(var(--s));
  will-change: transform;
}
/* bigger invisible hit target than the icon itself */

.dial-item.sel,
.dial-item:hover,
.dial-item.active {
  color: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.9));
}
.dial-item:focus-visible { outline: none; color: #fff; }

/* every icon has its name beside it; the front one is bright */
.dial-item .label {
  display: none; /* labels off for now — delete this line to bring the names back */
  position: absolute;
  left: calc(11px * var(--s) + 10px); /* follows the icon's right edge as it grows */
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.014em;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s, font-size 0.2s;
}
.dial-item.sel .label { opacity: 1; font-size: 16px; font-weight: 600; }

.dial-item, .menu-btn { filter: none !important; text-shadow: none !important; }
.dial-item svg, .menu-btn svg { filter: none !important; }
body.home-intro .menu-btn { opacity: 0; }
.menu-btn { transition: color .2s, opacity .4s ease .1s; }
body.browse-fullscreen .menu-btn, body.movies-fullscreen .menu-btn, body.rbx-fullscreen .menu-btn { display: none; }

/* ===================================================================== top bar */
.topbar { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2; width: min(760px, calc(100vw - 160px)); display: flex; gap: 8px; }
.nav-pill { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--deep); border: 1px solid var(--wire); }
.pill-btn { width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 0; border-radius: 50%; color: var(--mist); cursor: pointer; transition: background .15s, color .15s; }
.pill-btn:hover { background: var(--ridge); color: var(--paper); }
.pill-btn svg { width: 17px; height: 17px; }
.urlbar { flex: 1; min-width: 0; height: 42px; padding: 0 16px; display: flex; align-items: center; gap: 10px; border-radius: 999px; background: var(--deep); border: 1px solid var(--wire); cursor: text; transition: border-color .15s; }
.urlbar:focus-within { border-color: var(--sky); }
.urlbar svg { width: 16px; height: 16px; color: var(--mist-2); flex-shrink: 0; }
.urlbar input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: var(--t-15); }
.urlbar input::placeholder { color: var(--mist-2); }
body:not([data-view="browse"]) .browse-pill, body:not([data-view="rbx"]) .rbx-pill, body:not([data-view="movies"]) .movies-pill { display: none; }

/* ===================================================================== views */
main { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.view { height: 100%; }
.view:not([data-view="home"]) { pointer-events: auto; }
.view[data-view="games"], .view[data-view="settings"], .view[data-view="plus"] { overflow-y: auto; overscroll-behavior: contain; padding: 0 56px 96px 104px; }
.view[data-view="games"] > *, .view[data-view="settings"] > * { max-width: 1160px; margin-inline: auto; }

/* page header shared by every page: title, one quiet line, actions on the right, tabs on a rule */
.vhead, .games-head { padding: 96px 0 0; }
.vrail, .games-rail { display: flex; align-items: flex-end; gap: 20px; }
.vheadline, .games-headline { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vtitle, .games-title { font-size: var(--t-36); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.vsub, .games-sub { font-size: var(--t-15); color: var(--mist); font-variant-numeric: tabular-nums; }
.vactions { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.vtabs, .games-tabs { position: relative; display: flex; gap: 24px; margin-top: 28px; border-bottom: 1px solid var(--wire); overflow-x: auto; scrollbar-width: none; }
.vtabs::-webkit-scrollbar, .games-tabs::-webkit-scrollbar { display: none; }
.tab, .settings-tab, .mu-tab { position: relative; flex-shrink: 0; padding: 0 0 12px; background: none; border: 0; font-size: var(--t-15); font-weight: 600; color: var(--mist); cursor: pointer; text-decoration: none; transition: color .15s; }
.tab:hover, .settings-tab:hover, .tab[aria-selected="true"], .tab.on, .settings-tab.active, .mu-tab.on { color: var(--paper); }
.tab[aria-selected="true"]::after, .tab.on::after, .mu-tab.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--sky); }
.settings-tab-line { position: absolute; left: 0; bottom: -1px; width: 0; height: 2px; background: var(--sky); opacity: 0; pointer-events: none; transition: transform .26s var(--ease), width .26s var(--ease), opacity .15s; }

/* search field (Games, AI model etc.) */
.games-search { margin-left: auto; display: flex; align-items: center; gap: 10px; width: 300px; height: 40px; padding: 0 12px; border-radius: var(--r-ctl); background: var(--deep); border: 1px solid var(--wire); transition: border-color .15s; }
.games-search:focus-within { border-color: var(--sky); }
.games-search svg { width: 16px; height: 16px; color: var(--mist-2); flex-shrink: 0; }
.games-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: var(--t-15); }
.games-search input::placeholder { color: var(--mist-2); }
.games-search input::-webkit-search-cancel-button { display: none; }
.games-search-clear { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--mist); cursor: pointer; }
.games-search-clear:hover { background: var(--ridge); color: var(--paper); }
.games-search-clear svg { width: 14px; height: 14px; }

/* ===================================================================== buttons & small pieces */
.btn-primary, .btn-ghost, .chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-ctl); font-size: var(--t-13); font-weight: 600; white-space: nowrap; text-decoration: none; }
.btn-primary { border: 0; background: var(--sky); color: var(--sky-ink); cursor: pointer; transition: filter .15s; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .5; cursor: default; filter: none; }
.btn-ghost { border: 1px solid var(--wire); background: var(--deep); color: var(--paper); cursor: pointer; transition: background .15s, border-color .15s; }
.btn-ghost:hover { background: var(--ridge); border-color: var(--ridge-2); }
.btn-ghost svg { width: 15px; height: 15px; color: var(--mist); }
.btn-ghost.danger { color: var(--danger); border-color: #4a2a3c; }
.btn-ghost.danger:hover { background: #2a1630; }
.btn-ghost.on { background: #3a1830; border-color: #6a2a48; color: #ffc0c8; }
.btn-link { background: none; border: 0; font-size: var(--t-13); color: var(--mist); cursor: pointer; }
.btn-link:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.chip { border: 1px solid var(--wire); background: var(--deep); color: var(--paper); }
.btn-primary.sm, .btn-ghost.sm { height: 30px; padding: 0 10px; font-size: var(--t-12); }
.form-error { font-size: var(--t-13); color: var(--danger); }
.swift-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; padding: 10px 16px; border-radius: var(--r-ctl); background: var(--paper); color: var(--sky-ink); font-size: var(--t-13); font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }

/* ===================================================================== home: the bird lands, the name is written */
.view[data-view="home"] { display: grid; place-items: center; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.lockup { position: relative; }
.hero-mark {
  position: absolute; right: 100%; top: 50%; margin-right: .08em;
  display: flex; font-size: clamp(64px, 10vw, 132px); color: var(--paper);
  filter: none;
  transform: translateY(-46%);
}
.hero-mark svg { height: .5em; width: calc(.5em * 24 / 19); }
.wordmark {
  font-family: var(--f-name); font-weight: 400; font-size: clamp(64px, 10vw, 132px); line-height: 1.1;
  padding: 0 .15em .08em .05em; color: var(--paper); user-select: none;
}
/* intro.js: the mark is hidden while its double flies in; the name is revealed left to right behind it */
body.home-intro .hero-mark { opacity: 0; }
body.home-intro .wordmark { clip-path: inset(-30% 100% -30% 0); }
body.home-writing .wordmark { clip-path: inset(-30% -10% -30% 0); transition: clip-path 1.1s cubic-bezier(.55, .05, .3, 1); }
.hero-mark.landed svg { animation: land .55s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 90%; }
@keyframes land { 0% { transform: translateY(-10%) rotate(-10deg) scaleY(.8); } 100% { transform: none; } }
.flight { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: visible; }
.flight path { fill: none; stroke-linecap: round; }
.flier { position: fixed; left: 0; top: 0; z-index: 4; pointer-events: none; color: var(--paper); offset-rotate: auto; offset-anchor: 50% 55%; }
.flier svg { display: block; transform-origin: 50% 55%; animation: flap .2s ease-in-out infinite; }
.flier.glide svg { animation: none; }
@keyframes flap { 50% { transform: scaleY(.62) translateY(4%); } }

.discord-widget { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; border-radius: var(--r-panel); background: var(--deep); border: 1px solid var(--wire); color: var(--paper); text-decoration: none; pointer-events: auto; transition: background .15s, border-color .15s, opacity .5s ease; }
.discord-widget:hover { background: var(--ridge); border-color: var(--ridge-2); }
.discord-widget svg { width: 24px; height: 24px; color: #8f9cff; }
.discord-widget span { display: flex; flex-direction: column; line-height: 1.3; }
.discord-widget b { font-size: var(--t-15); font-weight: 600; }
.discord-widget small { font-size: var(--t-13); color: var(--mist); }
body.home-intro .discord-widget { opacity: 0; }

/* ===================================================================== games */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 28px 20px; padding-top: 28px; }
.game { display: flex; flex-direction: column; gap: 10px; min-width: 0; color: inherit; text-decoration: none; outline: none; }
.game-art { position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-panel); overflow: hidden; background: var(--deep); border: 1px solid var(--wire); transition: border-color .15s, transform .25s var(--ease); }
.game-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-art.is-fallback::before { content: attr(data-initials); position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--t-29); font-weight: 700; color: var(--mist-2); }
.game:hover .game-art, .game:focus-visible .game-art { border-color: var(--sky); transform: translateY(-2px); }
.game-name { padding: 0 2px; font-size: var(--t-13); font-weight: 600; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game:hover .game-name, .game:focus-visible .game-name { color: var(--paper); }
.game.is-skeleton .game-art { background: linear-gradient(100deg, var(--deep) 30%, var(--ridge) 50%, var(--deep) 70%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.games-note { margin-top: 48px; font-size: var(--t-15); color: var(--mist); }
.games-retry { padding: 0; border: 0; background: none; color: var(--sky); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.games-sentinel { width: 100%; height: 1px; }
.lumin-close-btn { position: fixed; top: 16px; left: 16px; z-index: 9999999; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--wire); background: var(--deep); color: var(--paper); cursor: pointer; }
.lumin-close-btn:hover { background: var(--ridge); }

/* game player, browser, movies, roblox: one framed-stage pattern */
.player { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; gap: 12px; padding: 72px 32px 24px 104px; background: var(--night); pointer-events: auto; }
.player-bar, .rbx-player-bar { display: flex; align-items: center; gap: 6px; height: 40px; flex-shrink: 0; }
.player-back, .rbx-player-back { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 10px; border-radius: var(--r-ctl); border: 1px solid var(--wire); background: var(--deep); font-size: var(--t-13); font-weight: 600; color: var(--paper); cursor: pointer; }
.player-back:hover, .rbx-player-back:hover { background: var(--ridge); }
.player-back svg, .rbx-player-back svg { width: 16px; height: 16px; }
.player-title, .rbx-player-bar b { flex: 1; min-width: 0; margin: 0 8px; font-size: var(--t-15); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-btn, .rbx-player-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: var(--r-ctl); background: none; color: var(--mist); cursor: pointer; text-decoration: none; }
.player-btn:hover, .rbx-player-btn:hover { background: var(--ridge); color: var(--paper); }
.player-btn svg, .rbx-player-btn svg { width: 17px; height: 17px; }
.player-stage, .browse-stage, .movies-stage { position: relative; flex: 1; min-height: 0; height: 100%; border-radius: var(--r-panel); overflow: hidden; background: #000; border: 1px solid var(--wire); }
.player-stage:fullscreen, .browse-stage:fullscreen, .movies-stage:fullscreen { border-radius: 0; border: 0; }
.player-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; opacity: 0; transition: opacity .25s; }
.player-stage iframe.ready { opacity: 1; }
.player-loading, .browse-note, .movies-note { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; font-size: var(--t-15); color: var(--mist); pointer-events: none; }
.movies-note { z-index: 2; }
.movies-note .btn-ghost { pointer-events: auto; }
.view[data-view="browse"], .view[data-view="movies"] { padding: 70px 32px 24px 104px; }
.browse-stage { background: var(--deep); }
.browse-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.browse-stage iframe:not([src]) { display: none; }
.movies-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; opacity: 0; transition: opacity .25s; }
.movies-frame.ready { opacity: 1; }
.browse-exit-full, .movies-exit-full, .rbx-exit-full { position: absolute; top: 12px; right: 12px; z-index: 6; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-ctl); background: var(--deep); border: 1px solid var(--wire); color: var(--paper); cursor: pointer; }
.browse-exit-full:hover, .movies-exit-full:hover, .rbx-exit-full:hover { background: var(--ridge); }
.browse-exit-full svg, .movies-exit-full svg, .rbx-exit-full svg { width: 16px; height: 16px; }
body.browse-fullscreen .topbar, body.browse-fullscreen .menu-btn, body.browse-fullscreen .dial,
body.movies-fullscreen .topbar, body.movies-fullscreen .menu-btn, body.movies-fullscreen .dial,
body.rbx-fullscreen .topbar, body.rbx-fullscreen .menu-btn, body.rbx-fullscreen .dial { display: none; }
body.browse-fullscreen .view[data-view="browse"], body.movies-fullscreen .view[data-view="movies"], body.rbx-fullscreen .view[data-view="rbx"] { padding: 0; }
body.browse-fullscreen .browse-stage, body.movies-fullscreen .movies-stage { border-radius: 0; border: 0; }

.view[data-view="rbx"] { position: relative; padding: 70px 32px 24px 104px; }
.rbx-stage { position: relative; height: 100%; display: flex; flex-direction: column; }
.rbx-stage:fullscreen { background: #000; }
.rbx-frame { flex: 1; min-height: 0; width: 100%; border: 1px solid var(--wire); border-radius: var(--r-panel); background: var(--deep); }
.rbx-stage:fullscreen .rbx-frame, body.rbx-fullscreen .rbx-frame { border: 0; border-radius: 0; }
.rbx-note { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; padding: 10px 10px 10px 16px; border-radius: var(--r-ctl); background: var(--deep); border: 1px solid var(--wire); font-size: var(--t-13); color: var(--mist); }
.rbx-note p { flex: 1; }
.rbx-note strong { color: var(--paper); }
.rbx-note button { height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--wire); background: var(--ridge); font-size: var(--t-13); font-weight: 600; cursor: pointer; }
.rbx-down { margin: auto; max-width: 380px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.rbx-down h2 { font-size: var(--t-23); font-weight: 700; }
.rbx-down p { margin-bottom: 8px; color: var(--mist); }
.rbx-player { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 10px; background: var(--night); }
.rbx-player:fullscreen { background: #000; padding: 0; }
.rbx-player-frame { flex: 1; min-height: 0; width: 100%; border: 1px solid var(--wire); border-radius: var(--r-panel); background: #000; }

/* ===================================================================== sign-in card (chat) */
.auth-card { width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--r-panel); background: var(--deep); border: 1px solid var(--wire); }
.auth-card h3 { font-size: var(--t-23); font-weight: 700; }
.auth-sub { margin: -6px 0 6px; font-size: var(--t-13); color: var(--mist); }
.auth-card input { height: 42px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--wire); background: var(--night); outline: none; font-size: var(--t-15); }
.auth-card input:focus { border-color: var(--sky); }
.auth-card input::placeholder { color: var(--mist-2); }
.auth-card .btn-primary { height: 42px; font-size: var(--t-15); }

/* ===================================================================== chat: sidebar · messages · members */
.view[data-view="chat"] { display: flex; flex-direction: column; padding: 70px 0 0 88px; overflow: hidden; }
.dc-auth { flex: 1; display: grid; place-items: center; padding-bottom: 70px; }
.dc { flex: 1; min-height: 0; display: grid; grid-template-columns: 264px minmax(0, 1fr); border-top: 1px solid var(--wire); border-left: 1px solid var(--wire); border-top-left-radius: var(--r-panel); overflow: hidden; background: var(--night); }
.dc-side { display: flex; flex-direction: column; min-height: 0; background: var(--deep); border-right: 1px solid var(--wire); }
.dc-modes { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--wire-soft); }
.dc-mode { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; background: none; border: 0; border-radius: 6px; color: var(--mist); font-size: var(--t-13); font-weight: 600; cursor: pointer; }
.dc-mode:hover { background: var(--ridge); color: var(--paper); }
.dc-mode.on { background: var(--ridge-2); color: var(--paper); }
.dc-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sky); color: var(--sky-ink); font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.dc-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 12px; }
.dc-cat { margin: 14px 8px 4px; font-size: var(--t-12); font-weight: 700; color: var(--mist-2); }
.dc-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 8px; background: none; border: 0; border-radius: 6px; color: var(--mist); font-size: var(--t-15); font-weight: 500; text-align: left; cursor: pointer; }
.dc-row svg { width: 17px; height: 17px; flex: none; color: var(--mist-2); }
.dc-row:hover { background: var(--ridge); color: var(--paper); }
.dc-row.on { background: var(--ridge-2); color: var(--paper); }
.dc-row.on svg { color: var(--sky); }
.dc-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-row-t b { font-weight: 600; }
.dc-row-t small { font-size: var(--t-12); color: var(--mist-2); overflow: hidden; text-overflow: ellipsis; }
.dc-dm { min-height: 44px; }
.dc-empty { padding: 12px 8px; font-size: var(--t-13); color: var(--mist-2); }
.dc-av { --sz: 40px; position: relative; flex: none; width: var(--sz); height: var(--sz); border-radius: 50%; display: grid; place-items: center; font-size: calc(var(--sz) * .42); font-weight: 700; color: #fff; }
.dc-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.dc-person { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--mist); font-size: var(--t-15); text-align: left; }
button.dc-person { cursor: pointer; }
.dc-person:hover { background: var(--ridge); color: var(--paper); }
.dc-person.online .dc-av::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2.5px solid var(--deep); }
.dc-acts { display: none; gap: 2px; }
.dc-person:hover .dc-acts, .dc-person:focus-within .dc-acts { display: flex; }
.dc-ic { width: 32px; height: 32px; display: grid; place-items: center; flex: none; background: none; border: 0; border-radius: 6px; color: var(--mist); cursor: pointer; }
.dc-ic svg { width: 18px; height: 18px; }
.dc-ic:hover { background: var(--ridge); color: var(--paper); }
.dc-add { display: flex; gap: 4px; margin: 4px 0 6px; }
.dc-add input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: 6px; background: var(--night); border: 1px solid var(--wire); font-size: var(--t-13); outline: none; }
.dc-add input:focus { border-color: var(--sky); }
.dc-user { display: flex; align-items: center; gap: 2px; padding: 8px; border-top: 1px solid var(--wire); background: var(--night); }
.dc-me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; background: none; border: 0; border-radius: 6px; text-align: left; cursor: pointer; }
.dc-me:hover { background: var(--ridge); }
.dc-me-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dc-me-t b { font-size: var(--t-13); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-me-t small { font-size: var(--t-12); color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-me-t small #chat-streak:not([hidden])::before { content: ", "; }
.dc-user .dc-ic { width: 30px; height: 30px; }
.dc-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dc-head { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--wire); flex: none; }
.dc-head > svg { width: 19px; height: 19px; color: var(--mist-2); }
.dc-head b { font-size: var(--t-15); font-weight: 700; white-space: nowrap; }
.dc-topic { flex: 1; min-width: 0; margin-left: 10px; font-size: var(--t-13); color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-back { display: none; }
.dc-toggle-members { margin-left: auto; }
.dc-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 240px; }
body.dc-no-members .dc-cols, body.dc-dm-view .dc-cols { grid-template-columns: minmax(0, 1fr); }
body.dc-no-members .dc-members, body.dc-dm-view .dc-members { display: none; }
.dc-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0 18px 18px; }
.dc-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 0 14px; }
.dc-start { padding: 32px 4px 16px; font-size: var(--t-15); color: var(--mist); }
.dc-day { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; font-size: var(--t-12); font-weight: 700; color: var(--mist-2); }
.dc-day::before, .dc-day::after { content: ""; flex: 1; height: 1px; background: var(--wire-soft); }
.dc-msg { position: relative; display: flex; gap: 14px; padding: 3px 10px 3px 6px; margin-top: 14px; border-radius: 6px; }
.dc-msg.grouped { margin-top: 0; }
.dc-msg:hover { background: var(--deep); }
.dc-gutter { flex: none; width: 40px; padding-top: 3px; font-size: 11px; text-align: center; color: transparent; font-variant-numeric: tabular-nums; }
.dc-msg:hover .dc-gutter { color: var(--mist-2); }
.dc-body { min-width: 0; flex: 1; }
.dc-head2 { display: flex; align-items: baseline; gap: 8px; line-height: 1.35; }
.dc-name { font-size: var(--t-15); font-weight: 700; color: var(--paper); }
.dc-head2 time { font-size: var(--t-12); color: var(--mist-2); }
.dc-tag { align-self: center; padding: 1px 6px; border-radius: 4px; background: var(--ridge-2); color: var(--sky); font-size: 11px; font-weight: 700; }
.dc-text { font-size: var(--t-15); line-height: 1.45; color: #d9ddef; white-space: pre-wrap; overflow-wrap: anywhere; }
.dc-edited { font-size: 11px; color: var(--mist-2); }
.dc-quote { margin: 0 0 3px; padding-left: 10px; border-left: 2px solid var(--wire); font-size: var(--t-13); color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-img { display: block; max-width: min(360px, 100%); max-height: 280px; margin-top: 6px; border-radius: var(--r-ctl); }
.dc-att { margin-top: 4px; font-size: var(--t-12); color: var(--mist-2); }
.dc-tools { position: absolute; top: -16px; right: 14px; display: none; padding: 2px; background: var(--deep); border: 1px solid var(--wire); border-radius: var(--r-ctl); }
.dc-msg:hover .dc-tools { display: flex; }
.dc-reply { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--deep); border: 1px solid var(--wire); border-bottom: 0; border-radius: var(--r-ctl) var(--r-ctl) 0 0; font-size: var(--t-13); color: var(--mist); }
.dc-reply + .dc-composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.dc-reply button { display: grid; background: none; border: 0; color: inherit; cursor: pointer; }
.dc-reply svg { width: 15px; height: 15px; }
.dc-composer { display: flex; align-items: flex-end; gap: 6px; padding: 4px 6px 4px 14px; border-radius: var(--r-ctl); background: var(--deep); border: 1px solid var(--wire); }
.dc-composer:focus-within { border-color: var(--sky); }
.dc-composer textarea { flex: 1; min-width: 0; padding: 9px 0; background: none; border: 0; outline: none; resize: none; font-size: var(--t-15); line-height: 1.4; }
.dc-composer textarea::placeholder { color: var(--mist-2); }
.dc-send { width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 0; border-radius: 6px; color: var(--mist); cursor: pointer; }
.dc-send:hover { background: var(--ridge); color: var(--sky); }
.dc-send svg { width: 19px; height: 19px; }
.dc-members { overflow-y: auto; padding: 4px 8px 12px; background: var(--deep); border-left: 1px solid var(--wire); }
.chat-error { margin: 4px 0 6px; }
.cx-voice { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 32px 6px; }
.cx-voice h3 { font-size: var(--t-23); font-weight: 700; }
.cx-voice-people { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-vp { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: var(--r-panel); background: var(--deep); border: 1px solid var(--wire); }
.cx-vp svg { width: 14px; height: 14px; color: var(--mist-2); }
.cx-voice-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#cx-voice-status { font-size: var(--t-13); color: var(--mist); }
.cx-empty { padding: 8px; font-size: var(--t-13); color: var(--mist-2); }

/* ===================================================================== hub sheet: wallet, shop, profile, admin */
.hub { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(6, 8, 20, .72); pointer-events: auto; }
.hub-card { width: min(780px, 100%); max-height: 86vh; display: flex; flex-direction: column; border-radius: var(--r-panel); background: var(--deep); border: 1px solid var(--wire); box-shadow: 0 30px 70px rgba(0, 0, 0, .5); overflow: hidden; }
.hub-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 20px; border-bottom: 1px solid var(--wire); }
.hub-tabs { display: flex; gap: 22px; }
.hub-tab { position: relative; padding: 16px 0 14px; background: none; border: 0; font-size: var(--t-15); font-weight: 600; color: var(--mist); cursor: pointer; }
.hub-tab:hover, .hub-tab.on { color: var(--paper); }
.hub-tab.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--sky); }
.hub-x { width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 0; border-radius: var(--r-ctl); color: var(--mist); cursor: pointer; }
.hub-x:hover { background: var(--ridge); color: var(--paper); }
.hub-body { padding: 20px; overflow-y: auto; }
.hub-wallet { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hub-big { padding: 18px 20px; border-radius: var(--r-panel); background: var(--night); border: 1px solid var(--wire); display: flex; flex-direction: column; gap: 2px; }
.hub-big b { font-size: var(--t-36); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hub-big span { font-size: var(--t-13); color: var(--mist); }
.hub-list { margin: 16px 0; padding-left: 18px; font-size: var(--t-15); line-height: 1.7; color: var(--mist); }
.hub-hist h4 { margin-bottom: 6px; font-size: var(--t-13); font-weight: 700; color: var(--mist-2); }
.hub-hrow { display: flex; justify-content: space-between; padding: 8px 0; font-size: var(--t-13); border-bottom: 1px solid var(--wire-soft); color: var(--mist); }
.hub-hrow b { font-variant-numeric: tabular-nums; }
.hub-hrow .pos { color: var(--ok); } .hub-hrow .neg { color: var(--danger); }
.hub-line { margin-bottom: 12px; font-size: var(--t-13); color: var(--mist); }
.hub-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hub-cat { height: 32px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--wire); background: none; font-size: var(--t-13); font-weight: 600; color: var(--mist); cursor: pointer; }
.hub-cat:hover { color: var(--paper); background: var(--ridge); }
.hub-cat.on { background: var(--ridge-2); border-color: var(--sky); color: var(--paper); }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.hub-item { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r-panel); background: var(--night); border: 1px solid var(--wire); }
.hub-item-top { display: flex; align-items: center; gap: 10px; }
.hub-item-top b { font-size: var(--t-15); font-weight: 700; }
.hub-item-top img { width: 40px; height: 40px; border-radius: var(--r-ctl); object-fit: cover; }
.hub-item p { font-size: var(--t-13); color: var(--mist); }
.hub-item-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hub-owned { font-size: var(--t-12); color: var(--mist-2); }
.hub-me { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.hub-me b { font-size: var(--t-18); font-weight: 700; }
.hub-me small { display: block; margin-top: 2px; font-size: var(--t-13); color: var(--mist); }
.hub-form { display: flex; flex-direction: column; gap: 14px; }
.hub-field { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-13); font-weight: 600; color: var(--mist); }
.hub-field input, .hub-field textarea, .hub-field select, .hub-search { padding: 10px 12px; border-radius: var(--r-ctl); background: var(--night); border: 1px solid var(--wire); font-size: var(--t-15); font-weight: 400; color: var(--paper); outline: none; }
.hub-field input:focus, .hub-field textarea:focus, .hub-field select:focus, .hub-search:focus { border-color: var(--sky); }
.hub-field select option { background: var(--deep); }
.hub-form .btn-primary { align-self: flex-start; padding: 0 22px; }
.hub-msg { font-size: var(--t-13); color: var(--mist); }
.hub-stats { display: flex; gap: 16px; margin-bottom: 10px; font-size: var(--t-13); color: var(--mist); }
.hub-search { width: 100%; margin-bottom: 8px; }
.hub-users { display: flex; flex-direction: column; }
.hub-urow { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--wire-soft); }
.hub-uinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: var(--t-15); }
.hub-uinfo b { font-weight: 700; }
.hub-uinfo small { font-size: var(--t-12); color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-uinfo small.ip { color: var(--mist-2); font-variant-numeric: tabular-nums; }
.hub-uacts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hub-dot { width: 14px; height: 14px; border-radius: 50%; }

/* ===================================================================== AI */
.view[data-view="ai"] { display: flex; flex-direction: column; padding: 0 56px 24px 104px; overflow: hidden; }
.view[data-view="ai"] > * { width: 100%; max-width: 1160px; margin-inline: auto; flex-shrink: 0; }
.ai-app { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ai-log { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 0 12px; }
.ai-log > *, .ai-app .ai-error, .ai-app .composer { width: 100%; max-width: 760px; margin-inline: auto; }
.ai-empty { padding-top: 10vh; text-align: center; }
.ai-empty h3 { font-size: var(--t-29); font-weight: 700; }
.am { display: flex; margin-bottom: 18px; }
.am-user { justify-content: flex-end; }
.am-user .am-body { max-width: 80%; padding: 10px 14px; border-radius: var(--r-panel); background: var(--ridge); }
.am-body { min-width: 0; font-size: var(--t-15); line-height: 1.6; color: #dfe3f3; overflow-wrap: anywhere; }
.am-body p { margin: 0 0 10px; } .am-body p:last-child { margin-bottom: 0; }
.am-body code { padding: 1px 5px; border-radius: 4px; background: var(--ridge); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .88em; }
.am-body pre { margin: 10px 0; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--deep); border: 1px solid var(--wire); overflow-x: auto; }
.am-body pre code { padding: 0; background: none; font-size: var(--t-13); line-height: 1.5; }
.am-body.is-waiting::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.composer { display: flex; align-items: flex-end; gap: 8px; margin: 10px auto 0; padding: 4px 4px 4px 14px; border-radius: var(--r-panel); background: var(--deep); border: 1px solid var(--wire); }
.composer:focus-within { border-color: var(--sky); }
.composer textarea { flex: 1; min-width: 0; padding: 10px 0; background: none; border: 0; outline: none; resize: none; font-size: var(--t-15); line-height: 1.4; }
.composer textarea::placeholder { color: var(--mist-2); }
.send { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--sky); color: var(--sky-ink); cursor: pointer; }
.send:hover { filter: brightness(1.08); }
.send svg { width: 18px; height: 18px; }
.ai-model-select { height: 36px; max-width: 220px; }
#ai-usage { color: var(--mist-2); }

/* ===================================================================== swift+ */
.plus { max-width: 880px; margin: 0 auto; padding-top: 96px; }
.plus-head { text-align: left; }
.plus-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-13); font-weight: 700; color: var(--sky); }
.plus-kicker svg { width: 15px; height: 15px; }
.plus-head h1 { margin-top: 10px; font-size: var(--t-36); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.plus-head p { margin-top: 10px; font-size: var(--t-18); color: var(--mist); max-width: 52ch; }
.plus-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 26px; border-radius: var(--r-panel); background: var(--deep); border: 1px solid var(--wire); }
.plan.featured { border-color: var(--sky); }
.plan-badge { position: absolute; top: -11px; left: 24px; padding: 3px 9px; border-radius: 6px; background: var(--sky); color: var(--sky-ink); font-size: var(--t-12); font-weight: 800; }
.plan h2 { font-size: var(--t-18); font-weight: 700; }
.plan-blurb { margin-top: 4px; font-size: var(--t-13); color: var(--mist); }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.plan-price b { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-price span { font-size: var(--t-13); color: var(--mist); }
.plan-sub { min-height: 20px; margin-top: 8px; font-size: var(--t-13); color: var(--mist); }
.plan-cta { display: flex; align-items: center; justify-content: center; margin-top: 18px; height: 44px; border-radius: var(--r-ctl); background: var(--ridge); border: 1px solid var(--wire); color: var(--paper); font-size: var(--t-15); font-weight: 700; text-decoration: none; cursor: pointer; }
.plan-cta:hover { background: var(--ridge-2); }
.plan.featured .plan-cta { background: var(--sky); border-color: var(--sky); color: var(--sky-ink); }
.plan-cta[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.plan ul { margin-top: 22px; padding-top: 20px; list-style: none; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--wire-soft); }
.plan li { display: flex; gap: 10px; font-size: var(--t-15); color: #d9ddef; }
.plan li svg { flex-shrink: 0; width: 17px; height: 17px; margin-top: 2px; color: var(--sky); }
.plus-note { margin-top: 24px; font-size: var(--t-13); color: var(--mist-2); }

/* ===================================================================== settings */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 26px; align-items: start; }
.set-card { padding: 18px 20px 4px; border-radius: var(--r-panel); background: var(--deep); border: 1px solid var(--wire); }
.set-card.wide { grid-column: 1 / -1; }
.set-card-head { padding-bottom: 6px; }
.set-card-title { font-size: var(--t-15); font-weight: 700; }
.set-card-desc { margin-top: 2px; font-size: var(--t-13); color: var(--mist); }
.set-row { display: flex; align-items: center; gap: 18px; padding: 14px 0; }
.set-row + .set-row, .set-preview + .set-row { border-top: 1px solid var(--wire-soft); }
.set-row-text { flex: 1; min-width: 0; }
.set-row-title { font-size: var(--t-15); font-weight: 600; }
.set-row-sub { margin-top: 2px; font-size: var(--t-13); color: var(--mist); }
.set-row-control { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.set-actions { display: inline-flex; gap: 8px; }
.set-value { font-size: var(--t-13); color: var(--mist); }
.set-status { font-size: var(--t-13); color: var(--mist); }
.set-status[data-bad="true"] { color: var(--danger); }
.set-toggle { position: relative; width: 40px; height: 24px; flex-shrink: 0; border: 0; border-radius: 12px; background: var(--wire); cursor: pointer; transition: background .18s; }
.set-toggle.on { background: var(--sky); }
.set-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); transition: transform .2s var(--ease); }
.set-toggle.on .set-toggle-thumb { transform: translateX(16px); background: var(--sky-ink); }
.set-select, .set-input { height: 36px; border-radius: var(--r-ctl); background: var(--night); border: 1px solid var(--wire); font-size: var(--t-13); outline: none; }
.set-select { appearance: none; -webkit-appearance: none; padding: 0 34px 0 12px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa3c7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.set-select option { background: var(--deep); }
.set-input { padding: 0 12px; }
.set-input::placeholder { color: var(--mist-2); }
.set-select:focus-visible, .set-input:focus { border-color: var(--sky); outline: none; }
.set-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; padding: 6px 0 18px; }
.set-theme { display: flex; flex-direction: column; gap: 8px; padding: 0; background: none; border: 0; text-align: left; cursor: pointer; }
.set-theme-art { position: relative; display: block; height: 64px; border-radius: var(--r-ctl); border: 1px solid var(--wire); }
.set-theme.on .set-theme-art { border: 2px solid var(--sky); }
.set-theme-name { font-size: var(--t-13); color: var(--mist); }
.set-theme.on .set-theme-name, .set-theme:hover .set-theme-name { color: var(--paper); }
.set-preview { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 16px; }
.set-preview-cap { font-size: var(--t-12); color: var(--mist-2); }
.set-preview-tab { display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; max-width: 100%; padding: 9px 16px 9px 12px; border-radius: 8px 8px 3px 3px; background: var(--ridge); border: 1px solid var(--wire); }
.set-preview-icon { width: 16px; height: 16px; display: grid; place-items: center; flex-shrink: 0; }
.set-preview-icon img { width: 16px; height: 16px; border-radius: 3px; object-fit: contain; }
.set-preview-icon svg { width: 15px; height: 12px; }
.set-preview-title { max-width: 320px; font-size: var(--t-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-keys { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 160px; height: 38px; padding: 0 12px; border-radius: var(--r-ctl); background: var(--night); border: 1px solid var(--wire); color: var(--mist); font-size: var(--t-13); cursor: pointer; }
.set-keys[data-listening] { border-color: var(--sky); }
.set-keys kbd { min-width: 26px; padding: 2px 8px; border-radius: 5px; background: var(--ridge); border: 1px solid var(--wire); border-bottom-width: 2px; font: inherit; font-size: var(--t-12); font-weight: 700; text-align: center; color: var(--paper); }
.set-plus { opacity: .4; }
.cl-entry { margin: 0 0 12px; font-size: var(--t-15); line-height: 1.55; color: #d9ddef; }

/* ===================================================================== tour + sponsor gate */
.tour, .ad-gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(6, 8, 20, .72); pointer-events: auto; }
.tour-card, .ad-card { width: min(420px, 100%); padding: 24px; border-radius: var(--r-panel); background: var(--deep); border: 1px solid var(--wire); display: flex; flex-direction: column; gap: 10px; box-shadow: 0 30px 70px rgba(0, 0, 0, .5); }
.tour-card h3 { font-size: var(--t-23); font-weight: 700; }
.tour-card p, .ad-card p { font-size: var(--t-15); line-height: 1.55; color: var(--mist); }
.ad-card b { color: var(--paper); }
.tour-step { font-size: var(--t-13); font-weight: 700; color: var(--sky); }
.tour-dots { display: flex; gap: 6px; margin: 6px 0; }
.tour-dots i { width: 18px; height: 3px; border-radius: 2px; background: var(--wire); }
.tour-dots i.on { background: var(--sky); }
.tour-btns { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }

/* ===================================================================== small screens */
@media (max-width: 1000px) { .settings-grid { grid-template-columns: 1fr; } .dc-cols { grid-template-columns: minmax(0, 1fr); } .dc-members { display: none; } }
@media (max-width: 760px) {
  .topbar { width: calc(100vw - 92px); left: auto; right: 12px; transform: none; }
  .view[data-view="games"], .view[data-view="settings"], .view[data-view="plus"] { padding: 0 16px 56px 80px; }
  .view[data-view="ai"] { padding: 0 16px 16px 80px; }
  .view[data-view="browse"], .view[data-view="movies"], .view[data-view="rbx"] { padding: 66px 12px 12px 80px; }
  .player { padding: 66px 12px 12px 80px; }
  .player-back span { display: none; }
  .vhead, .games-head { padding-top: 80px; }
  .vtitle, .games-title { font-size: var(--t-29); }
  .vrail, .games-rail { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
  .vactions { margin-left: 0; justify-content: flex-start; }
  .games-search { margin-left: 0; width: 100%; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 20px 12px; }
  .plus-plans { grid-template-columns: 1fr; }
  .view[data-view="chat"] { padding: 64px 0 0 76px; }
  .dc { grid-template-columns: 1fr; border-top-left-radius: 0; }
  .dc-main { display: none; }
  body.cx-open .dc-side { display: none; }
  body.cx-open .dc-main { display: flex; }
  .dc-back { display: grid; }
  .hub-wallet { grid-template-columns: 1fr; }
  .set-row { flex-wrap: wrap; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.dc-count { font-weight: 500; color: var(--mist-2); opacity: .8; }
.dc-me-t #chat-streak { display: none; }

/* ===================================================================== music */
.view[data-view="music"] { display: flex; flex-direction: column; padding: 0 56px 20px 104px; overflow: hidden; }
.view[data-view="music"] > * { width: 100%; max-width: 1160px; margin-inline: auto; flex-shrink: 0; }
.mu-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 0; }
.mu-sec h3 { margin: 8px 0 12px; font-size: var(--t-18); font-weight: 700; }
.mu-sec + .mu-sec { margin-top: 18px; }
.mu-rail { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.mu-card { flex: none; width: 152px; display: flex; flex-direction: column; gap: 3px; text-align: left; background: none; border: 0; cursor: pointer; }
.mu-card img { width: 152px; height: 152px; margin-bottom: 6px; border-radius: var(--r-panel); object-fit: cover; background: var(--deep); border: 1px solid var(--wire); transition: border-color .15s; }
.mu-card:hover img { border-color: var(--sky); }
.mu-card b, .mu-meta b { font-size: var(--t-15); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-card small, .mu-meta small { font-size: var(--t-13); color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-row { display: flex; align-items: center; gap: 14px; padding: 6px 10px; border-radius: var(--r-ctl); cursor: pointer; }
.mu-row:hover { background: var(--deep); }
.mu-row.on { background: var(--ridge); }
.mu-row img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--deep); }
.mu-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mu-time { font-size: var(--t-13); color: var(--mist-2); font-variant-numeric: tabular-nums; }
.mu-empty { padding: 28px 4px; font-size: var(--t-15); color: var(--mist); }
.mu-ic { width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 0; border-radius: var(--r-ctl); color: var(--mist); cursor: pointer; }
.mu-ic svg { width: 18px; height: 18px; }
.mu-ic:hover { color: var(--paper); background: var(--ridge); }
.mu-ic.on { color: var(--sky); } .mu-ic.on svg { fill: currentColor; }
.mu-lyrics { max-width: 640px; padding: 12px 0 80px; }
.mu-ly { padding: 6px 0; font-size: var(--t-23); font-weight: 700; line-height: 1.3; color: var(--mist-2); cursor: pointer; transition: color .25s; }
.mu-ly:hover { color: var(--mist); }
.mu-ly.on { color: var(--paper); }
.mu-ly.plain { font-size: var(--t-18); font-weight: 500; color: var(--mist); cursor: default; }
.mu-bar { display: grid; grid-template-columns: 1fr minmax(280px, 2fr) 1fr; align-items: center; gap: 16px; padding: 10px 16px; border-radius: var(--r-panel); background: var(--deep); border: 1px solid var(--wire); }
.mu-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mu-now img { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; background: var(--ridge); }
.mu-now div { min-width: 0; display: flex; flex-direction: column; }
.mu-now b { font-size: var(--t-15); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-now small { font-size: var(--t-13); color: var(--mist); }
.mu-ctl { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mu-btns { display: flex; align-items: center; gap: 6px; }
.mu-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sky); color: var(--sky-ink); display: grid; place-items: center; cursor: pointer; }
.mu-play svg { width: 18px; height: 18px; fill: currentColor; }
.mu-seek { display: flex; align-items: center; gap: 10px; width: 100%; font-size: var(--t-12); color: var(--mist); font-variant-numeric: tabular-nums; }
.mu-seek input { flex: 1; }
.mu-bar input[type=range] { accent-color: var(--sky); height: 4px; cursor: pointer; }
.mu-vol { display: flex; align-items: center; gap: 8px; justify-self: end; color: var(--mist); }
.mu-vol svg { width: 16px; height: 16px; } .mu-vol input { width: 100px; }
@media (max-width: 760px) { .view[data-view="music"] { padding: 0 12px 12px 80px; } .mu-bar { grid-template-columns: 1fr; } .mu-vol { display: none; } }
.hub-swatch { width: 32px; height: 32px; border-radius: 50%; flex: none; border: 2px solid var(--wire); }
.dc-title { align-self: center; font-size: var(--t-12); color: var(--mist); }
/* the list scrolls and the player / message box stay on screen (the "> *" rules above would stop them shrinking) */
.view[data-view="music"] > .mu-body, .view[data-view="ai"] > .ai-app { flex: 1 1 0; min-height: 0; }
.mu-bar.idle .mu-btns button, .mu-bar.idle .mu-seek input { opacity: .45; pointer-events: none; }
.mu-bar { margin-top: 8px; }
