/* Kingdoom — ink on paper. The game's palette: paper 0.965, ink 0.11, one mid shade; at night the
   page turns to ink (an inversion, like the game's own night). */

@font-face {
  font-family: "Patrick Hand";
  src: url("/assets/fonts/PatrickHand-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f6f6;
  --ink: #1c1c1c;
  --ink-soft: #4a4a4a;
  --shade: #8f8f8f;
  --rule: #d9d9d9;
  --tape: rgba(150, 150, 150, 0.5);
  --wash: #ececec;
  --hand: "Patrick Hand", "Comic Sans MS", "Chalkboard SE", "Segoe Print", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --card-pad: clamp(16px, 2.4vw, 24px);
  --radius: 14px 12px 15px 13px / 13px 15px 12px 14px;
  --shadow: 2px 3px 0 var(--ink);
  color-scheme: light;
}

:root[data-theme="night"] {
  --paper: #090909;
  --ink: #e3e3e3;
  --ink-soft: #b9b9b9;
  --shade: #707070;
  --rule: #333;
  --tape: rgba(120, 120, 120, 0.45);
  --wash: #161616;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) {
    --paper: #090909;
    --ink: #e3e3e3;
    --ink-soft: #b9b9b9;
    --shade: #707070;
    --rule: #333;
    --tape: rgba(120, 120, 120, 0.45);
    --wash: #161616;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--hand);
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }
img, svg, video { display: block; max-width: 100%; height: auto; }
picture { display: contents; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  border-radius: 6px;
}

h1, h2, h3, h4 { font-weight: 400; line-height: 1.05; margin: 0 0 0.4em; letter-spacing: 0.01em; text-wrap: balance; }
p, li, figcaption, summary, .lede { text-wrap: pretty; }
.faq summary, .page-head .lede, .page-head .muted, .prose .lede, .lost .lede { text-wrap: balance; }
.nowrap { white-space: nowrap; }
p { margin: 0 0 0.9em; }
strong { font-weight: 400; background: linear-gradient(transparent 58%, var(--rule) 58%, var(--rule) 92%, transparent 92%); padding: 0 0.1em; margin: 0 -0.1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--ink); color: var(--paper);
  border-radius: 10px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.glyph { width: 1.2em; height: 1.2em; flex: none; }

.only-night { display: none; }
:root[data-theme="night"] .only-day { display: none; }
:root[data-theme="night"] .only-night { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) .only-day { display: none; }
  :root:not([data-theme="day"]) .only-night { display: inline; }
}
html.no-js .only-js { display: none; }

/* ---------- chips: the game's paper buttons ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 44px;
  padding: 0.3em 0.95em;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 1.05em;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.chip:hover { transform: translate(-1px, -1px); box-shadow: 3px 4px 0 var(--ink); text-decoration: none; }
.chip:active { transform: translate(1px, 2px); box-shadow: 0 1px 0 var(--ink); }
.chip--ink { background: var(--ink); color: var(--paper); box-shadow: 2px 3px 0 var(--shade); }
.chip--ink:hover { box-shadow: 3px 4px 0 var(--shade); }
.chip--static, .chip--static:hover, .chip--static:active { cursor: default; transform: none; box-shadow: 2px 3px 0 var(--shade); }
.chip svg { width: 1.15em; height: 1.15em; flex: none; }

/* The App Store call to action: an ink chip with an hourglass (never Apple's badge). */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0;
  min-height: 64px;
  padding: 0.45em 1.25em 0.45em 0.9em;
  border: 2px solid var(--ink);
  border-radius: 16px 14px 17px 15px / 15px 17px 14px 16px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 4px 0 var(--shade);
  text-decoration: none;
  line-height: 1;
}
a.cta { transition: transform 0.12s ease, box-shadow 0.12s ease; }
a.cta:hover { transform: translate(-1px, -1px); box-shadow: 4px 5px 0 var(--shade); }
.cta__glyph { width: 34px; height: 34px; }
.cta__text { display: flex; flex-direction: column; font-size: 1.75rem; }
.cta__small { font-size: 0.95rem; letter-spacing: 0.02em; opacity: 0.85; margin-bottom: 0.15em; }

/* ---------- masthead ---------- */

.masthead { padding-top: 14px; position: relative; z-index: 5; }
.masthead__row { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-size: 1.7rem;
  margin-right: auto;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--ink); }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  text-decoration: none; font-size: 1.15rem;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0 2px; background-repeat: no-repeat; background-position: 0 78%;
  transition: background-size 0.2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { background-size: 100% 2px; }

.dial { padding-inline: 0.7em 0.9em; font-size: 1.05rem; }
.dial svg { width: 22px; height: 22px; }
/* both words share one cell, so the chip keeps its width when the night falls */
.dial__label { display: inline-grid; }
.dial__label > span { grid-area: 1 / 1; text-align: center; }
.dial__moon { display: none; }
.dial__night { visibility: hidden; }
html.no-js .dial { display: none; }
:root[data-theme="night"] .dial__sun { display: none; }
:root[data-theme="night"] .dial__moon { display: inline; }
:root[data-theme="night"] .dial__day { visibility: hidden; }
:root[data-theme="night"] .dial__night { visibility: visible; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) .dial__sun { display: none; }
  :root:not([data-theme="day"]) .dial__moon { display: inline; }
  :root:not([data-theme="day"]) .dial__day { visibility: hidden; }
  :root:not([data-theme="day"]) .dial__night { visibility: visible; }
}

@media (max-width: 600px) {
  .masthead__row { row-gap: 2px; }
  .nav { order: 3; width: 100%; }
  .nav ul { gap: 0 16px; }
  .nav a { font-size: 1.1rem; }
  .brand { font-size: 1.5rem; }
}

/* ---------- hero ---------- */

/* The hero is sized by the screen's height too, so the town's street (where people walk) shows
   above the fold on laptops; the picture's top band is empty sky and slides under the text. */
.hero { position: relative; padding-top: clamp(14px, 3vh, 40px); }
.hero__text { text-align: center; position: relative; z-index: 2; }
.eyebrow {
  display: inline-block;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 0.3em;
}
.hero h1 {
  font-size: clamp(4.2rem, min(3rem + 9vw, 15vh), 10rem);
  line-height: 0.95;
  margin: 0 0 0.2em;
  letter-spacing: 0.005em;
}
.hero__lede {
  text-wrap: balance;
  font-size: clamp(1.7rem, min(1.25rem + 1.8vw, 4.6vh), 2.6rem);
  line-height: 1.15;
  max-width: 30ch;
  margin: 0 auto 0.7em;
}
/* short laptop screens: the tagline on one line, and on the shortest the eyebrow goes */
@media (min-width: 1100px) and (max-height: 760px) {
  .hero__break { display: none; }
  .hero__lede { max-width: none; }
}
@media (min-width: 700px) and (max-height: 680px) { .hero .eyebrow { display: none; } }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; }
.hero__note { margin: 0; font-size: 1.25rem; max-width: 24ch; text-align: left; line-height: 1.3; }
@media (max-width: 520px) { .hero__note { text-align: center; } }

.panorama { position: relative; margin-top: clamp(-110px, -5vw, -10px); }
@media (max-width: 640px) { .panorama { margin-top: -9vw; } }
.panorama img { width: 100%; }
.panorama__night { display: none; }
:root[data-theme="night"] .panorama__day { display: none; }
:root[data-theme="night"] .panorama__night { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) .panorama__day { display: none; }
  :root:not([data-theme="day"]) .panorama__night { display: block; }
}
/* the moving town: a loop the game rendered from the picture's own view, faded in over it */
.panorama__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}
.panorama__video.is-on { opacity: 1; transition: opacity 0.4s ease; }
.panorama__pause {
  position: absolute; left: var(--gutter); bottom: 10px;
  min-height: 44px; padding: 0.15em 0.85em; font-size: 0.95rem;
}
.panorama__caption {
  position: absolute; right: var(--gutter); bottom: 10px;
  margin: 0; padding: 2px 10px;
  font-size: 0.95rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px;
  opacity: 0.85;
}

/* ---------- sections ---------- */

.section { padding-block: clamp(56px, 8vw, 110px); position: relative; }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section__head { max-width: 760px; margin-bottom: clamp(26px, 4vw, 48px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section h2 { font-size: clamp(2.4rem, 1.7rem + 3vw, 4rem); }
.section h3 { font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.3rem); }
.lede { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); line-height: 1.38; }
.muted { color: var(--ink-soft); }

/* the home page: headings and one short line per section, big and heavy (the hand font has one
   weight, so a stroke in the ink colour thickens it); the longer prose stays, small and grey */
h1, h2, h3, .punch, .hero__lede, .hero__note, .promise li, .powers__name { -webkit-text-stroke: 0.03em currentColor; }
.hero h1, .page-head h1, .lost h1 { -webkit-text-stroke-width: 0.022em; }
.punch {
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem);
  line-height: 1.08;
  text-wrap: balance;
  margin: 0 0 0.45em;
}
.punch--sm { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem); }
.section__head--center .punch { margin-inline: auto; }
.more { font-size: 1.05rem; line-height: 1.42; color: var(--ink-soft); }
p.more, .more p { max-width: 60ch; margin-bottom: 0.7em; }
.section__head--center p.more { margin-inline: auto; }

/* a hand-drawn rule under a heading: an SVG line used as a mask, so it takes the ink colour */
.scribble {
  display: block;
  width: min(240px, 60%);
  height: 14px;
  margin: -0.15em 0 0.6em;
  background: var(--ink);
  -webkit-mask: url("/assets/img/ui/scribble.svg") no-repeat center / 100% 100%;
  mask: url("/assets/img/ui/scribble.svg") no-repeat center / 100% 100%;
}
.section__head--center .scribble { margin-inline: auto; }

.rule {
  height: 18px;
  background: var(--ink);
  opacity: 0.85;
  -webkit-mask: url("/assets/img/ui/rule.svg") repeat-x center / 600px 18px;
  mask: url("/assets/img/ui/rule.svg") repeat-x center / 600px 18px;
}

/* ---------- photos: real renders taped to the page ---------- */

.photo {
  position: relative;
  margin: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px 6px 9px 7px / 7px 9px 6px 8px;
  box-shadow: 3px 4px 0 var(--ink);
  transform: rotate(var(--tilt, 0deg));
}
.photo img { width: 100%; border-radius: 6px 4px 7px 5px; background: #f6f6f6; }
.photo::before {
  content: "";
  position: absolute;
  top: -12px; left: var(--tape-x, 22px); right: var(--tape-right, auto);
  width: 78px; height: 24px;
  background: var(--tape);
  transform: rotate(var(--tape-r, -4deg));
  z-index: 2;
}
.photo--plain::before { display: none; }
.photo figcaption, .caption {
  padding: 10px 14px 12px;
  font-size: 1.12rem;
  line-height: 1.3;
  border-top: 2px solid var(--ink);
}
.caption__when { display: block; font-size: 1rem; color: var(--ink-soft); }

.grid { display: grid; gap: clamp(26px, 3.4vw, 44px); align-items: start; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--2 .photo img { aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- the living town ---------- */

.lifelist {
  list-style: none; margin: 0 0 0.6em; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 6px 28px;
}
.lifelist li { position: relative; padding-left: 30px; }
.lifelist li::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 16px; height: 16px;
  background: var(--ink);
  -webkit-mask: url("/assets/img/ui/tick.svg") no-repeat center / contain;
  mask: url("/assets/img/ui/tick.svg") no-repeat center / contain;
}

/* the struck house, hour by hour */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 10px; }
.strip .photo::before { display: none; }
@media (max-width: 860px) { .strip figcaption { font-size: 1rem; padding: 8px 10px 9px; } }
@media (max-width: 640px) { .strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .strip { gap: 10px; } .strip figcaption { font-size: 1rem; padding: 8px 9px 9px; } }

/* one stone's journey: five steps in a row; 3 + 2 on tablets, 2 + 2 + 1 on phones (the last centred) */
.journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: step; }
.journey li { display: flex; }
.journey .photo { flex: 1; }
.journey .photo::before { display: none; }
.journey figcaption { font-size: 1.02rem; }
@media (max-width: 960px) {
  .journey { grid-template-columns: repeat(6, 1fr); }
  .journey li { grid-column: span 2; }
  .journey li:nth-child(4) { grid-column: 2 / span 2; }
  .journey li:nth-child(5) { grid-column: 4 / span 2; }
}
@media (max-width: 620px) {
  .journey { grid-template-columns: repeat(2, 1fr); }
  .journey li, .journey li:nth-child(4), .journey li:nth-child(5) { grid-column: auto; }
  .journey li:last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
}

.quote-line {
  margin: 22px 0 0;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--ink);
  font-size: 1.15rem;
}

/* ---------- the three tools ---------- */

.tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding-block: clamp(28px, 4vw, 56px);
}
.tool + .tool { border-top: 0; }
.tool--flip .tool__shots { order: -1; }
.tool--intro { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); padding-top: 0; margin-bottom: clamp(30px, 4vw, 56px); align-items: start; }
.tool--lead { padding-top: 0; align-items: start; }
.tool--intro .lifelist { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.tool__title { display: flex; align-items: center; gap: 14px; }
.tool__badge {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; flex: none;
  border: 2px solid var(--ink); border-radius: 16px 14px 17px 15px;
  box-shadow: var(--shadow);
  background: var(--paper);
}
.tool__badge svg { width: 36px; height: 36px; }
.tool--break .tool__badge { background: var(--ink); color: var(--paper); box-shadow: 2px 3px 0 var(--shade); }
.tool__shots { display: flex; justify-content: center; align-items: flex-start; gap: clamp(14px, 2.5vw, 28px); }
.tool__shots .phone:nth-child(2) { margin-top: 64px; }
.tool--flip > .photo { order: -1; }
@media (max-width: 700px) {
  .tool, .tool--intro { grid-template-columns: 1fr; }
  .tool--flip .tool__shots, .tool--flip > .photo { order: 0; }
}

.powers { list-style: none; padding: 0; margin: 0.4em 0 0.8em; display: grid; gap: 10px; }
.powers li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; }
.powers__name { display: block; font-size: 1.45rem; line-height: 1.1; }
.powers__what { display: block; font-size: 1rem; line-height: 1.35; color: var(--ink-soft); }
.powers__icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 2px solid var(--ink); border-radius: 12px 10px 13px 11px; box-shadow: var(--shadow);
}
.powers__icon svg { width: 26px; height: 26px; }
.powers__icon--text { font-size: 1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; padding: 0; margin: 0.4em 0 0.9em; max-width: 30em; }
.tags li {
  padding: 2px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px 900px 950px 980px;
  font-size: 1.05rem;
}

/* a phone drawn by hand around a real screenshot */
.phone {
  position: relative;
  width: min(100%, 290px);
  margin: 0;
  padding: 8px;
  border: 3px solid var(--ink);
  border-radius: 40px 38px 41px 39px / 39px 41px 38px 40px;
  background: var(--paper);
  box-shadow: 4px 5px 0 var(--ink);
  transform: rotate(var(--tilt, 0deg));
}
.phone img { width: 100%; border-radius: 31px 29px 32px 30px; background: #f6f6f6; }
.phone figcaption { text-align: center; padding: 10px 6px 2px; font-size: 1.02rem; line-height: 1.25; }
.tool__shots .phone { flex: 1 1 0; max-width: 270px; }
@media (max-width: 600px) { .tool__shots .phone:only-child { max-width: 220px; } }

/* ---------- night ---------- */

.night {
  background: #090909;
  color: #e3e3e3;
  --ink: #e3e3e3; --ink-soft: #b9b9b9; --paper: #090909; --shade: #707070; --tape: rgba(120,120,120,.45);
}
:root[data-theme="night"] .night {
  background: #f6f6f6; color: #1c1c1c;
  --ink: #1c1c1c; --ink-soft: #4a4a4a; --paper: #f6f6f6; --shade: #8f8f8f; --tape: rgba(150,150,150,.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) .night {
    background: #f6f6f6; color: #1c1c1c;
    --ink: #1c1c1c; --ink-soft: #4a4a4a; --paper: #f6f6f6; --shade: #8f8f8f; --tape: rgba(150,150,150,.5);
  }
}
.night .rule { margin-bottom: 0; }

.compare {
  position: relative;
  --pos: 50%;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 10px 8px 11px 9px;
  box-shadow: 3px 4px 0 var(--ink);
  background: #090909;
  touch-action: pan-y;
}
.compare img { width: 100%; }
.compare__night { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--pos)); }
.compare__line {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 3px; margin-left: -1.5px;
  background: #e3e3e3;
  box-shadow: 0 0 0 1.5px #1c1c1c;
  pointer-events: none;
}
.compare__knob {
  position: absolute; top: 50%; left: var(--pos);
  width: 52px; height: 52px; margin: -26px 0 0 -26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #f6f6f6; color: #1c1c1c;
  border: 2px solid #1c1c1c;
  box-shadow: 2px 3px 0 #1c1c1c;
  pointer-events: none;
}
.compare__knob svg { width: 26px; height: 26px; }
.compare__range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare:has(.compare__range:focus-visible) { outline: 3px solid var(--ink); outline-offset: 5px; }
.photo > .compare { border: 0; box-shadow: none; border-radius: 6px 4px 0 0; }
.compare__labels { display: flex; justify-content: space-between; font-size: 1.05rem; margin-top: 10px; }

/* ---------- the shop ---------- */

.shop { display: grid; grid-template-columns: 1fr; gap: clamp(22px, 3vw, 36px); }
@media (min-width: 700px) {
  .shop { grid-template-columns: 1fr 1fr; grid-template-areas: "free wrath" "good wrath"; align-items: stretch; }
  .card--free { grid-area: free; }
  .card--wrath { grid-area: wrath; }
  .card--good { grid-area: good; }
}
@media (min-width: 1140px) { .shop { grid-template-columns: repeat(3, 1fr); grid-template-areas: "free wrath good"; } }
.shop .card { display: flex; flex-direction: column; }
.shop .card > .fine:last-child { margin-top: auto; padding-top: 0.6em; }
.card {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 3px 4px 0 var(--ink);
  background: var(--paper);
  padding: clamp(18px, 2.4vw, 26px);
}
.card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.8rem; margin-bottom: 0.3em; }
.card h3 svg { width: 28px; height: 28px; }
.free { list-style: none; padding: 0; margin: 0 0 0.6em; display: grid; gap: 8px; }
.free li { display: flex; align-items: flex-start; gap: 10px; }
.free svg { width: 22px; height: 22px; flex: none; margin-top: 0.15em; }

.meter { margin: 0.6em 0 0.4em; }
.meter__bar {
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 12px 11px 12px 10px;
  overflow: hidden;
  position: relative;
}
.meter__fill {
  position: absolute; inset: 0 40% 0 0;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 2px, transparent 2px 6px);
  border-right: 2px solid var(--ink);
}
.meter__label { display: flex; justify-content: space-between; font-size: 1.02rem; color: var(--ink-soft); margin-top: 4px; }

.costs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0.5em 0 0.8em; }
.costs li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px 2px 8px;
  border: 1.5px solid var(--ink); border-radius: 10px 9px 11px 9px;
  font-size: 1.05rem;
}
.costs svg { width: 18px; height: 18px; }
.costs li.costs__break { flex-basis: 100%; height: 0; padding: 0; border: 0; margin: 0; }

.items { list-style: none; padding: 0; margin: 0.4em 0 0; display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px 10px 13px 11px / 11px 13px 10px 12px;
}
.item svg { width: 26px; height: 26px; }
.item__name { display: block; font-size: 1.25rem; line-height: 1.1; }
.item__what { display: block; font-size: 1rem; color: var(--ink-soft); line-height: 1.2; }
.price {
  padding: 4px 12px;
  border-radius: 10px 9px 11px 10px;
  background: var(--ink); color: var(--paper);
  font-size: 1.2rem;
  white-space: nowrap;
}
@media (max-width: 360px) {
  .item { grid-template-columns: 1fr auto; gap: 10px; }
  .item > svg { display: none; }
  .card { padding: 14px; }
}
.label { font-size: 1.05rem; color: var(--ink-soft); margin: 1em 0 0.2em; }
.fine { font-size: 1rem; color: var(--ink-soft); line-height: 1.35; }

.promise { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; list-style: none; padding: 0; margin: clamp(30px, 4vw, 48px) 0 0; }
.promise li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 12px;
  border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem);
}
.promise svg { width: 0.9em; height: 0.9em; }
.promise li { white-space: nowrap; }
@media (max-width: 520px) { .promise li { font-size: 1.15rem; padding: 5px 12px 5px 10px; } }
@media (max-width: 360px) { .promise { gap: 10px; } .promise li { font-size: 1.05rem; } }

/* ---------- final call ---------- */

.finale { text-align: center; }
.finale h2 { margin-bottom: 0.25em; }
.finale p.more { margin-inline: auto; }
.finale .cta { margin-top: 0.6em; }
.finale__icon { width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 26px; border: 3px solid var(--ink); box-shadow: 4px 5px 0 var(--ink); overflow: hidden; }
.finale__icon img { width: 100%; height: 100%; }

/* ---------- footer and the town strip ---------- */

.footer { margin-top: clamp(10px, 2vw, 24px); }
.townstrip { position: relative; color: var(--ink); }
.townstrip svg { width: 100%; height: max(150px, 9.375vw); overflow: hidden; }
.townstrip__pause { min-height: 44px; padding: 0.15em 0.85em; font-size: 0.95rem; align-self: center; }
.footer__body { padding: 26px 0 40px; border-top: 0; }
.footer__row { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline; justify-content: space-between; }
.footer__brand { font-size: 1.6rem; margin: 0 auto 0 0; }
.footer nav ul { display: flex; gap: 4px 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer nav a { display: inline-flex; min-height: 44px; align-items: center; }
.footer nav a[aria-current="page"] { text-decoration-thickness: 3.5px; }
.footer__fine { flex-basis: 100%; font-size: 1rem; color: var(--ink-soft); margin: 0.6em 0 0; line-height: 1.38; }
.footer__fine span { display: block; max-width: 62ch; margin-bottom: 0.3em; }

/* the walking townsfolk (pure decoration; paused by the button, still with reduced motion) */
.ts-ground { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.ts-hatch { stroke: currentColor; stroke-width: 1.2; opacity: 0.45; }
.ts-fig { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.ts-fig .head { fill: currentColor; stroke: none; }
.ts-fig .solid { fill: currentColor; }
.ts-thin { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.limb { transform-box: fill-box; transform-origin: 50% 0; }
.walker { animation: ts-cross var(--dur, 40s) linear infinite; animation-delay: var(--delay, 0s); }
.walker--left { animation-name: ts-cross-left; }
.leg-a { animation: ts-stride 0.5s ease-in-out infinite alternate; }
.leg-b { animation: ts-stride 0.5s ease-in-out infinite alternate-reverse; }
.arm-a { animation: ts-swing 0.5s ease-in-out infinite alternate-reverse; }
.arm-b { animation: ts-swing 0.5s ease-in-out infinite alternate; }
.small .leg-a, .small .leg-b, .small .arm-a, .small .arm-b { animation-duration: 0.36s; }
.digger-arm { transform-box: fill-box; transform-origin: 50% 0; animation: ts-dig 1.3s cubic-bezier(.5,0,.75,.2) infinite; }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: ts-flicker 0.32s ease-in-out infinite alternate; }
.chip-stone { opacity: 0; animation: ts-chip 1.3s ease-out infinite; }
.chip-stone--b { animation-delay: 0.05s; }
.bird { animation: ts-flap 0.9s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 50%; }
.flock { animation: ts-drift 70s linear infinite; }
.ts-night { opacity: 0; transition: opacity 0.4s ease; }
.ts-day { transition: opacity 0.4s ease; }
:root[data-theme="night"] .ts-night { opacity: 1; }
:root[data-theme="night"] .ts-day { opacity: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) .ts-night { opacity: 1; }
  :root:not([data-theme="day"]) .ts-day { opacity: 0; }
}
.townstrip.is-paused * { animation-play-state: paused !important; }

@keyframes ts-cross { from { transform: translateX(-80px); } to { transform: translateX(1680px); } }
@keyframes ts-cross-left { from { transform: translateX(1680px); } to { transform: translateX(-80px); } }
@keyframes ts-stride { from { transform: rotate(24deg); } to { transform: rotate(-24deg); } }
@keyframes ts-swing { from { transform: rotate(20deg); } to { transform: rotate(-20deg); } }
@keyframes ts-dig {
  0% { transform: rotate(-150deg); }
  55% { transform: rotate(-160deg); }
  78% { transform: rotate(-35deg); }
  100% { transform: rotate(-150deg); }
}
@keyframes ts-chip {
  0%, 74% { opacity: 0; transform: translate(0, 0); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--cx, 14px), -18px); }
}
@keyframes ts-flicker { from { transform: scale(0.92, 0.84) skewX(-4deg); } to { transform: scale(1.04, 1.08) skewX(4deg); } }
@keyframes ts-flap { from { transform: scaleY(1); } to { transform: scaleY(0.4); } }
@keyframes ts-drift { from { transform: translateX(-200px); } to { transform: translateX(1800px); } }

/* ---------- prose pages (privacy, support) ---------- */

.page-head { padding: clamp(30px, 6vw, 70px) 0 clamp(10px, 2vw, 20px); }
.page-head h1 { font-size: clamp(3rem, 2rem + 5vw, 5.4rem); margin-bottom: 0.25em; display: inline-block; }
.page-head h1 .scribble { width: 100%; margin: 0.06em 0 0; }
.prose { padding-bottom: clamp(30px, 5vw, 60px); }
.prose h2 { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem); margin-top: 1.4em; }
.prose h3 { font-size: 1.5rem; margin-top: 1.2em; margin-bottom: 0.25em; }
.prose > p, .contact p, .faq details > div p { max-width: 64ch; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { content: "~  "; }
.summary {
  margin: 0.4em 0 1.6em;
  padding: clamp(16px, 2.4vw, 24px) clamp(18px, 2.6vw, 28px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 3px 4px 0 var(--ink);
}
.summary p:last-child { margin-bottom: 0; }
.summary ul { margin: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; padding: 0; margin: 0 0 1em; }
.toc li::marker { content: none; }
.toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: 1.05rem; }
.toc a:hover { background: var(--ink); color: var(--paper); }

.faq { display: grid; gap: 14px; margin: 0.4em 0 1.4em; }
.faq details {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 3px 4px 0 var(--ink);
  background: var(--paper);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 56px;
  padding: 10px var(--card-pad);
  font-size: 1.35rem; line-height: 1.2;
}
.faq summary:focus-visible { outline: none; }
.faq details:has(> summary:focus-visible) { outline: 3px solid var(--ink); outline-offset: 4px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none;
  width: 32px; height: 32px;
  border: 2px solid var(--ink); border-radius: 50%;
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 14px 2.5px, 2.5px 14px;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-color 0.15s ease;
}
.faq details[open] summary::after { background-size: 14px 2.5px, 0 0; }
.faq summary:hover::after { background-color: var(--wash); }
.faq details > div { padding: 12px var(--card-pad) var(--card-pad); border-top: 2px dashed var(--shade); }
.faq details > div p:last-child { margin-bottom: 0; }

.contact {
  display: grid; gap: 6px;
  padding: var(--card-pad);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 3px 4px 0 var(--ink);
}
.contact__mail { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); word-break: break-word; }
.contact__mail svg { width: 30px; height: 30px; flex: none; }

/* ---------- 404 ---------- */

.lost { text-align: center; padding: clamp(30px, 6vw, 70px) 0 clamp(40px, 8vw, 80px); }
.lost h1 { font-size: clamp(3rem, 2rem + 5vw, 5.4rem); margin-bottom: 0.15em; }
.lost__art { width: min(100%, 520px); margin: 0 auto 10px; color: var(--ink); }
.lost .chip { margin-top: 0.4em; }

/* ---------- the night falls (theme change) ---------- */

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: kd-ink 0.75s cubic-bezier(0.65, 0, 0.35, 1); }
@keyframes kd-ink {
  from { clip-path: circle(0 at var(--vt-x, 90%) var(--vt-y, 30px)); }
  to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 90%) var(--vt-y, 30px)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .walker { animation: none !important; transform: translateX(var(--x, 400px)); }
  .flock { animation: none !important; transform: translateX(300px); }
  .digger-arm { animation: none !important; transform: rotate(-150deg); }
  .chip-stone { animation: none !important; }
  .chip:hover, a.cta:hover { transform: none; }
  .townstrip__pause { display: none; }
  .panorama__video, .panorama__pause { display: none; }
}

@media print {
  .masthead nav, .dial, .townstrip, .skip { display: none !important; }
  body { background: #fff; color: #000; }
}
