/* ============================================================
   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 .ms,
body.arcade-playing .bo,
body.arcade-playing .dd {
  max-width: min(70vh, 720px) !important;
  width: 100%;
}
body.arcade-playing .snk,
body.arcade-playing .bf {
  max-width: none !important;
  width: 100%;
}
body.arcade-playing .t48-board,
body.arcade-playing .ms-board {
  max-height: 70vh;
}
body.arcade-playing .bo-wrap canvas {
  max-height: 70vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}
body.arcade-playing .snk-wrap canvas,
body.arcade-playing .bf-well canvas {
  max-height: none;
  max-width: none;
}
body.arcade-playing .t48-pad .t48-btn,
body.arcade-playing .bo-pad .bo-btn {
  min-width: 64px !important;
  min-height: 48px !important;
  padding: 12px 0 !important;
}
body.arcade-playing .snk-pad .snk-btn,
body.arcade-playing .bf-pad .bf-btn {
  min-width: 44px !important;
  min-height: 48px !important;
  padding: 10px 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; }
}
@media (max-width: 720px) {
  body.arcade-playing .content { padding: 8px 10px 12px; }
  body.arcade-playing .arcade-play-head { margin-bottom: 6px; }
  body.arcade-playing .arcade-play-head p { display: none; }
  body.arcade-playing .game-card { padding: 8px; }
  body.arcade-playing .game-help { display: none; }
}
@media (max-height: 560px) {
  body.arcade-playing .arcade-play-head p,
  body.arcade-playing .game-help { display: none; }
  body.arcade-playing .content { padding-top: 6px; padding-bottom: 8px; }
}

/* ---------------------------------------------- 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; }

/* ============================================================
   alive — signs of life: presence, type colours, the stream,
   room badges, the since-you-were-here strip, quiet facts.
   ============================================================ */

:root {
  --c-thread: #8f99ff;
  --c-reply: #7f8bd6;
  --c-link: #5cc8ff;
  --c-into: #f2b84b;
  --c-make: #ff9ad5;
  --c-event: #6fd9a6;
  --c-arcade: #ff8a65;
  --c-match: #d58cff;
  --c-legend: #ffd166;
  --c-album: #7fd6e8;
  --c-member: #a8b0d8;
  --here: #6fd9a6;
}

/* ---- avatars with a per-member ring + presence dot */
.av {
  --av: 32px;
  position: relative;
  display: inline-flex;
  width: var(--av);
  height: var(--av);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3.5px hsl(var(--hue, 230) 70% 68% / 0.9);
  background: var(--bg-3);
}
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av.is-here::after {
  content: "";
  position: absolute;
  right: -2px; bottom: -2px;
  width: calc(var(--av) * 0.34);
  height: calc(var(--av) * 0.34);
  min-width: 9px; min-height: 9px;
  border-radius: 50%;
  background: var(--here);
  box-shadow: 0 0 0 2px var(--bg-2);
}
.av-flat { box-shadow: none; }
.av-stack { display: inline-flex; align-items: center; }
.av-stack .av { margin-left: -7px; box-shadow: 0 0 0 2px var(--bg-2); }
.av-stack .av:first-child { margin-left: 0; }
.name-hue { color: hsl(var(--hue, 230) 70% 78%); }

.new-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
  margin-right: 6px;
  vertical-align: middle;
}
time.is-new { color: var(--link); }

/* ---- type chips / colour rails */
.type-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tc, var(--muted));
  white-space: nowrap;
}
.type-chip::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--tc, var(--muted)); }
.t-thread { --tc: var(--c-thread); }
.t-reply { --tc: var(--c-reply); }
.t-link { --tc: var(--c-link); }
.t-into { --tc: var(--c-into); }
.t-make { --tc: var(--c-make); }
.t-event { --tc: var(--c-event); }
.t-arcade { --tc: var(--c-arcade); }
.t-match { --tc: var(--c-match); }
.t-legend { --tc: var(--c-legend); }
.t-album { --tc: var(--c-album); }
.t-member { --tc: var(--c-member); }

/* ---- sidebar: room badges and who's around */
.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px;
  font: 700 0.7rem var(--font-mono);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
  flex-shrink: 0;
}
.nav-badge-move {
  background: var(--c-match); color: #1a0b25;
  font: 700 0.64rem var(--font-body); letter-spacing: 0.06em; text-transform: uppercase;
}
.nav-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-note-here { color: var(--here); opacity: 1; font-weight: 600; font-family: var(--font-body); }
.nav-link .nav-badge + .nav-spark,
.nav-link .nav-note + .nav-spark { margin-left: 6px; }
.sidebar-around {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 10px;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}
.sidebar-around:hover { background: var(--bg-3); text-decoration: none; }
.sidebar-around .av { --av: 22px; }

/* ---- topbar since-you-were-here chip */
.since-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 42vw;
}
.since-chip:hover { text-decoration: none; border-color: var(--accent); }
.since-chip .new-dot { margin-right: 0; }
@media (max-width: 900px) { .since-chip { display: none; } }

/* ---- home: plaque header + since strip */
.home-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.home-head h1 { margin: 0; font-size: 1.6rem; letter-spacing: -0.02em; }
.home-head .plaque-line { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); }
.home-note { color: var(--muted); margin: -6px 0 16px; max-width: 60ch; }
.home-note p:last-child { margin: 0; }
.since-strip {
  display: flex; gap: 12px; align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 0.9rem;
}
.since-strip .grow { flex: 1; min-width: 0; }
.since-strip b { font-weight: 650; }
.since-strip .muted { font-size: 0.86rem; }

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 30px;
  align-items: start;
}
@media (max-width: 1100px) { .home-layout { grid-template-columns: 1fr; gap: 22px; } }

/* ---- compose bar (Discord-ish, not a form) */
.compose-bar {
  display: flex; gap: 10px; align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.compose-bar .hint {
  flex: 1; min-width: 0;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.compose-bar .hint:hover { color: var(--text); text-decoration: none; }
.compose-bar .btn-sm { min-height: 34px; }

/* ---- the stream */
.stream { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stream-div {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 6px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.stream-div::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.stream-div.is-new { color: var(--link); }
.stream-div:first-child { margin-top: 0; }
.stream-item {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .12s ease;
}
.stream-item:hover { border-color: var(--border-2); }
.stream-item .rail-c { background: var(--tc, var(--border-2)); }
.stream-item .in {
  padding: 11px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.stream-item .hd {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--muted);
  margin-bottom: 3px;
}
.stream-item .hd .av { --av: 20px; }
.stream-item .hd b { color: var(--text); font-weight: 600; }
.stream-item .hd time { font-family: var(--font-mono); font-size: 0.72rem; }
.stream-item .t {
  display: block;
  font-weight: 650;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 2px;
  overflow-wrap: anywhere;
}
.stream-item .t:hover { color: var(--link); }
.stream-item .t .pin { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 6px; }
.stream-item .x {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.stream-item .ft { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.76rem; color: var(--muted); align-items: center; }
.stream-item .thumb {
  width: 112px; height: 76px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-3);
}
.stream-item.is-compact .in { padding: 8px 14px; }
.stream-item.is-compact .t { font-size: 0.92rem; margin-bottom: 0; font-weight: 600; }
.stream-item.is-compact .thumb { width: 64px; height: 44px; }
.stream-item.is-new { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.badge-new {
  background: var(--accent); color: var(--accent-ink);
  border-radius: 4px; padding: 0 5px;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em;
}
.stream-more { display: block; text-align: center; padding: 14px; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 640px) {
  .stream-item .in { grid-template-columns: minmax(0, 1fr); }
  .stream-item .thumb { width: 100%; height: 140px; order: -1; }
}

/* ---- rail cards (home right column) */
.home-rail-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rail-card.is-quiet { padding: 12px 16px; }
.rail-card h2 .section-more { margin: 0; font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 0.78rem; }
.rail-card h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.people li { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; min-width: 0; }
.people li a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people li a:hover { color: var(--link); }
.people .av { --av: 24px; }
.people .when { margin-left: auto; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); white-space: nowrap; }
.people li.is-here .when { color: var(--here); }
.people li.is-never { opacity: 0.55; }

.ticket {
  border: 1px dashed var(--border-2);
  border-radius: 10px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--c-event) 6%, var(--bg-2));
}
.ticket .d { font-family: var(--font-mono); color: var(--c-event); font-size: 0.72rem; letter-spacing: 0.04em; }
.ticket .t { font-weight: 650; margin: 2px 0 6px; display: block; color: var(--text); text-decoration: none; }
.ticket .t:hover { color: var(--link); }
.ticket .who { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); }
.ticket .who .av { --av: 20px; }
.ticket-big { padding: 14px 16px; }
.ticket-big .t { font-family: var(--font-display); font-size: 1.25rem; margin: 4px 0 10px; }
.ticket-big .who .av { --av: 26px; }

.fact { color: var(--muted); font-size: 0.84rem; margin: 0; line-height: 1.45; }
.fact + .fact { margin-top: 4px; }
.fact a { color: var(--link); }
.fact b { color: var(--text); font-weight: 600; }
.fact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fact-list li { display: flex; gap: 8px; align-items: center; font-size: 0.86rem; min-width: 0; }
.fact-list li .av { --av: 20px; }
.fact-list li .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact-list li .score { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); white-space: nowrap; }

.plaque {
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c-legend) 7%, var(--bg-2)), var(--bg-2));
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  display: flex; gap: 12px; align-items: flex-start;
}
.plaque img.exhibit { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.plaque b { color: var(--text); font-weight: 650; display: block; }
.plaque .q { font-style: italic; margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plaque .d { font-family: var(--font-mono); font-size: 0.72rem; }

/* ---- quiet one-line empties (replaces the big centered block in dense spots) */
.quiet {
  color: var(--muted);
  font-size: 0.86rem;
  padding: 10px 0;
  margin: 0;
}
.quiet a { color: var(--link); }

/* ---- onboarding, slim */
.onboard-chip.is-slim { padding: 6px 12px; margin-bottom: 14px; }
.onboard-chip.is-slim .onboard-copy strong { font-size: 0.84rem; }
.sidenav .nav-link { white-space: nowrap; }
.sidenav .nav-link > .nav-badge ~ .nav-spark,
.sidenav .nav-link > .nav-note ~ .nav-spark { display: none; }
.nav-badge-move { font-size: 0.58rem; padding: 0 5px; height: 18px; }

/* ---- cool stuff: cover-first cards */
.stuff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.stuff-card {
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--tc, var(--border-2));
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: transform .12s ease, border-color .12s ease;
}
.stuff-card:hover { text-decoration: none; border-color: var(--border-2); transform: translateY(-2px); }
.stuff-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-3);
  display: block;
}
.stuff-hero.is-cover { object-fit: cover; aspect-ratio: 16 / 10; }
.stuff-hero-blank {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 4;
  color: var(--tc, var(--muted));
  background:
    radial-gradient(300px 120px at 20% 0%, color-mix(in srgb, var(--tc, var(--accent)) 16%, transparent), transparent 70%),
    var(--bg-3);
}
.stuff-body { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.stuff-body h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.stuff-body .share-take { font-size: 0.88rem; }
.stuff-meta {
  margin-top: auto; padding-top: 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.76rem; color: var(--muted);
}
.stuff-meta .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stuff-meta .av { --av: 20px; }

/* ---- calendar: ticket hero + last time */
.cal-top { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .cal-top { grid-template-columns: 1fr; } }
.ticket-hero { padding: 16px 18px; }
.ticket-hero .t { font-family: var(--font-display); font-size: 1.45rem; margin: 6px 0 8px; }
.ticket-hero .share-take { margin: 0 0 10px; color: var(--text-2); }
.ticket-hero .who { flex-wrap: wrap; }
.ticket-more { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 4px; font-size: 0.86rem; }
.ticket-more .d { margin-right: 6px; }
.ticket-more a { color: var(--text); text-decoration: none; }
.ticket-more a:hover { color: var(--link); }
.cal-last .d { font-family: var(--font-mono); color: var(--muted); font-size: 0.7rem; letter-spacing: 0.05em; }
.cal-last .t { display: block; font-weight: 650; color: var(--text); text-decoration: none; margin: 3px 0 6px; }
.cal-last .t:hover { color: var(--link); }

/* ---- members: avatar card grid */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.member-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  color: inherit; text-decoration: none; min-width: 0;
  transition: border-color .12s ease, transform .12s ease;
}
.member-card:hover { text-decoration: none; border-color: var(--border-2); transform: translateY(-1px); }
.member-card.is-here { border-color: color-mix(in srgb, var(--here) 45%, var(--border)); }
.member-card.is-never { opacity: 0.6; }
.member-card .av { --av: 48px; flex-shrink: 0; }
.member-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.member-name { font-weight: 650; display: flex; align-items: center; gap: 6px; min-width: 0; }
.member-name .role-chip { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 1px 5px; border-radius: 4px; background: var(--bg-3); color: var(--muted); }
.member-seen { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.member-seen.is-here { color: var(--here); }
.member-seen.is-here::before { content: "●"; margin-right: 5px; }
.member-facts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.74rem; color: var(--muted); }
.member-into { font-size: 0.78rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-into em { font-style: normal; color: var(--text); }
.member-notyet { margin-top: 18px; color: var(--muted); font-size: 0.86rem; }
.member-notyet summary { cursor: pointer; }
.member-notyet-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.member-notyet-list li { display: flex; align-items: center; gap: 6px; opacity: 0.75; }
.member-notyet-list .avatar { width: 22px; height: 22px; }
.here-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--here); vertical-align: middle; margin-right: 2px; }

/* ---- game night: live first */
.gn-live { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.gn-block h2 { margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.gn-yourmove { border-color: color-mix(in srgb, var(--c-match) 45%, var(--border)); }
.gn-yourmove h2 .nav-badge-move { font-size: 0.62rem; }
.gn-rooms { display: flex; flex-direction: column; gap: 10px; }
.gn-room { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.gn-room:hover { text-decoration: none; }
.gn-room strong { display: block; }
.gn-room .grow { min-width: 0; }
.gn-room-ic { font-size: 1.4rem; width: 32px; text-align: center; flex-shrink: 0; }
.gn-challenge summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.gn-challenge summary::-webkit-details-marker { display: none; }
.gn-challenge summary h2 { margin: 0; }
.gn-challenge summary::after { content: "＋"; margin-left: auto; color: var(--muted); }
.gn-challenge[open] summary::after { content: "－"; }
.gn-challenge[open] summary { margin-bottom: 12px; }
.gn-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.gn-games { display: flex; gap: 8px; flex-wrap: wrap; }
.item-list li.quiet { color: var(--muted); font-size: 0.88rem; }
.item-list .av { flex-shrink: 0; }
.gn-results .title strong { color: var(--text); }

/* ---- arcade: marquee + grouped cabinets */
.arcade-marquee {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 0;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px; overflow: hidden;
}
@media (max-width: 760px) { .arcade-marquee { grid-template-columns: 1fr 1fr; } .am-crowns { grid-column: 1 / -1; border-top: 1px solid var(--border); } }
.am-cell { padding: 12px 18px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--border); min-width: 0; }
.am-cell:last-child { border-right: 0; }
.am-n { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--c-arcade); }
.am-l { font-size: 0.78rem; color: var(--muted); }
.am-crowns { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.am-crowns .av-stack .av { --av: 24px; }
.arcade-group-h { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 18px 0 10px; }
.arcade-group-h:first-of-type { margin-top: 4px; }
.arcade-cabinet.is-live { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-arcade) 45%, transparent), 0 10px 24px rgba(0,0,0,.35); }
.cabinet-note { margin: 0 0 12px; flex: 1; }
.cabinet-note-empty { margin-top: 10px; }
.lb-alltime td:first-child .muted { margin-left: 4px; font-family: var(--font-mono); font-size: 0.68rem; }
.arcade-cabinet .lb-alltime { flex: 0; }

/* ---- hall of fame: plaques */
.fame-card {
  border-color: color-mix(in srgb, var(--c-legend) 30%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--c-legend) 7%, var(--bg-2)), var(--bg-2));
}
.fame-card::before { color: color-mix(in srgb, var(--c-legend) 14%, transparent); }
.fame-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.fame-head .av { --av: 40px; flex-shrink: 0; }
.fame-head h3 { margin: 0 0 2px; }
.fame-head .fame-date { margin: 0; }
.fame-date a { color: var(--text); }
.fame-story { color: var(--text-2); }
.fame-story p:last-child { margin-bottom: 0; }
.fame-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 0.86rem; }
.fame-foot .fame-pin { margin-left: auto; }
.fame-foot .fame-pin p { margin: 0; }

/* ---- compose dock: say something / cool stuff, inline on feeds */
.compose-dock {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px 10px;
  margin-bottom: 12px;
}
.dock-modes { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dock-radio { position: absolute; opacity: 0; pointer-events: none; }
.dock-modes .pill { cursor: pointer; font-size: 0.74rem; }
.dock-modes .dock-link { margin-left: auto; text-decoration: none; }
.dock-modes .dock-link + .dock-link { margin-left: 0; }
.compose-dock:has(.dock-radio-say:checked) .dock-modes label[for$="-say"],
.compose-dock:has(.dock-radio-stuff:checked) .dock-modes label[for$="-stuff"] {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.compose-dock .dock-pane { display: none; }
.compose-dock:has(.dock-radio-say:checked) .dock-say,
.compose-dock:has(.dock-radio-stuff:checked) .dock-stuff { display: block; }
/* no :has() support → show both, stacked */
@supports not selector(:has(a)) {
  .compose-dock .dock-pane { display: block; }
  .compose-dock .dock-stuff { margin-top: 10px; }
}
.compose-dock .smart-compose,
.compose-dock .inline-thread { background: transparent; border: 0; padding: 0; margin: 0; }

.smart-row { display: flex; align-items: center; gap: 10px; position: relative; }
.smart-row .av { --av: 28px; flex-shrink: 0; }
.smart-row input[type="text"].smart-q {
  flex: 1; min-width: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text);
  font: inherit;
  margin: 0;
}
.smart-q::placeholder { color: var(--muted); }
.smart-row input[type="text"].smart-q:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.smart-compose, .inline-thread {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-bottom: 12px;
}
.smart-compose.is-big .smart-q { padding: 14px 16px; font-size: 1.05rem; }
.smart-spin {
  display: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border-2); border-top-color: var(--accent);
  animation: smart-spin .8s linear infinite;
  position: absolute; right: 14px; top: 50%; margin-top: -7px;
}
.smart-compose.htmx-request .smart-spin { display: block; }
@keyframes smart-spin { to { transform: rotate(360deg); } }

/* the preview that appears under the box */
.peek:empty { display: none; }
.peek { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.peek-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.peek-pills .pill { font-size: 0.74rem; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font: inherit; }
.peek-pills .pill .type-ico { width: 13px; height: 13px; }
.peek-card { max-width: 420px; transform: none !important; }
.peek-card .stuff-hero { aspect-ratio: 16 / 7; }
.peek-card .stuff-hero.is-cover { aspect-ratio: 16 / 9; object-fit: cover; }
.peek-card .stuff-hero-blank { aspect-ratio: 16 / 3.5; }
.peek-card input[type="text"].peek-title, .peek-card input[type="text"].peek-take {
  width: 100%; background: transparent; border: 0; border-bottom: 1px dashed var(--border-2);
  color: var(--text); font: inherit; padding: 2px 0 4px; margin: 0; border-radius: 0; box-shadow: none; min-height: 0;
}
.peek-card input[type="text"].peek-title { font-weight: 650; font-size: 1.02rem; line-height: 1.3; }
.peek-card input[type="text"].peek-take { font-size: 0.88rem; color: var(--text-2); }
.peek-card .peek-title::placeholder, .peek-card .peek-take::placeholder { color: var(--muted); font-weight: 400; }
.peek-card input[type="text"].peek-title:focus-visible, .peek-card input[type="text"].peek-take:focus-visible { outline: none; box-shadow: none; border-bottom-color: var(--accent); }
.peek-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.peek-foot .btn { margin-left: auto; }
.peek-foot .choice-pills { margin: 0; }

/* inline thread composer */
.inline-thread .expand-body { display: none; margin-top: 10px; }
.inline-thread.is-open .expand-body,
.inline-thread:focus-within .expand-body { display: block; }
.inline-thread.is-open .inline-title,
.inline-thread:focus-within .inline-title { font-weight: 650; font-size: 1.05rem; }
.inline-thread .composer textarea { min-height: 120px; }
.inline-cat { width: auto; margin: 0; padding: 6px 10px; font-size: 0.84rem; }

/* compose pages: photo fold */
.compose-photo { margin-top: 14px; }
.compose-photo summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.compose-photo summary::-webkit-details-marker { display: none; }
.compose-photo summary h2 { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.compose-photo summary::after { content: "＋"; margin-left: auto; color: var(--muted); }
.compose-photo[open] summary::after { content: "－"; }
.compose-photo[open] summary { margin-bottom: 12px; }

/* ---- plan something: name + when, the rest folded */
.plan-form { display: flex; flex-direction: column; gap: 12px; }
.plan-emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-emoji { position: relative; cursor: pointer; margin: 0; }
.plan-emoji input { position: absolute; opacity: 0; pointer-events: none; }
.plan-emoji span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; font-size: 1.2rem;
  background: var(--bg-3); border: 1px solid var(--border);
}
.plan-emoji:has(input:checked) span { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.plan-form input[type="text"].plan-title {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
  background: transparent; border: 0; border-bottom: 1px solid var(--border-2); border-radius: 0; padding: 6px 0 8px;
}
.plan-form input[type="text"].plan-title:focus-visible { outline: none; border-bottom-color: var(--accent); box-shadow: none; }
.plan-when { display: flex; flex-direction: column; gap: 6px; }
.when-echo-slot:empty { display: none; }
.when-echo {
  display: inline-block; font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--c-event); background: color-mix(in srgb, var(--c-event) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-event) 35%, transparent); border-radius: 999px; padding: 3px 10px;
}
.when-echo.is-bad { color: var(--danger, #ff8a8a); background: transparent; border-color: var(--border-2); }
.plan-when-note { margin: 0; }
.plan-more summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; }
.plan-more[open] summary { color: var(--text); }
.member-card .member-av { flex-shrink: 0; line-height: 0; }
.member-name a { color: var(--text); text-decoration: none; }
.member-name a:hover { color: var(--link); }
.member-actions { font-size: 0.76rem; margin-top: 2px; }
.member-actions a { color: var(--muted); text-decoration: none; }
.member-actions a:hover { color: var(--link); }
.member-card:hover .member-actions a { color: var(--text-2); }

/* ---------------------------------------------------------------- tokens */
.sidebar-tokens {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; margin: 4px 0; border-radius: 8px;
  color: var(--muted); font-size: .9rem;
}
.sidebar-tokens:hover { background: var(--bg-3); text-decoration: none; color: inherit; }
.sidebar-tokens .nav-ico { width: 16px; height: 16px; opacity: .8; }
/* Today card and Standing share one board: a streak, two daily tiles, two meters. */
.tok-hero { margin-bottom: 14px; }
.tok-board { display: flex; flex-direction: column; gap: 12px; }
.tok-streak { display: flex; align-items: center; gap: 14px; }
.tok-count { margin: 0; display: flex; flex-direction: column; min-width: 2.4ch; }
.tok-num {
  font-family: var(--font-display);
  font-size: 2.7rem; font-weight: 600; letter-spacing: -0.045em; line-height: 0.85;
  font-variant-numeric: tabular-nums;
}
.tok-unit {
  margin-top: 4px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.tok-streak.is-due .tok-num { color: var(--accent); text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent); }
.tok-streak.is-ended .tok-num { color: var(--muted); }
.tok-pips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tok-pip {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--border-2);
}
.tok-pip.is-lit {
  background: radial-gradient(circle at 35% 30%, #fff 0 1.5px, var(--accent) 3px);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 65%, transparent);
}
.tok-pip.is-held {
  background: color-mix(in srgb, var(--good) 55%, var(--bg));
  box-shadow: inset 0 0 0 1.5px var(--good);
}
.tok-pip.is-due, .tok-pip.is-open {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--accent);
  animation: tok-due 1.8s ease-in-out infinite;
}
.tok-pip.is-today.is-lit { box-shadow: 0 0 0 1px var(--text), 0 0 8px color-mix(in srgb, var(--accent) 65%, transparent); }
@keyframes tok-due {
  0%, 100% { transform: scale(1); box-shadow: inset 0 0 0 1.5px var(--accent); }
  50% { transform: scale(1.16); box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 8px var(--accent); }
}
.tok-note { margin: -4px 0 0; font-size: 0.82rem; color: var(--muted); }
.tok-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tok-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 0;
  padding: 10px 8px 12px;
  border-radius: 16px;
  text-align: center; text-decoration: none; color: inherit;
  background:
    radial-gradient(90px 60px at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 72%),
    var(--bg);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
}
.tok-tile:hover { text-decoration: none; border-color: var(--accent); }
.tok-tile.is-done {
  background:
    radial-gradient(90px 60px at 50% 0%, color-mix(in srgb, var(--good) 24%, transparent), transparent 72%),
    var(--bg);
  border-color: color-mix(in srgb, var(--good) 55%, var(--border));
}
.tok-kicker { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tok-name {
  font-size: 0.78rem; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tok-ring {
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(closest-side, var(--bg) 72%, transparent 73%),
    conic-gradient(from -90deg, var(--accent) calc(var(--pct) * 1%), color-mix(in srgb, var(--accent) 18%, var(--bg-3)) 0);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.tok-tile.is-done .tok-ring {
  background:
    radial-gradient(closest-side, var(--bg) 72%, transparent 73%),
    conic-gradient(from -90deg, var(--good), var(--good));
  box-shadow: 0 0 14px color-mix(in srgb, var(--good) 40%, transparent);
}
.tok-ring-n {
  font-family: var(--font-display);
  font-size: 0.92rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--accent);
}
.tok-tile.is-done .tok-ring-n { color: var(--good); }
.tok-prize {
  font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 99px;
  padding: 1px 7px;
}
.tok-tile.is-done .tok-prize { background: var(--good); }
.tok-meters { display: flex; flex-direction: column; gap: 8px; }
.tok-meter {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 8px; align-items: center;
  font-size: 0.72rem; color: var(--muted);
}
a.tok-meter { color: var(--muted); text-decoration: none; }
a.tok-meter:hover { color: var(--text); }
.tok-meter-n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tok-segs { display: flex; gap: 4px; }
.tok-seg {
  flex: 1; height: 8px; border-radius: 99px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--border);
}
.tok-seg.is-on {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent);
}
.tok-bar { margin: 0; }
.tok-bar > span {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent);
}
@media (min-width: 800px) {
  .tok-board.is-page {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(200px, 0.85fr);
    column-gap: 28px; row-gap: 12px; align-items: center;
  }
  .tok-board.is-page .tok-ring { width: 76px; height: 76px; }
  .tok-board.is-page .tok-streak,
  .tok-board.is-page .tok-note,
  .tok-board.is-page .tok-tiles { grid-column: 1; }
  .tok-board.is-page .tok-tiles { grid-template-columns: repeat(2, minmax(0, 210px)); }
  .tok-board.is-page .tok-meters { grid-column: 2; grid-row: 1 / span 3; align-content: center; }
}
@media (max-width: 1100px) {
  .tokens-today .tok-ring { width: 84px; height: 84px; }
  .tokens-today .tok-num { font-size: 3.1rem; }
  .tokens-today .tok-pip { width: 16px; height: 16px; }
}

/* Standing page: streak grid, ledger, leaderboard highlight */
.streak-grid { display: flex; gap: 3px; margin: 10px 0 6px; }
.sg-week { display: flex; flex-direction: column; gap: 3px; }
.sg-day { width: 11px; height: 11px; border-radius: 2px; background: var(--bg-3); display: block; }
.sg-day.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--bg-3)); }
.sg-day.l2 { background: color-mix(in srgb, var(--accent) 55%, var(--bg-3)); }
.sg-day.l3 { background: color-mix(in srgb, var(--accent) 80%, var(--bg-3)); }
.sg-day.l4 { background: var(--accent); }
.sg-day.is-future { opacity: .35; }
.sg-day.is-today { outline: 1px solid var(--text); outline-offset: 1px; }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--border); }
.ledger li:last-child { border-bottom: none; }
.ledger .mono { min-width: 4ch; text-align: right; }
.ledger .neg { color: var(--bad); }
.fact-list li.is-me { background: var(--bg-3); border-radius: 6px; }

/* tokens: award fx */
.tok-float {
  position: absolute; z-index: 60; pointer-events: none; white-space: nowrap;
  transform: translate(-50%, -100%);
  font-size: .8rem; font-weight: 600; color: var(--accent);
  animation: tok-rise .9s ease-out forwards;
}
@keyframes tok-rise {
  from { opacity: 1; margin-top: 0; }
  to   { opacity: 0; margin-top: -14px; }
}
/* The ring is a 600ms animation, not a transition, so it is over in 600ms
   rather than fading in and then out again after the class is dropped. */
.sidebar-tokens.is-lit { animation: tok-ring .6s ease-out forwards; }
@keyframes tok-ring {
  0%, 60% { box-shadow: inset 0 0 0 1px var(--accent); }
  100%    { box-shadow: inset 0 0 0 1px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .tok-float { display: none; }
  .sidebar-tokens.is-lit { animation: none; box-shadow: inset 0 0 0 1px var(--accent); }
  .tok-pip.is-due, .tok-pip.is-open { animation: none; }
}

/* tokens: prize counter */
.counter-group + .counter-group { margin-top: 14px; }
.counter-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.counter-item { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); }
.counter-item.is-owned { border-color: var(--border-2); }
.counter-item .swatch { width: 40px; display: flex; justify-content: center; }
.counter-item .title { font-weight: 600; }
.flair-big { font-size: 1.4rem; line-height: 1; }
.card-swatch { display: block; width: 36px; height: 24px; border-radius: 4px; border: 1px solid var(--border); }
.rarity-rare .title { color: var(--accent); }
.rarity-legendary .title { color: var(--good); }
.flair { margin-left: 4px; font-size: .95em; }
.member-title { display: block; color: var(--muted); font-size: .85rem; }
.av.has-ring { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3.5px var(--ring); }
.profile-head[style] { padding: 16px; border-radius: 12px; }

/* tokens: season goal */
.season { margin-top: 10px; }
.season-line { display: flex; gap: 8px; align-items: baseline; }
.season .progress { margin: 6px 0 4px; }
