:root {
  color-scheme: light;
  --paper: #F4EAD3;
  --paper-2: #EBDDBB;
  --surface: #FFFBF0;
  --gold-bg: #FFF6D6;
  --ink: #1F1A17;
  --muted: #5B4F45;
  --red: #B3261E;
  --navy: #1E3A5F;
  --mustard: #E0A526;
  --teal: #2B7A78;
  --terminal-bg: #0B0F0C;
  --terminal-fg: #39FF88;
  --postcard-bg: #F2C9A0;
  --postcard-fg: #3B2A20;
  --official-bg: #FFFFFF;
  --official-fg: #14213D;
  --neon-bg: #14102B;
  --neon-fg: #F5F3FF;
  --neon-pink: #FF3D9A;
  --neon-cyan: #22D3EE;
  font-family: "Space Mono", monospace;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}
button { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; }

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  color: var(--muted);
}
.boot-mark, .brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--red);
  color: var(--paper);
  font: 900 26px/1 Fraunces, Georgia, serif;
}
.boot-mark { margin-bottom: 12px; }
.boot-screen p { font-size: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.page {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(31, 26, 23, .14) 1.2px, transparent 1.4px);
  background-size: 24px 24px;
}
.page-decorations {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.at {
  position: absolute;
  left: var(--left);
  top: var(--top);
  color: var(--color);
  opacity: .15;
  user-select: none;
  pointer-events: none;
  font: 900 calc(var(--size) * 1px)/1 Fraunces, Georgia, serif;
  transform: rotate(var(--r));
  animation: drift var(--d) ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(var(--r)); }
  50% { transform: translateY(-22px) rotate(calc(var(--r) + 8deg)); }
}
.container {
  position: relative;
  z-index: 1;
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.site-header, .brand, .site-nav, .header-actions, .user-pill {
  display: flex;
  align-items: center;
}
.site-header {
  min-height: 44px;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.brand {
  flex: 0 0 auto;
  gap: 10px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-word { font: 900 30px/.95 Fraunces, Georgia, serif; letter-spacing: -.5px; }
.site-nav, .header-actions { flex-wrap: wrap; gap: 16px; }
.nav-link {
  padding: 10px 4px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav-link:hover { color: var(--red); }
.nav-current { border-bottom: 3px solid var(--red); color: var(--ink); }
.user-pill {
  gap: 8px;
  min-height: 42px;
  padding: 5px 13px 5px 5px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.user-pill:hover { color: var(--ink); }
.user-pill span:last-child { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar img[data-failed="true"] { display: none; }
.avatar img:not([data-failed="true"]) + .avatar-fallback { display: none; }
.avatar-fallback { font: 900 15px/1 Fraunces, Georgia, serif; }
.sign-in-small {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--red);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
}
.sign-in-small:hover { color: var(--paper); transform: translate(-1px, -1px); }
.sign-out {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eyebrow, .section-kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.5;
  text-transform: uppercase;
}
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 40px; margin-top: 40px; }
.hero-copy { flex: 1 1 440px; min-width: 0; }
.hero h1 {
  max-width: 600px;
  margin: 14px 0 28px;
  font-size: clamp(44px, 7vw, 78px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.02;
}
.hero-copy .lead { max-width: 580px; margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.button:hover { transform: translate(-2px, -2px); }
.button:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.button-primary { background: var(--ink); box-shadow: 5px 5px 0 var(--red); color: var(--paper); }
.button-primary:hover { box-shadow: 7px 7px 0 var(--red); color: var(--paper); }
.button-download { background: var(--navy); box-shadow: 5px 5px 0 var(--ink); color: var(--paper); }
.button-download:hover { box-shadow: 7px 7px 0 var(--ink); color: var(--paper); }
.button-post { background: var(--red); box-shadow: 5px 5px 0 var(--ink); color: var(--paper); }
.button-post:hover { box-shadow: 7px 7px 0 var(--ink); color: var(--paper); }
.button-look {
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  background: var(--mustard);
  color: var(--ink);
  font-size: 14px;
}
.button-dark { min-height: 52px; padding: 0 26px; background: var(--ink); color: var(--paper); font-size: 15px; }
.button-dark:hover { color: var(--paper); box-shadow: 5px 5px 0 var(--mustard); }
.button-small { min-height: 44px; padding: 0 18px; font-size: 13px; }
.button:disabled { cursor: wait; opacity: .72; transform: none; }

.live-count { display: flex; align-items: center; gap: 10px; margin-top: 32px; font-size: 14px; font-weight: 700; }
.live-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.search-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 440px; margin-top: 20px; }
.input {
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
}
.search-form .input { flex: 1 1 220px; }
input::placeholder { color: #65584c; opacity: 1; }

.champion-preview { display: flex; flex: 1 1 460px; min-width: 0; flex-direction: column; align-items: center; gap: 14px; }
.champion-label { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.crown { width: 28px; height: 22px; color: var(--ink); }
.champion-frame { position: relative; display: block; width: min(600px, 100%); aspect-ratio: 560 / 436; overflow: hidden; border: 3px solid var(--ink); border-radius: 16px; background: var(--paper-2); box-shadow: 8px 8px 0 var(--ink); }
.champion-frame img { width: 100%; height: 100%; object-fit: contain; }
.champion-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: var(--paper-2); color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; }
.no-champion {
  display: grid;
  place-content: center;
  width: min(520px, 100%);
  min-height: 250px;
  padding: 28px;
  border: 3px dashed var(--ink);
  border-radius: 16px;
  background: var(--gold-bg);
  text-align: center;
}
.no-champion h2 { margin: 0 0 8px; font-size: 24px; }
.no-champion p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.champion-meta { width: min(520px, 100%); color: var(--muted); font-size: 12px; text-align: center; }

.section-block { margin-top: 72px; }
.section-heading-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 18px; }
.section-heading-row h2 { margin: 0; font-size: 26px; font-weight: 900; }
.text-link { color: var(--navy); font-size: 14px; font-weight: 700; }
.text-link:hover { color: var(--red); }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 20px; }
.mini-tile {
  display: flex;
  min-width: 0;
  min-height: 176px;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--tile-border);
  border-radius: 12px;
  background: var(--tile-bg);
  box-shadow: 4px 4px 0 var(--tile-border);
  color: var(--tile-fg);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.mini-tile:hover { color: var(--tile-fg); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--tile-border); }
.mini-tile:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--tile-border); }
.tile-top, .tile-bottom { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.tile-author { display: flex; align-items: center; min-width: 0; gap: 7px; color: inherit; }
.tile-author strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mini-tile .avatar { width: 30px; height: 30px; font-size: 16px; }
.tile-joke { flex: 1; margin: 0; overflow-wrap: anywhere; font: 400 14px/1.35 Fraunces, Georgia, serif; }
.tile-bottom { margin-top: auto; font-size: 11px; }
.level-pill { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 9px; border-radius: 999px; background: var(--level-bg); color: var(--level-fg); font-size: 11px; font-weight: 700; white-space: nowrap; }
.tile-reactions { color: inherit; text-align: right; }
.theme-vin { --tile-bg: #F4EAD3; --tile-fg: #1F1A17; --tile-border: #1F1A17; --avatar-bg: #B3261E; --avatar-fg: #F4EAD3; --level-bg: #1E3A5F; --level-fg: #F4EAD3; }
.theme-ter { --tile-bg: #0B0F0C; --tile-fg: #39FF88; --tile-border: #39FF88; --avatar-bg: #39FF88; --avatar-fg: #0B0F0C; --level-bg: #39FF88; --level-fg: #0B0F0C; }
.theme-pos { --tile-bg: #F2C9A0; --tile-fg: #3B2A20; --tile-border: #3B2A20; --avatar-bg: #2B7A78; --avatar-fg: #FFF6E5; --level-bg: #3B2A20; --level-fg: #F2C9A0; }
.theme-off { --tile-bg: #FFFFFF; --tile-fg: #14213D; --tile-border: #1E3A5F; --avatar-bg: #1E3A5F; --avatar-fg: #FFFFFF; --level-bg: #1E3A5F; --level-fg: #FFFFFF; }
.theme-neo { --tile-bg: #14102B; --tile-fg: #F5F3FF; --tile-border: #FF3D9A; --avatar-bg: #FF3D9A; --avatar-fg: #14102B; --level-bg: #22D3EE; --level-fg: #14102B; }
.theme-ter .tile-joke, .theme-off .tile-joke, .theme-neo .tile-joke { font-family: "Space Mono", monospace; }
.mini-tile .avatar { background: var(--avatar-bg); color: var(--avatar-fg); border-color: var(--tile-border); }
.mini-tile .avatar img { border: 1px solid var(--tile-border); }
.mini-tile .level-pill { background: var(--level-bg); color: var(--level-fg); }

.site-footer { margin-top: 56px; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }
.door-footer { margin-top: 42px; }

.page-title { margin: 36px 0 0; font-size: clamp(40px, 6vw, 64px); font-weight: 900; letter-spacing: -1px; line-height: 1; }
.card-date { margin-top: 36px; }
.card-columns { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .85fr); align-items: start; gap: clamp(24px, 3vw, 40px); margin-top: 20px; }
.card-main { display: flex; width: 100%; min-width: 0; flex-direction: column; align-items: center; gap: 20px; }
.card-image-frame { position: relative; width: min(720px, 100%); aspect-ratio: 560 / 436; margin-inline: auto; overflow: hidden; border: 3px solid var(--ink); border-radius: 16px; background: var(--paper-2); box-shadow: 8px 8px 0 var(--ink); }
.card-image-frame img { width: 100%; height: 100%; object-fit: contain; }
.card-fallback { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px; color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; }
.card-actions, .reactions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.post-note { max-width: 500px; margin: -8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; text-align: center; }
.reactions { gap: 10px; }
.reaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.reaction-button[aria-pressed="true"] { background: var(--mustard); }
.reaction-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reaction-button:active svg { transform: scale(1.15); }
.side-panels { display: flex; width: 100%; min-width: 0; flex-direction: column; gap: 20px; }
.panel { padding: 22px; border: 3px solid var(--ink); border-radius: 16px; background: var(--surface); box-shadow: 6px 6px 0 var(--ink); }
.countdown-panel { background: var(--terminal-bg); color: var(--terminal-fg); }
.countdown-vin { background: var(--paper); color: var(--ink); }
.countdown-vin .panel-label, .countdown-vin .countdown-theme { color: var(--muted); }
.countdown-ter { background: var(--terminal-bg); color: var(--terminal-fg); }
.countdown-pos { background: var(--postcard-bg); color: var(--postcard-fg); }
.countdown-off { background: var(--official-bg); color: var(--official-fg); }
.countdown-neo { background: var(--neon-bg); color: var(--neon-cyan); border-color: var(--neon-pink); }
.panel-label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: 2px; line-height: 1.4; }
.countdown-time { margin: 0; font-size: clamp(40px, 6vw, 56px); font-weight: 700; letter-spacing: 2px; line-height: 1.1; }
.countdown-theme { margin: 10px 0 0; font-size: 13px; }
.streak-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.streak-number { margin: 0; font-size: 40px; font-weight: 900; letter-spacing: -1px; line-height: 1; }
.streak-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; }
.week-bar { display: flex; gap: 6px; margin-top: 12px; }
.week-segment { flex: 1; height: 10px; border: 2px solid var(--ink); border-radius: 99px; background: var(--surface); }
.week-segment.filled { border-color: var(--red); background: var(--red); }
.xp-levels { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; color: var(--muted); font-size: 11px; font-weight: 700; }
.xp-track { height: 16px; overflow: hidden; margin-top: 6px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); }
.xp-fill { width: var(--xp); height: 100%; background: var(--mustard); transition: width 180ms ease; }
.xp-caption { margin: 10px 0 0; font-size: 13px; font-weight: 700; }
.friend-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 20px;
  border: 3px dashed var(--ink);
  border-radius: 16px;
  background: var(--mustard);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.friend-link:hover { color: var(--ink); transform: translate(-2px, -2px); }
.last-seven { margin-top: 64px; }
.last-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 14px; }
.last-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
  padding: 7px;
  border: 2px solid var(--tile-border);
  border-radius: 12px;
  background: var(--tile-bg);
  box-shadow: 3px 3px 0 var(--tile-border);
  color: var(--tile-fg);
}
.last-tile:hover { color: var(--tile-fg); transform: translate(-2px, -2px); }
.last-tile-image, .last-tile-fallback { width: 100%; aspect-ratio: 560 / 436; border-radius: 7px; background: var(--tile-bg); }
.last-tile-image { object-fit: contain; }
.last-tile-fallback { display: grid; place-items: center; padding: 8px; color: var(--tile-fg); font-size: 10px; text-align: center; }
.last-tile-caption { color: var(--tile-fg); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.closing-line { margin: 56px 0 0; font: 700 22px/1.4 Fraunces, Georgia, serif; text-align: center; }

.wall-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.wall-heading .page-title { margin: 0; }
.wall-live { display: flex; align-items: center; gap: 10px; padding-bottom: 7px; font-size: 13px; font-weight: 700; }
.champion-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 32px;
  margin-top: 28px;
  padding: 22px 26px;
  border: 4px solid var(--mustard);
  outline: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--gold-bg);
  box-shadow: 8px 8px 0 var(--ink);
}
.banner-mini {
  position: relative;
  flex: 0 1 200px;
  width: 200px;
  min-width: 170px;
  aspect-ratio: 560 / 436;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  transform: rotate(-4deg);
}
.banner-mini-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner-mini-fallback { display: grid; width: 100%; height: 100%; place-items: center; background: var(--navy); color: var(--paper); font: 900 48px/1 Fraunces, Georgia, serif; }
.champion-copy { flex: 1 1 300px; min-width: 0; }
.champion-copy .champion-label { font-size: 11px; }
.champion-handle { margin: 8px 0 4px; overflow-wrap: anywhere; font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -.5px; line-height: 1.06; }
.champion-stats { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.filters-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-button {
  min-height: 44px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.filter-button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.wall-search { display: flex; flex: 0 1 280px; gap: 8px; }
.wall-search .input { width: 100%; min-height: 44px; padding: 0 18px; font-size: 14px; }
.formula {
  margin-top: 18px;
  padding: 12px 16px;
  border-left: 6px solid var(--teal);
  background: var(--surface);
  font-size: 12px;
  line-height: 1.65;
}
.anti-gaming { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.new-cards-bar { display: flex; justify-content: center; margin-top: 14px; }
.new-cards-button { min-height: 40px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--mustard); cursor: pointer; font-size: 12px; font-weight: 700; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 24px; margin-top: 28px; }
.wall-card-tile {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
  color: var(--tile-fg);
}
.wall-card-link {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 560 / 436;
  overflow: hidden;
  border: 2px solid var(--tile-border);
  border-radius: 14px;
  background: var(--tile-bg);
  box-shadow: 5px 5px 0 var(--tile-border);
  color: var(--tile-fg);
}
.wall-card-link:hover { color: var(--tile-fg); transform: translateY(-2px); }
.wall-card-image { width: 100%; height: 100%; object-fit: contain; }
.wall-card-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; background: var(--tile-bg); color: var(--tile-fg); font-size: 12px; font-weight: 700; text-align: center; }
.wall-card-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; min-height: 24px; }
.wall-card-kind { color: var(--muted); font-size: 11px; font-weight: 700; }
.wall-card-handle { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.theme-ter .wall-card-kind, .theme-ter .wall-card-handle, .theme-neo .wall-card-kind, .theme-neo .wall-card-handle { color: var(--tile-fg); opacity: .8; }
.wall-tile {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--tile-border);
  border-radius: 14px;
  background: var(--tile-bg);
  box-shadow: 5px 5px 0 var(--tile-border);
  color: var(--tile-fg);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.wall-tile:hover { color: var(--tile-fg); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--tile-border); }
.wall-tile:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--tile-border); }
.wall-tile .avatar { width: 36px; height: 36px; font-size: 19px; background: var(--avatar-bg); color: var(--avatar-fg); }
.wall-tile .tile-author strong { font-size: 13px; }
.wall-tile .tile-joke { font-size: 16px; line-height: 1.4; }
.wall-tile .tile-bottom { font-size: 11px; }
.tile-kind { font-weight: 700; }
.wall-card-reactions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wall-reaction-button {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid var(--tile-border);
  border-radius: 999px;
  background: var(--tile-bg);
  color: var(--tile-fg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 120ms ease, transform 120ms ease;
}
.wall-reaction-button:hover { transform: translateY(-1px); }
.wall-reaction-button[aria-pressed="true"] { background: var(--mustard); color: var(--ink); }
.wall-reaction-button:disabled { cursor: wait; opacity: .65; }
.wall-reaction-button svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rank-tile { min-height: 130px; }
.rank-number { font: 900 28px/1 Fraunces, Georgia, serif; }
.wall-footer { margin-top: 40px; }

.profile-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 36px; padding: 24px; border: 3px solid var(--ink); border-radius: 16px; background: var(--surface); box-shadow: 6px 6px 0 var(--ink); }
.profile-banner > .avatar { width: 96px; height: 96px; border: 3px solid var(--ink); font-size: 38px; }
.profile-info { flex: 1 1 280px; min-width: 0; }
.profile-name { margin: 0; overflow-wrap: anywhere; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.5px; line-height: 1.05; }
.profile-subtitle { margin: 6px 0 14px; color: var(--muted); font-size: 12px; }
.profile-progress { max-width: 450px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.badge-chip { display: grid; width: 72px; min-height: 82px; justify-items: center; align-content: center; gap: 5px; padding: 5px; border: 2px solid var(--ink); border-radius: 12px; background: var(--surface); font-size: 11px; text-align: center; }
.badge-chip svg { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 2; }
.profile-section { margin-top: 42px; }
.profile-section h2 { margin-bottom: 18px; font-size: 26px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

.friend-layout { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 48px 40px; margin-top: 40px; }
.friend-copy { flex: 1 1 420px; min-width: 0; }
.friend-copy h1 { margin: 14px 0 24px; font-size: clamp(40px, 6vw, 64px); letter-spacing: -1px; line-height: 1.03; }
.friend-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 500px; }
.friend-form .input { flex: 1 1 220px; }
.helper { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.inline-message { min-height: 44px; margin-top: 16px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--surface); font-size: 12px; line-height: 1.55; }
.friend-preview { flex: 1 1 440px; min-width: 0; }
.friend-preview .card-image-frame { margin: 0 auto; }
.claim-photo-note { margin: 12px auto 0; padding: 4px 10px; border: 2px dashed var(--ink); font-size: 11px; font-weight: 700; text-align: center; }
.copy-link-value { overflow-wrap: anywhere; margin-top: 14px; padding: 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); font-size: 12px; }
.claim-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 30px; padding: 16px 22px; border: 3px dashed var(--ink); border-radius: 16px; background: var(--mustard); }
.claim-banner p { margin: 0; font: 700 18px/1.4 Fraunces, Georgia, serif; }
.claim-card { display: grid; justify-items: center; gap: 12px; margin-top: 34px; }
.claim-card > .card-image-frame { width: min(560px, 100%); }
.claim-made-by { color: var(--muted); font-size: 12px; text-align: center; }

.loading-grid { display: grid; gap: 12px; }
.skeleton {
  min-height: 32px;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--paper-2), var(--paper), var(--paper-2));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.error-panel, .empty-state, .offline-banner {
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
}
.error-panel { border-color: var(--red); }
.error-panel p, .empty-state p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty-state h2 { margin-bottom: 8px; font-size: 22px; }
.offline-banner { margin-top: 18px; border-style: dashed; background: var(--mustard); font-size: 12px; }
.toast {
  position: fixed;
  z-index: 10;
  right: 20px;
  bottom: 20px;
  max-width: min(440px, calc(100vw - 40px));
  padding: 14px 18px;
  border: 3px solid var(--ink);
  background: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  color: var(--paper);
  font-size: 12px;
  line-height: 1.5;
}
.hidden { display: none !important; }

@media (max-width: 959px) {
  .hero, .card-columns, .friend-layout { gap: 36px 28px; }
  .card-columns { grid-template-columns: minmax(0, 1fr); }
  .champion-banner { justify-content: center; }
  .champion-copy { flex-basis: calc(100% - 230px); }
}
@media (max-width: 640px) {
  .container { padding: 20px 16px 54px; }
  .site-header { align-items: flex-start; }
  .site-header > .site-nav, .site-header > .header-actions { width: 100%; gap: 12px; }
  .nav-link { font-size: 12px; }
  .brand-word { font-size: 27px; }
  .hero { gap: 34px; margin-top: 34px; }
  .hero h1 { margin-bottom: 22px; font-size: 44px; }
  .hero-copy { flex-basis: 100%; }
  .hero-copy .lead { font-size: 12px; }
  .hero-actions, .card-actions { flex-direction: column; align-items: stretch; }
  .hero-actions { align-items: flex-start; }
  .hero-actions .button { width: auto; min-height: 48px; padding: 0 22px; font-size: 14px; }
  .card-actions .button { width: 100%; }
  .champion-preview { flex-basis: 100%; }
  .section-block { margin-top: 54px; }
  .section-heading-row h2 { font-size: 23px; }
  .mini-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mini-tile { min-height: 172px; padding: 10px; }
  .tile-author strong { font-size: 11px; }
  .tile-joke { font-size: 13px; }
  .page-title { margin-top: 30px; font-size: 42px; }
  .card-date { margin-top: 30px; }
  .card-columns { margin-top: 20px; gap: 34px; }
  .card-image-frame { box-shadow: 6px 6px 0 var(--ink); }
  .reactions { gap: 8px; }
  .reaction-button { padding: 0 12px; }
  .last-seven { margin-top: 52px; }
  .last-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
  .wall-heading { align-items: flex-start; margin-top: 30px; }
  .wall-heading .page-title { margin: 0; }
  .wall-live { padding: 0; font-size: 12px; }
  .champion-banner { gap: 20px; padding: 18px; }
  .banner-mini { flex-basis: 180px; }
  .champion-copy { flex-basis: 100%; }
  .champion-handle { font-size: 32px; }
  .filters-row { align-items: stretch; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-button { padding: 0 12px; }
  .wall-search { flex-basis: 100%; }
  .wall-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .wall-tile { min-height: 176px; }
  .profile-banner { padding: 18px; }
  .profile-banner > .avatar { width: 76px; height: 76px; }
  .friend-layout { margin-top: 32px; gap: 32px; }
  .friend-copy h1 { font-size: 42px; }
  .claim-banner { align-items: flex-start; }
  .claim-banner .button { width: 100%; }
  .countdown-time { font-size: 40px; }
  .at:nth-child(n+7) { display: none; }
  .at { font-size: calc(var(--size) * .6px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .at { animation: none; }
}
