:root {
  --bg: #f6f0e6;
  --bg-2: #fffaf2;
  --ink: #1d2430;
  --muted: #5d6572;
  --line: rgba(29, 36, 48, 0.1);
  --navy: #1b3a6b;
  --navy-2: #163057;
  --gold: #c9842a;
  --gold-soft: #f3e2c4;
  --red: #c4492c;
  --good: #2c7a4b;
  --good-bg: #e5f5ea;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(38, 28, 16, 0.08);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
.app {
  width: min(430px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}
.screen { padding: calc(18px + var(--safe-top)) 18px calc(28px + var(--safe-bot)); }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.icon-btn {
  width: 42px; height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--navy);
  font-size: 20px;
  display: grid; place-items: center;
}
.top .title {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 17px;
}
.top .spacer { width: 42px; }

.kicker {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}
h1, h2, .serif { font-family: Fraunces, Georgia, serif; font-weight: 600; }
h1 { font-size: 34px; line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: 26px; line-height: 1.15; letter-spacing: -0.03em; }
.sub { color: var(--muted); margin-top: 8px; font-size: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 18px;
  box-shadow: 0 8px 20px rgba(27, 58, 107, 0.25);
}
.btn:disabled { opacity: 0.45; }
.btn.gold { background: var(--gold); box-shadow: 0 8px 20px rgba(201, 132, 42, 0.25); color: #2a1a08; }
.btn.ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn + .btn { margin-top: 10px; }

/* Intro */
.intro {
  min-height: 100dvh;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #111 url("photos/plane_sky.jpg") center 40% / cover no-repeat;
  color: #fff;
}
.intro .shade {
  min-height: 100dvh;
  padding: calc(28px + var(--safe-top)) 24px calc(32px + var(--safe-bot));
  background:
    linear-gradient(180deg, rgba(18, 24, 36, 0.25) 0%, rgba(18, 24, 36, 0.15) 35%, rgba(18, 24, 36, 0.72) 72%, rgba(18, 24, 36, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.intro .brand { position: absolute; top: calc(22px + var(--safe-top)); left: 24px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; opacity: 0.9; }
.intro h1 { font-size: 36px; max-width: 16ch; }
.intro .follow { font-size: 22px; margin: 12px 0 28px; color: #f3e2c4; }
.intro .btn { max-width: 100%; }

/* Cards */
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.card.photo {
  min-height: 210px;
  color: #fff;
}
.card.photo .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.card.photo .shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(16,20,28,0.78) 100%);
}
.card.photo .body { position: relative; z-index: 1; padding: 16px; height: 100%; min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; }
.card .animal {
  position: absolute; right: 0; bottom: 0; height: 132px;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.35));
  pointer-events: none; z-index: 2;
}
.badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.badge.go { background: var(--gold); color: #2a1a08; }
.badge.lock { background: rgba(12,14,18,0.55); color: #f3f1ec; backdrop-filter: blur(8px); }
.card h3 { font-size: 22px; margin-top: 4px; }
.card p { font-size: 13px; opacity: 0.9; }
.card.locked .bg { filter: grayscale(0.35) brightness(0.85); }
.plain {
  padding: 16px;
}
.plain h3 { font-size: 18px; }
.plain p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.lock-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.progress-wrap { margin: 18px 0 14px; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.bar { height: 10px; background: #e8dfd0; border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--navy), #3d6cb5); border-radius: inherit; transition: width .35s ease; }

.scene-list { display: grid; gap: 10px; margin-top: 8px; }
.scene-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 0;
  text-align: left;
  width: 100%;
  color: inherit;
}
.scene-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; }
.scene-item b { display: block; font-size: 16px; }
.scene-item span { color: var(--muted); font-size: 13px; }
.done-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--good-bg); color: var(--good); font-weight: 800;
}
.open-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--navy);
}

/* Play */
.hero {
  position: relative;
  height: 220px;
  border-radius: 24px;
  overflow: hidden;
  background: #ccc center / cover no-repeat;
  margin-bottom: 14px;
}
.hero .shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.45));
}
.hero .cap {
  position: absolute; left: 16px; bottom: 14px; color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.hero .cap small { letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; opacity: 0.9; }
.hero .cap h2 { font-size: 28px; }
.tip {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  background: #fff;
  border-radius: 18px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.tip img { height: 72px; width: auto; margin: -8px 0; filter: drop-shadow(0 6px 8px rgba(0,0,0,.15)); }
.tip p { font-size: 14px; }

.step-card {
  background: #fff;
  border-radius: 24px;
  padding: 20px 18px 18px;
  box-shadow: var(--shadow);
}
.step-label {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 10px;
}
.big-play {
  width: 100%;
  height: 148px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, #1b3a6b, #12284b);
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 12px 24px rgba(27,58,107,.22);
}
.big-play .circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: #fff;
  color: var(--navy);
  display: grid; place-items: center;
  font-size: 26px;
}
.wave { display: flex; align-items: flex-end; gap: 4px; height: 28px; }
.wave i {
  width: 4px; background: #f3e2c4; border-radius: 4px;
  animation: none; height: 8px;
}
.playing .wave i { animation: eq 0.9s ease-in-out infinite; }
.playing .wave i:nth-child(1){ height: 10px; animation-delay: 0s; }
.playing .wave i:nth-child(2){ height: 22px; animation-delay: .1s; }
.playing .wave i:nth-child(3){ height: 16px; animation-delay: .2s; }
.playing .wave i:nth-child(4){ height: 26px; animation-delay: .05s; }
.playing .wave i:nth-child(5){ height: 12px; animation-delay: .18s; }
@keyframes eq {
  0%,100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.sounds {
  font-size: 28px;
  line-height: 1.25;
  word-break: break-word;
  color: var(--navy);
  font-weight: 650;
}
.words { font-size: 26px; line-height: 1.25; }
.meaning { margin-top: 10px; color: var(--muted); font-size: 16px; }
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.choice {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px;
  margin-top: 10px;
  font-size: 16px;
}
.choice.right { background: var(--good-bg); border-color: var(--good); }
.choice.wrong { background: var(--bad-bg); border-color: var(--bad); }
.choice:disabled { opacity: 1; }
.feedback {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--gold-soft);
  color: #3a2a12;
  font-size: 15px;
}
.mini { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 8px; }

.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  width: min(390px, calc(100% - 24px));
  background: #1d2430;
  color: #fff;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.hidden { display: none !important; }
.credits { font-size: 14px; color: var(--ink); }
.credits h2 { margin: 22px 0 8px; }
.credits h3 { margin: 16px 0 6px; font-size: 16px; }
.credits li { margin: 0 0 8px 18px; }
.credits a { word-break: break-all; }
.footer-link {
  display: block; text-align: center; margin-top: 22px;
  color: var(--muted); font-size: 14px;
}
