/* Milo and June's Adventures — site styles
   Palette taken from the published book: forest green titles, parchment
   cream pages, gold stars, night-sky navy, and the four village colours. */

:root {
  --green-900: #2f4a2c;
  --green-700: #4a6a44;
  --green-500: #7f9a75;
  --sage:      #a9b99c;
  --sage-soft: #dfe6d4;
  --cream:     #f6eed6;
  --parchment: #f0e4bf;
  --paper:     #fbf7ea;
  --gold:      #c9a24a;
  --gold-soft: #ead9a3;
  --navy:      #1b2a44;
  --night:     #0f1a2e;
  --ink:       #2b3a2a;
  --muted:     #5e6b5a;
  --fire:  #c8432e;  --earth: #8a5a2b;  --air: #2f6fc4;  --water: #1f8a86;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(31, 42, 24, .14);
  --font-display: "Lobster Two", "Cormorant Garamond", Georgia, serif;
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --tap: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden; font-family: var(--font-body); font-size: 18px; line-height: 1.6;
  color: var(--ink); background: var(--cream);
  background-image: radial-gradient(circle at 20% 0%, #fffaf0 0, transparent 45%),
                    radial-gradient(circle at 90% 100%, #e9e2c6 0, transparent 40%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--green-900); line-height: 1.15; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: 1.15rem; color: var(--muted); }
.display { font-family: var(--font-display); font-weight: 700; font-style: italic; letter-spacing: .01em; }
.eyebrow { font-family: var(--font-body); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 800; margin-bottom: .5em; }
.divider { text-align: center; color: var(--gold); letter-spacing: .4em; margin: .6rem 0 1.2rem; font-size: 1rem; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section.tight { padding: 2.5rem 0; }
.center { text-align: center; }
.center p { margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: var(--tap); padding: .7em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: 800 1rem var(--font-body); text-decoration: none; cursor: pointer; line-height: 1.2;
  background: var(--green-700); color: #fff; box-shadow: 0 6px 0 #33492f, 0 10px 18px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
}
.btn:hover, .btn:focus-visible { background: var(--green-900); transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #33492f; }
.btn.gold { background: var(--gold); color: var(--green-900); box-shadow: 0 6px 0 #9d7c2c, 0 10px 18px rgba(0,0,0,.12); }
.btn.gold:hover { background: #d9b45c; }
.btn.ghost { background: transparent; color: var(--green-900); border-color: var(--green-700); box-shadow: none; }
.btn.ghost:hover { background: var(--sage-soft); }
.btn.big { font-size: 1.15rem; padding: .9em 1.8em; }
.btn .ico { font-size: 1.25em; }

/* ---- Header / nav ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 238, 214, .92); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--gold-soft);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--green-900); }
.brand .mark { width: 44px; height: 44px; border-radius: 50%; background: var(--green-900); color: var(--gold); display: grid; place-items: center; font-size: 1.4rem; box-shadow: 0 0 0 3px var(--gold-soft); }
.brand .name { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.35rem; line-height: 1; }
.brand .name small { display: block; font: 700 .65rem var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: .3em; }

.nav { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  min-width: 78px; min-height: var(--tap); padding: .35rem .6rem; border-radius: 16px;
  text-decoration: none; color: var(--green-900); font-weight: 800; font-size: .8rem; letter-spacing: .04em;
  transition: background .2s;
}
.nav a .ico { font-size: 1.55rem; line-height: 1; display: inline-block; transition: transform .2s; }
.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"] { background: var(--sage-soft); }
.nav a:hover .ico, .nav a:focus-visible .ico { animation: wiggle .6s ease-in-out; }
.nav a[aria-current="page"] .ico { transform: scale(1.12); }
@keyframes wiggle { 0%,100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-12deg) scale(1.2); } 50% { transform: rotate(10deg) scale(1.25); } 75% { transform: rotate(-6deg) scale(1.15); } }

.tools { display: flex; align-items: center; gap: .5rem; }
.pocket {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .3rem .8rem;
  border-radius: 999px; background: var(--paper); border: 2px solid var(--gold-soft);
  font-weight: 800; font-size: .85rem; color: var(--green-900); text-decoration: none;
}
.pocket .star { color: var(--gold); }
.calm-toggle {
  min-height: 40px; padding: .3rem .8rem; border-radius: 999px; border: 2px solid var(--gold-soft);
  background: var(--paper); font: 800 .8rem var(--font-body); color: var(--green-900); cursor: pointer;
}
.calm-toggle[aria-pressed="true"] { background: var(--green-900); color: var(--cream); border-color: var(--green-900); }
.menu-btn { display: none; min-width: var(--tap); min-height: var(--tap); border-radius: 14px; border: 2px solid var(--gold-soft); background: var(--paper); font-size: 1.4rem; cursor: pointer; }

@media (max-width: 860px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--cream); border-bottom: 2px solid var(--gold-soft);
         flex-wrap: wrap; justify-content: center; padding: .6rem; display: none; }
  .nav.open { display: flex; }
  .brand .name { font-size: 1rem; white-space: nowrap; }
  .brand .mark { width: 36px; height: 36px; font-size: 1.1rem; }
  .calm-toggle .txt { display: none; }
  .calm-toggle { font-size: 1rem; padding: .2rem .5rem; min-width: 40px; }
  .site-header .bar { gap: .5rem; }
  .pocket .label { display: none; }
  .pocket { white-space: nowrap; padding: .3rem .6rem; }
  .calm-toggle { white-space: nowrap; padding: .3rem .55rem; font-size: .75rem; }
  .tools { gap: .35rem; }
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; color: var(--cream); overflow: hidden;
  background: var(--night) url("/assets/img/cover-sky.jpg?v=22") center 30% / cover no-repeat;
  min-height: min(78vh, 720px); display: grid; align-items: end;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,26,46,.25) 0%, rgba(15,26,46,.55) 55%, rgba(15,26,46,.92) 100%); }
.hero .wrap { position: relative; padding: clamp(4rem, 10vw, 7rem) 0 3rem; display: grid; gap: 1.5rem; grid-template-columns: 1.1fr .9fr; align-items: end; }
.hero h1 { color: #fff; font-family: var(--font-display); font-style: italic; font-size: clamp(2.6rem, 7vw, 5rem); text-shadow: 0 4px 24px rgba(0,0,0,.45); margin: 0 0 .2em; }
.hero h1 span { display: block; font-family: var(--font-heading); font-style: normal; font-size: .55em; color: var(--gold-soft); letter-spacing: .02em; }
.hero p { color: #efe8d2; font-size: 1.15rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1rem; }
.hero .cover-float { justify-self: center; width: min(320px, 70vw); transform: rotate(3deg); }
.hero .cover-float img { border-radius: 10px; box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 6px rgba(255,255,255,.08); }
.hero .cover-float:hover { transform: rotate(0) scale(1.03); transition: transform .3s; }
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars i { position: absolute; width: 6px; height: 6px; background: #fff3c4; border-radius: 50%; box-shadow: 0 0 10px 3px rgba(255,235,170,.7); animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.2); } }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero .cover-float { order: -1; width: min(240px, 60vw); } }

/* ---- Cards & panels -------------------------------------------------------- */
.card {
  background: var(--paper); border: 2px solid var(--gold-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(1.2rem, 3vw, 2rem);
}
.card.parchment { background: var(--parchment); }
.grid { display: grid; gap: 1.4rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.pairs { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .grid.pairs { grid-template-columns: 1fr; } }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pill { display: inline-block; padding: .2em .8em; border-radius: 999px; font-size: .8rem; font-weight: 800; letter-spacing: .05em; }
.pill.fire { background: #fbe3dc; color: var(--fire); } .pill.earth { background: #f1e4d3; color: var(--earth); }
.pill.air { background: #dfe9f8; color: var(--air); } .pill.water { background: #d9f0ee; color: var(--water); }

/* ---- Interactive map --------------------------------------------------------- */
.map-section { background: var(--night) url("/assets/img/cover-sky.jpg?v=22") center / cover fixed no-repeat; color: var(--cream); position: relative; }
.map-section::before { content: ""; position: absolute; inset: 0; background: rgba(15, 26, 46, .86); }
.map-section .wrap { position: relative; }
.map-section h2, .map-section h3 { color: #fff; }
.map-layout { display: grid; grid-template-columns: minmax(280px, 560px) minmax(280px, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } }

.ring { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; margin-inline: auto; }
.ring .track { position: absolute; inset: 9%; border-radius: 50%; border: 3px dashed rgba(234, 217, 163, .55); animation: spin 90s linear infinite; }
.ring .glow { position: absolute; inset: 9%; border-radius: 50%; box-shadow: 0 0 60px 10px rgba(201, 162, 74, .25) inset, 0 0 40px rgba(201,162,74,.25); }
@keyframes spin { to { transform: rotate(360deg); } }
.ring .center {
  position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; overflow: hidden; border: 5px solid var(--gold-soft); box-shadow: 0 0 40px rgba(201,162,74,.5);
  background: var(--navy);
}
.ring .center img { width: 100%; height: 100%; object-fit: cover; }
.friend-btn {
  position: absolute; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; padding: 0; border: 4px solid var(--gold-soft); background: var(--paper); cursor: pointer;
  overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.4); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.friend-btn img { width: 100%; height: 100%; object-fit: cover; }
.friend-btn:hover, .friend-btn:focus-visible { transform: translate(-50%, -50%) scale(1.18); z-index: 2; box-shadow: 0 0 0 6px rgba(255,255,255,.25), 0 12px 30px rgba(0,0,0,.5); }
.friend-btn[aria-pressed="true"] { border-color: #fff; transform: translate(-50%, -50%) scale(1.22); z-index: 3; animation: bob 1.6s ease-in-out infinite; }
.friend-btn.fire { border-color: var(--fire); } .friend-btn.earth { border-color: var(--earth); }
.friend-btn.air { border-color: var(--air); } .friend-btn.water { border-color: var(--water); }
.friend-btn .got { position: absolute; right: -2px; bottom: -2px; width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--gold); color: var(--green-900); display: none; place-items: center; font-size: .8rem; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.friend-btn.visited .got { display: grid; }
.friend-btn.dim { opacity: .35; }
@keyframes bob { 0%,100% { transform: translate(-50%, -50%) scale(1.22); } 50% { transform: translate(-50%, -56%) scale(1.22); } }
.ring .label { position: absolute; transform: translate(-50%, -50%); font-size: clamp(.6rem, 1.6vw, .85rem); font-weight: 800; color: var(--gold-soft); pointer-events: none; text-shadow: 0 1px 4px #000; }

.village-filter { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1.2rem 0 .5rem; }
.village-filter button {
  min-height: 42px; padding: .3rem .9rem; border-radius: 999px; border: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08);
  color: #fff; font: 800 .85rem var(--font-body); cursor: pointer;
}
.village-filter button[aria-pressed="true"] { background: #fff; color: var(--navy); }
.village-filter button.fire[aria-pressed="true"] { color: var(--fire); } .village-filter button.earth[aria-pressed="true"] { color: var(--earth); }
.village-filter button.air[aria-pressed="true"] { color: var(--air); } .village-filter button.water[aria-pressed="true"] { color: var(--water); }

.friend-panel { background: var(--parchment); color: var(--ink); border-radius: var(--radius); border: 3px solid var(--gold-soft); box-shadow: var(--shadow); overflow: hidden; }
.friend-panel .art { aspect-ratio: 4 / 3; overflow: hidden; background: var(--navy); }
.friend-panel .art img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.friend-panel .body { padding: 1.4rem; }
.map-section .friend-panel h3, .friend-panel h3 { color: var(--green-900); font-size: 1.9rem; margin-bottom: .1em; }
.friend-panel .meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; color: var(--muted); font-size: .95rem; margin-bottom: .8rem; }
.friend-panel .quote { font-family: var(--font-heading); font-size: 1.35rem; font-style: italic; color: var(--green-900); margin: .6rem 0; }
.lesson-box { border: 2px solid var(--gold); border-radius: 12px; padding: .7rem 1rem; background: var(--paper); display: flex; gap: .7rem; align-items: flex-start; }
.lesson-box .star { color: var(--gold); font-size: 1.3rem; line-height: 1; }
.lesson-box b { display: block; font-size: .7rem; letter-spacing: .2em; color: var(--green-700); }
.lesson-box i { font-family: var(--font-heading); font-size: 1.1rem; }
.friend-panel .empty { padding: 2.5rem 1.4rem; text-align: center; }
.friend-panel .empty .big { font-size: 3rem; }
.panel-nav { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1rem; }

.progress { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; font-weight: 800; color: var(--gold-soft); }
.progress .dots { display: inline-flex; gap: 3px; font-size: 1.1rem; letter-spacing: 1px; }
.progress .dots span { color: rgba(255,255,255,.35); } .progress .dots span.on { color: var(--gold); }

/* ---- Book shelf -------------------------------------------------------------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.book-card { display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit; transition: transform .2s; }
.book-card:hover { transform: translateY(-6px); }
.book-card .cover { aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--sage-soft); display: grid; place-items: center; box-shadow: 0 16px 30px rgba(0,0,0,.18); margin-bottom: 1rem; position: relative; }
.book-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card .cover.soon { background: linear-gradient(160deg, #3e5a3a, #1b2a44); color: var(--gold-soft); text-align: center; padding: 1.5rem; }
.book-card .cover.soon .q { font-size: 4rem; line-height: 1; }
.book-card .cover.soon .t { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; margin-top: .5rem; color: #fff; }
.book-card .num { position: absolute; top: 10px; left: 10px; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--green-900); font-weight: 900; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.book-card h3 { margin-bottom: .2em; }
.book-card .status { font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }

/* ---- Book detail ------------------------------------------------------------- */
.book-hero { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 2.5rem; align-items: start; }
.book-hero .cover img { border-radius: 12px; box-shadow: 0 30px 50px rgba(0,0,0,.28); }
.book-hero .cover { position: sticky; top: 90px; }
@media (max-width: 800px) { .book-hero { grid-template-columns: 1fr; } .book-hero .cover { position: static; max-width: 320px; margin-inline: auto; } }
.facts { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .4rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.facts li { background: var(--paper); border: 2px solid var(--gold-soft); border-radius: 12px; padding: .6rem .9rem; font-size: .95rem; }
.facts li b { display: block; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.friend-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; }
.friend-strip a { text-decoration: none; text-align: center; color: var(--green-900); font-weight: 800; font-size: .9rem; }
.friend-strip img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto .4rem; border: 4px solid var(--gold-soft); box-shadow: var(--shadow); transition: transform .2s; }
.friend-strip a:hover img { transform: scale(1.1) rotate(-4deg); }
.friend-strip a.fire img { border-color: var(--fire); } .friend-strip a.earth img { border-color: var(--earth); }
.friend-strip a.air img { border-color: var(--air); } .friend-strip a.water img { border-color: var(--water); }
.peek { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.peek figure { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: var(--paper); border: 2px solid var(--gold-soft); }
.peek figcaption { padding: .6rem .9rem; font-weight: 800; font-size: .9rem; color: var(--green-900); }
.lessons { columns: 2; column-gap: 2rem; list-style: none; padding: 0; margin: 0; }
.lessons li { break-inside: avoid; margin-bottom: .7rem; padding-left: 1.6rem; position: relative; font-family: var(--font-heading); font-size: 1.15rem; }
.lessons li::before { content: "★"; position: absolute; left: 0; color: var(--gold); }
.lessons li small { display: block; font: 800 .7rem var(--font-body); letter-spacing: .15em; text-transform: uppercase; color: var(--green-700); }
@media (max-width: 700px) { .lessons { columns: 1; } }
.note { border-left: 5px solid var(--gold); background: var(--paper); padding: 1rem 1.2rem; border-radius: 0 14px 14px 0; font-size: .95rem; color: var(--muted); }

/* ---- Villages ----------------------------------------------------------------- */
.village-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 3px solid var(--gold-soft); background: var(--paper); }
.village-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.village-card .body { padding: 1.1rem 1.2rem; border-top: 5px solid var(--vc, var(--gold)); }
.village-card h3 { color: var(--vc, var(--green-900)); margin-bottom: .2em; }
.village-card .who { display: flex; gap: .4rem; margin-top: .6rem; }
.village-card .who img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--vc); }

/* ---- Play page ------------------------------------------------------------------- */
.play-tabs { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2rem; }
.play-tabs button {
  min-height: 56px; padding: .5rem 1.2rem; border-radius: 18px; border: 3px solid var(--gold-soft); background: var(--paper);
  font: 800 1rem var(--font-body); color: var(--green-900); cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; transition: transform .15s;
}
.play-tabs button .ico { font-size: 1.5rem; }
.play-tabs button:hover { transform: translateY(-3px); }
.play-tabs button:hover .ico { animation: wiggle .6s; }
.play-tabs button[aria-selected="true"] { background: var(--green-900); color: var(--cream); border-color: var(--green-900); }
.play-panel[hidden] { display: none; }
.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field label { font-weight: 800; color: var(--green-900); }
.field select, .field input { min-height: var(--tap); font: 600 1.05rem var(--font-body); padding: .5rem .8rem; border-radius: 12px; border: 2px solid var(--gold-soft); background: #fff; color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; }
.row .field { flex: 1 1 160px; margin-bottom: 0; }
.result { margin-top: 1.5rem; display: grid; grid-template-columns: 140px 1fr; gap: 1.2rem; align-items: center; }
.result img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 5px solid var(--gold); box-shadow: var(--shadow); animation: pop .5s ease; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 560px) { .result { grid-template-columns: 1fr; text-align: center; } .result img { margin-inline: auto; } }

.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; max-width: 560px; margin: 1rem auto; }
.memory button { aspect-ratio: 1; border-radius: 16px; border: 3px solid var(--gold-soft); background: var(--green-900); cursor: pointer; padding: 0; overflow: hidden; position: relative; transition: transform .25s; }
.memory button .back { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); font-size: 2rem; }
.memory button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.memory button.flip img, .memory button.done img { opacity: 1; }
.memory button.flip .back, .memory button.done .back { display: none; }
.memory button.done { border-color: var(--gold); transform: scale(.94); cursor: default; }
.memory button:hover:not(.done) { transform: scale(1.05); }
.score { text-align: center; font-weight: 800; color: var(--green-900); margin-top: .6rem; }

.quiz-q { font-family: var(--font-heading); font-size: 1.5rem; font-style: italic; color: var(--green-900); text-align: center; margin-bottom: 1rem; }
.quiz-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; max-width: 620px; margin-inline: auto; }
.quiz-opts button { border: 3px solid var(--gold-soft); border-radius: 18px; background: var(--paper); padding: .8rem; cursor: pointer; font: 800 1rem var(--font-body); color: var(--green-900); display: grid; gap: .4rem; justify-items: center; transition: transform .15s; }
.quiz-opts button img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold-soft); }
.quiz-opts button:hover { transform: translateY(-4px); }
.quiz-opts button.right { border-color: var(--green-700); background: var(--sage-soft); }
.quiz-opts button.wrong { border-color: var(--fire); opacity: .6; }
.quiz-feedback { text-align: center; min-height: 2.5rem; font-weight: 800; color: var(--green-900); margin-top: 1rem; }

.passport { max-width: 640px; margin-inline: auto; background: var(--parchment); border: 6px double var(--gold); border-radius: 18px; padding: 1.5rem; position: relative; }
.passport h3 { text-align: center; font-family: var(--font-display); font-style: italic; font-size: 2.2rem; }
.passport .field input { background: var(--paper); border-style: dashed; }
.passport .stamp { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; align-items: center; margin-top: 1rem; }
.passport .stamp img { width: 90px; height: 90px; border-radius: 50%; border: 4px solid var(--gold); object-fit: cover; }

/* ---- Author ---------------------------------------------------------------------- */
.author-layout { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 760px) { .author-layout { grid-template-columns: 1fr; } }
.portrait { border-radius: 50%; aspect-ratio: 1; overflow: hidden; border: 6px solid var(--gold-soft); box-shadow: var(--shadow); background: var(--sage-soft); display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .ph { text-align: center; color: var(--green-700); font-weight: 800; padding: 1rem; }

/* ---- Notify form ------------------------------------------------------------------ */
.notify { display: flex; flex-wrap: wrap; gap: .6rem; }
.notify input { flex: 1 1 220px; min-height: var(--tap); padding: .5rem .9rem; border-radius: 999px; border: 2px solid var(--gold-soft); font: 600 1rem var(--font-body); }

/* ---- Footer ------------------------------------------------------------------------ */
.site-footer { background: var(--green-900); color: var(--sage-soft); padding: 3rem 0 2rem; margin-top: 3rem; }
.site-footer a { color: var(--gold-soft); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.site-footer h4, .site-footer .fh { color: var(--gold-soft); font-family: var(--font-body); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.site-footer .fine { font-size: .85rem; opacity: .85; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; }

/* ---- Confetti / celebration ----------------------------------------------------------- */
.celebrate { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.celebrate i { position: absolute; top: -20px; font-size: 1.5rem; animation: fall 3.5s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0; } }

/* ---- Calm mode & reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .map-section { background-attachment: scroll; }
}
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }
html.calm .map-section { background-attachment: scroll; }
html.calm .stars { display: none; }
html.calm body { background-image: none; background: #f7f1e0; }

/* ---- Print (passport) ---------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .play-tabs, .no-print, .hero { display: none !important; }
  body { background: #fff; }
  .passport { border-color: #999; box-shadow: none; }
}

/* ==== Book 2: the Sky-Keeper's lantern (orbit map) ================================= */
.orbit-section { background: var(--night) url("/assets/img/b2/cover-sky.jpg") center / cover fixed no-repeat; color: var(--cream); position: relative; }
.orbit-section::before { content: ""; position: absolute; inset: 0; background: rgba(15, 26, 46, .88); }
.orbit-section .wrap { position: relative; }
.orbit-section h2, .orbit-section h3 { color: #fff; }
.orbit-section .friend-panel h3 { color: var(--green-900); }
html.calm .orbit-section { background-attachment: scroll; }
.orbits { position: relative; aspect-ratio: 1; width: 100%; max-width: 600px; margin-inline: auto; }
.orbits .o { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1.5px dashed rgba(234, 217, 163, .35); pointer-events: none; }
.orbits .o.moon { border-color: rgba(217, 221, 230, .6); }
.planet-btn {
  position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; padding: 0; border: 3px solid var(--pc, var(--gold-soft)); background: var(--navy); cursor: pointer;
  overflow: hidden; box-shadow: 0 0 18px var(--pc, rgba(201,162,74,.5)), 0 8px 20px rgba(0,0,0,.45); transition: transform .2s, box-shadow .2s;
}
.planet-btn img { width: 100%; height: 100%; object-fit: cover; }
.planet-btn:hover, .planet-btn:focus-visible { transform: translate(-50%, -50%) scale(1.2); z-index: 2; box-shadow: 0 0 0 5px rgba(255,255,255,.25), 0 0 30px var(--pc); }
.planet-btn[aria-pressed="true"] { border-color: #fff; transform: translate(-50%, -50%) scale(1.25); z-index: 3; animation: bob2 1.6s ease-in-out infinite; }
.planet-btn .got { position: absolute; right: -1px; bottom: -1px; width: 36%; aspect-ratio: 1; border-radius: 50%; background: var(--pc, var(--gold)); color: #fff; display: none; place-items: center; font-size: .75rem; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.planet-btn.visited .got { display: grid; }
.planet-btn .nm { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); white-space: nowrap; font: 800 .7rem var(--font-body); color: var(--gold-soft); text-shadow: 0 1px 4px #000; pointer-events: none; }
@keyframes bob2 { 0%,100% { transform: translate(-50%, -50%) scale(1.25); } 50% { transform: translate(-50%, -58%) scale(1.25); } }
.orbits .plabel { position: absolute; transform: translate(-50%, 0); font: 800 clamp(.55rem, 1.5vw, .75rem) var(--font-body); color: var(--gold-soft); text-shadow: 0 1px 4px #000; pointer-events: none; white-space: nowrap; }
.lantern { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; margin-top: 1rem; font-weight: 800; color: var(--gold-soft); }
.lantern .lights { display: inline-flex; gap: 5px; }
.lantern .lights span { width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); display: inline-block; }
.lantern .lights span.on { box-shadow: 0 0 10px 2px var(--lc); background: var(--lc); border-color: #fff; }
.two-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .8rem; }
@media (max-width: 560px) { .two-boxes { grid-template-columns: 1fr; } }
.fact-box { border: 2px solid var(--gold-soft); border-radius: 12px; padding: .7rem .9rem; background: var(--paper); font-size: .95rem; }
.fact-box b { display: block; font-size: .68rem; letter-spacing: .2em; color: var(--green-700); margin-bottom: .2em; }
.fact-box.sky { border-color: var(--air); } .fact-box.sky b { color: var(--air); }
.rules-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; font-size: .95rem; }
.rules-row a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; font-weight: 800; color: var(--green-900); background: var(--paper); border: 2px solid var(--gold-soft); border-radius: 999px; padding: .2rem .7rem .2rem .25rem; }
.rules-row a img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.rules-row .mod { font-size: .75rem; color: var(--muted); }

/* Match the wanderers */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 720px; margin-inline: auto; }
@media (max-width: 560px) { .match { gap: .6rem; } }
.match .col { display: grid; gap: .5rem; }
.match button { min-height: 52px; border-radius: 14px; border: 3px solid var(--gold-soft); background: var(--paper); font: 800 .95rem var(--font-body); color: var(--green-900); cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .3rem .7rem; text-align: left; transition: transform .15s; }
.match button img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.match button:hover { transform: translateX(3px); }
.match button.sel { border-color: var(--green-700); background: var(--sage-soft); }
.match button.done { border-color: var(--gold); background: var(--gold-soft); opacity: .8; cursor: default; }
.match button.no { border-color: var(--fire); }
.series-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.series-nav a { display: grid; grid-template-columns: 72px 1fr; gap: .9rem; align-items: center; text-decoration: none; color: var(--green-900); background: var(--paper); border: 2px solid var(--gold-soft); border-radius: 16px; padding: .8rem; transition: transform .2s; }
.series-nav a:hover { transform: translateY(-3px); }
.series-nav img { border-radius: 8px; box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.series-nav small { display: block; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.series-nav b { font-family: var(--font-heading); font-size: 1.2rem; }

/* ==== Sign-up form, uniform covers, Book 2 games on Play ============================ */
.book-card .cover { aspect-ratio: 4 / 5; }
.book-card .cover img { object-fit: cover; object-position: center; }
.series-nav img { width: 72px; aspect-ratio: 4 / 5; object-fit: cover; }
.notify { display: block; }
.notify .row .field { flex: 1 1 200px; }
.notify .field input { width: 100%; }
.consent { display: grid; gap: .5rem; margin: .8rem 0 .4rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: .15em; flex: none; accent-color: var(--green-700); }
.check small { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.notify-msg { min-height: 1.4em; font-weight: 800; color: var(--green-900); }
.notify-msg.err { color: var(--fire); }
.notify.sent .row, .notify.sent .consent, .notify.sent button { display: none; }
.lights-box { margin-top: 1.2rem; border-top: 2px dashed var(--gold-soft); padding-top: 1rem; }
.lights-box .lrow { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .6rem; }
.lights-box .lrow a { display: grid; grid-template-columns: 56px 1fr; gap: .6rem; align-items: center; text-decoration: none; color: var(--green-900); background: var(--paper); border: 2px solid var(--gold-soft); border-radius: 14px; padding: .5rem .8rem .5rem .5rem; flex: 1 1 240px; }
.lights-box .lrow img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--pc); }
.lights-box .lrow b { display: block; } .lights-box .lrow small { color: var(--muted); font-weight: 600; }
.book-pick { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.book-pick button { min-height: 42px; padding: .3rem 1rem; border-radius: 999px; border: 2px solid var(--gold-soft); background: var(--paper); font: 800 .85rem var(--font-body); color: var(--green-900); cursor: pointer; }
.book-pick button[aria-pressed="true"] { background: var(--green-900); color: var(--cream); border-color: var(--green-900); }
.sf-card { max-width: 640px; margin-inline: auto; text-align: center; }
.sf-card .stmt { font-family: var(--font-heading); font-size: 1.5rem; font-style: italic; color: var(--green-900); min-height: 3.5em; display: grid; place-items: center; padding: 1rem; background: var(--paper); border: 2px solid var(--gold-soft); border-radius: 16px; }
.sf-card .who { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: .6rem 0; font-weight: 800; }
.sf-card .who img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.sf-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .8rem; }
.sf-btns button { min-height: 64px; border-radius: 18px; border: 3px solid var(--gold-soft); background: var(--paper); font: 800 1.05rem var(--font-body); color: var(--green-900); cursor: pointer; display: grid; place-items: center; transition: transform .15s; }
.sf-btns button:hover { transform: translateY(-3px); }
.sf-btns button.sky { border-color: var(--air); } .sf-btns button.idea { border-color: var(--gold); }
.sf-btns button.right { background: var(--sage-soft); border-color: var(--green-700); } .sf-btns button.wrong { opacity: .5; }
@media (max-width: 480px) { .sf-btns { grid-template-columns: 1fr; } }

/* ==== Book 1: in-page village card under "Meet the friends" ========================= */
.friend-strip a[aria-pressed="true"] img { transform: scale(1.12); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--gold); }
.village-card-wrap { margin-top: 1.6rem; }
.vcard { display: grid; grid-template-columns: minmax(240px, 2fr) 3fr; background: var(--paper); border: 3px solid var(--vc, var(--gold-soft)); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); animation: vpop .35s ease; }
@keyframes vpop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.vcard .art { position: relative; min-height: 260px; background: var(--navy); }
.vcard .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.vcard .body { padding: 1.4rem 1.6rem; }
.vcard h3 { color: var(--vc, var(--green-900)); font-size: 2rem; margin-bottom: .1em; }
.vcard .motto { font-family: var(--font-heading); font-style: italic; font-size: 1.25rem; color: var(--green-900); margin-bottom: .6rem; }
.vcard .members { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0; }
.vcard .members button { display: inline-flex; align-items: center; gap: .5rem; border: 2px solid var(--gold-soft); background: var(--cream); border-radius: 999px; padding: .25rem .9rem .25rem .3rem; font: 800 .9rem var(--font-body); color: var(--green-900); cursor: pointer; }
.vcard .members button img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.vcard .members button[aria-pressed="true"] { border-color: var(--vc); background: #fff; box-shadow: 0 0 0 3px var(--vc, var(--gold)); }
.vcard .members button small { font-weight: 600; color: var(--muted); }
.vcard .you { border-left: 5px solid var(--vc); background: var(--cream); padding: .7rem 1rem; border-radius: 0 12px 12px 0; margin-top: .8rem; font-size: .95rem; }
.vcard .you b { color: var(--vc); }
.vcard .tiny { font-size: .85rem; color: var(--muted); margin-top: .8rem; }
.vcard .close { float: right; border: none; background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); min-width: 44px; min-height: 44px; }
@media (max-width: 760px) { .vcard { grid-template-columns: 1fr; } .vcard .art { min-height: 200px; } }

/* ==== Home: clickable village cards; Book 1: in-page friend card ===================== */
button.village-card { text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 0; transition: transform .2s, box-shadow .2s; }
button.village-card:hover, button.village-card:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(31,42,24,.2); }
button.village-card[aria-pressed="true"] { border-color: var(--vc); box-shadow: 0 0 0 4px var(--vc); }
.village-card .who { align-items: center; }
.village-card .who .open { margin-left: auto; font: 800 .8rem var(--font-body); color: var(--vc); }
.friend-card-wrap { margin-top: 1.6rem; }
.friend-card-wrap .friend-panel { display: grid; grid-template-columns: minmax(240px, 2fr) 3fr; }
.friend-card-wrap .friend-panel .art { aspect-ratio: auto; min-height: 260px; position: relative; }
.friend-card-wrap .friend-panel .art img { position: absolute; inset: 0; }
.friend-card-wrap .friend-panel .close { float: right; border: none; background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); min-width: 44px; min-height: 44px; }
@media (max-width: 760px) { .friend-card-wrap .friend-panel { grid-template-columns: 1fr; } .friend-card-wrap .friend-panel .art { min-height: 220px; } }

[id] { scroll-margin-top: 84px; }

/* ==== Passport: collected stars & lights ============================================= */
.collection { margin-top: 1.4rem; border-top: 2px dashed var(--gold); padding-top: 1rem; }
.collection h4 { font-family: var(--font-heading); font-size: 1.3rem; color: var(--green-900); margin: 0 0 .2em; }
.collection .sub { font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.coll-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.coll-row .c { position: relative; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; border: 3px solid var(--gold-soft); background: var(--paper); }
.coll-row .c img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); opacity: .35; }
.coll-row .c.on { border-color: var(--gold); box-shadow: 0 0 10px rgba(201,162,74,.6); }
.coll-row .c.on img { filter: none; opacity: 1; }
.coll-row .c .badge { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: var(--green-900); font-size: .65rem; display: grid; place-items: center; }
.coll-row .c.on.light { border-color: var(--lc); box-shadow: 0 0 10px var(--lc); }
.coll-row .c.on.light .badge { background: var(--lc); color: #fff; }
.coll-row .c.room { border-radius: 12px; } .coll-row .c.room .badge { font-size: .6rem; }
.coll-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.coll-actions .reset { border: none; background: none; font: 700 .8rem var(--font-body); color: var(--muted); text-decoration: underline; cursor: pointer; min-height: 44px; }
.coll-done { font-family: var(--font-heading); font-style: italic; color: var(--green-900); }
@media print { .coll-actions { display: none; } .coll-row .c img { filter: none; } }

[hidden] { display: none !important; }

/* Peek inside: same frame for every page, whole page always visible */
.peek figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--paper); }

.contact .field textarea { min-height: 120px; font: 600 1.05rem var(--font-body); padding: .6rem .8rem; border-radius: 12px; border: 2px solid var(--gold-soft); background: #fff; color: var(--ink); resize: vertical; }
.contact.sent .row, .contact.sent .field, .contact.sent button { display: none; }

/* ==== Book 3: the Round Sky House (house wheel) ==================================== */
.house-section { background-image: url("/assets/img/b3/cover-sky.jpg"); }
.house { position: relative; aspect-ratio: 1; width: 100%; max-width: 600px; margin-inline: auto; }
.house svg { width: 100%; height: 100%; display: block; overflow: visible; }
.house .wedge { cursor: pointer; }
.house .wedge path { fill: var(--wc, #3a4f73); stroke: rgba(234,217,163,.5); stroke-width: 1.2; transition: fill .2s; }
.house .wedge.below path { fill: var(--wc, #26385a); }
.house .wedge:hover path, .house .wedge:focus-visible path { fill: #5a6f95; }
.house .wedge.below:hover path, .house .wedge.below:focus-visible path { fill: #3e567e; }
.house .wedge[aria-pressed="true"] path { fill: var(--gold); stroke: #fff; stroke-width: 2; }
.house .wedge.visited path { fill: #4a5d3a; }
.house .wedge.visited.below path { fill: #3b4b2e; }
.house .wedge image { pointer-events: none; }
.house .wedge .ring { fill: none; stroke: var(--gold-soft); stroke-width: 1.5; pointer-events: none; }
.house .wedge[aria-pressed="true"] .ring, .house .wedge.visited .ring { stroke: #fff; stroke-width: 2.5; }
.house .wedge .num { font: 800 7px var(--font-body); fill: var(--gold-soft); text-anchor: middle; pointer-events: none; }
.house .wedge[aria-pressed="true"] .num { fill: var(--green-900); }
.house .wedge .key { font-size: 6px; text-anchor: middle; pointer-events: none; display: none; }
.house .wedge.visited .key { display: block; }
.house .horizon { stroke: #7fc77a; stroke-width: 2.5; stroke-linecap: round; }
.house .axis { stroke: rgba(234,217,163,.45); stroke-width: 1; stroke-dasharray: 3 3; }
.house .angle { font: 800 5.5px var(--font-body); fill: #e8e2cc; text-anchor: middle; letter-spacing: .08em; paint-order: stroke; stroke: rgba(10,18,34,.75); stroke-width: 1.4px; stroke-linejoin: round; }
.house .angle.asc, .house .angle.dsc { fill: #a8e4a3; }
.house .hub { fill: var(--navy); stroke: var(--gold); stroke-width: 2; }
.house .hubtext { font: italic 700 7.5px var(--font-heading); fill: var(--cream); text-anchor: middle; }
.house .wedge:focus { outline: none; }
.house .wedge:focus-visible path { stroke: #fff; stroke-width: 2.5; }
html.calm .house-section { background-attachment: scroll; }
.lantern.keys > span { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.lantern.keys .lights span { border-radius: 4px; width: 15px; height: 20px; display: grid; place-items: center; font-size: 10px; color: rgba(255,255,255,.4); background: rgba(255,255,255,.12); }
.lantern.keys .lights span.on { background: var(--gold); color: var(--green-900); border-color: #fff; box-shadow: 0 0 8px var(--gold); }
.friend-strip.rooms img { border-radius: 18px; }
.friend-strip.rooms a:hover img { transform: scale(1.08) rotate(0); }
.room-panel .where { font-size: .8rem; }
.room-panel .where.above { color: var(--air); } .room-panel .where.below { color: var(--earth); }

/* Build your own sky sentence */
.sentence-builder .baskets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 760px) { .sentence-builder .baskets { grid-template-columns: 1fr; } }
.sentence-builder .basket { background: var(--paper); border: 3px solid var(--gold-soft); border-radius: 18px; padding: .8rem; }
.sentence-builder .basket h4, .sentence-builder .basket h3 { font-family: var(--font-heading); font-size: 1.3rem; color: var(--green-900); margin: 0 0 .5em; }
.sentence-builder .basket h4 em, .sentence-builder .basket h3 em { font-weight: 500; color: var(--muted); }
.sentence-builder .opts { display: grid; gap: .35rem; max-height: 330px; overflow: auto; padding-right: .2rem; }
.sentence-builder .opts button { min-height: 44px; display: flex; align-items: center; gap: .5rem; text-align: left; border-radius: 12px; border: 2px solid var(--gold-soft); background: var(--cream); font: 800 .9rem var(--font-body); color: var(--green-900); cursor: pointer; padding: .25rem .6rem .25rem .3rem; }
.sentence-builder .opts button img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.sentence-builder .opts button .r { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; flex: none; }
.sentence-builder .opts button small { font-weight: 600; color: var(--muted); }
.sentence-builder .opts button[aria-pressed="true"] { background: var(--green-900); color: var(--cream); border-color: var(--green-900); }
.sentence-builder .opts button[aria-pressed="true"] small { color: var(--gold-soft); }
.sentence-builder .sentence-out { margin-top: 1rem; }
.sentence-builder .line { font-family: var(--font-heading); font-size: clamp(1.25rem, 3vw, 1.7rem); color: var(--green-900); margin: 0 0 .4em; }
.sentence-builder .line small { font: 800 .65rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sentence-builder .slot { border-bottom: 3px dashed var(--gold); padding: 0 .2em; }
.sentence-builder .slot.on { border-bottom-style: solid; color: var(--fire); }
.sentence-builder .hint { font-size: .95rem; color: var(--muted); min-height: 1.4em; margin: 0 0 .6rem; }
.sentence-builder .hint b { color: var(--green-900); }
.sentence-builder .kept { display: grid; gap: .6rem; margin-top: 1rem; }
.sentence-builder .kept .k { background: var(--paper); border: 2px solid var(--gold-soft); border-radius: 14px; padding: .7rem .9rem; display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; }
.sentence-builder .kept .k b { font-family: var(--font-heading); font-size: 1.15rem; color: var(--green-900); }
.sentence-builder .kept .k em { display: block; color: var(--muted); font-size: .95rem; }
.sentence-builder .kept .k button { border: none; background: none; color: var(--muted); font: 700 .8rem var(--font-body); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* Which room? game */
.wr-card { max-width: 720px; margin-inline: auto; text-align: center; }
.wr-card .stmt { font-family: var(--font-heading); font-size: 1.35rem; font-style: italic; color: var(--green-900); margin: .6rem 0 1rem; }
.wr-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; }
.wr-doors button { border: 3px solid var(--gold-soft); border-radius: 18px 18px 8px 8px; background: var(--paper); padding: .6rem; cursor: pointer; font: 800 .9rem var(--font-body); color: var(--green-900); display: grid; gap: .3rem; justify-items: center; transition: transform .15s; }
.wr-doors button img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; border: 3px solid var(--gold-soft); }
.wr-doors button:hover { transform: translateY(-4px); }
.wr-doors button.right { border-color: var(--green-700); background: var(--sage-soft); }
.wr-doors button.wrong { border-color: var(--fire); opacity: .7; }

/* ---- SEO update (Oct 2026): breadcrumbs, heading-size helpers, Spanish edition line ---- */
.crumbs { padding-top: 1rem; font-size: .85rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: .35rem; color: var(--gold); }
.crumbs a { color: var(--green-700); }
.crumbs + .section { padding-top: clamp(1.5rem, 4vw, 3rem); }
.as-h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.as-h4 { font-size: 1em; }
.site-footer .fh { margin: 0 0 .4em; font-weight: 700; line-height: 1.15; }
.lang-note { font-size: .95rem; margin: -.4rem 0 1rem; }
