/* Bitz Lab. The palette comes from the games themselves. Every colour is a token, and
   the Design page (/design/) overrides them at /api/theme, so Mike can restyle the lab
   without a deploy. */

:root {
  --bg: #070a12;          /* page */
  --surface: #0f1420;     /* panels, cards */
  --surface-2: #151b2a;   /* raised panels, inputs */
  --line: #232a3a;        /* borders and rules */
  --ink: #eef1f6;         /* main text */
  --mist: #8b93a7;        /* secondary text */
  --gold: #e6c268;        /* the brand accent and primary actions */
  --gold-ink: #1a1405;    /* text on gold */
  --header-bg: #ecc65f;   /* the bright header */
  --header-ink: #141006;  /* text on the header */
  --yes: #5ccba0;         /* continue, keep, yes */
  --no: #e58783;          /* kill, no */
  --tweak: #e6c268;       /* tweak, maybe */
  --signal: #6aa2ff;      /* links and focus */
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}
a { color: var(--signal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 20px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--mist); }
.muted { font-size: 14px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header (bright) ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); color: var(--header-ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
.top-inner {
  max-width: 1440px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 22px; height: 58px;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none !important; }
.wm-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--header-ink); color: var(--header-bg);
  display: grid; place-items: center; font-weight: 900; font-size: 18px;
}
.wm-text { display: flex; flex-direction: column; line-height: 1.05; }
.wm-name { font-weight: 900; font-size: 18px; letter-spacing: .04em; }
.wm-name em { font-style: normal; font-weight: 600; opacity: .7; }
.wm-sub { font-size: 11px; font-weight: 600; opacity: .7; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  color: var(--header-ink); font-weight: 650; font-size: 14.5px;
  padding: 7px 12px; border-radius: 999px; text-decoration: none;
}
.nav a:hover { background: rgba(0, 0, 0, .08); }
.nav a[aria-current="page"] { background: var(--header-ink); color: var(--header-bg); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top .btn-new {
  background: var(--header-ink); color: var(--header-bg); border: 0;
  font-weight: 750; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14px;
}
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 999px; border: 0;
  background: rgba(0, 0, 0, .08); color: var(--header-ink); cursor: pointer;
  display: grid; place-items: center; text-decoration: none !important;
}
.icon-btn:hover { background: rgba(0, 0, 0, .15); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .count {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #d93a3a; color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--header-bg);
}
.avatar {
  width: 34px; height: 34px; border-radius: 999px; flex: none;
  display: inline-grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--av, #3b82f6); color: #fff; border: 0;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.xs { width: 20px; height: 20px; font-size: 10px; }
.top .avatar { cursor: pointer; border: 2px solid var(--header-ink); }

.menu {
  position: absolute; z-index: 80; min-width: 230px; padding: 6px;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu a, .menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; text-align: left;
  padding: 9px 11px; border-radius: 8px; color: var(--ink); background: none; border: 0;
  font: inherit; font-size: 14.5px; cursor: pointer; text-decoration: none !important;
}
.menu a:hover, .menu button:hover { background: rgba(255, 255, 255, .06); }
.menu .menu-head { padding: 8px 11px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .menu-head b { display: block; }
.menu small { display: block; color: var(--mist); font-size: 12.5px; }
.menu .menu-item-text { display: flex; flex-direction: column; }

/* ---------- Ticker (the lab's activity, like the deck's live tape) ---------- */
.ticker {
  background: #04060b; border-bottom: 1px solid var(--line);
  height: 30px; overflow: hidden; position: relative; font-size: 12.5px;
}
.ticker-track { display: inline-flex; gap: 34px; white-space: nowrap; padding-left: 100%; height: 30px; align-items: center; animation: tape 70s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick { display: inline-flex; gap: 7px; align-items: center; color: var(--mist); }
.tick b { color: var(--ink); font-weight: 650; }
.tick a { color: var(--ink); }
.tick .chip { font-size: 10.5px; padding: 1px 6px; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; padding-left: 20px; }
}

/* ---------- Page layout ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 26px 20px 90px; }
.page-narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--mist); margin: 4px 0 0; max-width: 64ch; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1; }

/* ---------- Buttons and inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 650; font-size: 14.5px;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.btn:hover { border-color: #39425a; background: #1a2133; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.btn-primary:hover { background: var(--gold); filter: brightness(1.07); border-color: transparent; }
.btn-yes { background: var(--yes); color: #062417; border-color: transparent; }
.btn-no { background: var(--no); color: #2a0c0b; border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--mist); }
.btn-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, .05); border-color: transparent; }
.btn-sm { padding: 6px 11px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 12px; }
.btn svg { width: 17px; height: 17px; }

label { display: block; font-weight: 650; font-size: 14px; margin: 0 0 6px; }
.hint { font-weight: 400; color: var(--mist); font-size: 13px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font: inherit; font-size: 15px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230, 194, 104, .18); }
input[type="color"] { width: 46px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; color: var(--mist); font: inherit; font-weight: 650; font-size: 13.5px; padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- Chips, stages, verdict bars ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .07); color: var(--ink); white-space: nowrap;
}
.chip.yes { background: rgba(92, 203, 160, .16); color: var(--yes); }
.chip.no { background: rgba(229, 135, 131, .16); color: var(--no); }
.chip.gold { background: rgba(230, 194, 104, .16); color: var(--gold); }
.chip.blue { background: rgba(106, 162, 255, .16); color: var(--signal); }
.stage-idea { background: rgba(139, 147, 167, .18); color: #c3c9d6; }
.stage-prototype { background: rgba(106, 162, 255, .16); color: var(--signal); }
.stage-review { background: rgba(230, 194, 104, .16); color: var(--gold); }
.stage-pricing { background: rgba(190, 140, 255, .16); color: #c8a6ff; }
.stage-production { background: rgba(92, 203, 160, .16); color: var(--yes); }
.stage-ready { background: var(--yes); color: #062417; }
.stage-parked { background: rgba(139, 147, 167, .12); color: var(--mist); }
.stage-killed { background: rgba(229, 135, 131, .16); color: var(--no); }

.vbar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: #1c2333; }
.vbar i { display: block; height: 100%; }
.vbar .c { background: var(--yes); } .vbar .t { background: var(--tweak); } .vbar .k { background: var(--no); }
.vlegend { display: flex; justify-content: space-between; font-size: 12px; color: var(--mist); margin-top: 4px; }
.vlegend b { font-weight: 700; }
.vlegend .c b { color: var(--yes); } .vlegend .k b { color: var(--no); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 14px; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.empty {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 30px 20px;
  text-align: center; color: var(--mist);
}
.empty b { color: var(--ink); display: block; font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }

/* Welcome (first visit) */
.welcome {
  display: grid; grid-template-columns: 1.1fr 2fr; gap: 26px; align-items: center;
  background: linear-gradient(180deg, #121a2b, #0d1320); border: 1px solid #2b3550;
  border-radius: 16px; padding: 24px 26px; margin-bottom: 26px; position: relative;
}
.welcome h2 { font-size: 24px; }
.welcome p { color: #c4cad8; margin: 0; }
.welcome-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.welcome-steps a {
  display: block; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none !important;
}
.welcome-steps a:hover { border-color: var(--gold); }
.welcome-steps b { display: block; margin: 6px 0 3px; }
.welcome-steps span { color: var(--mist); font-size: 13px; line-height: 1.35; display: block; }
.welcome-steps svg { width: 22px; height: 22px; color: var(--gold); }
.welcome .close { position: absolute; top: 10px; right: 10px; }

/* ---------- Game cards (lobby) ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar input[type="search"] { max-width: 280px; }
.toolbar select { width: auto; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.gcard {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; color: var(--ink); text-decoration: none !important;
  transition: border-color .15s, transform .15s;
}
.gcard:hover { border-color: #3a4560; transform: translateY(-2px); }
.gcard-art { position: relative; aspect-ratio: 16 / 9; background: #0b1020 center/cover no-repeat; }
.gcard-art .fallback {
  position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 26px;
  letter-spacing: -.02em; color: var(--ink); background: radial-gradient(circle at 30% 20%, #1d2a4a, #0a0f1d 70%); padding: 16px; text-align: center;
}
.gcard-art .badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.gcard-art .ver {
  position: absolute; right: 10px; top: 10px; background: rgba(4, 6, 11, .82); color: var(--ink);
  font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}
.gcard-art .playhint {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .15s;
  background: rgba(4, 6, 11, .45);
}
.gcard:hover .playhint { opacity: 1; }
.playhint span { background: var(--gold); color: var(--gold-ink); font-weight: 800; padding: 10px 18px; border-radius: 999px; }
.gcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gcard-title { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.gcard-title h3 { margin: 0; font-size: 17px; }
.gcard-format { color: var(--gold); font-size: 13px; font-weight: 650; }
.gcard-hook { color: #b9c0cf; font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gcard-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; color: var(--mist); font-size: 12.5px; padding-top: 6px; }
.gcard-foot .grow { min-width: 0; }
.gcard-stats { display: flex; gap: 12px; }
.gcard-stats span { display: inline-flex; align-items: center; gap: 4px; }
.gcard-stats svg { width: 14px; height: 14px; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 14px; }
.section-title h2 { margin: 0; }

/* ---------- Play page ---------- */
.play {
  display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 0;
  height: calc(100vh - 88px); height: calc(100dvh - 88px);
}
.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #04060b; }
.stage-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--bg); }
.stage-bar h1 { font-size: 19px; margin: 0; }
.vpills { display: flex; gap: 5px; flex-wrap: wrap; }
.vpill {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--mist); font: inherit;
  font-size: 12.5px; font-weight: 750; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.vpill[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.vpill.draft { border-style: dashed; }
.frames { flex: 1; display: flex; gap: 18px; justify-content: center; align-items: stretch; padding: 16px; min-height: 0; overflow: auto; }
.frame { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; }
.frame-label { text-align: center; font-size: 12.5px; color: var(--mist); margin-bottom: 6px; font-weight: 650; }
.frame-shell { flex: 1; min-height: 0; border-radius: 26px; border: 8px solid #1b2130; box-shadow: var(--shadow); overflow: hidden; background: #000; }
.frame-shell iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.frames .frame { flex: none; align-items: center; }
.frames { align-items: center; }
.device-fit { position: relative; flex: none; }
.device { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.device .frame-shell { width: 100%; height: 100%; }
.frames.desk .frame-shell { border-radius: 10px; border-width: 1px; border-color: var(--line); }
.loading-frame { display: grid; place-items: center; height: 100%; color: var(--mist); }

.side { border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs button {
  flex: 1; border: 0; background: none; color: var(--mist); font: inherit; font-weight: 700; font-size: 13.5px;
  padding: 13px 10px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.tabs .count { font-size: 11px; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.tabpanel { flex: 1; overflow: auto; padding: 16px; min-height: 0; }

/* Feedback stream */
.composer { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 16px; }
.composer textarea { border: 0; background: transparent; padding: 6px; min-height: 64px; box-shadow: none !important; }
.composer .spread { padding-top: 6px; border-top: 1px solid var(--line); }
.item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item-body { flex: 1; min-width: 0; }
.item-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; color: var(--mist); }
.item-head b { color: var(--ink); font-size: 14px; }
.item-text { margin-top: 3px; white-space: pre-wrap; word-wrap: break-word; }
.item-text .mention { color: var(--gold); font-weight: 650; }
.item.request { }
.item .result { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--yes); background: rgba(92, 203, 160, .07); border-radius: 0 8px 8px 0; font-size: 14px; }
.item-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* Verdict form */
.rating { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.stars { display: flex; gap: 4px; }
.stars button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--mist); font-weight: 800; cursor: pointer; }
.stars button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.verdicts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.verdicts button { padding: 12px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.verdicts button[data-v="continue"][aria-pressed="true"] { background: var(--yes); color: #062417; }
.verdicts button[data-v="tweak"][aria-pressed="true"] { background: var(--tweak); color: var(--gold-ink); }
.verdicts button[data-v="kill"][aria-pressed="true"] { background: var(--no); color: #2a0c0b; }

/* Dropzone */
.drop {
  border: 2px dashed #3a4560; border-radius: 14px; padding: 24px 16px; text-align: center; cursor: pointer;
  background: rgba(255, 255, 255, .02); color: var(--mist); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(230, 194, 104, .06); color: var(--ink); }
.drop b { color: var(--ink); display: block; font-size: 15.5px; margin-bottom: 4px; }
.drop svg { width: 30px; height: 30px; color: var(--gold); margin-bottom: 6px; }
.filelist { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; }
.filelist li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.progress { height: 6px; background: #1c2333; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }

/* Version history */
.vlist { list-style: none; padding: 0; margin: 0; }
.vlist li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.vlist .vhead { display: flex; gap: 8px; align-items: center; }
.vlist .vnum { font-weight: 900; color: var(--gold); min-width: 32px; }
.vlist .vlog { margin-top: 4px; font-size: 14px; color: #c9cfdb; white-space: pre-wrap; }

/* Markdown */
.md { line-height: 1.6; }
.md h1 { font-size: 22px; } .md h2 { font-size: 18px; margin-top: 1.2em; } .md h3 { font-size: 15.5px; margin-top: 1em; }
.md table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 10px 0; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: .92em; }
.md pre { background: var(--surface-2); padding: 12px; border-radius: 10px; overflow: auto; }
.md ul, .md ol { padding-left: 1.3em; }
.md blockquote { margin: 0; padding: 4px 12px; border-left: 3px solid var(--gold); color: #c9cfdb; }

/* Ask Bitz */
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { padding: 10px 12px; border-radius: 12px; max-width: 92%; }
.bubble.user { align-self: flex-end; background: #233256; }
.bubble.assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); }
.bubble .acts { margin-top: 6px; font-size: 12.5px; color: var(--yes); }

/* ---------- Boards (ideas) ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-height: 160px; }
.col-head { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.col-head h3 { margin: 0; font-size: 14.5px; }
.icard { display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--ink); text-decoration: none !important; margin-bottom: 10px; }
.icard:hover { border-color: #3a4560; }
.icard img { border-radius: 8px; margin-bottom: 8px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.icard h4 { margin: 0 0 4px; font-size: 15px; }
.icard p { margin: 0; color: #b9c0cf; font-size: 13px; }
.icard .foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; color: var(--mist); font-size: 12.5px; }
.vote { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 3px 10px; font: inherit; font-weight: 750; font-size: 12.5px; cursor: pointer; }
.vote[aria-pressed="true"] { background: var(--yes); color: #062417; border-color: transparent; }

/* ---------- Moodboard ---------- */
.mood { columns: 4 260px; column-gap: 16px; }
.mcard { break-inside: avoid; margin-bottom: 16px; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); text-decoration: none !important; }
.mcard img, .mcard video { width: 100%; display: block; }
.mcard .mbody { padding: 12px 14px; }

/* ---------- Inbox and activity ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.feed li.unread { background: rgba(230, 194, 104, .05); }
.feed .when { color: var(--mist); font-size: 12.5px; white-space: nowrap; }
.feed .what { flex: 1; min-width: 0; }
.feed .what a { color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--gold); flex: none; margin-top: 8px; }

/* ---------- Modals and toasts ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(2, 4, 8, .7); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { width: min(620px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border: 1px solid #2b3550; border-radius: 16px; box-shadow: var(--shadow); padding: 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h2 { margin: 0; }
.toasts { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 650; box-shadow: var(--shadow); pointer-events: auto; }
.toast.err { background: var(--no); color: #2a0c0b; }
.mention-pop { position: absolute; z-index: 120; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; min-width: 200px; }
.mention-pop button { display: flex; gap: 8px; align-items: center; width: 100%; border: 0; background: none; color: var(--ink); font: inherit; padding: 7px 9px; border-radius: 7px; cursor: pointer; text-align: left; }
.mention-pop button.on, .mention-pop button:hover { background: rgba(255, 255, 255, .07); }

/* ---------- Bottom bar (phones) ---------- */
.bottombar { display: none; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--header-bg); color: var(--header-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; max-width: 12ch; }
.login-art p { font-size: 17px; max-width: 40ch; opacity: .8; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: min(380px, 100%); }
.error-box { background: rgba(229, 135, 131, .12); border: 1px solid rgba(229, 135, 131, .4); color: #ffc9c6; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; }
.ok-box { background: rgba(92, 203, 160, .12); border: 1px solid rgba(92, 203, 160, .4); color: #b9f1da; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; }

/* Not found */
.notfound { max-width: 560px; margin: 12vh auto; padding: 24px; }
.eyebrow { color: var(--gold); font-weight: 700; font-size: 13px; margin-bottom: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .play { grid-template-columns: minmax(0, 1fr) 360px; }
  .welcome { grid-template-columns: 1fr; }
  .welcome-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav, .top .btn-new, .wm-sub { display: none; }
  .top-inner { padding: 0 14px; height: 54px; gap: 12px; }
  .top-actions { margin-left: auto; }
  .page { padding: 18px 16px 100px; }
  .bottombar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottombar a, .bottombar button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--mist); font: inherit;
    font-size: 11px; font-weight: 650; text-decoration: none !important; background: none; border: 0; padding: 4px 0; cursor: pointer;
  }
  .bottombar svg { width: 22px; height: 22px; }
  .bottombar a[aria-current="page"] { color: var(--gold); }
  .bottombar .plus span.p { width: 42px; height: 42px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; margin-top: -16px; box-shadow: var(--shadow); }
  .play { grid-template-columns: 1fr; height: auto; }
  .stage { height: calc(100dvh - 84px - 62px); }
  .frames { padding: 8px; }
  .frames { align-items: stretch; }
  .frames .frame { flex: 1; align-items: stretch; }
  .frames.phone .frame { width: 100%; }
  .frames.compare { overflow-x: auto; justify-content: flex-start; }
  .frames.compare .frame { width: 86vw; flex: none; }
  .device-fit { width: 100%; height: 100%; flex: 1; }
  .device { position: static; width: 100%; height: 100%; transform: none; }
  .frame-shell { border-width: 0; border-radius: 0; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .tabpanel { max-height: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 28px 22px; min-height: auto; }
  .login-art h1 { font-size: 34px; }
  .games { grid-template-columns: 1fr; }
  .welcome-steps { grid-template-columns: 1fr 1fr; }
  .toasts { bottom: 90px; }
}

/* ---------- Forms: password fields and errors ---------- */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent;
  color: var(--mist); font: inherit; font-size: 13px; font-weight: 650; padding: 6px 10px; border-radius: 7px; cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.field-err { color: var(--no); font-size: 13px; margin: 6px 0 0; }
[aria-invalid="true"] { border-color: var(--no) !important; }
.seg button svg { width: 17px; height: 17px; display: block; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
#designGrid > .panel { margin-top: 0; }

/* Icons inside panel headings (the pricing check) */
.panel-title h3 svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; color: var(--gold); }
