/* Platform theme "Glut" (2026-10-30): night-plum surfaces, one ember accent, warm white text,
   one system type stack, sentence case, soft motion. Loaded last; profile effects keep their own colours.
   Why: GameWall is about tonight. People gather like around a fire, and a 24h pin glows and then cools.
   Rule of thumb: ember = do it / brand / news, warm white = chosen, green = someone is online.
   Signature: the time left on a pin is drawn in ember that cools to ash as the 24 hours run out (--heat). */
:root {
  color-scheme: dark;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Display", "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --bg: #120e14;          /* night plum: page */
  --surface: #1b161e;     /* cards, rails */
  --surface-2: #241e28;   /* inputs, chips, secondary buttons */
  --surface-hover: #2b2430;
  --hairline: #fff2e812;
  --ink: #f7f1ec;         /* warm white, 17.1:1 on --bg, 15.9:1 on --surface */
  --muted: #b7abb4;       /* 8.6:1 on --bg, 8.0:1 on --surface */
  --subtle: #998c97;      /* 6.0:1 on --bg, 5.6:1 on --surface, 5.1:1 on --surface-2 */
  --accent: #ff9e57;      /* ember: 9.4:1 on --bg, 8.7:1 on --surface; --on-accent on it 9.2:1 */
  --accent-hover: #ffb478;
  --accent-soft: #ff9e571f;
  --on-accent: #1d0e05;
  --ash: var(--subtle);   /* what the ember cools to */
  --live: #5fd99a;        /* online, 10.1:1 on --surface */
  --radius: 16px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --paper: var(--bg); --white: var(--surface); --line: var(--hairline); --violet: var(--accent); --coral: var(--accent);
}
html { scrollbar-color: #3a3240 var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font-family: var(--font); }
::selection { background: #ff9e5755; color: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Display type: tight, bold, no decoration. */
.page-heading, .hero h1, .section-head h2, .shop-hero h1, .games-hero h1, .room-head h1, .pp-name h1, .g-head-text h1, .account-gate h1 {
  font-family: var(--font-display); font-weight: 750; letter-spacing: -.025em;
}
.page-heading { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.12; }
.hero h1, .hero-live h1 { letter-spacing: -.03em; }
.section-head h2 { font-size: 22px; letter-spacing: -.02em; }
.right-card h3, .pin-content h3, .dialog h2, .settings-panel h2, .pp-module-head h2, .studio2-group-head h3 { font-family: var(--font); font-weight: 700; letter-spacing: -.01em; }
.title-dot { color: var(--accent); }
.page-lede, .section-head p { color: var(--muted); font-size: 15px; }

/* Small labels: sentence case, quiet, no tracking. Structure comes from size and weight, not caps. */
.nav-label, .crumb, .eyebrow, .category, .pin-category, .board-count, .shop-group h3, .shop-rarity, .game-kind,
.studio2-sub, .g-channels-label, .rail-kicker, .section-kicker {
  text-transform: none; letter-spacing: 0;
}
.eyebrow, .section-kicker, .rail-kicker { font-size: 13px; font-weight: 600; color: var(--muted); }
.category, .pin-category { font-size: 12px; font-weight: 600; color: var(--muted); }
.crumb { font-size: 15px; font-weight: 700; color: var(--ink); }

/* ---------- Shell ---------- */
.app-shell { grid-template-columns: 248px minmax(0, 1fr) 300px; gap: 32px; max-width: 1480px; padding: 16px 28px 64px; }
.side { border: 0; padding-right: 4px; }
.brand { font-family: var(--font-display); font-size: 21px; letter-spacing: -.03em; margin: 10px 0 28px 10px; color: var(--ink); }
.brand b { color: var(--ink); }
.brand-domain, .brand small { color: var(--subtle); }
.brand-mark { box-shadow: none; }
.nav-label { display: none; }
.nav { gap: 2px; flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
/* Sidebar sections: small sentence-case headings, no lines, just a little air between groups. */
.nav-group { display: grid; gap: 2px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-section { padding: 0 14px 4px; font-size: 12px; font-weight: 600; color: var(--subtle); }
.nav-item {
  min-height: 46px; padding: 10px 14px; gap: 14px;
  border: 0; border-radius: 999px; background: transparent; box-shadow: none;
  color: var(--muted); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.nav-item:before { content: none !important; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); box-shadow: none; font-weight: 700; }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; font-size: 18px; color: inherit; }
.ui-icon { display: block; }
.nav-item.active .ui-icon { stroke-width: 2.2; }
/* Short laptop screens: tighter rows so all three sections fit without scrolling. */
@media (max-height: 860px) { .nav-item { min-height: 40px; padding-top: 8px; padding-bottom: 8px; } .nav-group + .nav-group { margin-top: 10px; } .brand { margin-bottom: 20px; } }
@media (max-height: 800px) { .side-foot { display: none; } }
.small-profile { background: transparent; border: 0; border-radius: 999px; box-shadow: none; padding: 8px 12px 8px 8px; transition: background-color .16s var(--ease); }
.small-profile:hover { background: var(--surface); }
.small-profile .chevron { color: var(--subtle); }
.side-foot { color: var(--subtle); font-size: 12px; }

/* Top bar: title left, a calm search, compact actions. */
.topbar { height: 52px; margin-bottom: 20px; gap: 10px; }
.search { background: var(--surface); border: 1px solid transparent; border-radius: 999px; min-width: 260px; padding: 10px 16px; color: var(--subtle); font-size: 14px; transition: border-color .16s var(--ease), background-color .16s var(--ease); }
.search:focus-within { background: var(--bg); border-color: var(--accent); }
.search input { font-size: 14px; color: var(--ink); }
.search input::placeholder { color: var(--subtle); }
.icon-btn, .top-gems, .top-language, .mobile-search { background: var(--surface); border: 0; color: var(--muted); border-radius: 999px; transition: background-color .16s var(--ease), color .16s var(--ease); }
.icon-btn:hover, .top-gems:hover, .top-language:hover { background: var(--surface-hover); color: var(--ink); }
.top-create { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; font-weight: 700; padding: 0 18px; min-height: 40px; transition: background-color .16s var(--ease); }
.top-create:hover { background: var(--accent-hover); color: var(--on-accent); }

/* Right rail: plain cards, no gradients. */
.right-card, .right-card.highlight { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: none; }
.right-card.highlight { background: var(--surface); }
.prompt-icon { background: var(--accent-soft); color: var(--accent); }
.mini-gather { border-color: var(--hairline); }
.person-row button { color: var(--subtle); }

/* ---------- Controls ---------- */
.btn { border-radius: 999px; font-size: 14px; font-weight: 700; min-height: 40px; padding: 9px 18px; letter-spacing: 0; transition: background-color .16s var(--ease), color .16s var(--ease), transform .16s var(--ease); }
.btn:active { transform: scale(.98); }
.btn.primary, .btn.showcase-button { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: none; }
.btn.primary:hover, .btn.showcase-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.secondary, .btn.hero-secondary { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn.secondary:hover, .btn.hero-secondary:hover { background: var(--surface-hover); border-color: transparent; }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { color: var(--accent); }
.btn:disabled, .btn[disabled] { background: var(--surface-2); border-color: transparent; color: var(--subtle); box-shadow: none; opacity: 1; }
.text-link { color: var(--accent); font-weight: 600; }

/* Filters: pills; the chosen one is solid warm white like a pressed key (ember stays for actions). */
.tab, .kind-tab, .people-tab { border: 0; border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 600; transition: background-color .16s var(--ease), color .16s var(--ease); }
.tab:hover, .kind-tab:hover, .people-tab:hover { background: var(--surface-hover); color: var(--ink); }
.tab.active, .people-tab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kind-tabs { background: var(--surface); border: 0; border-radius: 999px; }
.kind-tab.active { background: var(--surface-hover); color: var(--ink); }
.field input, .field textarea, .field select, select, .message-form input {
  background: var(--surface-2); border-color: transparent; border-radius: var(--radius-sm); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.nav-count { background: var(--accent); color: var(--on-accent); }
.toast { background: var(--ink); color: var(--bg); border-radius: 999px; font-weight: 600; box-shadow: 0 12px 32px #0008; }
.live-dot, .hero .live-dot { background: var(--live); box-shadow: 0 0 0 3px #5fd99a26; }

/* ---------- Cards: one surface, a gentle lift on hover ---------- */
.pin-card, .person-card, .profile-card, .message-panel, .studio-preview, .studio-controls, .empty,
.game-tile, .g-card, .reel-card, .shop-card, .settings-panel, .match-section, .pp-module {
  border-color: transparent; box-shadow: none; border-radius: var(--radius);
}
.pin-card, .person-card, .empty, .message-panel, .settings-panel { background: var(--surface); }
.pin-card, .person-card, .hero-card, .game-tile, .g-card, .reel-card, .shop-card {
  transition: transform .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
@media (hover: hover) {
  .pin-card:hover, .person-card:hover, .game-tile:hover, .g-card:hover, .reel-card:hover, .shop-card:hover {
    transform: translateY(-2px); background-color: var(--surface-hover); box-shadow: 0 10px 30px #0006;
  }
  .hero-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px #0008; }
}
.pin-icon { border: 0; border-radius: var(--radius-sm); }
/* Signature: the ember on a 24h pin cools as its time runs out. --heat is 1 when fresh, 0 when gone (set in app.js). */
.pin-expiry, [data-expires-at] { --heat: 1; }
.pin-expiry {
  background: color-mix(in oklab, var(--accent) calc(var(--heat) * 16%), var(--surface-2));
  color: color-mix(in oklab, var(--accent) calc(var(--heat) * 100%), var(--ash));
  border: 0; border-radius: 999px; font-weight: 700; transition: color 1s linear, background-color 1s linear;
}
.pp-pin small[data-expires-at], .section-kicker [data-expires-at] { color: color-mix(in oklab, var(--accent) calc(var(--heat) * 100%), var(--ash)); font-weight: 700; }
.pin-language-badge, .chip, .vibe-tag { background: var(--surface-2); color: var(--muted); border: 0; border-radius: 999px; }
.pin-footer { border-color: var(--hairline); }
.pin-meta { color: var(--subtle); }
.hero-card { border-radius: 20px; }
.hero-card-body strong em, .pp-main-badge, .reel-games em { background: var(--accent); color: var(--on-accent); letter-spacing: 0; text-transform: none; }

/* Dialogs and sheets */
.dialog-backdrop { background: #07040899; backdrop-filter: blur(6px); }
.dialog { background: var(--surface); border-radius: 20px; box-shadow: 0 30px 80px #000a; animation: theme-pop .22s var(--ease); }
@keyframes theme-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.footnote, .legal-footer, .legal-footer a { color: var(--subtle); }

/* Top bar icons */
.search .ui-icon, .icon-btn .ui-icon, .mobile-search .ui-icon { width: 18px; height: 18px; }
.search > span:first-child { display: grid; place-items: center; }
.icon-btn, .mobile-search { place-items: center; }

/* Page heroes for games and shop: flat surface, the content carries the colour. */
.shop-hero, .games-hero { background: var(--surface); border: 0; border-radius: 20px; }
.shop-hero p, .games-hero p { color: var(--muted); font-size: 15px; }
.shop-daily, .shop-earn, .shop-plans, .shop-history, .game-leaderboard, .game-faq { background: var(--surface); border: 0; border-radius: var(--radius); }
.shop-daily { background: var(--surface); }
.shop-daily p, .shop-plans p { color: var(--muted); font-size: 13px; }
.game-tile { background: var(--surface); border: 0; border-radius: var(--radius); }
.game-tile p { color: var(--muted); font-size: 13px; }

/* Small badges: sentence case, rounded. */
.nav-hint, .hint-tag, .beta-tag, .shop-rarity, .game-kind { text-transform: none; letter-spacing: 0; }
.nav-hint { border-radius: 999px; font-weight: 700; }

.hero .eyebrow, .hero-live .eyebrow { letter-spacing: 0; color: var(--ink); } /* who is online: green dot, plain text */
.settings-tabs button { border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; padding: 10px 14px; transition: background-color .16s var(--ease), color .16s var(--ease); }
.settings-tabs button:hover { background: var(--surface); color: var(--ink); }
.settings-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: none; }
.settings-panel { border: 0; border-radius: var(--radius); }
.settings-panel .field input, .settings-panel .field textarea, .settings-panel .field select { background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); }
.settings-panel .field input:focus, .settings-panel .field textarea:focus, .settings-panel .field select:focus { border-color: var(--accent); }

.tag-option span { background: var(--surface-2); border: 1px solid transparent; color: var(--muted); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; transition: background-color .16s var(--ease), color .16s var(--ease); }
.tag-option:hover span { color: var(--ink); }
.tag-option input:checked + span { background: var(--accent-soft); border-color: #ff9e5766; color: var(--ink); }
.pp-pin { border: 1px solid var(--hairline); background: var(--surface); }
.pp-pin-icon { background: var(--accent-soft); color: var(--accent); }
.choice { border-radius: var(--radius-sm); }

/* Buttons never wrap their label. */
.btn { white-space: nowrap; }
@media (max-width: 730px) {
  .topbar:before { color: var(--ink); font-family: var(--font-display); letter-spacing: -.03em; }
  .btn { font-size: 13px; padding: 8px 14px; min-height: 38px; }
}

/* ---------- Phone ---------- */
@media (max-width: 730px) {
  .mobile-nav { background: #120e14e6; border-top: 1px solid var(--hairline); backdrop-filter: saturate(1.4) blur(16px); }
  .mobile-nav button, .mobile-nav.has-admin button { color: var(--subtle); font-size: 11px; font-weight: 600; }
  .mobile-nav button>span { display: grid; place-items: center; height: 26px; margin: 0 auto 2px; }
  .mobile-nav button.active { color: var(--ink); }
  .mobile-nav button.active>span { color: var(--accent); text-shadow: none; }
  .mobile-nav button.active .ui-icon { stroke-width: 2.2; }
  .mobile-nav button[aria-expanded="true"] { color: var(--ink); }
  .more-panel { background: var(--surface); }
  .more-profile, .more-grid button { background: var(--surface-2); }
  .more-grid button>span { display: grid; place-items: center; }
  .page-heading { font-size: 28px; }
  .crumb { font-size: 17px; }
}
@media (max-width: 1180px) { .app-shell { gap: 24px; } }

@media (prefers-reduced-motion: reduce) {
  .pin-card, .person-card, .hero-card, .game-tile, .g-card, .reel-card, .shop-card, .btn, .dialog { transition: none; animation: none; }
  .pin-card:hover, .person-card:hover, .hero-card:hover, .game-tile:hover, .g-card:hover, .reel-card:hover, .shop-card:hover { transform: none; }
}
/* Gem code redemption under the daily reward */
.shop-redeem { display: grid; gap: 4px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.shop-redeem label { font-weight: 600; font-size: 14px; }
.shop-redeem small { color: var(--muted); font-size: 12px; }
.shop-redeem div { display: flex; gap: 8px; margin-top: 6px; }
.shop-redeem input { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--ink); padding: 10px 12px; font: 600 14px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .5px; text-transform: uppercase; }
.shop-redeem input::placeholder { text-transform: none; color: var(--subtle); }
.shop-redeem input:focus { outline: none; border-color: var(--accent); }

/* Badges: new = quiet ember, ready to collect = solid ember (it is an action), count = alert red. Green stays for online only. */
.nav-hint.is-new, .hint-tag.is-new, .opt-tag.is-fresh { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px #ff9e5740; }
.nav-hint.is-ready, .hint-tag.is-ready { background: var(--accent); color: var(--on-accent); animation-name: hint-pulse-ember; }
.studio2-dot.is-fresh { background: var(--accent); }
.shop-daily.is-ready { box-shadow: inset 0 0 0 1px #ff9e5766; }
@keyframes hint-pulse-ember { 0% { box-shadow: 0 0 0 0 #ff9e5788; } 70%, 100% { box-shadow: 0 0 0 7px #ff9e5700; } }
@media (prefers-reduced-motion: reduce) { .pin-expiry { transition: none; } .nav-hint.is-ready { animation: none; } }
@media (prefers-contrast: more) {
  :root { --muted: #d2c8cf; --subtle: #bfb3bc; --hairline: #fff2e830; }
}
/* Ember is spent once per view: the page's main action. Actions inside a pin card are quieter,
   and reporting is never highlighted. */
.pin-actions .btn.primary { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pin-actions .btn.primary:hover { background: #ff9e5733; border-color: transparent; }
.pin-actions .btn.primary:disabled { background: var(--surface-2); color: var(--subtle); }
[data-report-pin], [data-report] { color: var(--subtle); font-weight: 600; }
[data-report-pin]:hover, [data-report]:hover { color: var(--ink); }
.right-card .btn.primary { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.right-card .btn.primary:hover { background: var(--surface-hover); }
/* Leftover violet states from the older themes, now on the ember system. */
.toggle.on { background: var(--accent); }
.choice.active { background: var(--surface-hover); border-color: var(--accent); color: var(--ink); box-shadow: inset 0 0 0 1px #ff9e5755; }
.studio2-tabs button.active { box-shadow: inset 0 0 0 1px #ff9e5766; }
.message-form input:focus, .g-composer textarea:focus { border-color: var(--accent); }
.g-desc a, .g-msg-body p a { color: var(--accent); }
.discord-connected > span { color: var(--ink); }

/* Own profile link: phone avatar shortcut in the top bar and the address row in the studio. */
.top-me { display: none; flex: none; border: 0; padding: 0; background: none; border-radius: 999px; cursor: pointer; }
.top-me .avatar { display: block; }
@media (max-width: 730px) { .top-me { display: block; } }
.profile-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; padding: 10px 12px; background: var(--surface); border-radius: 14px; max-width: 640px; margin-bottom: 16px; }
.profile-link-label { color: var(--muted); font-size: 13px; }
.profile-link-url { flex: 1 1 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); font: 600 13px/1.4 var(--font); }
.profile-link-row .btn { padding: 7px 14px; font-size: 13px; }
