:root {
  color-scheme: dark;
  --night: #111a24;
  --night-soft: #172330;
  --panel: #1c2a36;
  --panel-raised: #233440;
  --ink: #f0eadc;
  --muted: #b6b5aa;
  --gold: #d9b677;
  --gold-light: #f1dfb8;
  --teal: #91b1a7;
  --line: rgba(235, 222, 194, .17);
  --danger: #e2a99c;
  --success: #a7cfb6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background: var(--night);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 82% 0, rgba(62, 92, 91, .2), transparent 34rem),
    linear-gradient(160deg, #121c27 0%, #111a24 55%, #17232c 100%);
}

button,
select,
textarea {
  font: inherit;
}

button {
  min-height: 48px;
  border: 1px solid rgba(217, 182, 119, .55);
  border-radius: 12px;
  padding: 11px 17px;
  background: #d9b677;
  color: #17212a;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:hover:not(:disabled) {
  background: #ebcb91;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #f3d9a5;
  outline-offset: 3px;
}

button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

a {
  color: var(--gold-light);
}

.boot-screen,
.fatal-screen {
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 15vh 25px 50px;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

.quiet-button {
  min-height: 44px;
  padding: 8px 13px;
  border-color: var(--line);
  background: rgba(255, 255, 255, .035);
  color: var(--ink);
}

.quiet-button:hover:not(:disabled) {
  background: var(--panel-raised);
}

.status-strip {
  min-height: 35px;
  padding: 6px 20px;
  border-bottom: 1px solid rgba(235, 222, 194, .08);
  color: var(--muted);
  text-align: center;
  font-size: .78rem;
  letter-spacing: .025em;
}

.status-strip.is-warning {
  color: var(--gold-light);
}

.landing,
.case-layout,
.unavailable,
.site-footer {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.landing {
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.landing-hero {
  min-height: calc(100vh - 24px);
  min-height: calc(100svh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
  display: flex;
  align-items: flex-end;
  padding: 35px 32px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 182, 119, .23);
  border-radius: 24px;
  background: #162a32;
}

.hero-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 17, 29, .68), transparent 75%),
    linear-gradient(0deg, rgba(8, 17, 29, .88), transparent 68%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.15;
}

h1 {
  max-width: 700px;
  margin: 0 0 18px;
  color: var(--gold-light);
  font-size: 3.6rem;
  letter-spacing: -.035em;
}

.hero-copy p {
  max-width: 610px;
  margin: 0;
  color: #e2e0d6;
  font-size: 1.18rem;
}

.cover-mode {
  margin-top: 24px;
}

.cover-start {
  margin-top: 24px;
  min-width: 200px;
}

.cover-controls {
  position: fixed;
  z-index: 3;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
}

.reader-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #1c2a36;
}

.cover-controls .reader-menu-button {
  width: 44px;
}

.settings-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(320px, calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 24px));
  max-height: min(70vh, calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 70px));
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #1c2a36;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.settings-home {
  width: 100%;
  margin-bottom: 16px;
}

.settings-panel p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: .85rem;
}

.settings-panel nav {
  margin-top: 16px;
}

.settings-panel .language-option {
  min-height: 44px;
}

.settings-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chapter-tab {
  flex: 0 0 auto;
  min-height: 46px;
  border-color: var(--line);
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
}

.chapter-tab.is-active {
  border-color: rgba(217, 182, 119, .7);
  background: rgba(217, 182, 119, .14);
  color: var(--gold-light);
}

.tab-read {
  color: var(--teal);
  font-size: .78rem;
  font-weight: 500;
}

.case-layout {
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 32px max(12px, env(safe-area-inset-left));
}

.story-column {
  min-width: 0;
}

.story-card {
  max-width: none;
  margin: 0 auto;
  padding: 20px 26px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(23, 35, 48, .82);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .13);
}

.book-page {
  min-width: 0;
  outline: none;
}

.book-illustration .story-scene {
  margin: 0 0 28px;
}

.story-content {
  min-width: 0;
}

.page-navigation {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.page-navigation > .page-indicator {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
  line-height: 1.3;
}

.page-navigation .settings-panel {
  z-index: 3;
  top: auto;
  right: 0;
  bottom: calc(100% + 6px);
  width: min(320px, 100%);
}

.story-card .page-locked {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .9rem;
  text-align: right;
}

@media (min-width: 900px) and (orientation: landscape) {
  .book-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
  }

  .book-illustration {
    position: sticky;
    top: max(20px, env(safe-area-inset-top));
    min-height: min(65vh, 500px);
    display: flex;
    align-items: center;
  }

  .book-illustration .story-scene {
    width: 100%;
    margin: 0;
  }

  .book-page.is-interactive {
    display: block;
  }

  .book-page.is-interactive .book-illustration {
    position: static;
    display: block;
    min-height: 0;
    max-width: 480px;
  }

  .book-page.is-interactive .story-scene {
    margin-bottom: 28px;
  }

}

.story-card > h1,
.story-card h2:first-child {
  margin-top: 0;
}

.story-card h1 {
  margin-bottom: 26px;
  color: var(--gold-light);
  font-size: 2rem;
}

.story-card h2 {
  margin: 31px 0 13px;
  color: var(--gold-light);
  font-size: 1.55rem;
}

.story-card h3 {
  margin: 31px 0 13px;
  color: var(--gold-light);
  font-size: 1.32rem;
}

.story-card p {
  margin: 0 0 1.05em;
  color: #e2e1d9;
}

.story-scene {
  margin: 28px -16px 30px;
  overflow: hidden;
  border: 1px solid rgba(217, 182, 119, .25);
  border-radius: 12px;
  background: #101e2b;
}

.story-scene img {
  display: block;
  width: 100%;
  height: auto;
}

.exhibition-sign {
  width: 100%;
  max-width: 390px;
  margin: 22px auto 26px;
}

.exhibition-sign img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(217, 182, 119, .25);
  border-radius: 8px;
}

.story-card em {
  color: #cfcec3;
}

.story-card strong {
  color: var(--gold-light);
  font-weight: 700;
}

.message-thread {
  max-width: 360px;
  margin: 22px auto 26px;
  overflow: hidden;
  border: 1px solid rgba(217, 182, 119, .25);
  border-radius: 16px;
  background: #101113;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.message-header {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 12px 40px 10px;
  border-bottom: 1px solid #343438;
  background: #1c1c1e;
}

.message-back {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #58a6ff;
  font-size: 32px;
  line-height: 1;
}

.message-contact {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #f5f5f7;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.message-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(#a2a3a8, #62646a);
  color: white;
  font-size: .86rem;
  font-weight: 500;
}

.message-body {
  padding: 14px 14px 18px;
}

.message-time {
  display: block;
  margin-bottom: 12px;
  color: #b2b2b7;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
}

.story-card .message-bubble {
  width: fit-content;
  max-width: 90%;
  margin: 0;
  padding: 9px 13px;
  border-radius: 18px 18px 18px 5px;
  background: #3a3a3c;
  color: #fff;
  font-size: .95rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.story-card blockquote {
  margin: 18px 0 24px;
  padding: 17px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(13, 21, 29, .62);
  color: #e9e3d5;
}

.story-card blockquote p {
  margin: 0 0 .45em;
  color: inherit;
}

.story-card blockquote p:last-child {
  margin-bottom: 0;
}

.story-card blockquote.handwritten-letter {
  max-width: 470px;
  margin: 28px auto 32px;
  padding: clamp(26px, 7vw, 42px);
  border: 1px solid #d5c39c;
  border-radius: 3px 6px 4px 5px / 5px 3px 6px 4px;
  background:
    repeating-linear-gradient(5deg, rgba(113, 81, 41, .025) 0, transparent 1px, transparent 5px),
    radial-gradient(ellipse at 18% 12%, rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(135deg, #f8efd9, #eee1c2);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .22);
  color: #493328;
  font-family: "Bradley Hand", "Segoe Print", "Chalkboard SE", "Comic Sans MS", cursive;
  font-size: 1.08rem;
  line-height: 1.75;
}

.story-card .handwritten-letter p {
  margin-bottom: 1.2em;
}

.story-card .handwritten-letter p:last-child {
  margin-top: 1.5em;
}

.story-card .handwritten-letter em {
  color: inherit;
  font-style: normal;
}

.story-card blockquote.artwork-label {
  position: relative;
  width: 100%;
  max-width: 470px;
  margin: 24px auto 28px;
  padding: 28px 32px;
  border: 1px solid #ad8d5d;
  border-radius: 3px;
  background:
    radial-gradient(circle at 12px 12px, #bba178 1px, transparent 2px),
    radial-gradient(circle at calc(100% - 12px) 12px, #bba178 1px, transparent 2px),
    radial-gradient(circle at 12px calc(100% - 12px), #bba178 1px, transparent 2px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), #bba178 1px, transparent 2px),
    repeating-linear-gradient(175deg, rgba(255, 255, 255, .018) 0, transparent 1px, transparent 4px),
    linear-gradient(135deg, #30363a, #171f25 55%, #2a3031);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25), inset 0 0 0 4px #202629, inset 0 0 0 5px rgba(190, 160, 111, .36);
  text-align: center;
}

.story-card .artwork-label p {
  margin: 0 0 9px;
  color: #e0d4bd;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .94rem;
  line-height: 1.5;
}

.story-card .artwork-label p:first-child {
  margin-bottom: 13px;
  font-size: 1.25rem;
  letter-spacing: .12em;
}

.story-card .artwork-label strong {
  font-weight: 500;
}

.story-card .artwork-label p:last-child {
  margin-bottom: 0;
  color: #c5b9a2;
  font-size: .83rem;
}

.story-card hr {
  height: 1px;
  margin: 34px 0;
  border: 0;
  background: var(--line);
}

.unavailable {
  padding: 0 26px 52px;
}

.unavailable-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 19px 22px;
  border: 1px dashed rgba(217, 182, 119, .35);
  border-radius: 15px;
  color: var(--muted);
  font-size: .92rem;
  text-align: center;
}

.site-footer {
  padding: 14px 26px 30px;
  border-top: 1px solid rgba(235, 222, 194, .08);
  color: #969b97;
  font-size: .8rem;
  text-align: center;
}

.evidence-panel,
.interaction-panel {
  margin: 24px 0 29px;
  padding: 20px;
  border: 1px solid rgba(217, 182, 119, .25);
  border-radius: 17px;
  background: rgba(12, 20, 28, .58);
}

.evidence-panel h3,
.interaction-panel h3 {
  margin: 0 0 8px;
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.panel-intro {
  margin: 0 0 16px !important;
  color: var(--muted) !important;
  font-size: .92rem;
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.object-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}

.object-card .object-inspect {
  width: 100%;
  padding: 0 0 14px;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.object-card .object-inspect:hover {
  background: rgba(217, 182, 119, .07);
}

.object-card .object-inspect:focus-visible {
  outline-offset: -3px;
}

.object-art {
  display: block;
  background: radial-gradient(ellipse at center, #31474a, #172830 75%);
  border-bottom: 1px solid var(--line);
}

.object-art svg {
  display: block;
  width: 100%;
  height: 125px;
}

.object-title,
.object-action {
  display: block;
  margin: 12px 14px 0;
}

.object-title {
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.07rem;
  font-weight: 500;
}

.object-action {
  margin-top: 4px;
  color: var(--teal);
  font-size: .78rem;
  letter-spacing: .03em;
}

.object-card p {
  margin: 0 0 14px;
  color: #d1d1c9;
  font-size: .88rem;
  line-height: 1.5;
}

.object-card.is-inspected {
  border-color: rgba(145, 177, 167, .6);
}

.object-detail {
  padding: 0 14px 5px;
}

.small-label {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.evidence-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 15px auto 13px;
  border: 1px solid rgba(217, 182, 119, .25);
  border-radius: 13px;
  background: #14242c;
}

.zoom-button {
  display: block;
  min-height: 43px;
  margin: 0 auto 12px;
  font-size: .88rem;
}

.image-zoom {
  position: fixed;
  z-index: 9;
  inset: 0;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 12, .92);
}

.image-zoom-content {
  width: 100%;
  max-width: 1000px;
}

.image-zoom-header {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.image-zoom-header p {
  margin: 0;
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.image-zoom img {
  display: block;
  width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border: 1px solid rgba(217, 182, 119, .4);
  border-radius: 12px;
  object-fit: contain;
}

.petal-comparison {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.petal-comparison figure {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.petal-comparison figcaption {
  margin-bottom: 8px;
  color: var(--gold-light);
  font-size: .9rem;
}

.petal-instructions {
  color: var(--muted);
  font-size: .88rem;
}

.petal-surface {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #172a31;
  line-height: 0;
}

.petal-surface:disabled {
  opacity: 1;
}

.petal-surface:not(:disabled) { cursor: crosshair; }

.petal-surface > svg {
  display: block;
  width: 100%;
  height: auto;
}

.petal-cursor {
  display: none;
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid #fff3cc;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #172a31;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.petal-surface:focus-visible .petal-cursor {
  display: block;
}

.petal-comparison .zoom-button {
  margin-top: 10px;
}

.petal-zoom {
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.petal-zoom .image-zoom-content {
  width: min(100%, 900px);
  max-height: 100%;
  overflow-y: auto;
}

.petal-detail-scroll {
  margin-top: 8px;
  overflow: auto;
  max-height: 70dvh;
}

.petal-detail-scroll .petal-surface {
  width: max(100%, 660px);
}

@media (min-width: 768px) {
  .petal-comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.night-shift-image {
  max-width: 570px;
}

.story-card .inspection-prompt {
  margin: 8px 0;
  color: var(--gold-light);
  text-align: center;
  font-size: .9rem;
}

.text-inspection {
  max-width: 570px;
  margin: 12px auto;
  color: var(--muted);
  font-size: .88rem;
}

.text-inspection summary {
  min-height: 44px;
  padding: 8px 0;
  color: var(--gold-light);
  cursor: pointer;
}

.text-inspection summary:focus-visible {
  outline: 3px solid #f3d9a5;
  outline-offset: 3px;
}

.image-caption {
  margin: 0 0 15px !important;
  color: var(--muted) !important;
  font-size: .83rem;
  text-align: center;
}

.choice-list {
  display: grid;
  gap: 9px;
  margin: 14px 0;
}

.choice-button {
  width: 100%;
  min-height: 56px;
  padding: 12px 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  background: rgba(35, 52, 64, .75);
  color: var(--ink);
  text-align: left;
  font-weight: 500;
}

.choice-button:hover:not(:disabled) {
  border-color: rgba(217, 182, 119, .6);
  background: var(--panel-raised);
}

.later-evidence .choice-button[aria-pressed="true"] {
  border-color: var(--teal);
  background: rgba(145, 177, 167, .22);
}

.later-evidence .choice-button[aria-pressed="true"]::before {
  content: "✓";
  color: var(--teal);
}

.choice-letter {
  min-width: 25px;
  color: var(--gold);
  font-weight: 700;
}

.feedback {
  min-height: 27px;
  margin: 10px 0 0 !important;
  color: var(--muted) !important;
  font-size: .9rem;
}

.feedback.is-success {
  color: var(--success) !important;
}

.feedback.is-retry {
  color: var(--gold-light) !important;
}

.hint-row {
  margin-top: 13px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hint-button {
  min-height: 43px;
  padding: 8px 12px;
  border-color: var(--line);
  background: rgba(255, 255, 255, .035);
  color: var(--gold-light);
  font-size: .87rem;
}

.hint-text {
  margin: 12px 0 0 !important;
  padding: 12px 14px;
  border-left: 2px solid var(--gold);
  background: rgba(217, 182, 119, .08);
  color: #e5dfd1 !important;
  font-size: .9rem;
}

.inspection-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.report-row {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: rgba(35, 52, 64, .5);
  color: #e2e1d9;
  text-align: left;
  font-weight: 500;
}

.report-row span:last-child {
  color: var(--gold);
  white-space: nowrap;
}

.report-row-detail {
  margin: -3px 0 4px !important;
  padding: 12px 14px;
  border-radius: 0 0 10px 10px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted) !important;
  font-size: .87rem;
}

.sorting-board {
  display: grid;
  gap: 10px;
  margin: 15px 0;
}

.sort-row {
  padding: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(142px, .46fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(35, 52, 64, .48);
}

.sort-row label {
  color: #e3e1d9;
  font-size: .92rem;
}

select,
textarea {
  width: 100%;
  border: 1px solid rgba(217, 182, 119, .38);
  border-radius: 10px;
  padding: 11px 12px;
  background: #192833;
  color: var(--ink);
}

select {
  min-height: 48px;
}

.form-button-row {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.action-button {
  min-width: 145px;
}

.report-illustration {
  max-width: 440px;
}

.recipe-card {
  margin: 18px 0;
  padding: 19px;
  border: 1px solid rgba(195, 164, 112, .6);
  border-radius: 8px;
  background: linear-gradient(135deg, #eee1c6, #dfcfad);
  color: #34372f;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.recipe-card .small-label {
  color: #6b735d;
}

.recipe-card p {
  margin: 0 0 9px !important;
  color: #34372f !important;
}

.recipe-card.is-open {
  border-color: #e5c688;
}

.recipe-card-button {
  min-height: 43px;
  margin-top: 10px;
  border-color: #7f7058;
  background: #303e3c;
  color: #f2e7d0;
  font-size: .9rem;
}

.towel-illustration {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 12px auto;
}

.towel-flap {
  transform-box: view-box;
  transition: transform .7s ease;
}

.towel-flap-left {
  transform-origin: 145px 0;
}

.towel-flap-right {
  transform-origin: 275px 0;
}

/* Mirroring about each stitched guide is what a real inward fold does to the panel. */
.towel-illustration.is-folded .towel-flap {
  transform: scaleX(-1);
}

.flap-cloth {
  transition: fill-opacity .7s ease;
}

/* Thin linen: folded panels let the centre print show through. */
.towel-illustration.is-folded .flap-cloth {
  fill-opacity: .3;
}

.towel-illustration.is-folded .fold-guide {
  opacity: .15;
}

.fold-button-row {
  margin-top: 12px;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.fold-button-row button {
  min-height: 48px;
}

.record-button {
  border-color: rgba(145, 177, 167, .6);
  background: rgba(145, 177, 167, .17);
  color: #d1e4dc;
}

.record-button:hover:not(:disabled) {
  background: rgba(145, 177, 167, .27);
}

.reveal-copy {
  margin-top: 15px;
  padding: 14px 16px;
  border-left: 2px solid var(--gold);
  background: rgba(217, 182, 119, .08);
}

.reveal-copy p {
  margin: 0 0 8px !important;
}

.reveal-copy p:last-child {
  margin-bottom: 0 !important;
}

.chapter-finish {
  max-width: 760px;
  margin: 22px auto 0;
  padding: 22px;
  border: 1px solid rgba(217, 182, 119, .32);
  border-radius: 16px;
  background: rgba(28, 42, 54, .92);
}

.chapter-finish h2 {
  margin: 0 0 8px;
  color: var(--gold-light);
  font-size: 1.45rem;
}

.chapter-finish p {
  margin: 0 0 16px;
  color: var(--muted);
}

.finish-button {
  min-width: 220px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 620px) {
  :root {
    font-size: 16px;
  }

  .landing-hero {
    padding: 24px 21px;
    border-radius: 19px;
  }

  .hero-scene {
    object-position: 70% center;
  }

  h1 {
    font-size: 2.85rem;
  }

  .hero-copy p {
    font-size: 1.05rem;
  }

  .chapter-tab {
    padding: 8px;
    font-size: .9rem;
  }

  .story-card {
    padding: 12px 14px 22px;
    border-radius: 16px;
  }

  .story-card h1 {
    font-size: 1.8rem;
  }

  .story-card h2 {
    font-size: 1.42rem;
  }

  .page-navigation {
    gap: 4px;
  }

  .page-navigation > button,
  .page-navigation .reader-menu-button {
    padding: 10px 6px;
    font-size: .75rem;
  }

  .page-navigation > .page-indicator {
    font-size: .75rem;
  }

  .story-scene {
    margin-left: -10px;
    margin-right: -10px;
  }

  .object-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .object-card p {
    font-size: .92rem;
  }

  .sort-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .sort-row label {
    line-height: 1.45;
  }

  .evidence-panel,
  .interaction-panel {
    padding: 16px;
  }

  .unavailable {
    padding: 0 15px 36px;
  }

  .site-footer {
    padding: 14px 18px 26px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.language-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
}

.language-option {
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
}

.language-option:hover:not(:disabled) {
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
}

.language-option.is-active,
.language-option.is-active:hover:not(:disabled) {
  background: rgba(217, 182, 119, .2);
  color: var(--gold-light);
}

.object-detail p {
  margin: 0 0 10px !important;
}

.later-art {
  display: block;
  width: 100%;
  max-height: 260px;
  margin: 14px auto;
  border-radius: 12px;
}

.later-sketch {
  display: block;
  width: 80px;
  height: 80px;
  color: var(--gold-light);
}

.evidence-enlarged .later-art {
  max-height: none;
}

.evidence-enlarged .later-sketch {
  width: 180px;
  height: 180px;
}

.proof-row,
.shapes-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}

.proof-art {
  display: block;
  width: 100%;
}

.proof-item {
  flex: 1 1 80px;
  max-width: 140px;
}

.proof-row .evidence-image {
  width: 55%;
}

.proof-row > .proof-art {
  width: 35%;
}

.timeline-list {
  padding: 0;
  list-style: none;
}

.timeline-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-list li > span {
  flex: 1;
  min-width: 120px;
}

.shapes-row > div {
  flex: 1 1 100px;
  font-size: .85rem;
}

.object-note,
.notebook-line {
  color: var(--teal) !important;
  font-size: .88rem;
}

.evidence-figure {
  margin-left: 0;
  margin-right: 0;
}

.chosen-answer {
  margin: 8px 0 0 !important;
  padding: 12px 14px;
  border: 1px solid rgba(217, 182, 119, .45);
  border-radius: 12px;
  background: rgba(35, 52, 64, .75);
}

.sorted-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.sorted-columns > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(35, 52, 64, .48);
}

.sorted-columns h4 {
  margin: 0 0 6px;
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.sorted-columns ul {
  margin: 0;
  padding-left: 18px;
  font-size: .9rem;
}

@media (max-width: 620px) {
  .language-option {
    padding: 6px 9px;
  }

  .sorted-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  margin: 14px 0;
  overflow: hidden;
  border-radius: 14px;
}

.tile-grid img {
  grid-area: 1 / 1 / 4 / 4;
  display: block;
  width: 100%;
  height: auto;
}

.tile-grid .tile-button {
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tile-grid .tile-button:hover:not(:disabled),
.tile-grid .tile-button:focus-visible {
  border-color: var(--gold-light);
  background: rgba(217, 182, 119, .12);
}

.tile-grid .tile-button.is-found {
  border-color: var(--teal);
  background: rgba(145, 177, 167, .18);
}

.tile-button:nth-of-type(1) { grid-area: 1 / 1; }
.tile-button:nth-of-type(2) { grid-area: 1 / 2; }
.tile-button:nth-of-type(3) { grid-area: 1 / 3; }
.tile-button:nth-of-type(4) { grid-area: 2 / 1; }
.tile-button:nth-of-type(5) { grid-area: 2 / 2; }
.tile-button:nth-of-type(6) { grid-area: 2 / 3; }
.tile-button:nth-of-type(7) { grid-area: 3 / 1; }
.tile-button:nth-of-type(8) { grid-area: 3 / 2; }
.tile-button:nth-of-type(9) { grid-area: 3 / 3; }

.towel-option {
  flex: 1 1 90px;
  width: auto;
  flex-direction: column;
  align-items: center;
}

.tile-grid .tile-button:disabled {
  opacity: 1;
  cursor: default;
}

.tile-grid .tile-button:focus-visible {
  outline-offset: -4px;
}
