/* OneStory narrative game. Same look as the chatbot (app.css): a sky, the character standing in
   it, and a sheet below. Day and night themes, chosen by ../theme.js and the button in the corner.
   The colour values and the sky block are copied from app.css so the two stay visually identical;
   app.css itself is not loaded here because its page layout is the chat screen's. */
:root {
  --amber: #F18314; --cream: #FFEECE; --sky: #3A95B5; --navy: #0D2D3F;
  --ink: #0D2D3F; --muted: #3F5868; --accent: #1F6F8B; --you-ink: #8A4A00;
  --sky-a: #7FB9DC; --sky-b: #BFE0F2; --sky-c: #FFF3DC;
  --glass: rgba(255, 250, 240, .78); --sheet: #FFFAF0; --line: rgba(13, 45, 63, .14); --field: #fff;
  --them: #EEF5F9; --you: #FFEECE;
  --good: #E5F4EA; --good-line: #2E7D4F; --grow: #FFF3DA; --grow-line: #A86A00; --down: #B4472F;
  --shadow: 0 18px 50px rgba(13, 45, 63, .18);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #F6EEDC; --muted: #B4C5CF; --accent: #8FD0E8; --you-ink: #FFC98A;
  --sky-a: #04111A; --sky-b: #0D2D3F; --sky-c: #123A50;
  --glass: rgba(8, 28, 40, .74); --sheet: #0B2534; --line: rgba(255, 238, 206, .16); --field: #071B27;
  --them: #123A50; --you: #3A2A12;
  --good: #0F3323; --good-line: #63C08A; --grow: #3A2C0C; --grow-line: #F0B44A; --down: #F08A70;
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--sky-c); -webkit-font-smoothing: antialiased;
  font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- sky (as in app.css) ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 42%, var(--sky-c) 78%); transition: background .4s ease; }
.sky .orb { position: absolute; top: 15vh; right: 9vw; width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle, #FFF6D6 0 38%, rgba(255, 240, 190, .55) 39% 55%, transparent 72%); }
:root[data-theme="dark"] .sky .orb { background: radial-gradient(circle at 38% 38%, #FFF7E3 0 34%, #E9DFC8 35% 44%, rgba(255, 238, 206, .12) 46% 62%, transparent 74%); }
.sky .cloud { position: absolute; height: 34px; border-radius: 999px; background: #fff; opacity: .78; filter: blur(7px); animation: drift 90s linear infinite; }
.sky .cloud::after { content: ""; position: absolute; left: 22%; top: -16px; width: 46%; height: 34px; border-radius: 999px; background: inherit; }
.sky .c1 { top: 12vh; left: -220px; width: 210px; }
.sky .c2 { top: 23vh; left: -220px; width: 150px; animation-duration: 130s; animation-delay: -55s; opacity: .6; }
.sky .c3 { top: 5vh; left: -220px; width: 120px; animation-duration: 110s; animation-delay: -20s; opacity: .5; }
:root[data-theme="dark"] .sky .cloud { opacity: .08; }
@keyframes drift { to { transform: translateX(calc(100vw + 260px)); } }
.sky .stars { position: absolute; top: 0; left: 0; width: 2px; height: 2px; background: transparent; opacity: 0; transition: opacity .4s;
  box-shadow: 4vw 9vh #fff, 11vw 22vh #FFD9A0, 17vw 5vh #B9C2CF, 24vw 16vh #fff, 31vw 28vh #fff, 38vw 8vh #FFD9A0, 44vw 19vh #B9C2CF,
    52vw 4vh #fff, 58vw 25vh #fff, 63vw 12vh #FFD9A0, 70vw 30vh #B9C2CF, 76vw 6vh #fff, 83vw 21vh #fff, 89vw 33vh #FFD9A0, 95vw 11vh #B9C2CF,
    8vw 34vh #fff, 47vw 33vh #B9C2CF, 28vw 3vh #fff, 67vw 2vh #fff, 92vw 3vh #fff; }
:root[data-theme="dark"] .sky .stars { opacity: 1; animation: twinkle 5s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .sky .cloud, .sky .stars { animation: none !important; } }

/* ---------- page ---------- */
.top, main, .help, .credits { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; align-items: center; gap: 8px; padding-top: 12px; padding-bottom: 8px; }
.logo { height: 84px; width: auto; border-radius: 16px; margin-right: auto; }
h1 { font-size: 30px; line-height: 1.15; margin: 12px 0; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 20px; margin: 22px 0 8px; }
h3 { font-size: 17px; margin: 12px 0 2px; }
h1:focus, h2:focus, p:focus { outline: none; }
p { margin: 12px 0; }
.lede { color: var(--muted); max-width: 36rem; }
.fine { color: var(--muted); font-size: 14px; }
.session { text-align: center; margin-bottom: 0; }
.note-bar { background: var(--navy); color: var(--cream); padding: 10px 14px; border-radius: 12px; }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: 24px; padding: 4px 20px 24px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pick { padding-top: 0; overflow: hidden; }
.pick h2 { margin-top: 14px; }
.pick p { font-size: 16px; }
.step { margin: 14px 0 0; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; font-weight: 700; }
.sum { font-weight: 700; }

/* The character stands in the sky, above the sheet. Pixel art, so it is scaled without smoothing. */
.stage { height: 230px; display: flex; justify-content: center; align-items: flex-end; overflow: hidden; }
.stage.empty { height: 28px; }
.sprite { image-rendering: pixelated; flex: none; filter: drop-shadow(0 12px 10px rgba(13, 45, 63, .28)); }
.sprite-viktor { height: 290px; margin-bottom: -52px; }
.sprite-yasmin { height: 400px; margin-bottom: -112px; }     /* her picture has a wider empty border */

.bubble, .you { border-radius: 4px 16px 16px 16px; padding: 12px 14px; border: 1px solid var(--line); background: var(--them); }
.you { background: var(--you); border-radius: 16px 4px 16px 16px; margin-top: 18px; }
.who { display: block; font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.you .who { color: var(--you-ink); }

button { font: inherit; color: inherit; cursor: pointer; border-radius: 14px; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .6; cursor: default; }
.pill { min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-weight: 700; font-size: 14px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pill.icon { padding: 0; font-size: 18px; }
.theme-glyph::before { content: "☾"; }
:root[data-theme="dark"] .theme-glyph::before { content: "☀"; }
.primary, .secondary { display: block; width: 100%; min-height: 48px; margin-top: 18px; padding: 12px; font-weight: 800; border-radius: 999px; }
.primary { background: var(--amber); color: var(--navy); border: 0; box-shadow: 0 6px 18px rgba(241, 131, 20, .35); }
.secondary { background: none; border: 2px solid var(--ink); margin-top: 10px; }
.choices { display: grid; gap: 10px; }
.choice { text-align: left; padding: 14px 16px; background: var(--field); border: 2px solid var(--line); min-height: 48px; }
.choice:hover:enabled { border-color: var(--amber); }

.skills { border-left: 6px solid; border-radius: 8px; padding: 4px 16px 12px; margin-top: 20px; }
.skills h2 { margin-top: 12px; }
.skills p { margin: 2px 0 0; }
.good { background: var(--good); border-color: var(--good-line); }
.grow { background: var(--grow); border-color: var(--grow-line); }
.recap { padding-left: 24px; }
.recap li { margin-bottom: 14px; padding-left: 10px; border-left: 4px solid var(--line); }
.recap li.up { border-color: var(--good-line); }
.recap li.down { border-color: var(--down); }
.recap strong, .recap span { display: block; }
.recap span { color: var(--muted); font-size: 16px; }

/* ---------- introduction videos ---------- */
.video-dlg { width: min(46rem, calc(100% - 1.5rem)); padding: 1rem; border: 1px solid var(--line); border-radius: 24px; background: var(--sheet); color: var(--ink); box-shadow: var(--shadow); }
.video-dlg::backdrop { background: rgba(4, 17, 26, .6); }
.video-dlg h2 { margin: 0 0 10px; }
.video-dlg video { display: block; width: 100%; max-height: 70vh; border-radius: 16px; background: #000; }

.help { margin-top: 24px; font-size: 15px; color: var(--muted); }
.help h2 { font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.help p { margin: 4px 0; }
.help ul { margin: 6px 0 0; padding-left: 20px; }
.help strong { color: var(--ink); }

/* ---------- funders (same logos and wording as onestory.cy) ---------- */
.credits { margin-top: 20px; padding-top: 16px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }
.credits p { margin: 6px 0 0; }
.funders { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.funders img { height: 52px; width: auto; padding: 6px 10px; border-radius: 12px; background: #fff; }
.funders img.on-navy { background: var(--navy); padding: 14px 12px; }
:root[data-theme="dark"] .funders img.on-navy { background: #04111A; border: 1px solid var(--line); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .cards { grid-template-columns: 1fr; }
  .stage { height: 190px; }
  .sprite-viktor { height: 240px; margin-bottom: -44px; }
  .sprite-yasmin { height: 330px; margin-bottom: -94px; }
  h1 { font-size: 25px; }
  .logo { height: 64px; }
}
