/* Survive Your Ideas Wiki — v3 game-style visual system */
@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/lilita-one-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #2D2415;
  --bg-deep: #1E170E;
  --bg-raised: #3A2D1C;
  --paper: #EFDFB9;
  --paper-light: #FFF6E7;
  --paper-edge: #B59E72;
  --ink: #2A1E12;
  --ink-muted: #5E5449;
  --cream: #F3E6C8;
  --cream-muted: #CDBF9F;
  --btn-dark: #281B13;
  --btn-dark-edge: #0E0905;
  --gold: #F8CD45;
  --gold-edge: #B8901F;
  --green: #80C055;
  --green-edge: #324C1F;
  --green-ink: #142008;
  --money: #A6D25D;
  --r-common: #C2B587;
  --r-uncommon: #73BD47;
  --r-rare: #4392DC;
  --r-epic: #854FBB;
  --r-legendary: #F9CB45;
  --r-mythical: #D8373C;
  --display: "Lilita One", "Arial Black", sans-serif;
  --round: "Fredoka", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(248, 205, 69, 0.07), rgba(248, 205, 69, 0) 60%),
    linear-gradient(180deg, #33291A 0%, var(--bg) 360px);
  background-color: var(--bg);
  color: var(--cream);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; }
a { color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 2px; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.menu-toggle:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: 0.92em;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 901px) { .wrap { padding: 0 24px; } }

/* ---------- Header ---------- */
.site-header {
  background: var(--bg-deep);
  border-bottom: 4px solid var(--paper-edge);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  column-gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 48px;
}
.brand-name {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.1;
  color: var(--cream);
  text-shadow: 0 2px 0 var(--btn-dark-edge), 0 0 1px var(--btn-dark-edge);
  -webkit-text-stroke: 1px var(--btn-dark-edge);
  paint-order: stroke fill;
}
.brand-badge {
  font-family: var(--round);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--gold);
  border-radius: 8px;
  padding: 3px 8px;
  box-shadow: 0 3px 0 var(--gold-edge);
}
.main-nav { display: none; }

/* Mobile details menu */
.menu { margin-left: auto; }
.menu-toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 48px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper-light);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 5px 0 var(--paper-edge);
}
.menu.is-open .menu-toggle { transform: translateY(3px); box-shadow: 0 2px 0 var(--paper-edge); }
.menu-nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: none;
  width: min(420px, calc(100vw - 32px));
  background: var(--paper);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 6px 0 var(--paper-edge), 0 14px 24px rgba(0, 0, 0, 0.45);
}
.menu.is-open .menu-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.menu-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 8px 10px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  color: var(--ink);
  background: var(--paper-light);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--paper-edge);
  text-decoration: none;
}
.menu-nav a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--paper-edge); }
.menu-nav a[aria-current="page"] { background: var(--gold); box-shadow: 0 4px 0 var(--gold-edge); }

/* Quick row (mobile) */
.quick-row {
  display: flex;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  border-top: 2px solid rgba(239, 223, 185, 0.14);
}
.quick-row a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper-light);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--paper-edge);
  text-decoration: none;
}
.quick-row a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--paper-edge); }
.quick-row a[aria-current="page"] { background: var(--gold); box-shadow: 0 4px 0 var(--gold-edge); }

@media (min-width: 901px) {
  .site-header { position: sticky; top: 0; z-index: 40; }
  .header-inner { min-height: 72px; }
  .brand-name { font-size: 24px; }
  .menu, .quick-row { display: none; }
  .main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  .main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 11px;
    font-family: var(--round);
    font-weight: 700;
    font-size: 14px;
    color: var(--ink);
    background: var(--paper-light);
    border-radius: 999px;
    box-shadow: 0 4px 0 var(--paper-edge);
    text-decoration: none;
    white-space: nowrap;
  }
  .main-nav a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--paper-edge); }
  .main-nav a[aria-current="page"] { background: var(--gold); box-shadow: 0 4px 0 var(--gold-edge); }
}
@media (min-width: 1201px) {
  .main-nav { gap: 8px; }
  .main-nav a { padding: 0 16px; font-size: 15px; }
}

/* ---------- Typography ---------- */
h1, h2, h3, p { margin-top: 0; }
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.01em;
}
h3 { font-family: var(--round); font-weight: 700; }
h1 {
  font-size: 36px;
  line-height: 1.1;
  color: var(--cream);
  text-shadow: 0 3px 0 var(--btn-dark-edge), 0 0 1px var(--btn-dark-edge);
  -webkit-text-stroke: 1px var(--btn-dark-edge);
  paint-order: stroke fill;
  margin-bottom: 18px;
}
h2 { font-size: 26px; line-height: 1.2; color: var(--ink); margin: 36px 0 14px; }
.panel h2:first-child,
.answer + h2 { margin-top: 0; }
h3 { font-size: 20px; line-height: 1.3; color: var(--ink); }
p { margin-bottom: 16px; }
ul, ol { margin: 0 0 16px; padding-left: 24px; }
li { margin-bottom: 6px; }
[id] { scroll-margin-top: 20px; }
@media (min-width: 901px) {
  h1 { font-size: 52px; line-height: 1.05; }
  h2 { font-size: 32px; margin-top: 44px; }
  [id] { scroll-margin-top: 100px; }
}
.lead { font-size: 19px; line-height: 1.55; }

.crumbs { font-size: 14px; line-height: 1.5; color: var(--cream-muted); margin: 20px 0 10px; }
.crumbs a { color: var(--cream-muted); }
.crumbs .sep { margin: 0 6px; }

.panel .cite { font-size: 14px; color: var(--ink-muted); }
.panel .cite a { color: #6A5210; }
.cite { font-size: 14px; color: var(--cream-muted); }
.note { font-size: 14px; line-height: 1.5; color: var(--ink-muted); max-width: 720px; }

/* ---------- Panels ---------- */
.panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 6px 0 var(--paper-edge), 0 10px 18px rgba(0, 0, 0, 0.35);
}
.panel a { color: #075A9C; text-underline-offset: 3px; }
.panel a:hover { color: #003C70; }
.panel a:focus-visible { outline-color: #075A9C; }
@media (min-width: 901px) { .panel { padding: 24px; } }

/* ---------- Article layout ---------- */
.main-panel { margin-top: 4px; }
.main-panel > p,
.main-panel > ul,
.main-panel > ol { max-width: 720px; }
.side { display: none; }
@media (min-width: 1025px) {
  .page-grid {
    display: grid;
    grid-template-columns: minmax(0, 860px) 280px;
    column-gap: 32px;
    justify-content: space-between;
  }
  .side { display: block; padding-top: 128px; }
}

.toc {
  position: sticky;
  top: 100px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 6px 0 var(--paper-edge), 0 10px 18px rgba(0, 0, 0, 0.35);
  font-size: 15px;
  line-height: 1.5;
}
.toc-title {
  margin: 0 0 8px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-muted);
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 7px 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px dashed rgba(90, 74, 52, 0.25);
}
.toc li:last-child a { border-bottom: 0; }
.toc a:hover { color: #6A5210; text-decoration: underline; }

.toc-details {
  margin: 0 0 24px;
  background: var(--bg-raised);
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.toc-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 15px;
  color: var(--cream);
}
.toc-details summary::-webkit-details-marker { display: none; }
.toc-details summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 3px solid var(--cream-muted);
  border-bottom: 3px solid var(--cream-muted);
  transform: rotate(45deg);
  margin-right: 4px;
}
.toc-details[open] summary::after { transform: rotate(225deg); }
.toc-details ul { margin: 0; padding: 2px 16px 14px; list-style: none; }
.toc-details li { margin: 0; }
.toc-details a { display: block; padding: 6px 0; font-size: 15px; color: var(--gold); text-decoration: none; }
.toc-details a:hover { text-decoration: underline; }
@media (min-width: 1025px) { .toc-details { display: none; } }

.narrow { max-width: 720px; }
.narrow .toc-details { display: block; }

/* ---------- Answer card ---------- */
.answer {
  background: var(--paper-light);
  color: var(--ink);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 0 0 24px;
  box-shadow: 0 5px 0 var(--paper-edge);
}
.answer p { max-width: 720px; }
.answer p:last-child { margin-bottom: 0; }
.answer-key {
  font-family: var(--round);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}
.btn:active { transform: translateY(3px); }
.btn-dark { background: var(--btn-dark); color: var(--paper-light); box-shadow: 0 5px 0 var(--btn-dark-edge); }
.btn-dark:active { box-shadow: 0 2px 0 var(--btn-dark-edge); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--gold-edge); }
.btn-gold:active { box-shadow: 0 2px 0 var(--gold-edge); }
.btn-green { background: var(--green); color: var(--green-ink); box-shadow: 0 5px 0 var(--green-edge); }
.btn-green:active { box-shadow: 0 2px 0 var(--green-edge); }
.btn-paper { background: var(--paper-light); color: var(--ink); box-shadow: 0 5px 0 var(--paper-edge); }
.btn-paper:active { box-shadow: 0 2px 0 var(--paper-edge); }

/* ---------- Big stats ---------- */
.stat-big {
  font-family: var(--display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 10px;
}
.stat-big .small { font-size: 20px; }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--round);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  white-space: nowrap;
}
.tag-video { border-color: #4E8A2C; background: #E9F5DA; color: #2C4D14; }
.tag-reported { border-color: var(--paper-edge); background: #F4E8CC; color: var(--ink); }
.tag-api { border-color: #2E6DA8; background: #E3EEF8; color: #1C4770; }
.tag-unknown { border-color: #8B8578; background: #ECE8DE; color: #4A453B; }
.tag-roblox { border-color: var(--btn-dark); background: var(--paper-light); color: var(--ink); }

/* ---------- Banner word chips ---------- */
.banner-word {
  display: inline-block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.25;
  padding: 3px 12px;
  background: var(--btn-dark);
  color: var(--cream);
  border-radius: 9px;
  text-shadow: 0 2px 0 var(--btn-dark-edge);
  box-shadow: 0 3px 0 var(--btn-dark-edge);
  letter-spacing: 0.03em;
}
.banner-word.caps { background: var(--gold); color: var(--ink); text-shadow: none; box-shadow: 0 3px 0 var(--gold-edge); }
/* Linked words must stay legible on their chip background. */
.panel a.banner-word,
.panel a.banner-word:visited {
  background: var(--gold);
  color: var(--ink);
  text-shadow: none;
  box-shadow: 0 3px 0 var(--gold-edge);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.panel a.banner-word:hover { background: #FFE58A; color: var(--ink); }
.panel a.banner-word:active { box-shadow: 0 1px 0 var(--gold-edge); }


/* ---------- Writer input ---------- */
.writer-callout {
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
  color: var(--gold);
  text-shadow: 0 2px 0 var(--btn-dark-edge), 0 0 1px var(--btn-dark-edge);
  -webkit-text-stroke: 1px var(--btn-dark-edge);
  paint-order: stroke fill;
  margin: 0 0 10px;
}
.writer {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-light);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 6px 0 var(--paper-edge), 0 10px 18px rgba(0, 0, 0, 0.35);
}
.writer input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  font-family: var(--round);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.writer input::placeholder { color: var(--ink-muted); opacity: 0.8; }
.writer input:focus-visible { outline-offset: -1px; border-radius: 8px; }
.writer .dice {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: inset 0 -4px 0 var(--paper-edge);
  position: relative;
}
.writer .dice::before,
.writer .dice::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.75;
}
.writer .dice::before { top: 10px; left: 10px; }
.writer .dice::after { bottom: 10px; right: 10px; }
.writer .btn { flex: none; min-height: 52px; padding: 12px 20px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Home hero ---------- */
.hero {
  margin-top: 24px;
  background: var(--bg-deep);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.5), 0 14px 26px rgba(0, 0, 0, 0.4);
}
.hero h1 { margin-bottom: 12px; }
.hero .lead { max-width: 34em; color: var(--cream); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 20px 0 12px; }
.hero-play { margin: 0; }
.hero-play a { font-family: var(--round); font-weight: 700; color: var(--gold); }
.hero-media { margin: 0; }
.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 4px solid var(--bg-deep);
  box-shadow: 0 6px 0 var(--paper-edge), 0 10px 18px rgba(0, 0, 0, 0.35);
}
figcaption { font-size: 14px; line-height: 1.5; color: var(--cream-muted); margin-top: 10px; }
.panel figcaption { color: var(--ink-muted); }
.panel figcaption a { color: #6A5210; }

@media (min-width: 901px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
    gap: 36px;
    align-items: center;
    padding: 40px;
    margin-top: 32px;
  }
}
@media (max-width: 900px) {
  .home-flow { display: flex; flex-direction: column; }
  .hero { display: contents; }
  .entries { display: contents; }
  .hero-text { order: 1; background: var(--bg-deep); border-radius: 16px; padding: 20px; margin-top: 16px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.5); }
  .entries h2 { order: 2; }
  .cards-primary { order: 3; }
  .hero-media { order: 4; margin: 20px 0 4px; }
  .cards-secondary { order: 5; }
}

/* ---------- Entry cards ---------- */
.entries h2 { margin-top: 32px; color: var(--cream); text-shadow: 0 3px 0 var(--btn-dark-edge), 0 0 1px var(--btn-dark-edge); -webkit-text-stroke: 1px var(--btn-dark-edge); paint-order: stroke fill; }
.cards-primary, .cards-secondary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}
@media (min-width: 901px) {
  .entries h2 { margin-top: 48px; }
  .cards-primary, .cards-secondary { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
  .cards-secondary { margin-top: 20px; }
}
@media (min-width: 1025px) {
  .cards-primary { grid-template-columns: repeat(3, 1fr); }
  .cards-secondary { grid-template-columns: repeat(4, 1fr); }
}
.entry-card {
  display: block;
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--paper-edge), 0 10px 18px rgba(0, 0, 0, 0.35);
}
.entry-card:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--paper-edge); }
.entry-card h3 {
  margin: 0 0 6px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}
.entry-card h3::after { content: "→"; margin-left: 8px; color: #6A5210; }
.entry-card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.entry-card.accent { background: var(--gold); box-shadow: 0 6px 0 var(--gold-edge), 0 10px 18px rgba(0, 0, 0, 0.35); }
.entry-card.accent h3::after { color: var(--ink); }
.entry-card.accent p { color: #4A3A14; }
.entry-card.accent:active { box-shadow: 0 3px 0 var(--gold-edge); }

/* ---------- Home split ---------- */
.home-split { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 40px; align-items: start; }
.home-split > * > h2:first-child { margin-top: 0; }
@media (min-width: 1025px) {
  .home-split { grid-template-columns: minmax(0, 720px) minmax(0, 400px); gap: 32px; justify-content: space-between; }
}
.home-main > h2 { color: var(--cream); text-shadow: 0 3px 0 var(--btn-dark-edge), 0 0 1px var(--btn-dark-edge); -webkit-text-stroke: 1px var(--btn-dark-edge); paint-order: stroke fill; }
.home-main > p { max-width: 720px; }
.home-dark h2 { color: var(--cream); text-shadow: 0 3px 0 var(--btn-dark-edge), 0 0 1px var(--btn-dark-edge); -webkit-text-stroke: 1px var(--btn-dark-edge); paint-order: stroke fill; }
.home-dark h2:first-child { margin-top: 0; }
.home-dark p { max-width: 720px; }
.codes-card h2 { margin-top: 0; }
.codes-card .code-plaque { margin: 12px 0; }

/* ---------- Words tools ---------- */
.word-tools { margin: 0 0 12px; max-width: 856px; }
.word-tools .writer-callout { font-size: 18px; text-shadow: none; -webkit-text-stroke: 0; color: #6A5210; }
.word-tools label { display: block; font-family: var(--round); font-weight: 700; font-size: 15px; color: var(--ink); margin: 0 0 8px; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.filter-buttons button {
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 12px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 0 4px 0 var(--paper-edge);
  cursor: pointer;
}
.filter-buttons button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--paper-edge); }
.filter-buttons button[aria-pressed="true"] { background: var(--gold); box-shadow: 0 4px 0 var(--gold-edge); }
.result-count {
  margin: 14px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
}
.tools-note { font-size: 14px; line-height: 1.5; color: var(--ink-muted); max-width: 856px; }
.no-results {
  max-width: 856px;
  background: var(--paper-light);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 0 0 20px;
  box-shadow: 0 5px 0 var(--paper-edge);
}
.no-results p { margin: 0 0 12px; }

/* ---------- Tables / responsive cards ---------- */
.cardify {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--paper-light);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 5px 0 var(--paper-edge);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.cardify th, .cardify td {
  padding: 12px 14px;
  border-bottom: 2px solid rgba(181, 158, 114, 0.45);
  vertical-align: top;
  text-align: left;
}
.cardify tr:last-child td { border-bottom: 0; }
.cardify th {
  background: var(--paper);
  font-family: var(--round);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-muted);
}
.cardify td { color: var(--ink); }
.cell-word { font-weight: 700; }
.num { text-align: right; }
.word-table { table-layout: fixed; }
.word-table col.c-word { width: 17%; }
.word-table col.c-effect { width: 43%; }
.word-table col.c-duration { width: 19%; }
.word-table col.c-evidence { width: 21%; }

.ev-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-sources { margin-top: 8px; font-size: 14px; line-height: 1.5; }
.ev-sources summary { cursor: pointer; color: #6A5210; font-family: var(--round); font-weight: 700; }
.ev-sources p { margin: 8px 0 0; color: var(--ink-muted); }
.ev-sources a { color: #6A5210; }

@media (max-width: 768px) {
  .cardify { display: block; background: transparent; box-shadow: none; margin: 0; overflow: visible; }
  .cardify thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .cardify tbody { display: block; }
  .cardify tr {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--paper-light);
    border-radius: 14px;
    padding: 16px;
    margin: 0 0 14px;
    box-shadow: 0 5px 0 var(--paper-edge);
  }
  .cardify td { display: block; border: 0; padding: 0; }
  .cardify tr:last-child td { border: 0; }
  .cardify .cell-word { order: 1; }
  .cardify .cell-word .banner-word { font-size: 19px; }
  .cardify .cell-effect { order: 3; }
  .cardify .cell-duration { order: 4; }
  .cardify .cell-duration::before { content: "Duration: "; font-weight: 700; }
  .cardify .cell-evidence { display: contents; }
  .cardify .ev-tags { order: 2; }
  .cardify .ev-sources { order: 5; margin-top: 0; }
  .cardify .num { text-align: left; }
}

/* ---------- Situation cards (Best Words) ---------- */
.situation-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 0 0 20px; }
@media (min-width: 901px) { .situation-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }
.sit-card {
  background: var(--paper-light);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 5px 0 var(--paper-edge);
}
.sit-card h3 { margin: 0 0 10px; font-size: 19px; }
.sit-card p { margin: 0 0 10px; max-width: none; }
.sit-card p:last-child { margin-bottom: 0; }
.sit-field {
  display: block;
  font-family: var(--round);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.sit-card .banner-word { margin: 2px 0; }

/* ---------- Notice block ---------- */
.notice {
  background: var(--gold);
  color: var(--ink);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 0 0 16px;
  max-width: 720px;
  box-shadow: 0 5px 0 var(--gold-edge);
}
.notice p { color: var(--ink); }
.notice a { color: #4A3A14; }
.notice p:last-child { margin-bottom: 0; }
.notice-label {
  display: block;
  font-family: var(--round);
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 8px;
}

/* ---------- Codes ---------- */
.status-card { max-width: 720px; margin: 0 0 20px; }
.code-plaque {
  display: inline-block;
  font-family: var(--round);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--paper-light);
  border: 3px dashed var(--paper-edge);
  border-radius: 12px;
  padding: 8px 22px;
  margin: 4px 0 12px;
}
.check-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }

/* ---------- Beginner guide ---------- */
.id-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--paper-light);
  border-radius: 14px;
  padding: 16px 20px;
  max-width: 720px;
  margin: 0 0 16px;
  box-shadow: 0 5px 0 var(--paper-edge);
}
.id-card img { width: 80px; height: 80px; border-radius: 12px; flex: none; }
.id-card p { margin: 0; }
.id-name { font-family: var(--round); font-weight: 700; font-size: 20px; }
.id-meta { font-size: 14px; line-height: 1.5; color: var(--ink-muted); margin: 2px 0 6px; }

.flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--paper-light);
  border-radius: 14px;
  padding: 16px 20px;
  max-width: 720px;
  margin: 0 0 4px;
  box-shadow: 0 5px 0 var(--paper-edge);
}
.flow .step {
  font-family: var(--round);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 10px;
  padding: 6px 16px;
  box-shadow: 0 3px 0 var(--paper-edge);
  text-decoration: none;
}
.flow a.step:hover { background: var(--gold); box-shadow: 0 3px 0 var(--gold-edge); }
.flow .arrow { color: var(--ink-muted); font-weight: 800; }
.flow-note { font-size: 14px; line-height: 1.5; color: var(--ink-muted); margin: 0 0 16px; }
@media (max-width: 768px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow .step { text-align: center; }
  .flow .arrow { display: none; }
}

.mistakes { list-style: none; padding-left: 0; }
.mistakes li { position: relative; padding-left: 26px; margin-bottom: 12px; }
.mistakes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--gold);
  box-shadow: 0 2px 0 var(--gold-edge);
}

/* ---------- Disasters kickers ---------- */
.kicker {
  margin: 36px 0 6px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6A5210;
}
.kicker + h2 { margin-top: 0; }
@media (min-width: 901px) { .kicker { margin-top: 44px; } }

/* ---------- Figures ---------- */
figure.shot { margin: 24px 0; max-width: 768px; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 4px solid var(--bg-deep);
  box-shadow: 0 6px 0 var(--paper-edge), 0 10px 18px rgba(0, 0, 0, 0.35);
}

/* ---------- Meta rows (game menu style) ---------- */
.meta-rows { margin: 0 0 20px; max-width: 720px; }
.meta-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  background: var(--paper-light);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 5px 0 var(--paper-edge);
}
.meta-row .meta-cmd {
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  color: var(--ink);
}
.meta-row a.meta-cmd { color: #075A9C; text-underline-offset: 4px; }
.meta-row a.meta-cmd:hover { color: #003C70; }
.meta-row .meta-effect { margin: 0; font-size: 16px; color: var(--ink); }
.meta-row .meta-price {
  grid-column: 1 / -1;
  justify-self: start;
  font-family: var(--round);
  font-weight: 700;
  font-size: 15px;
  color: var(--green-ink);
  background: var(--green);
  border-radius: 10px;
  padding: 4px 14px;
  box-shadow: 0 3px 0 var(--green-edge);
}
@media (min-width: 560px) {
  .meta-row { grid-template-columns: 110px minmax(0, 1fr) auto; }
  .meta-row .meta-price { grid-column: auto; justify-self: end; }
}

/* ---------- Items page ---------- */
.items-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 0 24px;
}
@media (min-width: 901px) {
  .items-menu { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.9fr); }
}
.items-col {
  background: var(--paper-light);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 5px 0 var(--paper-edge);
}
.items-col-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 10px;
  font-family: var(--round);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.items-col-title .count { color: #8A6D1F; }
.items-col-title.spaced { margin-top: 16px; }
.coll-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  box-shadow: 0 3px 0 var(--paper-edge);
}
.coll-item:last-child { margin-bottom: 0; }
.coll-item .coll-name { font-family: var(--round); font-weight: 700; font-size: 15px; color: var(--ink); }
.coll-item .coll-rar { font-size: 13px; color: var(--ink-muted); }
.rarity {
  flex: none;
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--r-common);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.rarity.uncommon { background: var(--r-uncommon); }
.rarity.rare { background: var(--r-rare); }
.rarity.epic { background: var(--r-epic); }
.rarity.legendary { background: var(--r-legendary); }
.rarity.mythical { background: var(--r-mythical); }
.rarity.unknown-rar { background: #8B8578; }

.spin-display { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.spin-box {
  border-radius: 12px;
  padding: 16px 12px 12px;
  text-align: center;
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
}
.spin-box.dark { background: var(--btn-dark); color: var(--paper-light); box-shadow: 0 5px 0 var(--btn-dark-edge); }
.spin-box.gold { background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--gold-edge); }
.spin-sub {
  display: block;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  margin-top: 6px;
}
.spin-box.dark .spin-sub { color: var(--money); }
.spin-box.gold .spin-sub { color: var(--ink); }
.snapshot-label {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
.loadout-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.loadout-slot {
  aspect-ratio: 1;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: inset 0 -4px 0 var(--paper-edge);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 4px 6px;
  font-size: 13px;
  color: var(--ink-muted);
  font-family: var(--round);
  font-weight: 700;
}
.odds-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  box-shadow: 0 3px 0 var(--paper-edge);
  font-family: var(--round);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.odds-row:last-child { margin-bottom: 0; }
.odds-row .odds-name { flex: 1; }
.odds-row .odds-pct { font-family: var(--display); font-weight: 400; font-size: 18px; }
.pity-block { margin-top: 14px; }
.pity-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--round);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 6px;
}
.pity-track {
  height: 16px;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.12);
}
.money-line {
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  color: #5B8A1E;
  margin: 12px 0 0;
  text-align: right;
}

/* ---------- Badges page ---------- */
.badge-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 0 0 20px; }
@media (min-width: 769px) { .badge-grid { grid-template-columns: 1fr 1fr; } }
.badge-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--paper-light);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 5px 0 var(--paper-edge);
}
.badge-card img {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 3px solid var(--bg-deep);
}
.badge-card h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
}
.badge-card .badge-desc { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.badge-card .badge-link { font-size: 14px; font-weight: 700; }
.badge-icons-note { font-size: 14px; color: var(--ink-muted); }

/* ---------- Related guides ---------- */
.related-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 856px;
  margin: 0 0 16px;
}
@media (min-width: 769px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
.related-grid li { margin: 0; }
.rel-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--paper-light);
  color: var(--ink);
  border-radius: 12px;
  padding: 14px 18px;
  font-family: var(--round);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--paper-edge);
}
.rel-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--paper-edge); }
.rel-card::after { content: "→"; color: #6A5210; font-weight: 700; }

/* ---------- Sources ---------- */
.sources-block {
  font-size: 14px;
  line-height: 1.55;
  color: var(--cream-muted);
  max-width: 720px;
  margin-top: 28px;
}
.sources-block h2 {
  font-size: 18px;
  color: var(--cream-muted);
  margin: 0 0 10px;
  text-shadow: none;
  -webkit-text-stroke: 0;
}
.sources-block a { color: var(--cream-muted); text-decoration: underline; }
.sources-block a:hover { color: var(--cream); }
.sources-block ul { padding-left: 20px; }
.sources-block .note { color: var(--cream-muted); }
.source-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid var(--cream-muted);
  border-radius: 999px;
  font-size: 14px;
  color: var(--cream-muted);
}

/* ---------- Ads (empty placeholders) ---------- */
.ad-slot:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 64px;
  background: var(--bg-deep);
  border-top: 4px solid var(--paper-edge);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-nav a { font-size: 15px; color: var(--cream-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--gold); text-decoration: underline; }
.footer-copy { margin: 0 0 0 auto; font-size: 14px; color: var(--cream-muted); }
@media (max-width: 768px) { .footer-copy { margin-left: 0; flex-basis: 100%; } }

/* narrow phones: drop the decorative dice so the Writer placeholder fits */
@media (max-width: 480px) {
  .writer .dice { display: none; }
}

/* buttons inside paper panels keep their own colors */
.panel a.btn { text-decoration: none; }
.panel a.btn-dark { color: var(--paper-light); }
.panel a.btn-gold, .panel a.btn-paper { color: var(--ink); }
.panel a.btn-green { color: var(--green-ink); }

/* Adsterra */
.ad-slot.ad-banner{width:100%;max-width:728px;height:90px;margin:24px auto;overflow:hidden;position:relative}
.ad-banner-inner{width:728px;height:90px;transform-origin:top left}
.ad-slot.ad-native{margin:24px auto;max-width:100%;overflow:hidden}

/* Mobile menu: keep link tiles solid while tapped */
.menu-toggle { -webkit-appearance: none; appearance: none; padding: 0; margin: 0; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.menu-nav a, .menu-nav a:visited, .menu-nav a:hover, .menu-nav a:focus { color: var(--ink); background: var(--paper-light); opacity: 1; }
.menu-nav a[aria-current="page"], .menu-nav a[aria-current="page"]:visited { background: var(--gold); }
