/* The wiki's parts: the home's hero and meadow, the Cantara chart, a region's map and pins, place cards, Murm
   cards with their "when" rows, people, tales and finds. Per-item positions and sizes are in built.css. */

/* The home's hero: the valley, the title, the trailer's button, and the meadow of the newest region's Murms. */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-top: max(28px, env(safe-area-inset-top)); display: grid; }
.hero .backdrop { position: absolute; inset: 0; z-index: -1; background: var(--night-dark) url("/assets/img/valley.webp") 50% 40% / cover no-repeat; }
.hero .loop, .hero .motes { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .loop { object-fit: cover; object-position: 50% 40%; opacity: 0; transition: opacity 1.4s ease; }
.hero .loop.is-on { opacity: 1; }
.hero .motes { image-rendering: pixelated; }
.hero .veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--night-dark) 0%, rgb(26 30 54 / 0.7) 26%, rgb(26 30 54 / 0.15) 60%, transparent 80%); }
.hero-in { padding: clamp(36px, 10vh, 120px) var(--edge) 0; max-width: var(--col); margin: 0 auto; width: 100%; }
.logo { display: block; width: clamp(180px, 34vw, 340px); line-height: 0; }
h1.title { font-size: clamp(40px, 6vw, 60px); color: var(--gold-light); margin-top: 8px; }
.tagline { margin: 6px 0 0; font-size: 28px; }
.watch { margin-top: 16px; display: inline-flex; gap: 12px; align-items: center; padding: 8px 16px 8px 8px; color: var(--parchment-light); cursor: pointer; background: none; border: 0; border-image: url("/assets/kit/panel_night.png") 8 fill / 16px stretch; image-rendering: pixelated; text-decoration: none; }
.watch img { width: 96px; height: 55px; object-fit: cover; border: 2px solid var(--outline); }
.watch span { display: grid; text-align: left; line-height: 1; gap: 4px; }
.watch b { font-weight: normal; font-size: 26px; color: var(--gold-light); }
.watch small { font-size: 18px; opacity: 0.8; }
.meadow-hint { max-width: var(--col); margin: clamp(24px, 5vh, 56px) auto 4px; padding: 0 var(--edge); font-size: 20px; text-align: center; color: var(--parchment); }
.meadow { width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); max-width: var(--col); margin: 0 auto; padding: 0 var(--edge) 10px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; justify-content: safe center; }
.meadow::-webkit-scrollbar { display: none; }
.meadow li { flex: none; scroll-snap-align: center; }
.meadow a { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--parchment-light); font-size: 18px; }
.meadow a::before { content: ""; grid-area: 1 / 1; align-self: end; width: 70%; height: 10px; margin-bottom: -2px; border-radius: 50%; background: rgb(20 22 40 / 0.45); }
.meadow .idle { grid-area: 1 / 1; position: relative; }
.meadow .nm { grid-area: 2 / 1; }
.meadow a:hover, .meadow a:focus-visible { color: var(--gold-light); }

/* Sprites: a Murm's battle picture at 2× (64 → 128), a person's walk frame at 3× (16×24 → 48×72). */
.sp { display: inline-block; width: 128px; height: 128px; background-size: 100% 100%; background-repeat: no-repeat; }
.sp.s96 { width: 96px; height: 96px; }
.walker { display: inline-block; background-repeat: no-repeat; image-rendering: pixelated; }
[data-stage="still"] .walker, [data-stage="still"] .idle { animation-play-state: paused; }

/* Moods: how to answer each. */
.moods { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 6px 0 6px; }
.mood { display: grid; gap: 2px; padding: 10px 12px; background: var(--night-dark); color: var(--parchment-light); border: 3px solid var(--outline); }
.mood b { font-weight: normal; font-size: 28px; color: var(--gold-light); }
.mood span:last-child { font-size: 20px; opacity: 0.85; }

/* The Cantara chart: eight lands in a ring, each a pin; the open ones lit and linked. Then a card per region. */
.chart-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.chart-wrap > * { min-width: 0; }
.chart { position: relative; width: calc(160px * var(--ms)); height: calc(160px * var(--ms)); --ms: 3; background: url("/assets/maps/cantara.png") 0 0 / 100% 100%; image-rendering: pixelated; border: 3px solid var(--outline); justify-self: center; }
.chart .pin { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 0; text-decoration: none; color: #fff; font-size: 20px; line-height: 1; }
.chart .pin .mk { width: calc(16px * var(--ms)); height: calc(16px * var(--ms)); }
.chart .pin.locked { color: var(--parchment); opacity: 0.8; font-size: 18px; }
.chart .pin.locked .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--outline); opacity: 0.6; margin-bottom: 4px; }
.chart .pin:hover, .chart .pin:focus-visible { color: var(--gold-light); }
.chart .pin.mid { color: var(--night); font-size: 18px; text-shadow: none; pointer-events: none; }
.lands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.land.on { grid-column: span 2; }
.land { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; color: var(--parchment); text-decoration: none; background: var(--night-dark); border: 3px solid var(--outline); }
.land.on { color: var(--paper-ink); background: var(--paper); }
.land.on:hover { background: #fff9ea; }
.land:not(.on) { opacity: 0.72; }
.land .no { display: block; font-size: 17px; opacity: 0.6; }
.land h3 { font-size: 30px; margin: 0; color: var(--gold-light); }
.land.on h3 { color: var(--gold-dark); }
.land p { margin: 0; font-size: 19px; }
.land .thumb { width: 320px; max-width: 100%; height: 180px; margin: 6px 0 2px; background-size: 320px 180px; background-position: 50% 50%; image-rendering: pixelated; border: 2px solid var(--outline); }
.land .state { margin-top: auto; padding-top: 6px; font-size: 17px; opacity: 0.75; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick a { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: calc(6 * var(--px)) calc(7 * var(--px)) calc(8 * var(--px)); color: var(--ink); text-decoration: none; border-image: var(--tile) 10 fill / calc(10 * var(--px)) stretch; image-rendering: pixelated; }
.quick a:hover { border-image-source: url("/assets/kit/tile_focused.png"); }
.quick b { font-weight: normal; font-size: 26px; }
.quick small { display: block; font-size: 18px; opacity: 0.75; }

/* A region's map: the game's own 320×180 pixel map at 2× (swiped on a phone) or 3×, the game's pins on top, each a
   link to its place; the night map after dusk. */
.region-head { display: grid; gap: 10px; justify-items: start; }
.region-head .of { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; }
.rgems { display: inline-flex; gap: 5px; }
.rg { width: calc(9 * var(--px)); height: calc(7 * var(--px)); background: url("/assets/kit/divider_gem.png") 0 0 / 100% 100%; image-rendering: pixelated; filter: grayscale(1) opacity(0.35); }
.rg.on { filter: none; opacity: 0.7; }
.rg.here { filter: drop-shadow(0 0 3px var(--gold-light)); }
.mapwrap { width: fit-content; max-width: 100%; overflow-x: auto; background: var(--night-dark); border: 3px solid var(--outline); overscroll-behavior-x: contain; scroll-margin-top: calc(var(--bar) + 12px); }
.map { --ms: 3; position: relative; width: calc(320px * var(--ms)); height: calc(180px * var(--ms)); background: 0 0 / 100% 100% no-repeat; image-rendering: pixelated; }
.map .pin { position: absolute; transform: translate(-50%, -100%); display: grid; justify-items: center; text-decoration: none; color: #fff; font-size: 19px; line-height: 1; z-index: 1; }
.map .pin .mk { width: calc(16px * var(--ms)); height: calc(16px * var(--ms)); }
.map .pin .nm { padding: 1px 4px; white-space: nowrap; }
.map .pin.under { transform: translate(-50%, -6px); }   /* a pin near the top: its marker on the point, its name under */
.map .pin .mk-dot { width: calc(6px * var(--ms)); height: calc(6px * var(--ms)); margin-bottom: calc(5px * var(--ms)); border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 0 2px var(--outline); }
.map .pin:hover, .map .pin:focus-visible, .map .pin.here, .map .pin:target { color: var(--gold-light); z-index: 2; }
.map .pin:target .mk, .map .pin:target .mk-dot { animation: bob 0.6s steps(3) infinite alternate; }
.map .pin.here .mk { animation: bob 0.6s steps(3) infinite alternate; }
.map .pin:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.swipe { display: none; font-size: 18px; opacity: 0.7; margin: 6px 0 0; }
.mapwrap.wide + .swipe { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 18px; opacity: 0.85; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .mk-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 0 2px var(--outline); margin: 0 6px; }

/* Place cards, in the map's order (west to east): a cut of its backdrop at 1×, name, marks, a line, what is there. */
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.pcard { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 8px; color: var(--ink); text-decoration: none; background: var(--parchment-light); border: 3px solid var(--outline); }
a.pcard:hover { background: #fff9ea; }
.pcard.flat { color: var(--ink); }
.pcard .shot { width: 112px; height: 72px; background-position: 50% 60%; background-repeat: no-repeat; image-rendering: pixelated; border: 2px solid var(--outline); }
.pcard .shot.mapcut, .shot-big.mapcut { background-repeat: no-repeat; }
.shot-big.mapcut { width: 341px; height: 191px; max-width: 100%; margin: 0 auto; }
.pcard .shot.none { background: radial-gradient(circle at 50% 55%, #2c2438 0 30%, #120f1c 75%); }
.pcard h3 { font-size: 26px; margin: 0; }
.pcard p { margin: 2px 0 0; font-size: 19px; }
.pcard .has { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 17px; opacity: 0.75; margin-top: 4px; }

/* The facts beside a picture: a place's, a Murm's. */
.facts { display: grid; gap: 8px; justify-items: start; align-content: start; }
.facts .no { font-size: 20px; opacity: 0.65; }
.facts h1 { font-size: 48px; line-height: 1; }
.facts .row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 21px; }
.facts .about { font-size: 24px; max-width: 30em; }
.facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 20px; margin: 0; }
.facts dt { opacity: 0.65; }
.facts dd { margin: 0; }

/* A place's page: the backdrop at 1× (2× wide) in a frame, the facts beside it. */
.place-head > * { min-width: 0; }
.place-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.shot-big { display: flex; justify-content: center; overflow: hidden; border: 3px solid var(--outline); background: var(--night-dark); }
.shot-big img { display: block; width: 682px; max-width: none; height: 382px; image-rendering: pixelated; }
.where { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.where .cut { flex: none; position: relative; width: calc(96px * 2); height: calc(54px * 2); background-size: 640px 360px; image-rendering: pixelated; border: 2px solid var(--outline); }
.where .cut .mk-dot-here { position: absolute; width: 32px; height: 32px; transform: translate(-50%, -100%); background: url("/assets/markers/marker_hero.png") 0 0 / 100% 100%; animation: bob 0.6s steps(3) infinite alternate; }
.rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.rooms { gap: 4px 0; font-size: 20px; }
.rooms li:not(:last-child)::after { content: "·"; margin: 0 8px; opacity: 0.6; }
.two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.two > .col { display: grid; gap: 20px; }

/* Murm cards: the battle picture, the name, its tones, and when it is met (how · hours · weather · tide). */
.murms { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.murms.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.mcard { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: calc(5 * var(--px)) calc(6 * var(--px)) calc(7 * var(--px)); color: var(--ink); text-decoration: none; border-image: var(--tile) 10 fill / calc(10 * var(--px)) stretch; image-rendering: pixelated; }
.mcard:hover { border-image-source: url("/assets/kit/tile_focused.png"); }
.mcard[hidden] { display: none; }
.mcard .sp { grid-row: span 4; align-self: center; }
.mcard .nm { font-size: 26px; line-height: 1; align-self: end; }
.mcard .no { font-size: 16px; opacity: 0.6; margin-right: 6px; }
.mcard .when { display: grid; gap: 3px; font-size: 18px; opacity: 0.9; grid-column: 2; }
.mcard .when li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.mcard .when .ic { margin-right: -2px; }
.later { display: inline-block; font-size: 16px; padding: 0 6px 2px; border: 2px solid var(--outline); opacity: 0.8; margin-right: 6px; }
.mcard.off { opacity: 0.45; }
.mcard.off .when { opacity: 1; }
.mcard .cnt { font-size: 17px; opacity: 0.7; grid-column: 2; }
.when .icons { display: inline-flex; gap: 2px; white-space: nowrap; }
:root[data-hour="dusk"] .mcard, :root[data-hour="night"] .mcard, :root[data-hour="dusk"] .quick a, :root[data-hour="night"] .quick a { color: var(--parchment-light); }
.key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 18px; opacity: 0.8; }
.key li { display: inline-flex; align-items: center; gap: 6px; }

/* People: a walker in place (never the grey strangers), the name, where to find them. */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.person { display: flex; gap: 12px; align-items: center; }
.person .walker { flex: none; }
.person b { font-weight: normal; font-size: 24px; display: block; line-height: 1; }
.person span { display: block; font-size: 18px; opacity: 0.75; }
.person .says { font-size: 19px; opacity: 0.9; font-style: italic; margin-top: 2px; }
.person .says::before { content: "\201C"; }
.person .says::after { content: "\201D"; }
.people.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.people.wide .person { align-items: flex-start; }

/* Tales: the quests that start here, main and side. */
.quests { display: grid; gap: 8px; }
.quest { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 8px 12px 10px; background: var(--parchment-light); color: var(--ink); border: 3px solid var(--outline); text-decoration: none; }
.quest .ic { grid-row: 1 / span 2; align-self: start; margin-top: 2px; }
.quest b { font-weight: normal; font-size: 24px; }
.quest p { margin: 0; font-size: 19px; opacity: 0.85; }
.quest .at { grid-column: 2; font-size: 17px; opacity: 0.7; }

/* Finds: items in sight, how many hidden, combed, caught, sold. */
.finds { display: grid; gap: 14px; }
.finds h4 { font-size: 20px; opacity: 0.75; margin-bottom: 4px; }
.items { display: flex; flex-wrap: wrap; gap: 6px; }
.item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 6px 6px; font-size: 19px; background: var(--parchment-light); border: 2px solid var(--outline); color: var(--ink); text-decoration: none; }
.item .ic.big { width: 32px; height: 32px; vertical-align: middle; }
.item.hid { opacity: 0.7; }
.item.hid .q { display: inline-grid; place-items: center; width: 32px; height: 32px; background: var(--parchment-shade); color: var(--ink); font-size: 22px; }

@keyframes bob { to { transform: translate(-50%, calc(-100% - 4px)); } }
@media (max-width: 1060px) { .map { --ms: 2; } .map .pin { font-size: 16px; } }
@media (max-width: 760px) {
  .chart-wrap { grid-template-columns: 1fr; }
  .chart { --ms: 2; justify-self: center; }
  .place-head { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .shot-big img { width: 341px; height: 191px; }
  .murms { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .murms.wide { grid-template-columns: 1fr; }
  .mcard { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: calc(5 * var(--px)) calc(4 * var(--px)) calc(7 * var(--px)); }
  .mcard .sp { grid-row: auto; }
  .mcard .when, .mcard .cnt { grid-column: auto; }
  .mcard .when li { justify-content: center; }
  .murms.wide .mcard { grid-template-columns: auto 1fr; justify-items: start; text-align: left; }
  .murms.wide .mcard .sp { grid-row: span 4; }
  .murms.wide .mcard .when li { justify-content: start; }
  .places { grid-template-columns: 1fr; }
  .lands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .land.on { grid-column: 1 / -1; }
  .land h3 { font-size: 24px; }
  .land p { font-size: 17px; }
  .tagline { font-size: 22px; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick a { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 4px; padding: calc(5 * var(--px)) calc(3 * var(--px)) calc(6 * var(--px)); }
  .quick b { font-size: 22px; }
  .quick small { font-size: 15px; }
}

/* Lists: a name search, the finds' rows, every Murm's card with its number, a tide's words, the Old Song. */
.find { display: flex; justify-content: center; margin: 0 0 10px; }
.find input { width: min(420px, 100%); min-height: 44px; padding: 0 14px 3px; font: inherit; font-size: 22px; color: var(--ink); background: var(--parchment-light); border: 3px solid var(--outline); }
.find input:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.murms.index { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.murms.index .mcard { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.murms.index .mcard .sp { grid-row: auto; }
.murms.index .mcard .nm { font-size: 22px; overflow-wrap: anywhere; }
.murms.index .mcard .no { display: block; }
.finds-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.find-row { padding: 10px 12px; background: var(--parchment-light); color: var(--ink); border: 3px solid var(--outline); scroll-margin-top: calc(var(--bar) + 16px); }
.find-row[hidden] { display: none; }
.find-row:target { outline: 3px solid var(--gold); }
.find-row h3 { display: flex; align-items: center; gap: 8px; font-size: 26px; margin-bottom: 4px; }
.find-row p { font-size: 19px; margin: 0 0 6px; }
.find-row .where { display: grid; gap: 2px; font-size: 18px; }
.find-row .how { opacity: 0.65; margin-right: 4px; }
.pocket { margin: 18px 0 8px; text-align: center; }
.tidal { display: inline-flex; align-items: center; gap: 4px; }
.verses { display: grid; gap: 10px; margin: 8px 0 14px; }
.verses .known { font-size: 30px; }
.verses .lost { display: flex; gap: 10px; opacity: 0.45; }
.outro { opacity: 0.8; }
.worn { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; font-size: 19px; }
.worn .fx { flex: none; image-rendering: pixelated; background-color: var(--night); border: 2px solid var(--outline); }
.spark { display: inline-block; width: 16px; height: 16px; margin-left: 4px; background: url("/assets/kit/divider_gem.png") 50% 50% / 100% 100%; image-rendering: pixelated; animation: glimmer 2.4s ease-in-out infinite; }
.tale-list { display: grid; gap: 10px; }
.tale-row { padding: 10px 12px; background: var(--parchment-light); color: var(--ink); border: 3px solid var(--outline); scroll-margin-top: calc(var(--bar) + 16px); }
.tale-row:target { outline: 3px solid var(--gold); }
.tale-row h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 26px; margin-bottom: 4px; }
.tale-row p { font-size: 20px; margin: 0 0 6px; }
.tale-row dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 6px; font-size: 19px; }
.tale-row dt { opacity: 0.65; }
.tale-row dd { margin: 0; }
.steps-of summary { cursor: pointer; display: inline-flex; min-height: 40px; align-items: center; padding: 0 14px 3px; font-size: 20px; border-image: url("/assets/kit/pill_normal.png") 8 fill / 18px stretch; image-rendering: pixelated; list-style: none; }
.steps-of summary::-webkit-details-marker { display: none; }
.steps-of[open] summary { border-image-source: url("/assets/kit/pill_focused.png"); }
.steps-of ol { margin: 8px 0 0 24px; padding: 0; list-style: decimal; display: grid; gap: 4px; font-size: 19px; }
.quest b a { text-decoration: none; }
.quest b a:hover { text-decoration: underline; }
.tale-row dd.items { display: flex; flex-wrap: wrap; gap: 6px; }
