/* Fonts (SIL Open Font License, see fonts/OFL-*.txt): variable files, one per script subset, covering every weight used */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/fredoka-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/fredoka-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(../fonts/nunito-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(../fonts/nunito-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Base, before the theme: reset and hidden attribute */
body {
  margin: 0;
  font: 14px system-ui;
}
img {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
/* Layout: sticky header, 1200px column, data screens routed on the hash (#accueil, #objets, #objet-…, #recettes, #personnages, #lieux) */
:root {
  --bg: #f7f3e8;
  --surface: #fffdf7;
  --line: #e6ddc6;
  --line-soft: #efe8d6;
  --ink: #1e3a3a;
  --ink-2: #2c4a49;
  --muted: #4f6463;
  --green: #2f6b3f;
  --green-deep: #1e4a2a;
  --leaf: #3f7d4e;
  --sky: #cfe6ee;
  --sun: #f2c462;
  --earth: #8a6a45;
  --t-green: #e3f0e3;
  --t-sun: #fbe7c0;
  --t-sky: #d9ecf2;
  --t-rose: #f5dcd0;
  --t-lilac: #e8e1f3;
  --t-sand: #f2ebd6;
  --panel: #1e3a3a;
  --panel-ink: #f7f3e8;
  --panel-muted: #b9ccc8;
  --on-green: #ffffff;
  --tile-dark: #2c4a49;
  --veil: rgba(247, 243, 232, 0.9);
  --display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #131e1d;
    --surface: #1a2928;
    --line: #2b3f3d;
    --line-soft: #233533;
    --ink: #eaf1ec;
    --ink-2: #d2e0da;
    --muted: #a7bcb6;
    --green: #86c794;
    --green-deep: #5fa570;
    --leaf: #86c794;
    --sky: #1f3a45;
    --sun: #e8b94f;
    --earth: #c9a27a;
    --t-green: #23402d;
    --t-sun: #463a1e;
    --t-sky: #1e3a44;
    --t-rose: #47302a;
    --t-lilac: #352d45;
    --t-sand: #3a3428;
    --panel: #0e1716;
    --panel-ink: #eaf1ec;
    --panel-muted: #a7bcb6;
    --on-green: #10201a;
    --tile-dark: #0e1716;
    --veil: rgba(19, 30, 29, 0.86);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #131e1d;
  --surface: #1a2928;
  --line: #2b3f3d;
  --line-soft: #233533;
  --ink: #eaf1ec;
  --ink-2: #d2e0da;
  --muted: #a7bcb6;
  --green: #86c794;
  --green-deep: #5fa570;
  --leaf: #86c794;
  --sky: #1f3a45;
  --sun: #e8b94f;
  --earth: #c9a27a;
  --t-green: #23402d;
  --t-sun: #463a1e;
  --t-sky: #1e3a44;
  --t-rose: #47302a;
  --t-lilac: #352d45;
  --t-sand: #3a3428;
  --panel: #0e1716;
  --panel-ink: #eaf1ec;
  --panel-muted: #a7bcb6;
  --on-green: #10201a;
  --tile-dark: #0e1716;
  --veil: rgba(19, 30, 29, 0.86);
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}
a {
  color: var(--green);
}
a:hover {
  color: var(--green-deep);
}
:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  text-wrap: balance;
  margin: 0;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.num {
  font-variant-numeric: tabular-nums;
}

/* header */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--surface);
}
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: var(--surface);
  border-bottom: 2px solid var(--line);
}
.top .wrap {
  padding-block: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
}
.brand b span {
  color: var(--leaf);
}
.brand .logo {
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--line);
}
.theme-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
}
.theme-btn:hover {
  border-color: var(--ink);
}
.theme-btn .sun,
.theme-btn[aria-pressed='true'] .moon {
  display: none;
}
.theme-btn[aria-pressed='true'] .sun {
  display: block;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 auto;
  align-items: center;
}
.nav .grp {
  position: relative;
}
.nav .grp > button,
.nav .top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.nav .grp > button:hover,
.nav .top-link:hover,
.nav .grp > button[aria-expanded='true'] {
  background: var(--t-sand);
}
.nav .grp > button svg {
  transition: transform 0.15s;
}
.nav .grp > button[aria-expanded='true'] svg {
  transform: rotate(180deg);
}
.nav .grp.active > button,
.nav .top-link[aria-current='page'] {
  background: var(--t-green);
  font-weight: 800;
}
.nav .menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(30, 58, 58, 0.14);
}
.nav .menu a {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.nav .menu a small {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}
.nav .menu a:hover {
  background: var(--t-sand);
}
.nav .menu a[aria-current='page'] {
  background: var(--t-green);
}
@media (prefers-reduced-motion: reduce) {
  .nav .grp > button svg {
    transition: none;
  }
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 2px 6px 2px 14px;
  flex: 0 1 260px;
  min-width: 180px;
}
.search input {
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  min-height: 38px;
  width: 100%;
  outline: none;
}
.search:focus-within {
  border-color: var(--ink);
}
.search {
  position: relative;
}
.suggest {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(440px, calc(100vw - 32px));
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(30, 58, 58, 0.16);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.suggest li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
}
.suggest li .t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.suggest li b {
  font-weight: 800;
  overflow-wrap: anywhere;
}
.suggest li small {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.suggest li:hover,
.suggest li[aria-selected='true'] {
  background: var(--t-sand);
}
.suggest li.all {
  justify-content: center;
  font-weight: 800;
  color: var(--green);
  border-top: 2px solid var(--line-soft);
  border-radius: 0 0 12px 12px;
  margin-top: 2px;
}
.suggest li.none-found {
  color: var(--muted);
  cursor: default;
}
.results {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.results li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
}
.results li a:hover,
.results li a:focus-visible {
  background: var(--t-sand);
}
.results li .t {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.results li b {
  font-weight: 800;
}
.results li small {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

main {
  padding-block: 28px 64px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.crumbs {
  font-size: 14px;
  color: var(--muted);
}
.lead {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.page-head h1 {
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1.1;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* icons from atlases */
.ic {
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 12px;
  background-color: var(--t-sand);
  background-repeat: no-repeat;
}
.ic.dark {
  background-color: var(--tile-dark);
}
.ic.none {
  background-image: none !important;
  border: 2px dashed var(--line);
}

/* home */
.hero {
  position: relative;
  isolation: isolate;
  z-index: 1;
  background: var(--sky);
  border: 2px solid color-mix(in srgb, var(--ink) 35%, transparent);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 32px;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
  min-height: 380px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
}
/* game illustration (mirrored so the balloon sits on the right), veiled on the text side */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  z-index: -2;
  background: var(--hero) center / cover no-repeat;
  transform: scaleX(-1);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  z-index: -1;
  background: linear-gradient(90deg, var(--veil) 0%, var(--veil) 42%, transparent 78%);
}
@media (max-width: 760px) {
  .hero::after {
    background: linear-gradient(180deg, var(--veil) 0%, var(--veil) 100%);
  }
}
.ver {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--t-sun);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}
.ver strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
}
.hero > div:first-child {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.badge {
  align-self: flex-start;
  background: var(--surface);
  color: var(--green);
  font-weight: 800;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.05;
}
.hero p {
  margin: 0;
  font-size: 19px;
  color: var(--ink-2);
  max-width: 520px;
}
.hero form {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 560px;
}
.hero-suggest {
  left: 0;
  right: auto;
  width: 100%;
}
.hero input {
  flex: 1 1 260px;
  min-height: 56px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 0 20px;
  font: inherit;
  font-size: 17px;
  background: var(--surface);
  color: var(--ink);
}
.btn {
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 18px;
  background: var(--green);
  color: var(--on-green);
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--green-deep);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn:hover {
  color: var(--on-green);
  filter: brightness(1.05);
}
.figures {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-weight: 700;
  color: var(--ink-2);
}
.figures strong {
  font-family: var(--display);
  font-size: 22px;
  color: var(--ink);
}

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}
.sec-head h2 {
  font-size: 30px;
  font-weight: 600;
}
.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.cat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 4px 0 var(--line);
}
.cat:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.cat .ic {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}
.cat span.t {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cat b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
}
.cat small {
  color: var(--muted);
  font-size: 15px;
}
.cat em {
  font-style: normal;
  font-weight: 800;
  font-size: 14px;
  color: var(--green);
}
.duo {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 28px;
  padding: 26px;
}
.duo > .card {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.duo h2 {
  font-size: 26px;
  font-weight: 600;
}
.minis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.mini {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
}
.mini:hover {
  color: var(--ink);
  background: var(--t-sand);
}
.mini .t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mini b {
  font-weight: 800;
}
.mini small {
  font-size: 14px;
  color: var(--muted);
}

/* lists */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pill:hover {
  border-color: var(--ink);
}
.pill[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  font-weight: 800;
}
.pill small {
  font-weight: 700;
  opacity: 0.75;
}
.pills.sub .pill {
  min-height: 38px;
  font-size: 15px;
}
.filter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 0 14px;
  flex: 0 1 320px;
  min-width: 0;
}
.filter input {
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  min-height: 48px;
  width: 100%;
  outline: none;
}
.tablebox {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th {
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  padding: 14px 12px;
  border-bottom: 2px solid var(--line);
}
th:first-child,
td:first-child {
  padding-left: 20px;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td a.row {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
td a.row:hover {
  color: var(--green);
}
.chip {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--t-green);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.coin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}
.muted {
  color: var(--muted);
}
.empty {
  margin: 0;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pager button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.pager button[aria-current='page'] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
.ings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ing {
  position: relative;
  display: inline-flex;
}
.ing i {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: 800 12px/22px var(--body);
  text-align: center;
  box-sizing: border-box;
}

/* item page */
.item {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}
.item aside {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.item aside .card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 5px 0 var(--line);
}
.bigicon {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  font-size: 15px;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}
.facts dd.code {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
}
.note {
  background: var(--panel);
  color: var(--panel-muted);
  border-radius: 22px;
  padding: 16px 20px;
  font-size: 14px;
}
.note strong {
  color: var(--panel-ink);
}
.item > .main {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.item h1 {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.1;
}
.item .desc {
  margin: 0;
  font-size: 18px;
  color: var(--ink-2);
  max-width: 62ch;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 12px;
}
.tab {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tab[aria-selected='true'] {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-green);
  font-weight: 800;
  box-shadow: 0 3px 0 var(--green-deep);
}
.tab small {
  opacity: 0.8;
}
.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.recipe {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 2px dashed var(--line);
}
.recipe:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--bg);
  font-weight: 700;
}
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 12px;
  flex: 1 1 260px;
  min-width: 0;
}
.input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 20px;
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
  text-align: center;
}
.input:hover {
  color: var(--ink);
  background: var(--t-sand);
}
.input b {
  font-weight: 800;
  font-size: 15px;
}
.output {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: 22px;
  background: var(--t-green);
  border: 2px solid var(--leaf);
  font-weight: 800;
  text-align: center;
  max-width: 200px;
}
.sources {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--bg);
}
.source .chip {
  background: var(--t-sky);
}

/* people & places */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}
.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  text-align: center;
}
.person b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
}
.places {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.place {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 20px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
}
.place:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.loading {
  padding: 64px 0;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}
.person {
  text-decoration: none;
  color: var(--ink);
}
a.person:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.person small {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

/* quests */
.qgroup {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.qgroup h2 {
  font-size: 26px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.qgroup h2 small {
  font-family: var(--body);
  font-size: 15px;
  color: var(--muted);
  font-weight: 700;
}
.qcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.qcard {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 22px;
  text-decoration: none;
  color: var(--ink);
  align-items: flex-start;
}
.qcard:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.qcard .t {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.qcard b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
}
.qcard .who {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.imp {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: var(--t-sun);
}
.imp.side {
  background: var(--t-lilac);
}
.qmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.giver {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.giver:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font: 600 20px/44px var(--display);
  text-align: center;
}
.step > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tasks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tasks li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 700;
}
.tasks li::before {
  content: '';
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid var(--leaf);
}
.tasks li.opt {
  color: var(--muted);
  font-weight: 600;
}
.tasks a.goal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 2px;
  border-radius: 999px;
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
}
details.talk {
  border-radius: 16px;
  background: var(--bg);
}
details.talk summary {
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 800;
  color: var(--green);
  min-height: 24px;
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 14px 16px;
}
.line {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: baseline;
}
.line b {
  font-family: var(--display);
  font-weight: 600;
  text-align: right;
  color: var(--leaf);
  overflow-wrap: anywhere;
}
.line p {
  margin: 0;
  max-width: 62ch;
}
.line.pc b {
  color: var(--muted);
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.choices span {
  padding: 3px 12px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  font-size: 14px;
}
.tok {
  padding: 0 6px;
  border-radius: 6px;
  background: var(--t-sun);
  font-weight: 800;
}
.idle {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.bubble {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 20px 20px 20px 6px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bubble p {
  margin: 0;
}
/* crops */
th button.sort {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
th button.sort:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
  border-radius: 4px;
}
th button.sort[aria-pressed='true'] {
  color: var(--ink);
}
td .sub {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}
td.gain {
  font-weight: 800;
  color: var(--green);
}
.note-inline {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 80ch;
}

/* fishing & foraging */
.spots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.spot {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.spot h3 {
  font-size: 19px;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tier {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tier > span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 800;
}
.loot {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.loot li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  font-size: 15px;
}
.loot li a {
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
}
.loot li a:hover {
  color: var(--green);
}
.loot li em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.pct {
  display: inline-block;
  min-width: 44px;
  text-align: right;
  color: var(--green);
  font-weight: 800;
}
.icons-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  white-space: nowrap;
}

/* memories */
.mems {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.mem {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  align-items: start;
}
.mem .t {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.mem b a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
}
.mem b a:hover {
  color: var(--green);
}
.mem p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.conds {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.conds li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--bg);
  font-weight: 700;
  font-size: 15px;
}
.conds .icons-inline a {
  display: inline-flex;
}
.conds .more {
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}

/* skills */
.skill-head {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  background: var(--sky);
  border-radius: 28px;
  padding: 24px;
}
.skill-head .t {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skill-head h2 {
  font-size: 32px;
}
.skill-head p {
  margin: 0;
  color: var(--ink-2);
  max-width: 70ch;
}
.perks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.perk {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 20px;
  align-items: start;
}
.perk .t {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.perk b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
}
.perk p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.cost {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.cost span {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--t-green);
}
.cost span.m {
  background: var(--t-lilac);
}
.lvl-h {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
}
.lvl-h span {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* pets */
.pets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.pet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 22px;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
}
.pet:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.pet[aria-current='page'] {
  border-color: var(--green);
  box-shadow: 0 4px 0 var(--green);
}
.pet b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
}
.pet small {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}
.tile:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.how {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.how > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 2px solid var(--line);
}

/* wardrobe */
.sets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.set {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}
.set img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--t-sky);
}
.set .t {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
}
.set b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
}
.set .lbl {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 800;
}
.cos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.co {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 18px;
  background: var(--surface);
  border: 2px solid var(--line);
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
a.co:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.co b {
  font-weight: 800;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.co .avail {
  justify-content: center;
  max-width: 100%;
}
/* tiles are narrow: a long source ("Quête · Surprise ultra-secrète") wraps inside its chip instead of overflowing */
.co .avail span {
  font-size: 11px;
  line-height: 1.35;
  padding: 2px 8px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: 10px;
}

/* community */
.stages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.stage {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  min-width: 0;
}
.stage img,
.bin img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--t-sky);
}
.slider {
  position: relative;
}
.slides {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 2px 2px 14px;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.slides:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 24px;
}
.slides > .stage {
  flex: 0 0 min(340px, 86%);
  scroll-snap-align: start;
}
.sl-btn {
  position: absolute;
  top: 34%;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 700 28px/1 var(--body);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sl-btn.prev {
  left: -12px;
}
.sl-btn.next {
  right: -12px;
}
.sl-btn:hover {
  border-color: var(--ink);
}
.sl-btn[disabled] {
  opacity: 0;
  pointer-events: none;
}
@media (max-width: 640px) {
  .sl-btn.prev {
    left: 2px;
  }
  .sl-btn.next {
    right: 2px;
  }
}
.stage .t,
.bin .t {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  min-width: 0;
}
.stage b,
.bin b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
}
.stage p,
.bin p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.days li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg);
  font-size: 14px;
}
.days li > span:first-child {
  font-weight: 800;
}
.days li > span:first-child small {
  display: block;
  font-weight: 700;
  color: var(--muted);
}
.goal-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-weight: 700;
}
.goal-line > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.goal-line em {
  font-style: normal;
  color: var(--muted);
  font-weight: 700;
}
.bins {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.bin {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  min-width: 0;
}
.bundle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  background: var(--bg);
}
.status {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: start;
}
.status span.chip {
  text-align: center;
}

/* research & datapads */
.pads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.pad {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  min-width: 0;
}
.pad img.art {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--t-sand);
}
.pad .t {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
}
.pad b.title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
}
.lore {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}
.lore .rt {
  font-weight: 800;
  color: var(--ink);
}
.lore .rt-Location {
  color: var(--green);
}
.lore .rt-NPC {
  color: var(--leaf);
}
.lore .who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}
.rwline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

/* shops */
.shops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.shop {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 4px 0 var(--line);
}
.shop:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.shop .head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.shop b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.2;
}
.shop p {
  margin: 0;
  color: var(--muted);
}
.shop .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.shop .stats span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg);
}
.shop .stats span.cur,
.chip.cur {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
}
.price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  white-space: nowrap;
}
.level {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.level-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.level-head h2 {
  font-size: 24px;
  font-weight: 600;
}
.avail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.avail span {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: var(--t-sky);
  white-space: nowrap;
}
.avail span.rot {
  background: var(--t-lilac);
}
.avail span.req {
  background: var(--t-sun);
}

/* interactive map: side panel of filters + pan/zoom viewer (stage scaled by --k, markers counter-scaled by --inv) */
body.mapmode main {
  max-width: none;
  padding: 0;
  gap: 0;
}
body.mapmode footer {
  display: none;
}
.map-shell {
  position: relative;
  height: 80vh;
  overflow: hidden;
  background: #5c9daa;
}
.map-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 72px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.map-top > * {
  pointer-events: auto;
}
.map-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 0 var(--line);
}
.map-btn[aria-expanded='true'] {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-green);
  box-shadow: 0 3px 0 var(--green-deep);
}
.map-dist {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: 0 3px 0 var(--line);
}
.map-dist a {
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.map-dist a[aria-current] {
  background: var(--ink);
  color: var(--surface);
}
.map-panel {
  position: absolute;
  top: 70px;
  left: 12px;
  bottom: 12px;
  width: min(340px, calc(100% - 24px));
  overflow: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.map-panel[hidden] {
  display: none;
}
.map-panel-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.map-panel-h h2 {
  font-size: 19px;
  font-weight: 600;
}
.map-panel .x,
.map-card .x {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
  flex: none;
}
.map-find {
  position: relative;
}
.map-find input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
.map-find input:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 1px;
}
.map-hits {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.map-hits button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.map-hits button:hover,
.map-hits button:focus-visible {
  background: var(--t-green);
}
.map-hits small {
  display: block;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}
.lyr {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lyr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-weight: 800;
  cursor: pointer;
}
.lyr-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  flex: none;
  margin: 0;
}
.lyr-row .sw {
  width: 26px;
  height: 26px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lyr-row .n {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
.lyr details {
  margin-left: 30px;
}
.lyr summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 0;
}
.lyr details .lyr-row {
  min-height: 34px;
  font-weight: 700;
  font-size: 14px;
}
.lyr details .lyr-row input {
  width: 18px;
  height: 18px;
}
.map-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.map-tools button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.map-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.map-view:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}
.map-view.drag {
  cursor: grabbing;
}
.map-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.map-stage > img {
  display: block;
  max-width: none;
  pointer-events: none;
  -webkit-user-drag: none;
}
.mk {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) scale(var(--inv, 1));
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}
.mk.pin img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}
.mk.it {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fffdf7;
  border: 3px solid var(--c, #3f7d4e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}
.mk.it.sq {
  border-radius: 9px;
  background: var(--c);
}
.mk.dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c);
  border: 3px solid #fffdf7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.mk.lbl {
  cursor: default;
  pointer-events: none;
  font: 600 22px/1.1 var(--display);
  color: #1e3a3a;
  white-space: nowrap;
  text-shadow:
    0 0 3px #fffdf7,
    0 0 3px #fffdf7,
    0 0 6px #fffdf7;
}
.mk.sel {
  z-index: 3;
}
.mk.sel.it,
.mk.sel.dot {
  outline: 4px solid #f2c462;
  outline-offset: 2px;
}
.mk.sel.pin img {
  filter: drop-shadow(0 0 6px #f2c462) drop-shadow(0 0 2px #f2c462);
}
.map-view.far .mk.dot {
  width: 12px;
  height: 12px;
  border-width: 2px;
}
.map-view.far .mk.it {
  width: 20px;
  height: 20px;
  border-width: 2px;
}
.map-view.far .mk.it .ic {
  transform: scale(0.7);
}
.map-ctrl {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-ctrl button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 700 22px/1 var(--body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 var(--line);
}
.map-card {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: min(380px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: auto;
  user-select: text;
  -webkit-user-select: text;
}
.map-card .hd {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 36px;
}
.map-card .hd b {
  font: 600 20px/1.2 var(--display);
}
.map-card .hd small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
.map-card .x {
  position: absolute;
  top: 10px;
  right: 10px;
}
.map-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}
.map-card .kv {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 14px;
  font-weight: 700;
}
.map-card .kv span {
  color: var(--muted);
}
.map-card h3 {
  font-size: 15px;
  font-weight: 800;
  font-family: var(--body);
  color: var(--muted);
  margin: 0;
}
.map-card .go {
  align-self: flex-start;
  font-weight: 800;
}
/* rarity badges */
.rar {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: #e3e8e4;
  color: #33443f;
  white-space: nowrap;
}
.rar.sm {
  display: table;
  margin-top: 3px;
  padding: 1px 8px;
  font-size: 11px;
}
.rar[data-r='Uncommon'] {
  background: #d7efd9;
  color: #1e5a2c;
}
.rar[data-r='Rare'] {
  background: #d6e8fa;
  color: #1b4f86;
}
.rar[data-r='VeryRare'] {
  background: #e8ddf8;
  color: #5a2e91;
}
.rar[data-r='Premium'] {
  background: #fbe7c0;
  color: #7a5300;
}
.rar[data-r='Personal'] {
  background: #d9f0ef;
  color: #1e5755;
}
/* owned toggles */
.own {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.own.lbl {
  padding: 0 14px 0 10px;
}
.own:hover {
  border-color: var(--green);
  color: var(--green);
}
.own[aria-pressed='true'] {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-green);
}
.own:not([aria-pressed='true']) svg {
  opacity: 0.35;
}
.own-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ownwrap {
  position: relative;
  display: flex;
}
.ownwrap > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.ownwrap > .own {
  position: absolute;
  top: 8px;
  right: 8px;
}
.ownwrap.is-own > :first-child,
.pad.is-own,
.mem.is-own {
  box-shadow: inset 0 0 0 3px var(--green);
}
td.own-cell {
  width: 52px;
  text-align: right;
  padding-right: 16px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--muted);
}
.toolbar select {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--panel);
  color: var(--panel-ink);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.toast a {
  color: var(--sun);
}
/* item page */
.sibs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -24px;
}
.sibs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  max-width: 42%;
}
.sibs a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sibs a:hover {
  color: var(--green);
}
.sec {
  gap: 14px;
}
.sec > h2 {
  font-size: 26px;
  font-weight: 600;
}
.h3 {
  font: 800 15px var(--body);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 4px 0 0;
}
.srcs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.src {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
a.src:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.src .t {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
.src .t b {
  font-weight: 800;
  overflow-wrap: anywhere;
}
.src .t small {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.src.wide {
  grid-column: 1 / -1;
  flex-wrap: wrap;
}
.uses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}
.use {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  text-decoration: none;
}
.use:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.use .t {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.use small {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.ing.self {
  outline: 3px solid var(--sun);
  outline-offset: 1px;
  border-radius: 10px;
}
.minimaps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.minimap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.minimap small {
  color: var(--muted);
  font-weight: 700;
}
.mm {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: #5c9daa;
}
.mm img {
  display: block;
  width: 100%;
  height: 100%;
}
.mm i {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #e2563b;
  border: 2px solid #fffdf7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.minimap:hover .mm {
  border-color: var(--ink);
}
.steps-list {
  margin: 0;
  padding: 4px 10px 10px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.steps-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tipcard {
  position: fixed;
  z-index: 70;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 340px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}
.tipcard .t {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.tipcard small {
  color: var(--muted);
  font-weight: 700;
}
/* tools */
.cart {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart li a {
  flex: 1 1 auto;
  font-weight: 800;
}
.cart input {
  width: 76px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}
.cart .x {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px;
}
.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  cursor: pointer;
}
.checklist label:hover {
  background: var(--bg);
}
.checklist input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  flex: none;
}
.checklist small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.checklist li.done b {
  text-decoration: line-through;
  color: var(--muted);
}
td .neg {
  color: #b5432e;
}
:root[data-theme='dark'] td .neg {
  color: #f08f7a;
}
.bar {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}
.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.prog {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.prog:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.prog .num {
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}
.homecol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.homecol-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kv-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.kv-row > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 800;
}
.kv-row small {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.permits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.mini-table {
  min-width: 0 !important;
  width: 100%;
}
.mini-table th,
.mini-table td {
  padding: 6px 8px;
}
.plaques {
  columns: 320px;
  column-gap: 16px;
}
.plaque {
  break-inside: avoid;
  margin: 0 0 16px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 2px solid var(--line);
}
.plaque blockquote {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.plaque figcaption {
  font-weight: 800;
  color: var(--green);
}
/* drawer */
.drawer-btn {
  margin-left: auto;
}
.drawer-btn + .theme-btn {
  margin-left: 0;
}
.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(14, 23, 22, 0.45);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 92vw);
  overflow: auto;
  background: var(--surface);
  padding: 18px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
  outline: none;
}
.drawer-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 22px var(--display);
}
.drawer-h .x {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}
.drawer-g {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drawer-g a {
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.drawer-g a:hover {
  background: var(--t-sand);
}
.cap {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 640px) {
  .sibs {
    margin-top: -10px;
  }
  .sibs a {
    max-width: 40%;
    font-size: 14px;
  }
  .srcs,
  .uses {
    grid-template-columns: minmax(0, 1fr);
  }
  .ownwrap > .own {
    top: 6px;
    right: 6px;
  }
  .drawer-btn {
    order: 2;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .rar {
    filter: brightness(0.85) saturate(1.2);
  }
}
:root[data-theme='dark'] .rar {
  filter: brightness(0.85) saturate(1.2);
}
@media (max-width: 900px) {
  .map-card {
    left: 12px;
    width: auto;
    max-height: 55%;
  }
  .map-panel {
    top: auto;
    height: min(70%, calc(100% - 120px));
    width: auto;
    right: 12px;
  }
  .map-top {
    right: 64px;
  }
  .map-dist {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .map-dist a {
    padding: 6px 10px;
    font-size: 14px;
  }
}
@media (max-width: 560px) {
  .line {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .line b {
    text-align: left;
  }
  .step {
    grid-template-columns: 1fr;
  }
}

footer {
  border-top: 2px solid var(--line);
  background: var(--surface);
}
footer .wrap {
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 640px) {
  .top {
    position: static;
  } /* brand + menu + search wrap to ~170px: too tall to keep pinned on a phone */
  .top .wrap {
    gap: 10px 12px;
    padding-block: 10px;
  }
  .brand {
    order: 1;
  }
  .brand b {
    font-size: 21px;
  }
  .theme-btn {
    order: 2;
  }
  .nav {
    order: 3;
    flex: 1 1 100%;
    gap: 2px;
    justify-content: space-between;
  }
  .top .search {
    order: 4;
    flex: 1 1 100%;
  }
  .nav .grp > button,
  .nav .top-link {
    padding: 0 7px;
    gap: 3px;
    font-size: 14.5px;
  }
  .nav .grp > button svg {
    display: none;
  }
  .nav .grp:nth-child(3) .menu {
    left: auto;
    right: 0;
  }
  main {
    padding-block: 18px 48px;
    gap: 28px;
  }
  .hero {
    min-height: 0;
    border-radius: 24px;
  }
  .hero::before,
  .hero::after {
    border-radius: 22px;
  }
  .card {
    padding: 18px;
    border-radius: 22px;
  }
  /* tables become one card per row, each cell labelled with its column (labels set in done()) */
  .tablebox table {
    min-width: 0 !important;
  }
  .tablebox thead {
    display: none;
  }
  .tablebox table,
  .tablebox tbody,
  .tablebox tr,
  .tablebox td {
    display: block;
    width: auto;
  }
  .tablebox tr {
    padding: 12px 16px;
    border-bottom: 2px solid var(--line-soft);
  }
  .tablebox tr:last-child {
    border-bottom: 0;
  }
  .tablebox td,
  .tablebox td:first-child {
    padding: 4px 0;
    border: 0;
  }
  .tablebox td[data-l]:not(:first-child) {
    display: grid;
    grid-template-columns: minmax(96px, 38%) 1fr;
    gap: 10px;
    align-items: center;
  }
  .tablebox td[data-l]:not(:first-child)::before {
    content: attr(data-l);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--muted);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* shared page parts (were repeated as style="" attributes in the scripts) */
.page-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.page-body.loose {
  gap: 22px;
}
h1.page-title {
  font-size: clamp(34px, 5vw, 44px);
}
/* :is(h1, h2, h3) lifts these above contextual rules such as .duo h2 or .sec-head h2, as the style="" they replace did */
:is(h1, h2, h3):is(.h-xl, .h-lg, .h-md, .h-sm) {
  font-weight: 600;
}
:is(h1, h2, h3).h-xl {
  font-size: 26px;
}
:is(h1, h2, h3).h-lg {
  font-size: 24px;
}
:is(h1, h2, h3).h-md {
  font-size: 22px;
}
:is(h1, h2, h3).h-sm {
  font-size: 20px;
}
.count {
  font-family: var(--body);
  font-size: 15px;
}
