/* Stories Around the World (/world). Mobile first; loaded after styles.css, theme.css, lesson.css and read.css. */
.wd-hero { background: linear-gradient(165deg, #fff6e6 0%, #eaf7ff 55%, #eefbe6 100%); padding: 28px 0 20px; overflow: hidden; }
.wd-hero__in { display: grid; gap: 18px; }
.wd-hero h1 { font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.05; margin: 0 0 6px; font-weight: 900; }
.wd-sub { font-size: 1.15rem; font-weight: 800; color: var(--magenta); margin: 0 0 10px; }
.wd-hero__cast { display: flex; justify-content: center; gap: 10px; }
.wd-pal { margin: 0; text-align: center; width: 46%; max-width: 210px; }
.wd-pal svg { width: 100%; height: auto; display: block; animation: wd-bob 3.2s ease-in-out infinite; }
.wd-pal--m svg { animation-delay: -1.6s; }
.wd-pal figcaption b { display: block; font-size: 1.15rem; }
.wd-pal figcaption small { color: var(--ink-2); font-weight: 700; }
@keyframes wd-bob { 50% { transform: translateY(-6px) rotate(-1deg); } }

.wd-section { padding: 22px 16px 40px; }
.wd-h2 { font-size: 1.45rem; font-weight: 900; margin: 30px 0 12px; }
.wd-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.wd-chip { font: inherit; font-weight: 800; cursor: pointer; border: 2px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 8px 16px; min-height: 44px; }
.wd-chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Map */
.wd-map { background: var(--tint); border-radius: var(--radius); padding: 14px; }
.wd-map__head h2 { margin: 0; font-size: 1.35rem; font-weight: 900; }
.wd-map__head p { margin: 2px 0 10px; font-weight: 700; }
.wd-map__svg { width: 100%; height: auto; display: block; }
.wd-sea { fill: #bfe3ff; }
.wd-mapgrid path { stroke: #fff; stroke-opacity: .55; stroke-width: 1.5; fill: none; }
.wd-land path { fill: #9fd67a; stroke: #6fb24a; stroke-width: 3; stroke-linejoin: round; }
.wd-pin { cursor: pointer; outline: none; }
.wd-pin path { transition: transform .15s; }
.wd-pin:hover path, .wd-pin:focus-visible path { transform: scale(1.15); }
.wd-pin:focus-visible path { stroke: #1f2aa8; }
.wd-pin__pulse { opacity: .35; transform-origin: 0 0; animation: wd-pulse 2s ease-out infinite; }
@keyframes wd-pulse { from { transform: scale(.4); opacity: .5; } to { transform: scale(1.8); opacity: 0; } }
.wd-pinbox { margin-top: 10px; background: var(--bg); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.wd-pinbox__place { margin: 0 0 6px; font-weight: 900; font-size: 1.1rem; }
.wd-pinbox__place small { color: var(--ink-2); font-weight: 700; }
.wd-pinbox__row { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 6px; border-radius: 12px; }
.wd-pinbox__row:hover { background: var(--tint); }
.wd-pinbox__row b, .wd-pinbox__row small { display: block; }
.wd-pinbox__row small { color: var(--ink-2); font-weight: 700; }
.wd-pinbox__face { width: 52px; flex: none; }
.wd-pinbox__face svg { width: 100%; height: auto; display: block; }

/* Cards */
.wd-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.wd-videos { display: grid; gap: 16px; grid-template-columns: 1fr; }
.wd-card, .wd-video { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; font: inherit; text-align: left; padding: 0; cursor: pointer; }
.wd-card:hover, .wd-video:hover { transform: translateY(-3px); }
.wd-cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #cfe9ff; }
.wd-cover > svg { width: 100%; height: 100%; display: block; }
.wd-card.is-locked .wd-cover > svg { filter: saturate(.75); }
.wd-badge { position: absolute; top: 10px; left: 10px; background: var(--green); color: #fff; font-weight: 900; font-size: .8rem; letter-spacing: .06em; padding: 5px 10px; border-radius: 999px; }
.wd-badge--lock { background: #3b2a7a; }
.wd-tags .wd-badge { position: static; }
.wd-done { position: absolute; top: 10px; right: 10px; background: #fff; color: var(--green-dark); font-weight: 900; padding: 4px 9px; border-radius: 999px; }
.wd-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: rgba(31, 42, 168, .88); color: #fff; font-size: 1.7rem; padding-left: 5px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.wd-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 16px; }
.wd-card__title { font-weight: 900; font-size: 1.15rem; line-height: 1.2; }
.wd-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-weight: 700; font-size: .95rem; }
.wd-skill { font-weight: 800; color: var(--magenta); font-size: .95rem; }
.wd-card__desc { color: var(--ink-2); font-size: .95rem; }

/* Passport */
.wd-passport { margin-top: 30px; background: #fff8e8; border: 2px dashed #e7c27a; border-radius: var(--radius); padding: 16px; }
.wd-passport h2 { margin: 0 0 8px; font-size: 1.3rem; font-weight: 900; }
.wd-passport p { margin: 0; font-weight: 700; }
.wd-stamps { display: flex; flex-wrap: wrap; gap: 10px; }
.wd-stamp { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 104px; height: 104px; border-radius: 50%; border: 4px double #c4167c; color: #c4167c; font-weight: 900; font-size: .78rem; line-height: 1.15; padding: 8px; transform: rotate(-8deg); background: rgba(255, 255, 255, .6); }
.wd-stamp b { font-size: 1.8rem; line-height: 1; margin-bottom: 4px; }
.wd-stamp--big { width: 150px; height: 150px; font-size: .95rem; animation: wd-stamp .5s cubic-bezier(.2, 1.6, .5, 1) both; }
.wd-stamp--big b { font-size: 2.6rem; }
@keyframes wd-stamp { from { transform: scale(2.2) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
.wd-note { margin-top: 26px; }

/* Members gate */
.wd-gate { width: min(480px, 100% - 24px); max-height: calc(100vh - 24px); padding: 0 24px 24px; border: 0; border-radius: 28px; background: #fff; color: #12224a; box-shadow: 0 30px 80px rgba(18, 34, 74, .35); overflow: auto; text-align: center; }
.wd-gate::backdrop { background: rgba(14, 29, 69, .55); backdrop-filter: blur(3px); }
.wd-gate[open] { animation: wl-in .25s ease-out; }
.wd-gate .wl__x { position: absolute; top: 12px; right: 12px; }
.wd-gate__art { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 0 -24px 14px; padding: 18px 0 6px; background: linear-gradient(160deg, #ffe6b8, #d9f0ff); }
.wd-gate__art svg { width: 120px; height: auto; }
.wd-gate__lock { font-size: 2.4rem; margin-bottom: 30px; }
.wd-gate h2 { font-size: 1.6rem; font-weight: 900; margin: 0 0 6px; }
.wd-gate__story { font-weight: 800; color: #3b2a7a; margin: 0 0 6px; }
.wd-gate .btn { margin-top: 10px; }

/* Reader */
.wd-reader { padding: 16px 16px 40px; max-width: 920px; }
.wd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.wd-tag { background: var(--tint); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: .85rem; }
.wd-title { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 900; line-height: 1.1; margin: 0 0 8px; }
.wd-skillbar { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; font-weight: 700; color: var(--ink-2); }
.wd-skillbar b { color: var(--magenta); }
.wd-progress { display: flex; gap: 5px; margin-bottom: 12px; }
.wd-progress i { flex: 1; height: 8px; border-radius: 99px; background: var(--line); }
.wd-progress i.is-done { background: var(--green); }
.wd-progress i.is-now { background: var(--blue); }
.wd-progress i.is-special { flex: .55; }
.wd-book { min-height: 300px; }
.wd-scene { display: grid; gap: 12px; }
.wd-pic { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: #cfe9ff; box-shadow: var(--shadow); }
.wd-pic > svg { width: 100%; height: 100%; display: block; }
.wd-pic .w-actor { animation: wd-bob 3s ease-in-out infinite; }
.wd-pic .w-actor + .w-actor { animation-delay: -1.5s; }
.wd-pic .w-fx { animation: wd-pop .5s .3s cubic-bezier(.2, 1.6, .5, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes wd-pop { from { opacity: 0; scale: .3; } }
.wd-lines { display: grid; gap: 10px; }
.wd-lines > * { animation: wd-in .4s calc(var(--i, 0) * .25s) ease-out both; }
@keyframes wd-in { from { opacity: 0; transform: translateY(8px); } }
.wd-cap { margin: 0; font-size: 1.2rem; line-height: 1.45; font-weight: 600; }
.wd-fx { margin: 0; font-size: 1.5rem; font-weight: 900; color: #e08a00; letter-spacing: .02em; }
.wd-say { display: flex; gap: 10px; align-items: flex-end; }
.wd-say--r { flex-direction: row-reverse; }
.wd-face { flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; overflow: hidden; }
.wd-face svg { width: 120%; height: auto; margin-top: 12%; }
.wd-face--icon img { width: 42px; height: 42px; }
.wd-say__bubble { background: var(--tint); border-radius: 18px 18px 18px 4px; padding: 9px 14px; font-size: 1.15rem; line-height: 1.4; }
.wd-say--r .wd-say__bubble { border-radius: 18px 18px 4px 18px; background: #fff3d9; color: #12224a; }
.wd-say__bubble b { display: block; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--blue-text); }
.wd-say--r .wd-say__bubble b { color: #b45f00; }
.is-reading.wd-cap, .is-reading .wd-say__bubble { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 14px; }
.wd-bar { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.wd-bar .btn { flex: 1; max-width: 240px; min-height: 48px; }
.wd-bar .btn[disabled] { opacity: .45; cursor: default; transform: none; }
.wd-listen-row { text-align: center; margin: 14px 0 0; }
.wd-vctl { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.wd-vctl[hidden] { display: none; }
.wd-vctl .st-listen { padding: 8px 12px; min-width: 44px; min-height: 44px; }

.wd-card-step, .wd-panel { background: var(--tint); border-radius: var(--radius); padding: 18px; }
.wd-card-step h2, .wd-panel h2 { font-size: 1.35rem; font-weight: 900; margin: 4px 0 6px; }
.wd-step-badge { margin: 0; font-weight: 900; color: var(--magenta); font-size: 1.05rem; }
.wd-opts { display: grid; gap: 10px; margin-top: 12px; }
.wd-opt { font: inherit; font-weight: 800; font-size: 1.05rem; text-align: left; cursor: pointer; border: 2px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 16px; padding: 12px 14px; min-height: 48px; }
.wd-opt:hover { border-color: var(--blue); }
.wd-opt[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.wd-reply { margin: 12px 0 0; padding: 12px 14px; background: #e9f9ef; color: #12224a; border-radius: 14px; font-weight: 700; animation: wd-in .35s ease-out both; }

.wd-complete { display: grid; gap: 14px; }
.wd-complete__hero { display: flex; gap: 14px; align-items: center; background: linear-gradient(160deg, #fff1cc, #e3f4ff); color: #12224a; border-radius: var(--radius); padding: 16px; }
.wd-complete__pal { width: 110px; flex: none; }
.wd-complete__pal svg { width: 100%; height: auto; animation: wd-bob 2s ease-in-out infinite; }
.wd-complete__place { font-size: 1.4rem; font-weight: 900; margin: 0; }
.wd-complete__place small { font-size: .95rem; color: #4b5878; }
.wd-complete__skill { margin: 4px 0; font-weight: 700; }
.wd-complete__skill b { color: var(--magenta); }
.wd-complete__line { margin: 0; }
.wd-complete .kicker { color: #1f2aa8; }
.wd-dyk p { margin: 4px 0 0; font-size: 1.08rem; }
.wd-word { margin-top: 12px !important; }
.wd-word .kicker { display: block; margin: 0; }
.wd-stampbox { display: flex; justify-content: center; background: #fff8e8; }
.wd-complete .wd-h2 { margin: 16px 0 0; }

@media (min-width: 640px) {
  .wd-grid, .wd-videos { grid-template-columns: repeat(2, 1fr); }
  .wd-opts { grid-template-columns: repeat(3, 1fr); }
  .wd-complete .wd-opts { grid-template-columns: 1fr; }
  .wd-complete__pal { width: 150px; }
}
@media (min-width: 900px) {
  .wd-hero__in { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .wd-grid { grid-template-columns: repeat(3, 1fr); }
  .wd-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .wd-scene { grid-template-columns: 1.35fr 1fr; align-items: center; }
  .wd-section { padding: 30px 24px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .wd-pal svg, .wd-pic .w-actor, .wd-pin__pulse, .wd-complete__pal svg, .wd-lines > *, .wd-stamp--big, .wd-pic .w-fx { animation: none; }
}

[data-theme="dark"] .wd-hero { background: linear-gradient(165deg, #1b2450, #10284a 55%, #143a2c); }
[data-theme="dark"] .wd-chip, [data-theme="dark"] .wd-opt, [data-theme="dark"] .wd-card, [data-theme="dark"] .wd-video, [data-theme="dark"] .wd-pinbox { background: var(--surface); }
[data-theme="dark"] .wd-opt[aria-pressed="true"], [data-theme="dark"] .wd-chip[aria-pressed="true"] { background: var(--blue); }
[data-theme="dark"] .wd-sea { fill: #1d3d6e; }
[data-theme="dark"] .wd-land path { fill: #3f7d4a; stroke: #2d5e36; }
[data-theme="dark"] .wd-passport { background: #2a2440; border-color: #6b5a9a; }
[data-theme="dark"] .wd-stamp { background: transparent; color: #ff8fc8; border-color: #ff8fc8; }
[data-theme="dark"] .wd-stampbox { background: #2a2440; }
[data-theme="dark"] .wd-say__bubble { background: var(--surface); }

/* Video adventures (assets/world/video.js) */
.wv { width: min(1100px, 100% - 16px); max-height: calc(100vh - 16px); padding: 0; border: 0; border-radius: 22px; background: #0b1230; color: #fff; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.wv::backdrop { background: rgba(6, 12, 34, .8); }
.wv-frame { position: relative; }
.wv-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; max-height: calc(100vh - 90px); margin: 0 auto; background: #000; }
.wv-shot { position: absolute; inset: 0; animation: wv-fade .7s ease-out both; }
.wv-shot > svg { width: 100%; height: 100%; display: block; }
.wv-shot .w-actor { animation: wd-bob 2.6s ease-in-out infinite; }
.wv-kb1 > svg { animation: wv-kb1 14s ease-out both; }
.wv-kb2 > svg { animation: wv-kb2 14s ease-out both; }
.wv-kb3 > svg { animation: wv-kb3 14s ease-out both; }
.wv-kb4 > svg { animation: wv-kb4 14s ease-out both; }
@keyframes wv-fade { from { opacity: 0; } }
@keyframes wv-kb1 { from { transform: scale(1.02); } to { transform: scale(1.14) translate(-2%, -1%); } }
@keyframes wv-kb2 { from { transform: scale(1.14) translate(2%, 0); } to { transform: scale(1.04); } }
@keyframes wv-kb3 { from { transform: scale(1.06) translate(-2%, 1%); } to { transform: scale(1.14) translate(2%, -1%); } }
@keyframes wv-kb4 { from { transform: scale(1.04); } to { transform: scale(1.12) translate(1%, 2%); } }
.wv-dim > svg { filter: brightness(.55) blur(2px); }
.wv-caption { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); width: min(88%, 900px); background: rgba(8, 14, 40, .82); border-radius: 16px; padding: .5em .9em; font-size: clamp(.95rem, 2.6vw, 1.7rem); font-weight: 700; line-height: 1.3; text-align: center; animation: wv-up .35s ease-out both; }
.wv-caption b { display: block; font-size: .65em; letter-spacing: .08em; text-transform: uppercase; color: #ffc94a; }
.wv-caption--fx { background: none; font-size: clamp(1.4rem, 4.5vw, 3rem); font-weight: 900; color: #ffc94a; text-shadow: 0 3px 0 #1f2aa8, 0 0 12px rgba(0, 0, 0, .5); }
@keyframes wv-up { from { opacity: 0; transform: translate(-50%, 10px); } }
.wv-card { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 4%; animation: wv-up2 .6s .2s ease-out both; }
.wv-card--title { justify-content: flex-end; padding-bottom: 6%; background: linear-gradient(to top, rgba(8, 14, 40, .85), transparent 60%); }
@keyframes wv-up2 { from { opacity: 0; transform: translateY(14px); } }
.wv-card h2, .wv-end h2 { margin: 0 0 .25em; font-size: clamp(1.4rem, 5vw, 3.2rem); font-weight: 900; line-height: 1.1; text-shadow: 0 3px 12px rgba(0, 0, 0, .5); }
.wv-series { margin: 0 0 .4em; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #ffc94a; font-size: clamp(.75rem, 1.8vw, 1.1rem); }
.wv-place { margin: 0; font-weight: 800; font-size: clamp(.95rem, 2.4vw, 1.5rem); }
.wv-opts { list-style: none; margin: .6em 0 0; padding: 0; display: grid; gap: .5em; width: min(100%, 720px); font-size: clamp(.9rem, 2.3vw, 1.4rem); font-weight: 800; }
.wv-opts li { background: rgba(255, 255, 255, .95); color: #12224a; border-radius: 14px; padding: .45em .8em; }
.wv-end { position: absolute; inset: 0; display: flex; align-items: center; gap: 3%; padding: 4% 5%; background: radial-gradient(circle at 20% 40%, #2a35c4, #0b1230 70%); animation: wv-fade .6s both; }
.wv-end__pal { width: 30%; flex: none; }
.wv-end__pal svg { width: 100%; height: auto; animation: wd-bob 2s ease-in-out infinite; }
.wv-end__copy { font-size: clamp(.8rem, 1.9vw, 1.2rem); }
.wv-end__copy p { margin: .3em 0; }
.wv-dyk, .wv-think { background: rgba(255, 255, 255, .1); border-radius: 12px; padding: .4em .7em; }
.wv-end__cta { margin-top: .8em !important; display: flex; flex-wrap: wrap; gap: 8px; }
.wv-prog { height: 5px; background: rgba(255, 255, 255, .15); }
.wv-prog i { display: block; height: 100%; width: 0; background: #ffc94a; transition: width .5s; }
.wv-ctrl { display: flex; gap: 8px; align-items: center; padding: 8px 10px; }
.wv-btn { font: inherit; font-weight: 800; min-width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; padding: 0 12px; }
.wv-btn:hover { background: rgba(255, 255, 255, .24); }
.wv-lang { max-width: 170px; font: inherit; height: 44px; border-radius: 12px; border: 0; padding: 0 8px; background: rgba(255, 255, 255, .14); color: #fff; }
.wv-lang option { color: #12224a; }
.wv-x { margin-left: auto; }
.wv--rec { width: 100vw; height: 100vh; max-width: none; max-height: none; border-radius: 0; }
.wv--rec .wv-stage { max-height: none; height: 100vh; aspect-ratio: auto; }
.wv--rec .wv-ctrl, .wv--rec .wv-prog { display: none; }
@media (max-width: 640px) {
  .wv-end { flex-direction: column; justify-content: center; text-align: center; }
  .wv-end__pal { width: 22%; }
  .wv-dyk, .wv-think { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wv-shot > svg, .wv-shot .w-actor, .wv-end__pal svg { animation: none; }
}
