/* ============================================================
   small.community — the clubhouse design system
   midnight navy + periwinkle, a little bit 1999, a lot 2026
   ============================================================ */

:root {
  --bg: #0d1020;
  --bg-2: #141831;
  --bg-3: #1d2342;
  --border: #262d52;
  --border-2: #3a4374;
  --text: #e9ebf8;
  --muted: #a8b0d8;
  --accent: #8f99ff;
  --accent-ink: #101238;
  --good: #6fd9a6;
  --bad: #ef7a85;
  --link: #c2c8ff;
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: "Space Grotesk", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --tap: 44px;
  --play-min-height: 70vh;
  --sidebar-width: 252px;
  --focus: 2px solid var(--accent);
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-padding-top: 72px; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(143, 153, 255, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

p { margin: 0 0 0.8em; }
img { max-width: 100%; }

code, pre { font-family: var(--font-mono); font-size: 0.88em; background: var(--bg-3); border-radius: 6px; }
code { padding: 0.1em 0.35em; }
pre { padding: 0.8em 1em; overflow-x: auto; }

blockquote { margin: 0.6em 0; padding: 0.4em 1em; border-left: 3px solid var(--accent); background: var(--bg-3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); }

hr { border: none; border-top: 1px solid var(--border); margin: 1.2em 0; }

.muted { color: var(--muted); }
.small { font-size: 0.85em; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -48px;
  z-index: 400;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.skip-link:focus { top: var(--space-3); text-decoration: none; }

/* ---------------------------------------------- layout: app shell */

.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-shrink: 0;
  padding: 4px 8px 6px;
}
.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
}
.sidebar .brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  padding: 0;
  color: var(--muted);
  display: block;
  text-decoration: none;
}
.sidebar .brand:hover { color: var(--text); text-decoration: none; }
.sidebar .brand .tld { color: var(--accent); }

.community-switch {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  margin: 0 2px 8px;
  cursor: pointer;
  width: calc(100% - 4px);
  color: var(--text);
  font: inherit;
  text-align: left;
  min-height: 44px;
  flex-shrink: 0;
}
.community-switch:hover { border-color: var(--border-2); }
.community-switch .chev { margin-left: auto; display: flex; color: var(--muted); }
.community-switch .chev .nav-ico { width: 14px; height: 14px; }
.community-switch img, .community-avatar {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
}
.community-switch .name { font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher-avatar { width: 24px; height: 24px; font-size: 0.7rem; }
.community-switcher-panel { left: 8px; right: 8px; width: auto; }
.notif.is-current { background: color-mix(in srgb, var(--accent) 12%, transparent); }

.sidenav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.78; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-link:hover { background: var(--bg-3); text-decoration: none; color: var(--text); }
.nav-link:hover .nav-ico, .nav-link.active .nav-ico { opacity: 1; }
.nav-link.active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  font-weight: 600;
  color: var(--text);
}
.nav-link.active .nav-ico { color: var(--accent); }
.nav-link .icon { width: 1.4em; text-align: center; }
.nav-link .pill { margin-left: auto; }
.nav-spark {
  margin-left: auto;
  display: flex;
  color: var(--accent);
  opacity: 0.7;
}
.nav-spark .nav-ico { width: 13px; height: 13px; opacity: 1; }
.nav-rule {
  height: 1px;
  background: var(--border);
  margin: 8px 10px;
}
.nav-section { margin: 14px 10px 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.nav-link-btn {
  background: none; border: none; width: 100%; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}

.sidebar-foot {
  flex-shrink: 0;
  margin-top: auto;
  padding: 8px 2px 4px;
  border-top: 1px solid var(--border);
}
.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.account-chip:hover { background: var(--bg-3); }
.account-chip .name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip .chev { margin-left: auto; display: flex; color: var(--muted); }
.account-chip .chev .nav-ico { width: 14px; height: 14px; }
.drop-up .dropdown-panel {
  top: auto;
  bottom: calc(100% + 8px);
  right: 0;
  left: 0;
  width: auto;
}
.account-panel .notif { align-items: center; }
.account-panel .nav-ico { opacity: 0.8; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.rail { display: none; }
.rail:has(> *) {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 14px 26px;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
}
@media (min-width: 1100px) {
  .shell:has(.rail > *) { grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 280px; }
  .rail:has(> *) {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
}
@media (max-width: 1099px) {
  .rail:has(> *) { grid-column: 2; border-left: none; border-top: 1px solid var(--border); }
}

.topbar {
  display: flex; align-items: center;
  padding: 10px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 16, 32, 0.72);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 40;
}
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.topbar-bell { flex-shrink: 0; margin-left: auto; }
.tagline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { padding: 28px 32px 48px; width: 100%; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.page-head h1 { margin-bottom: 0.1em; }
.page-head p { margin: 0; }

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--muted); margin-bottom: var(--space-3);
}
.crumbs a { color: var(--link); }
.crumbs-sep { color: var(--border-2); }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(6, 8, 18, 0.66);
  z-index: 90;
}
.sidebar-overlay[hidden] { display: none; }

body.nav-open { overflow: hidden; }

/* ---------------------------------------------- cards & grids */

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-6);
}
.card + .card { margin-top: var(--space-4); }
.card h2, .card h3 { display: flex; align-items: center; gap: var(--space-2); }
.card-link { display: block; color: inherit; transition: transform .12s ease, border-color .12s ease; }
.card-link:hover { text-decoration: none; border-color: var(--border-2); transform: translateY(-2px); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.even-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: stretch;
}
.even-cards > .card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin-top: 0;
}
.grid-2 > .card + .card,
.even-cards > .card + .card { margin-top: 0; }
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 36px;
  align-items: start;
}
.home-col { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.home-col .card + .card { margin-top: 0; }
.home-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: stretch;
}
.home-pair > .card { margin-top: 0; min-height: 100%; }
.home-rooms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.home-rooms > .card { margin-top: 0; min-height: 118px; }
.home-rooms .title { font-weight: 600; margin: 4px 0 2px; color: var(--text); }
.home-board-list { display: block; }

.home-hero { margin-bottom: 28px; max-width: 40rem; }
.home-hero .kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.home-hero h1 {
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.home-hero .lede { color: var(--muted); font-size: 1.05rem; line-height: 1.5; }
.home-hero .lede p:last-child { margin-bottom: 0; }

.onboard-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 28px;
}
.onboard-chip > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  justify-content: flex-start;
}
.onboard-chip > summary::-webkit-details-marker,
.onboard-chip > summary::marker { display: none; content: none; }
.onboard-progress { width: 88px; height: 6px; margin: 0; flex-shrink: 0; }
.onboard-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.onboard-copy strong { font-size: 0.92rem; }
.onboard-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

.home-main, .home-rail { min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.home-section { min-width: 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.section-head h2,
.rail-card h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-more {
  flex-shrink: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}
.section-more:hover { color: var(--text); }

.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feed-row:last-child { border-bottom: none; }
.feed-row .title {
  display: block;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-row .title:hover { color: var(--link); }
.feed-row .pin {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 6px;
}
.feed-list-compact .feed-row { padding: 10px 0; }

.shelf-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.shelf-strip li { flex: 0 0 auto; max-width: 220px; }
.shelf-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  max-width: 220px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.shelf-chip:hover { border-color: var(--border-2); text-decoration: none; }
.shelf-chip .title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shelf-prefs { margin-top: 10px; }
.shelf-prefs .checkbox-row { min-height: 0; }

.home-elsewhere {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  max-width: 420px;
}
.home-elsewhere a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.home-elsewhere a:hover { border-color: var(--border-2); text-decoration: none; }
.home-elsewhere .title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.rail-card h2 { margin-bottom: 12px; }
.rail-card h3 { font-size: 1.05rem; margin: 0 0 8px; }
.rail-card .section-more { display: inline-block; margin-top: 8px; }
.rail-event { margin: 0 0 12px; }
.rail-event:last-of-type { margin-bottom: 4px; }
.people-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.people-list .member-chip { margin: 0; }
@media (max-width: 1100px) {
  .home-rooms { grid-template-columns: 1fr 1fr; }
  .home-grid { grid-template-columns: 1fr; gap: 28px; }
  .home-elsewhere { grid-template-columns: minmax(0, 1fr); }
  .home-rail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
.arcade-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-4); align-items: start; }

/* Must beat `.btn { display: inline-flex }` later in this file — the
   hamburger is also a .btn, so a lone .menu-btn { display:none } loses. */
.btn.menu-btn { display: none; }

/* playing layout: sidebar slides over, the board is the page */
body.is-playing .shell { grid-template-columns: 1fr; }
body.is-playing .content { max-width: none; }
body.is-playing .btn.menu-btn { display: inline-flex; }
body.is-playing .sidebar-close { display: inline-flex; }
body.is-playing .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(280px, 88vw);
  z-index: 100;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform .18s ease, visibility .18s ease;
}
body.is-playing .sidebar.open { transform: translateX(0); visibility: visible; box-shadow: var(--shadow); }
body.is-playing .arcade-layout { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) {
  body.is-playing .arcade-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail:has(> *) { grid-column: 1; padding: 0 16px 20px; background: transparent; border: none; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 100;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .18s ease, visibility .18s ease;
  }
  .sidebar.open { transform: translateX(0); visibility: visible; box-shadow: var(--shadow); }
  .sidebar-close { display: inline-flex; }
  .grid-2, .grid-3, .home-grid, .arcade-layout, .even-cards, .album-grid, .home-pair, .home-rooms, .home-board-list { grid-template-columns: 1fr; }
  .content { padding: var(--space-4); }
  .topbar { padding: var(--space-2) var(--space-3); }
  .btn.menu-btn { display: inline-flex !important; min-width: var(--tap); min-height: var(--tap); }
  .nav-link, .nav-link-btn, .community-switch { min-height: var(--tap); }
  .hanging-out { display: none; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 1.4rem; }
  .page-head { gap: var(--space-3); }
  .card { padding: var(--space-4); }
  .media-grid { grid-template-columns: 1fr; }
  .home-elsewhere, .home-rail { grid-template-columns: 1fr; }
  .topbar-search { max-width: none; }
}

/* ---------------------------------------------- buttons, forms, pills */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-height: var(--tap);
  font: 600 0.92rem var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: filter .1s ease, transform .05s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-2); }
.btn-ghost:hover { background: var(--bg-3); }
.btn-danger { background: var(--bad); color: #2a0d08; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; min-height: 36px; }
@media (max-width: 900px) {
  .btn-sm { min-height: var(--tap); }
}

input[type="text"], input[type="url"], input[type="datetime-local"], input[type="color"],
input[type="file"], select, textarea {
  width: 100%;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  min-height: var(--tap);
}
textarea { min-height: 110px; }
input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible, .heart-btn:focus-visible, .bell-btn:focus-visible,
.community-switch:focus-visible, .nav-link:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-color: transparent;
}
textarea { resize: vertical; }
label { display: block; font-weight: 600; font-size: 0.88rem; margin: 12px 0 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 900px) {
  .form-row { grid-template-columns: 1fr; }
}
form.stack .btn { margin-top: var(--space-4); }
.checkbox-row { display: flex; align-items: center; gap: var(--space-2); margin: 6px 0; min-height: var(--tap); }
.checkbox-row input { width: auto; min-height: 20px; min-width: 20px; }
.checkbox-row label { margin: 0; font-weight: 500; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.03em;
}
a.pill { min-height: 32px; }
@media (max-width: 900px) {
  a.pill { min-height: var(--tap); padding: 10px 14px; }
}
.pill-premium { background: linear-gradient(120deg, #23264d, #2c3165); color: var(--accent); border-color: #4a539b; }
.pill-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pill-good { color: var(--good); border-color: #2f4a2f; }
.pill-bad { color: var(--bad); border-color: #55291f; }

.filter-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); flex-wrap: wrap;
}
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pills a.pill { text-decoration: none; text-transform: none; letter-spacing: 0; }

.arcade-champs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 8px 0 10px;
}
.arcade-champs p { margin: 0; }
@media (max-width: 640px) {
  .arcade-champs { grid-template-columns: 1fr; }
}

/* ---------------------------------------------- avatars & people */

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-3); object-fit: cover; }
.avatar-sm { width: 24px; height: 24px; }
.avatar-lg { width: 72px; height: 72px; border-radius: 18px; }
.member-chip { display: inline-flex; align-items: center; gap: var(--space-2); }
.member-chip .avatar { width: 26px; height: 26px; }

.online-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; box-shadow: 0 0 6px var(--good); }

/* ---------------------------------------------- lists */

.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 11px 4px;
  border-bottom: 1px dashed var(--border);
}
.item-list li:last-child { border-bottom: none; }
.item-list .grow { flex: 1; min-width: 0; }
.item-list .title { font-weight: 600; display: block; }

.thread-row .title { font-size: 1.0rem; }
.pin { color: var(--accent); }

.activity-compose {
  display: block;
  background: var(--bg-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--muted);
  margin-bottom: 8px;
  text-decoration: none;
}
.activity-compose:hover {
  color: var(--text);
  border-color: var(--accent);
  text-decoration: none;
}
.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.activity-row:last-child { border-bottom: none; }
.activity-verb {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.activity-row .title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-row .title:hover { color: var(--link); }
.activity-blurb {
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.activity-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

/* ---------------------------------------------- forum posts */

.post {
  display: grid; grid-template-columns: 52px 1fr; gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.post:last-child { border-bottom: none; }
.post .meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.post .meta .author { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.post .body :last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .post { grid-template-columns: 40px 1fr; gap: var(--space-3); }
}

/* ---------------------------------------------- calendar */

.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 6px 4px; text-align: left; }
.cal td { border: 1px solid var(--border); vertical-align: top; height: 86px; padding: 5px 6px; font-size: 0.82rem; }
.cal td.empty { background: transparent; border-color: transparent; }
.cal td.today { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.cal .daynum { color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; }
.cal .cal-event { display: block; background: var(--bg-3); border-radius: 5px; padding: 1px 6px; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.78rem; }

.cal-agenda { display: none; list-style: none; margin: 0; padding: 0; }
.cal-agenda li {
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--border);
}
.cal-agenda li:last-child { border-bottom: none; }
.cal-agenda-day { font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.cal-agenda .cal-event {
  display: block;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 6px;
  min-height: var(--tap);
}

@media (max-width: 900px) {
  .cal { display: none; }
  .cal-agenda { display: block; }
}

.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: var(--space-2); }
.cal-nav h2 { margin: 0; text-align: center; flex: 1; }

/* ---------------------------------------------- wall */

.wall-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 900px) { .wall-grid { grid-template-columns: 1fr; } }
.filter-row { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.share-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.share-card h3 { margin: 0; font-size: 1.05rem; }
.share-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.share-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.share-take { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.share-meta { margin-top: auto; padding-top: 8px; }
.type-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 5px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
.type-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.type-btn:hover,
.type-btn:focus-visible {
  background: var(--bg-2);
  color: var(--text);
  text-decoration: none;
}
.type-btn.is-on {
  background: var(--accent);
  color: var(--accent-ink);
}
@media (hover: hover) and (pointer: fine) {
  .type-btn::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: var(--bg-2);
    color: var(--text);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--shadow);
    z-index: 6;
  }
  .type-btn:hover::after,
  .type-btn:focus-visible::after { opacity: 1; }
}
.intent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  max-width: 840px;
}
.intent-tile {
  padding: 22px 20px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.intent-verb { font-size: 1.25rem; font-weight: 700; }
.compose-card { max-width: 560px; }
.choice-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pill-choice { position: relative; cursor: pointer; margin: 0; }
.pill-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pill-choice:has(input:checked) {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.unfurl { display: flex; gap: var(--space-3); background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; }
.unfurl img { width: 90px; height: 68px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.unfurl .u-title { font-weight: 600; font-size: 0.9rem; }
.unfurl .u-desc { font-size: 0.8rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.heart-btn {
  background: none; border: 1px solid var(--border-2); border-radius: 99px;
  color: var(--text); padding: 8px 14px; cursor: pointer; font: inherit; font-size: 0.85rem;
  min-height: var(--tap); min-width: var(--tap);
  transition: transform .12s ease, border-color .12s ease, color .12s ease;
}
.heart-btn.hearted { border-color: var(--bad); color: var(--bad); animation: heart-pop 160ms ease; }

/* ---------------------------------------------- hall of fame */

.fame-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 900px) { .fame-grid { grid-template-columns: 1fr; } }
.fame-card { position: relative; overflow: hidden; }
.fame-card::before {
  content: "★"; position: absolute; top: -18px; right: -6px;
  font-size: 5rem; color: rgba(143, 153, 255, 0.09); pointer-events: none;
}
.fame-card img.exhibit { width: 100%; border-radius: var(--radius-sm); margin: 10px 0; }
.fame-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

/* ---------------------------------------------- arcade */

.game-card { text-align: center; }
#game-root { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.run-result { margin-top: 14px; padding: 12px 16px; background: var(--bg-3); border: 1px solid var(--border-2); border-radius: var(--radius-sm); }
.game-help { margin-top: 10px; }
.lb { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.lb td { padding: 6px 4px; border-bottom: 1px dashed var(--border); }
.lb tr:first-child td { color: var(--accent); font-weight: 700; }
.lb .score { text-align: right; font-family: var(--font-mono); }
.crown-row { display: flex; gap: 8px; flex-wrap: wrap; }

.arcade-cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.arcade-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.arcade-tag {
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--muted);
  border-radius: 99px;
  padding: 4px 12px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.arcade-tag.is-on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(143, 153, 255, 0.12);
}
.arcade-tag:hover { border-color: var(--border-2); }
.arcade-cabinet {
  /* Flex column so every cabinet lines up: the leaderboard absorbs the
     height variance and the coin slot anchors to the bottom edge. */
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(143, 153, 255, 0.08), transparent 42%),
    var(--bg-2);
  box-shadow: inset 0 0 0 1px rgba(143, 153, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.35);
}
.arcade-cabinet[hidden] { display: none; }
.cabinet-marquee {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.cabinet-week { margin-top: 12px; }
.arcade-cabinet .lb { margin-bottom: 12px; flex: 1; }
.cabinet-coin { width: 100%; justify-content: center; margin-top: auto; }
.pb-spark { color: var(--accent); display: block; margin: 4px 0 8px; opacity: 0.85; }
.pb-row { margin-bottom: 8px; }
.pb-row p { margin-bottom: 0; }
.daily-share { font-family: var(--font-mono); font-size: 1.1rem; letter-spacing: 0.12em; line-height: 1.25; }

.seg {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.seg-btn {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--muted);
  border-radius: 99px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.seg-btn.is-on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(143, 153, 255, 0.12);
}

details.fold > summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { margin-bottom: 12px; }

body.arcade-playing .shell { grid-template-columns: 1fr; }
body.arcade-playing .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(240px, 80vw);
  transform: translateX(-100%);
  z-index: 100;
  transition: transform .2s ease;
}
body.arcade-playing .sidebar.open { transform: translateX(0); visibility: visible; box-shadow: var(--shadow); }
body.arcade-playing .btn.menu-btn { display: inline-flex !important; }
body.arcade-playing .content { max-width: none; padding: 12px 18px 28px; }
body.arcade-playing .arcade-layout {
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: stretch;
}
body.arcade-playing .arcade-play-head { margin-bottom: 12px; }
body.arcade-playing .arcade-play-actions { display: flex; gap: 8px; flex-wrap: wrap; }
body.arcade-playing .game-card { padding: 12px; }
body.arcade-playing .t48,
body.arcade-playing .snk,
body.arcade-playing .bf,
body.arcade-playing .ms,
body.arcade-playing .bo,
body.arcade-playing .dd {
  max-width: min(70vh, 720px) !important;
  width: 100%;
}
body.arcade-playing .t48-board,
body.arcade-playing .ms-board {
  max-height: 70vh;
}
body.arcade-playing .snk-wrap canvas,
body.arcade-playing .bf-wrap canvas,
body.arcade-playing .bo-wrap canvas {
  max-height: 70vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}
body.arcade-playing .t48-pad .t48-btn,
body.arcade-playing .snk-pad .snk-btn,
body.arcade-playing .bf-pad .bf-btn,
body.arcade-playing .bo-pad .bo-btn {
  min-width: 64px !important;
  min-height: 48px !important;
  padding: 12px 0 !important;
}
.arcade-play:fullscreen,
.arcade-play:-webkit-full-screen {
  background: var(--bg);
  padding: 16px;
  overflow: auto;
}

@media (max-width: 900px) {
  body.arcade-playing .arcade-layout { grid-template-columns: 1fr; }
}

/* ---------------------------------------------- gamenight boards */

.c4-board { display: inline-grid; grid-template-columns: repeat(7, 46px); gap: 6px; background: var(--bg-3); padding: 12px; border-radius: var(--radius); }
.c4-cell { width: 46px; height: 46px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); }
.c4-cell.p1 { background: radial-gradient(circle at 35% 30%, #c5cbff, var(--accent)); }
.c4-cell.p2 { background: radial-gradient(circle at 35% 30%, #9ad4d6, #4d9ea1); }
.c4-drop { width: 46px; border: none; background: var(--bg-3); color: var(--accent); font-size: 1.1rem; cursor: pointer; border-radius: 6px; padding: 4px 0; min-height: 36px; }
.c4-drop:hover { background: var(--border-2); }
.ttt-board { display: inline-grid; grid-template-columns: repeat(3, 72px); gap: 8px; }
.ttt-cell { width: 72px; height: 72px; font-size: 2rem; font-family: var(--font-display); background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); cursor: pointer; }
.ttt-cell:disabled { cursor: default; }
@media (max-width: 900px) {
  .c4-board { grid-template-columns: repeat(7, minmax(36px, 1fr)); width: 100%; }
  .c4-cell { width: auto; height: auto; aspect-ratio: 1; }
  .c4-drop { width: auto; min-width: var(--tap); min-height: var(--tap); }
  .ttt-board { grid-template-columns: repeat(3, minmax(72px, 1fr)); width: min(100%, 280px); }
  .ttt-cell { width: 100%; height: auto; aspect-ratio: 1; min-height: var(--tap); }
}

.bs-wrap { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.bs-grid { display: inline-grid; grid-template-columns: repeat(10, 28px); gap: 3px; }
.bs-cell {
  width: 28px; height: 28px; padding: 0; border: 1px solid var(--border);
  background: var(--bg); border-radius: 4px; color: var(--text); cursor: pointer;
}
.bs-cell.ship { background: var(--accent); color: var(--accent-ink); }
.bs-cell.ghost { background: rgba(143, 153, 255, 0.35); }
.bs-cell.hit { background: var(--bad); }
.bs-cell.miss { background: var(--bg-3); }
.bs-place-bar { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 8px 0; }
@media (max-width: 600px) {
  .bs-grid { grid-template-columns: repeat(10, 32px); }
  .bs-cell { width: 32px; height: 32px; }
}

/* ---------------------------------------------- zine */

.zine-article { max-width: 680px; }
.zine-article .body { font-size: 1.05rem; line-height: 1.75; }
.zine-kicker { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.72rem; color: var(--accent); }

/* ---------------------------------------------- theater */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 320px));
  gap: 10px;
  justify-content: start;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 320px));
  gap: var(--space-4);
  justify-content: start;
}
.album-cover {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.album-grid > .card + .card { margin-top: 0; }
@media (max-width: 900px) {
  .media-grid, .album-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 640px) {
  .media-grid, .album-grid { grid-template-columns: 1fr; }
}
.media-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); }
.media-tile { position: relative; color: inherit; }
a.media-tile:hover { text-decoration: none; }
.media-tile .cap { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.pin-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.pin-strip .card + .card { margin-top: 0; }
.pin-card h3 { font-size: 1.05rem; }

/* ---------------------------------------------- bell & dropdowns */

.dropdown { position: relative; }
.dropdown-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: min(340px, calc(100vw - 24px)); max-height: 420px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: var(--shadow);
  z-index: 60; padding: var(--space-2);
  display: none;
}
.dropdown.open .dropdown-panel { display: block; }
.bell-btn {
  position: relative; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px; cursor: pointer; color: var(--muted); font-size: 1rem;
  min-width: 38px; min-height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
}
.bell-btn:hover { color: var(--text); border-color: var(--border-2); }
.bell-btn .nav-ico { width: 18px; height: 18px; opacity: 0.9; }
.bell-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--bad); color: #fff;
  font-size: 0.68rem; font-weight: 700;
  border-radius: 99px; padding: 1px 6px;
}
.bell-loading { padding: 10px; }
.bell-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 10px; gap: var(--space-2);
}
.notif-day {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  padding: 10px 10px 4px;
}
.notif-type { font-size: 0.78rem; padding: 4px 10px 0; color: var(--muted); }
.notif { display: flex; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text); align-items: flex-start; }
.notif:hover { background: var(--bg-3); text-decoration: none; }
.notif.unread { background: rgba(143, 153, 255, 0.08); }
.notif .t { font-size: 0.88rem; }
.notif .when { font-size: 0.74rem; color: var(--muted); }

/* ---------------------------------------------- messages / toasts */

.messages { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 24px)); }
.toast {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  animation: slide-in .18s ease;
}
.toast.error { border-left-color: var(--bad); }
.toast.success { border-left-color: var(--good); }
.toast-out { opacity: 0; transform: translateY(6px); transition: opacity .16s ease, transform .16s ease; }
@keyframes slide-in { from { transform: translateY(8px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes heart-pop { 50% { transform: scale(1.12); } }

.htmx-swapping { opacity: 0.72; transition: opacity 80ms linear; }
.htmx-added { animation: fade-in 120ms ease; }

/* ---------------------------------------------- landing page */

.landing { max-width: 880px; margin: 0 auto; padding: 60px 24px; }
.landing .hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -0.03em; }
.landing .hero .tld { color: var(--accent); }
.landing .hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.landing .rooms-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 48px; }
@media (max-width: 700px) { .landing .rooms-strip { grid-template-columns: 1fr; } }
.marquee { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); border: 1px dashed var(--border-2); border-radius: 8px; padding: 6px 12px; display: inline-block; margin-bottom: 28px; }

body.landing-page {
  background:
    radial-gradient(1000px 480px at 12% -8%, rgba(143, 153, 255, 0.12), transparent 55%),
    radial-gradient(800px 400px at 90% 8%, rgba(143, 153, 255, 0.05), transparent 50%),
    var(--bg);
}
body.landing-page .land-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: 12px 24px;
  background: rgba(13, 16, 32, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.land-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}
.land-wordmark:hover { text-decoration: none; color: var(--text); }
.land-wordmark .tld { color: var(--accent); }
.land-jump {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  min-width: 0;
  overflow: hidden;
  font-size: 0.9rem;
}
.land-jump a { color: var(--muted); }
.land-jump a:hover { color: var(--text); text-decoration: none; }
.land-nav-cta { flex-shrink: 0; min-height: 40px; padding: 8px 14px; }
.land-top {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 28px;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.15fr);
  gap: 36px;
  align-items: center;
}
.land-hero {
  max-width: none;
  margin: 0;
  padding: 0;
}
.land-hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 16px;
}
.land-hero .lede,
.land-section .lede,
.land-band .lede,
.land-finale .lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 38rem;
  line-height: 1.5;
}
.land-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 28px 0 8px;
}
.land-hero .marquee { margin-bottom: 16px; }
.land-hero .land-cta-row { margin: 20px 0 8px; }
.land-stage-wrap {
  max-width: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.land-stage-panel[hidden],
.land-caption[hidden] { display: none !important; }
.land-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.land-tab {
  font: 600 0.85rem var(--font-body);
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: var(--tap);
  cursor: pointer;
  white-space: nowrap;
}
.land-tab:hover { color: var(--text); }
.land-tab[aria-selected="true"],
.land-tab.is-on {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.land-stage-frame {
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: var(--shadow);
}
.land-stage-panel img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  background: var(--bg-3);
}
.land-caption {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 40rem;
}
.land-band {
  max-width: 1080px;
  margin: 0 auto 24px;
  padding: 0 24px;
}
.land-band-copy {
  max-width: 40rem;
  padding: 36px 0 8px;
  border-top: 1px dashed var(--border-2);
}
.land-band .kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.land-band h2, .land-section h2, .land-finale h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 10px;
}
.land-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px 8px;
}
.land-steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.land-steps li {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.land-steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.land-steps p { margin: 0; }
.land-step-n {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}
.land-facts {
  max-width: 1080px;
  margin: 28px auto 0;
  padding: 0 24px;
}
.land-facts ul {
  list-style: none;
  margin: 0;
  padding: 20px 0;
  border-top: 1px dashed var(--border-2);
  border-bottom: 1px dashed var(--border-2);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.land-facts li { display: flex; flex-direction: column; gap: 4px; }
.land-facts strong { font-family: var(--font-display); font-size: 1.05rem; }
.land-facts span { color: var(--muted); font-size: 0.9rem; }
.land-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
  align-items: stretch;
}
.land-plans > .card { margin-top: 0; }
.land-plans h3 { margin-bottom: 4px; }
.land-price {
  font-family: var(--font-display);
  color: var(--accent);
  margin: 0 0 10px;
}
.land-plan-list {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
  font-size: 0.92rem;
}
.land-billing-note { margin-top: 16px; }
.land-faq {
  max-width: 40rem;
  margin-top: 18px;
}
.land-faq details {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.land-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-display);
  list-style: none;
}
.land-faq summary::-webkit-details-marker { display: none; }
.land-faq summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-family: var(--font-mono);
}
.land-faq details[open] summary::after { content: "–"; }
.land-faq p { margin: 8px 0 4px; color: var(--muted); }
.land-finale {
  max-width: 1080px;
  margin: 24px auto 0;
  padding: 48px 24px 12px;
  border-top: 1px dashed var(--border-2);
}
.land-foot { max-width: 1080px; margin: 0 auto; padding: 28px 24px 48px; }

@media (max-width: 1200px) {
  .land-jump { display: none; }
  .land-nav { grid-template-columns: auto auto; justify-content: space-between; }
}
@media (max-width: 960px) {
  .land-top { grid-template-columns: 1fr; padding-top: 28px; }
  .land-steps, .land-facts ul, .land-plans { grid-template-columns: 1fr; }
}

/* ---------------------------------------------- misc */

.checklist li.done { text-decoration: line-through; color: var(--muted); }
.progress { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress > div, .progress > span { height: 100%; background: var(--accent); border-radius: 99px; display: block; transition: width .3s ease; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--border-2); }
.table td { padding: 9px 6px; border-bottom: 1px dashed var(--border); }
@media (max-width: 700px) {
  .table { min-width: 560px; }
}

.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-state .big { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.empty-state p { margin: 0 0 var(--space-4); }
.empty-state-wide { grid-column: 1 / -1; }
.empty-state-compact { padding: var(--space-5) var(--space-3); }
.empty-cta { margin-top: var(--space-2); }

.err-page { text-align: center; padding: 90px 20px; }
.err-page h1 { font-size: 5rem; margin: 0; color: var(--accent); font-family: var(--font-mono); }

footer.site-foot { color: var(--muted); font-size: 0.8rem; padding: 30px 26px; }

/* ---------------------------------------------- WS5 product widgets */

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  max-width: none;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  min-height: 38px;
  color: var(--muted);
}
.topbar-search .nav-ico { width: 16px; height: 16px; opacity: 0.65; }
.topbar-search input[type="search"] {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 0;
  font: inherit;
  font-size: 0.9rem;
  min-height: 0;
  color: var(--text);
}
.topbar-search input[type="search"]:focus,
.topbar-search input[type="search"]:focus-visible { outline: none; }
.topbar-search:focus-within {
  border-color: var(--border-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.composer { display: flex; flex-direction: column; gap: 8px; }
.composer-toolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.composer textarea { min-height: 88px; }
.composer-preview {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 88px;
}
.reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.react-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text);
  padding: 2px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}
.react-btn.on { border-color: var(--accent); background: rgba(143, 153, 255, 0.12); }
.react-btn:hover { border-color: var(--border-2); }
.pagination { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.prefs-table input { width: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card-link:hover { transform: none; }
  .heart-btn.hearted { animation: none; }
}

/* ============================================================= */
/* Phase 3 — cards & poker stream (p3-cards). Scoped additions   */
/* only: .poker-* classes used by templates/gamenight/poker*.    */
/* Arcade card games inject their own styles from JS like the    */
/* other cabinets do.                                            */
/* ============================================================= */
.poker-seats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 12px; }
.poker-seat {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-width: 130px;
  text-align: center;
}
.poker-seat.acting { border-color: var(--accent); box-shadow: 0 0 12px rgba(143, 153, 255, 0.25); }
.poker-seat.folded { opacity: 0.45; }
.poker-seat.me { background: rgba(143, 153, 255, 0.08); }
.poker-seat-name { font-weight: 700; }
.poker-seat-stack { font-size: 0.95rem; }
.poker-btn-chip {
  display: inline-block;
  background: var(--accent);
  color: #101238;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  margin-right: 4px;
}
.poker-felt {
  background: #123524;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.55);
}
.poker-board { display: flex; gap: 8px; justify-content: center; min-height: 46px; align-items: center; }
.poker-pot { color: var(--muted); margin-top: 8px; font-size: 0.9rem; }
.poker-cardface {
  width: 44px;
  height: 64px;
  display: block;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  background: #f4f1e8;
  overflow: hidden;
}
.poker-cardface.big { width: 62px; height: 90px; }
.poker-cards { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.poker-mine { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }
.poker-actions { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.poker-raise { display: inline-flex; gap: 6px; align-items: center; }
.poker-raise input { width: 110px; }
.poker-result { text-align: center; margin-top: 12px; display: flex; gap: 12px; justify-content: center; align-items: center; }
.poker-log {
  margin-top: 12px;
  max-height: 140px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

/* ============================================================ */
/* Phase 3 — stream B (gamenight + action arcade) appended block */
/* ============================================================ */
.db-score { display: flex; gap: 10px; justify-content: center; align-items: center; margin-bottom: 12px; }
.db-tag { font-weight: 700; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--border); }
.db-tag.p1 { color: var(--accent); }
.db-tag.p2 { color: #4d9ea1; }
.db-board { display: inline-flex; flex-direction: column; gap: 0; margin: 6px auto; }
.db-row { display: flex; align-items: center; }
.db-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; }
.db-edge { flex: none; border: 0; padding: 0; background: var(--bg-3); border-radius: 3px; }
.db-edge.db-h { width: 44px; height: 8px; margin: 0 1px; }
.db-edge.db-v { width: 8px; height: 44px; margin: 1px 2px; }
.db-edge.open { cursor: pointer; background: var(--bg-3); }
.db-edge.open:hover { background: var(--accent); opacity: 0.7; }
.db-edge.p1 { background: var(--accent); }
.db-edge.p2 { background: #4d9ea1; }
.db-box { width: 44px; height: 44px; margin: 1px 2px; display: flex; align-items: center; justify-content: center; font-weight: 800; border-radius: 6px; }
.db-box.p1 { background: rgba(143, 153, 255, 0.18); color: var(--accent); }
.db-box.p2 { background: rgba(77, 158, 161, 0.18); color: #4d9ea1; }
.wd-score { display: flex; gap: 10px; justify-content: center; align-items: center; margin-bottom: 8px; }
.wd-board { display: grid; grid-template-columns: repeat(11, 34px); gap: 2px; justify-content: center; margin: 8px auto; }
.wd-cell { width: 34px; height: 34px; background: var(--bg-3); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; color: var(--muted); position: relative; }
.wd-cell.wd-TW { background: rgba(239, 122, 133, 0.25); }
.wd-cell.wd-DW { background: rgba(239, 122, 133, 0.12); }
.wd-cell.wd-TL { background: rgba(143, 153, 255, 0.28); }
.wd-cell.wd-DL { background: rgba(143, 153, 255, 0.14); }
.wd-tile { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 5px; background: #d8c9a3; color: #2a2213; font-weight: 800; font-size: 1rem; border: 0; font-family: inherit; }
.wd-tile sub { font-size: 0.5rem; margin-left: 1px; }
.wd-tile.pending { outline: 2px solid var(--accent); }
.wd-rack { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
.wd-rack .wd-tile { cursor: pointer; width: 40px; height: 40px; font-size: 1.15rem; }
.wd-rack .wd-tile.sel { outline: 3px solid var(--accent); transform: translateY(-3px); }
.wd-rack .wd-tile:disabled { opacity: 0.25; cursor: default; }
.wd-actions { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.pr-legend { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.pr-tag { font-size: 0.85rem; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--border); }
.pr-tag.pr-s1 { color: #8f99ff; }
.pr-tag.pr-s2 { color: #4d9ea1; }
.pr-tag.pr-s3 { color: #f2b04d; }
.pr-tag.pr-s4 { color: #ef7a85; }
.pr-wrap { position: relative; max-width: 720px; margin: 0 auto; }
.pr-svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.pr-paper { fill: #10142a; }
.pr-wall { fill: #2a3054; }
.pr-finish { stroke: #f2b04d; stroke-width: 3; stroke-dasharray: 8 6; }
.pr-trail { fill: none; stroke-width: 2.5; opacity: 0.75; }
.pr-trail.pr-s1 { stroke: #8f99ff; }
.pr-trail.pr-s2 { stroke: #4d9ea1; }
.pr-trail.pr-s3 { stroke: #f2b04d; }
.pr-trail.pr-s4 { stroke: #ef7a85; }
.pr-car.pr-s1 { fill: #8f99ff; }
.pr-car.pr-s2 { fill: #4d9ea1; }
.pr-car.pr-s3 { fill: #f2b04d; }
.pr-car.pr-s4 { fill: #ef7a85; }
.pr-opt-form { position: absolute; transform: translate(-50%, -50%); margin: 0; }
.pr-opt { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text); background: rgba(233, 235, 248, 0.35); cursor: pointer; padding: 0; }
.pr-opt:hover { background: var(--accent); }
.pr-opt.danger { border-color: #ef7a85; background: rgba(239, 122, 133, 0.35); }

/* ---------- Type Race (arcade + Game Night duel) ---------- */
.typerace { max-width: 720px; margin: 0 auto; }
.tr-duel { text-align: left; max-width: 720px; margin: 12px auto 0; }
.tr-duel-score {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  flex-wrap: wrap; margin-bottom: 14px;
}
.typerace .tr-hud {
  display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap;
  margin-bottom: 14px; padding: 10px 14px;
  background: var(--bg-3); border-radius: 10px;
  font-family: var(--font-mono);
}
.typerace .tr-stat { display: flex; align-items: baseline; gap: 8px; }
.typerace .tr-stat .tr-lbl {
  color: var(--muted); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.typerace .tr-stat span:last-child {
  color: var(--accent); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.typerace .tr-passage {
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.75;
  color: var(--muted);
  padding: 22px 24px;
  background: var(--bg-3);
  border-radius: 12px;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  word-wrap: break-word;
}
.typerace .tr-word { display: inline-block; }
.typerace .tr-ch { position: relative; transition: color 60ms linear; }
.typerace .tr-ch.tr-ok { color: var(--text); }
.typerace .tr-ch.tr-cur {
  color: var(--accent);
  background: rgba(143, 153, 255, 0.16);
  border-radius: 3px;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.typerace .tr-ch.tr-space.tr-cur {
  background: rgba(143, 153, 255, 0.28);
}
@keyframes tr-wrong-flash {
  0%   { background: rgba(239, 122, 133, 0.55); }
  100% { background: rgba(239, 122, 133, 0); }
}
.typerace .tr-ch.tr-wrong-flash { animation: tr-wrong-flash 260ms ease-out; border-radius: 3px; }
.typerace .tr-bar {
  height: 6px; margin-top: 12px; background: var(--bg-3); border-radius: 999px; overflow: hidden;
}
.typerace .tr-bar-fill {
  height: 100%; width: 0; background: var(--accent);
  transition: width 90ms linear;
}
.typerace .tr-foot { margin-top: 10px; }
.typerace .tr-again { margin-top: 14px; }
