/* Full-screen story views (js/views/): Balanza's infographics and the M5 atlas. They reuse the cabin
   games' overlay (.game-overlay, .go-bar) so leaving the chart feels the same. */
.story-view .go-title .sv-title { font: inherit; }

/* ---------------- Balanza: an infographic page per story ---------------- */
.bz { position: absolute; inset: 0; overflow: auto; scroll-behavior: smooth; background: #f6efdf; }
.bz-in { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.bz-in.in { opacity: 1; transform: none; }
.bz-hero { display: grid; grid-template-columns: 1fr minmax(180px, 34%); align-items: center; gap: 20px; padding: 34px clamp(18px, 6vw, 72px) 26px;
  background: radial-gradient(ellipse at 80% 40%, #ffffff, #efe4c9 70%); border-bottom: 1px solid var(--line); }
.bz-kicker { font: 700 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.bz-hero h1 { margin: 6px 0 4px; font: 400 clamp(34px, 5vw, 58px)/1.02 var(--serif); color: var(--ink); }
.bz-where { margin: 0 0 14px; font: italic 18px var(--serif); color: var(--ink-2); }
.bz-orca { width: 100%; max-width: 360px; justify-self: center; filter: drop-shadow(0 12px 18px rgba(31, 27, 67, .25)); }
.bz-pearls { display: flex; align-items: center; gap: 8px; }
.bz-pearls i { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #a6a2cf; background: transparent; }
.bz-pearls i.on { border-color: #d9a441; background: radial-gradient(circle at 35% 35%, #fff, #f6ead0 45%, #e6d5ae); box-shadow: 0 0 0 2px rgba(217, 164, 65, .18); }
.bz-pearls i.new { box-shadow: 0 0 10px 3px rgba(255, 220, 140, .9); }
.bz-pearls span { margin-left: 6px; font: 700 12px var(--sans); color: var(--ink-3); }

.bz-band { position: relative; padding: 34px clamp(18px, 6vw, 72px); }
.bz-label { margin-bottom: 10px; font: 700 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.bz-band h2 { margin: 0 0 10px; font: 400 clamp(26px, 3.4vw, 38px)/1.1 var(--serif); }
.bz-band p { margin: 0 0 12px; font: 18px/1.6 var(--serif); max-width: 62ch; }
.bz-grid { display: grid; grid-template-columns: minmax(200px, 38%) 1fr; gap: clamp(18px, 4vw, 48px); align-items: center; }
.bz-light .bz-grid { grid-template-columns: 1fr minmax(200px, 38%); }
.bz-scene { margin: 0; border-radius: 18px; overflow: hidden; background: #fbf6ea; box-shadow: 0 10px 28px -12px rgba(31, 27, 67, .35); }
.bz-scene img { display: block; width: 100%; height: auto; }
.bz-figure { display: inline-grid; margin-top: 8px; padding: 12px 18px; border-left: 4px solid currentColor; }
.bz-figure b, .bz-figs b { font: 400 clamp(30px, 4vw, 46px)/1 var(--serif); }
.bz-figure span, .bz-figs span { font: 600 13px/1.35 var(--sans); opacity: .85; max-width: 26ch; }
.bz-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 22px; }
.bz-figs > div { display: grid; gap: 6px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(51, 41, 31, .1); }

.bz-dark { background: linear-gradient(160deg, #1f3047, #2b3f57 60%, #34485f); color: #e6ddc8; }
.bz-dark h2 { color: #f4ead3; } .bz-dark p { color: #ded3bc; }
.bz-dark .bz-scene { background: radial-gradient(circle at 50% 45%, #3a4f68, #22344a); }
.bz-dark .bz-scene img { filter: grayscale(.45) sepia(.2) brightness(.88); }
.bz-dark .bz-figs > div { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); }

.bz-act { background: #efe6d0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bz-prompt { font-style: italic; }
.bz-options { display: grid; gap: 10px; max-width: 640px; }
.bz-opt { text-align: left; padding: 14px 18px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fffaf0; font: 600 15px var(--sans); color: var(--ink); cursor: pointer; transition: transform .15s, border-color .15s; }
.bz-opt:hover:not(:disabled) { transform: translateX(4px); border-color: var(--ink-3); }
.bz-opt.wrong { opacity: .5; text-decoration: line-through; }
.bz-opt.right { background: #dfeedd; border-color: var(--green); color: #2f5a3d; opacity: 1; }
.bz-opt:disabled { cursor: default; }
.bz-note { margin-top: 12px !important; font: 600 15px var(--sans) !important; color: var(--navy); min-height: 1em; }
.bz-note.on { padding: 8px 12px; border-left: 3px solid var(--navy); background: rgba(35, 64, 94, .07); }
.bz-act.solved .bz-label::after { content: ' · ' attr(data-done); color: var(--green); }   /* the word: balanza-view.js */
.bz-timing { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 20px; align-items: center; }
.bz-timing > div { display: flex; flex-wrap: wrap; gap: 10px; }
.bz-cue { transition: box-shadow .2s; position: relative; }
.bz-cue.cue { box-shadow: 0 0 0 4px #f6e6b8, 0 0 30px 8px rgba(246, 230, 184, .9); }
.bz-cue.cue::after { content: ''; position: absolute; inset: 20%; border-radius: 50%; border: 4px solid #fff; animation: qd-cue 1s ease-out infinite; }
.bz-time.cue { background: var(--red); border-color: var(--red); }
.bz-time.cue::after { content: ' · ' attr(data-now); }
.bz-join { font-size: 16px; padding: 12px 22px; }

.bz-light { background: linear-gradient(180deg, #fffdf6, #f3f8f4); }
.bz-light.veiled > :not(.bz-veil):not(.bz-label) { filter: blur(6px); opacity: .45; pointer-events: none; user-select: none; }
.bz-veil { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
  background: rgba(51, 41, 31, .88); color: #f6eedb; font: 700 14px var(--sans); }
.bz-light.veiled .bz-veil { display: flex; }

.bz-route { background: #f6efdf; }
.bz-map { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: var(--paper); }
.bz-map canvas { display: block; width: 100%; }
.bz-map-key { position: absolute; left: 12px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 10px; border-radius: 10px; background: rgba(251, 245, 230, .92); font: 600 12px var(--sans); color: var(--ink-2); }
.bz-map-key i { display: inline-block; width: 18px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 3px solid #2b2756; }
.bz-map-key .k-next { border-top: 2px dashed rgba(51, 41, 31, .5); }
.bz-map-key .k-pearl { width: 10px; height: 10px; border: 2px solid #d9a441; border-radius: 50%; background: #fff4cc; }
.bz-next { margin-top: 18px; }
.bz-next-card { display: grid; gap: 4px; max-width: 640px; padding: 18px 20px; border-radius: 16px; background: #fffaf0; border: 1px solid var(--line-2); }
.bz-next-card.in { animation: qd-in .45s ease-out both; }
.bz-next-card b { font: 400 24px var(--serif); }
.bz-next-card p { margin: 0 0 6px; font-size: 16px; }
.bz-coords { font: 600 13px var(--sans) !important; color: var(--ink-3); }
.bz-next-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bz-wait { font: italic 16px var(--serif) !important; color: var(--ink-3); }

.bz-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.bz-card { position: relative; display: grid; gap: 4px; align-content: start; text-align: left; padding: 12px; border-radius: 16px; border: 1px solid var(--line-2); background: #fffaf0; cursor: pointer; }
.bz-card img { width: 100%; aspect-ratio: 1.6; object-fit: cover; border-radius: 10px; background: #fbf6ea; }
.bz-card:disabled { cursor: default; opacity: .55; } .bz-card:disabled img { filter: grayscale(1); }
.bz-card.done { border-color: #d9a441; box-shadow: 0 0 0 2px rgba(217, 164, 65, .18); }
.bz-card-n { position: absolute; top: 18px; left: 18px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #2b2756; color: #fff; font: 700 13px var(--sans); }
.bz-card b { font: 400 19px var(--serif); } .bz-card small { color: var(--ink-3); font-weight: 600; }
.bz-card-text { font-size: 13px; color: var(--ink-2); }

@media (max-width: 760px) {
  .bz-hero { grid-template-columns: 1fr; padding-top: 22px; } .bz-orca { max-width: 220px; order: -1; }
  .bz-grid, .bz-light .bz-grid, .bz-timing { grid-template-columns: 1fr; }
  .bz-scene { max-width: 420px; }
  .bz-band p { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) { .bz-in { opacity: 1; transform: none; transition: none; } .bz { scroll-behavior: auto; } }

/* ---------------- The M5 atlas: a turning globe and the animals' infographics ---------------- */
.m5v { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 420px; }
.m5v-stage { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #f2f7f6, #d7e4e2 70%, #c3d6d6); cursor: grab; }
.m5v-stage:active { cursor: grabbing; }
.m5v-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.m5v-month { position: absolute; left: 20px; top: 18px; padding: 8px 14px; border-radius: 12px; background: rgba(251, 245, 230, .92); border: 1px solid var(--line-2); }
.m5v-month small { display: block; font: 700 11.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.m5v-month b { font: 400 24px var(--serif-sc); }
.m5v-track { position: absolute; left: 20px; bottom: 18px; max-width: min(460px, calc(100% - 40px)); padding: 12px 16px; border-radius: 14px; background: rgba(251, 245, 230, .94); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.m5v-track b { font: 400 21px var(--serif); }
.m5v-track p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.m5v-drag { position: absolute; right: 16px; bottom: 12px; margin: 0; font: italic 13px var(--serif); color: var(--ink-3); }
.m5v-side { display: flex; flex-direction: column; min-height: 0; overflow: auto; border-left: 1px solid var(--line-2); background: #f6ecd4; }
.m5v-crest { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px dashed var(--line-2); }
.m5v-crest-art { flex: none; width: 112px; }
.m5v-crest-art svg { display: block; width: 100%; height: auto; }
.m5v-crest-art .m5 { cursor: pointer; }
.m5v-crest-art .m5.sel path { filter: drop-shadow(0 0 10px rgba(217, 164, 65, .9)); }
@media (prefers-reduced-motion: no-preference) { .m5v-crest-art .m5.just path { animation: m5-just 1.4s ease-out 3; } }
@keyframes m5-just { 0%, 100% { filter: none; } 40% { filter: drop-shadow(0 0 16px rgba(255, 220, 140, 1)) brightness(1.2); } }
.m5v-crest b { display: block; font: 400 18px var(--serif); }
.m5v-n { font: 700 12.5px var(--sans); color: var(--navy); }
.m5v-crest small { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12px; }
.m5v-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px 12px; }
.m5v-tabs button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); cursor: pointer; }
.m5v-tabs img { width: 44px; height: 44px; }
.m5v-tabs span { font: 600 10.5px/1.15 var(--sans); text-align: center; color: var(--ink-2); }
.m5v-tabs button.unknown img { filter: grayscale(1) opacity(.45); }
.m5v-tabs button.on { background: var(--ink); border-color: var(--ink); } .m5v-tabs button.on span { color: var(--paper); }
.m5v-info { padding: 4px 16px 18px; }
.m5v-head { display: flex; align-items: center; gap: 12px; }
.m5v-head img { width: 84px; height: 84px; }
.m5v-head.unknown img { filter: grayscale(1) opacity(.45); }
.m5v-head h2 { margin: 0; font: 400 26px/1.1 var(--serif); }
.m5v-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.m5v-latin { font: italic 16px var(--serif) !important; color: var(--ink-3) !important; }
.m5v-info h3 { margin: 16px 0 6px; font: 700 11.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.m5v-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.m5v-chips div { padding: 8px 10px; border-radius: 12px; background: #fffaf0; border: 1px solid var(--line); }
.m5v-chips small { display: block; font: 700 10.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.m5v-chips b { font: 400 16px/1.25 var(--serif); }
.m5v-size { display: block; width: 100%; height: auto; margin-top: 10px; }
.m5v-size text { font: 600 10px var(--sans); fill: var(--ink-3); }
.m5v-size .m5v-size-l { font: 400 13px var(--serif); fill: var(--ink); }
.m5v-iucn { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.m5v-iucn span { min-width: 34px; padding: 4px 0; border-radius: 6px; text-align: center; font: 800 11.5px var(--sans); color: #fff; opacity: .3; }
.m5v-iucn span:nth-child(1) { background: #3f7250; } .m5v-iucn span:nth-child(2) { background: #8aa13c; } .m5v-iucn span:nth-child(3) { background: #d9a441; }
.m5v-iucn span:nth-child(4) { background: #c0532f; } .m5v-iucn span:nth-child(5) { background: #a3352c; }
.m5v-iucn span.on { opacity: 1; transform: scale(1.12); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.m5v-iucn span.dd { background: #8f8268; }
.m5v-iucn em { margin-left: 6px; font: italic 14px var(--serif); color: var(--ink-2); }
.m5v-where { display: flex; gap: 6px; align-items: flex-start; margin: 14px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(217, 164, 65, .14); font-size: 13.5px; color: var(--ink); }
.m5v-where .ic { flex: none; color: var(--gold); margin-top: 2px; }
.m5v-cal { display: grid; gap: 3px; }
.m5v-cal-row { display: grid; grid-template-columns: 116px repeat(12, 1fr); gap: 2px; align-items: center; }
.m5v-cal-row span { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.15; font-size: 11.5px; color: var(--ink-2); }   /* two lines, then … */
.m5v-cal-row i { height: 14px; border-radius: 3px; background: rgba(51, 41, 31, .07); }
.m5v-cal-row i.on { background: #d9a441; }
.m5v-cal-row i.now { outline: 2px solid var(--navy); outline-offset: -1px; }
.m5v-cal-row.head i { height: auto; background: none; font: 700 10px var(--sans); font-style: normal; text-align: center; color: var(--ink-3); }
.m5v-cal-row.head i.now { outline: 0; color: var(--navy); }
.m5v-notes p { margin: 0 0 8px; font: 15px/1.55 var(--serif); color: var(--ink-2); }
@media (max-width: 760px) {
  .m5v { grid-template-columns: 1fr; grid-template-rows: 46vh 1fr; }
  .m5v-side { border-left: 0; border-top: 1px solid var(--line-2); }
  .m5v-track { left: 10px; right: 10px; bottom: 10px; max-width: none; padding: 8px 12px; } .m5v-track p { display: none; }
  .m5v-drag { display: none; } .m5v-month { left: 10px; top: 10px; padding: 4px 10px; } .m5v-month b { font-size: 18px; }
  .m5v-tabs img { width: 34px; height: 34px; }
}
.bz-dark.bz-intro .bz-scene img { filter: none; }
.story-view .go-title { min-width: 0; }
.story-view .sv-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-view .go-right { display: flex; flex: none; gap: 8px; align-items: center; }
@media (max-width: 760px) {
  .story-view .go-bar { padding: 8px 12px; gap: 8px; }
  .story-view .go-title { font-size: 17px; }
  .story-view .go-right .btn { display: none; }        /* the close button is enough on a phone */
}
.m5v-size .m5v-size-z { font: 800 11px var(--sans); fill: var(--gold); }
/* Balanza's places and positions: the name sails there, the position brings the glass (as in the passport) */
.bz .bz-go, .bz .bz-glass { font: inherit; color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.bz .bz-glass { margin-left: 8px; font: 600 12.5px ui-monospace, Consolas, monospace; color: var(--navy); white-space: pre; }
.bz .bz-go:hover, .bz .bz-glass:hover { color: var(--red); text-decoration-style: solid; }
