:root {
  --cream: #fff8ef;
  --cream-2: #fff1e4;
  --white: #fffdfb;
  --plum: #3f2a33;
  --plum-soft: #6e5660;
  --muted: #9a8389;
  --pink: #e66a8a;
  --pink-deep: #b23f5e;
  --pink-soft: #fde4eb;
  --gold: #c9953c;
  --gold-soft: #f7e4b8;
  --line: rgba(63, 42, 51, 0.09);
  --shadow: 0 24px 60px rgba(120, 70, 50, 0.1);
  --r-lg: 28px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-hand: "Caveat", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  color: var(--plum);
  background:
    radial-gradient(1100px 760px at 88% -8%, #ffe7d2 0%, transparent 62%),
    radial-gradient(900px 700px at -12% 28%, #ffe2ea 0%, transparent 58%),
    linear-gradient(180deg, #fff9f1 0%, #fff3e8 55%, #fff8f2 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
::selection { background: #f7c6d2; color: var(--plum); }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 500;
  padding: 10px 16px; border-radius: 999px; background: var(--plum); color: var(--cream);
  transform: translateY(-160%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.bg-blobs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: blobDrift 20s ease-in-out infinite alternate; }
.blob-1 { width: 520px; height: 520px; background: #ffd8c2; top: -200px; right: -140px; }
.blob-2 { width: 420px; height: 420px; background: #ffd6e0; top: 42%; left: -200px; animation-delay: -7s; }
.blob-3 { width: 360px; height: 360px; background: #f3e2b8; bottom: -180px; right: 12%; animation-delay: -13s; }

.topbar {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 52px);
}
.brand {
  font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--plum-soft); text-decoration: none;
}
.brand em { font-family: var(--font-display); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--pink-deep); }
.icon-btn {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .55); color: var(--plum);
  backdrop-filter: blur(10px); transition: background .2s, transform .2s;
}
.icon-btn:hover { background: #fff; transform: translateY(-1px); }
.icon { width: 19px; height: 19px; }
.icon-btn .sound-off { display: none; }
.icon-btn.is-muted .sound-on { display: none; }
.icon-btn.is-muted .sound-off { display: block; }

.screen { position: relative; z-index: 2; }
.screen[hidden] { display: none !important; }
.screen-enter { animation: screenIn .5s cubic-bezier(.2, .8, .2, 1) both; }

.eyebrow {
  margin: 0 0 14px; color: var(--pink-deep);
  font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 500; }

.game-hero {
  max-width: 860px;
  padding: clamp(14px, 3.5vw, 36px) 0 clamp(24px, 4vw, 44px);
}
.game-hero .eyebrow { margin-bottom: 16px; }
.game-hero h1 {
  max-width: 800px; margin: 0 0 22px;
  font-size: clamp(40px, 6.6vw, 78px); line-height: .95; letter-spacing: -.045em;
}
.game-hero h1 em { font-style: italic; color: var(--pink-deep); }
.lede { max-width: 660px; margin-bottom: 14px; color: var(--plum-soft); font-size: clamp(16px, 1.8vw, 19px); line-height: 1.62; }
.lede strong { color: var(--plum); }
.hero-sign {
  margin: 22px 0 0; color: var(--pink-deep);
  font-family: var(--font-hand); font-size: clamp(22px, 2.4vw, 27px); line-height: 1.25;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 14px 24px; border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: -.01em; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary { background: var(--plum); color: var(--cream); box-shadow: 0 10px 24px rgba(63, 42, 51, .18); }
.btn-primary:hover { background: #4b333e; transform: translateY(-2px); box-shadow: 0 16px 30px rgba(63, 42, 51, .22); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-ghost { background: rgba(255, 255, 255, .55); color: var(--plum); border: 1px solid rgba(63, 42, 51, .16); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: #fff; transform: translateY(-2px); }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 13px; }
.text-link {
  display: inline-block; padding: 4px 0; border: 0; background: none; color: var(--pink-deep);
  font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
:focus-visible { outline: 3px solid rgba(230, 106, 138, .5); outline-offset: 3px; }

.screen-game { width: min(1240px, 100%); margin: 0 auto; padding: 10px clamp(16px, 4.5vw, 56px) 64px; }
.game-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.sidebar { position: sticky; top: 20px; }

.confession { border-top: 1px solid var(--line); padding-top: 16px; }
.confession summary {
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; list-style: none; font-size: 11px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--pink-deep);
}
.confession summary::-webkit-details-marker { display: none; }
.confession summary span { font-size: 16px; transition: transform .2s; }
.confession[open] summary span { transform: rotate(180deg); }
.confession-body p { margin: 0 0 14px; color: var(--plum-soft); font-size: 12.5px; line-height: 1.7; }
.confession-body p:last-child { margin-bottom: 0; }
.confession-body strong { color: var(--plum); }

.progress-card {
  margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 24px;
  background: rgba(255, 255, 255, .7); box-shadow: 0 18px 50px rgba(120, 70, 50, .07);
  backdrop-filter: blur(12px);
}
.progress-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.progress-kicker { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.progress-count { color: var(--plum); font-size: 11px; font-weight: 700; white-space: nowrap; }
.progress-label { margin: 5px 0 14px; font-family: var(--font-display); font-size: 24px; letter-spacing: -.02em; }
.meter { position: relative; height: 12px; border-radius: 999px; background: #f1e2d8; overflow: hidden; }
.meter-fill { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e88a9d, var(--pink) 48%, var(--gold)); transition: width .55s cubic-bezier(.2, .8, .2, 1); }
.meter-ticks {
  position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(8.333% - 1px), rgba(255, 255, 255, .7) calc(8.333% - 1px) 8.333%);
}
.hint { display: flex; gap: 8px; margin: 16px 0 12px; color: var(--plum-soft); font-size: 11.5px; line-height: 1.55; }
.hint-flame { flex: 0 0 auto; font-size: 13px; }
.hint strong { color: var(--plum); }

.game-heading { margin-bottom: clamp(8px, 2vw, 20px); }
.game-heading h2 { margin: 0 0 10px; font-size: clamp(38px, 5vw, 56px); letter-spacing: -.045em; line-height: .98; }
.sub { max-width: 540px; margin-bottom: 0; color: var(--plum-soft); font-size: 14px; line-height: 1.6; }

.balloon-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1.6vw, 22px); width: 100%; max-width: 840px;
  margin-top: 18px;
}
.balloon-slot { position: relative; display: flex; justify-content: center; min-height: clamp(168px, 20vw, 216px); }
.balloon {
  position: relative; width: 100%; max-width: 152px; aspect-ratio: 1 / 1.35;
  padding: 0; border: 0; background: none; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.balloon-float {
  position: absolute; inset: 0; display: flex; justify-content: center;
  animation: float var(--dur, 5s) ease-in-out infinite; animation-delay: var(--delay, 0s);
}
.balloon-body {
  position: relative; width: 100%; height: 78%;
  border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .85), transparent 27%),
    radial-gradient(circle at 70% 82%, rgba(255, 255, 255, .18), transparent 40%),
    linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow:
    inset -16px -20px 36px rgba(90, 40, 50, .12),
    inset 12px 14px 24px rgba(255, 255, 255, .35),
    0 18px 34px rgba(120, 60, 70, .12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.balloon:hover .balloon-body { transform: translateY(-5px) rotate(1.5deg); }
.balloon.is-pressed .balloon-body { transform: translateY(-1px) scale(.97); }
.balloon.hot .balloon-body {
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .8), transparent 27%),
    radial-gradient(circle at 70% 82%, rgba(255, 220, 190, .3), transparent 42%),
    linear-gradient(150deg, #ffc2a8, #e0516e);
}
.balloon.hot::before {
  content: ""; position: absolute; z-index: -1; inset: -10px -10px 16px;
  border-radius: 50%; background: radial-gradient(circle, rgba(240, 110, 90, .32), transparent 66%);
  animation: hotPulse 2.6s ease-in-out infinite;
}
.hot-badge {
  position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px;
  background: rgba(255, 255, 255, .9); box-shadow: 0 4px 12px rgba(120, 40, 50, .18);
}
.balloon-knot {
  position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-top: 11px solid var(--c2);
}
.balloon-string {
  position: absolute; top: 77%; left: 50%; width: 26px; height: 66px;
  transform: translateX(-50%); overflow: visible; pointer-events: none;
}
.balloon-string path { fill: none; stroke: rgba(120, 80, 70, .4); stroke-width: 1.4; stroke-linecap: round; }
.breath-ring {
  position: absolute; inset: -11px; border-radius: inherit; opacity: 0; pointer-events: none;
  background: conic-gradient(from -90deg, rgba(255, 255, 255, .95) calc(var(--breath, 0) * 360deg), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  transition: opacity .2s;
}
.balloon.breathing .breath-ring { opacity: 1; }
.balloon.breathing .balloon-body { transform: scale(.97); box-shadow: 0 0 0 10px rgba(255, 190, 160, .16), 0 18px 34px rgba(120, 60, 70, .12); }
.balloon.puffing .balloon-float { animation: puffAway .45s ease forwards; }
.balloon.away { visibility: hidden; pointer-events: none; }
.balloon.returning .balloon-float { animation: returnIn .5s cubic-bezier(.2, .8, .2, 1) both; }
.balloon.popping .balloon-float { animation: popAway .24s ease forwards; }
.balloon:disabled { cursor: default; }
.balloon-slot.popped .balloon { display: none; }

.note-chip {
  width: clamp(86px, 9vw, 100px); aspect-ratio: 1; margin-top: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 1px dashed rgba(63, 42, 51, .2); border-radius: 50%;
  background: rgba(255, 255, 255, .62); cursor: pointer;
  animation: chipIn .4s cubic-bezier(.2, .9, .3, 1.2) both;
  transition: transform .2s, background .2s, border-color .2s;
}
.note-chip:hover { transform: translateY(-3px) rotate(-2deg); background: #fff; border-color: var(--cat-color); }
.chip-check { color: var(--cat-color); font-size: 10px; line-height: 1; }
.chip-cat { color: var(--cat-color); font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.chip-num { color: var(--plum); font-family: var(--font-display); font-size: 17px; line-height: 1.1; }
.chip-calm { position: absolute; margin: -56px 0 0 58px; color: var(--gold); font-size: 12px; }
.game-footnote { margin: 18px 0 0; color: var(--muted); font-size: 11px; letter-spacing: .04em; }

.screen-unlock { width: min(1100px, 100%); margin: 0 auto; padding: 18px clamp(16px, 4.5vw, 56px) 60px; }
.unlock-head { max-width: 820px; margin: 0 auto 34px; text-align: center; }
.unlock-head h1 { margin: 0 0 18px; font-size: clamp(44px, 7vw, 82px); line-height: .98; letter-spacing: -.045em; }
.unlock-head h1 em { font-style: italic; color: var(--pink-deep); }
.unlock-sub { max-width: 560px; margin: -6px auto 16px; color: var(--plum-soft); font-size: 13.5px; line-height: 1.6; }
.result-strip {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .58); color: var(--muted); font-size: 11px;
}
.result-strip strong { color: var(--plum); font-weight: 700; }
.result-strip .dot { color: #cdb6b8; }
.letter { max-width: 700px; margin: 0 auto 42px; color: #4a343d; font-family: var(--font-display); font-size: clamp(17px, 2vw, 20px); line-height: 1.75; }
.letter p { margin-bottom: 20px; }
.letter p:last-child { margin-bottom: 0; }

.then-now {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 900px; margin: 0 auto 34px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .66);
}
.then-now-col { padding: 20px clamp(16px, 2.6vw, 26px); border-left: 1px solid var(--line); }
.then-now-col:first-child { border-left: 0; }
.then-now-tag { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.then-now-col.now .then-now-tag { color: var(--pink-deep); }
.then-now-col.want { background: linear-gradient(145deg, rgba(255, 243, 230, .92), rgba(253, 228, 235, .58)); }
.then-now-col.want .then-now-tag { color: var(--gold); }
.then-now-col p { margin: 0; color: var(--plum-soft); font-family: var(--font-display); font-size: 16px; line-height: 1.45; }
.then-now-col.want p { color: var(--plum); }

.unlock-grid { display: grid; grid-template-columns: .96fr 1.04fr; gap: 20px; align-items: stretch; max-width: 1000px; margin: 0 auto 30px; }
.card, .certificate { border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(255, 255, 255, .82); box-shadow: var(--shadow); }
.promise-card { padding: clamp(22px, 3.5vw, 38px); }
.promise-card h2 { margin: 0 0 22px; font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -.03em; }
.promise-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.promise-list li { display: flex; gap: 11px; color: var(--plum-soft); font-size: 13.5px; line-height: 1.55; }
.check {
  flex: 0 0 auto; width: 23px; height: 23px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center; background: #e7f0d9; color: #4f7a3a; font-size: 12px; font-weight: 700;
}

.certificate { padding: 12px; border-color: rgba(201, 149, 60, .35); background: linear-gradient(145deg, #fffdf8, #fff5e6); }
.cert-border { position: relative; padding: clamp(22px, 3.4vw, 34px); border: 1.5px solid rgba(201, 149, 60, .45); border-radius: 20px; background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, .8), transparent 62%); }
.cert-border::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(201, 149, 60, .22); border-radius: 15px; pointer-events: none; }
.cert-eyebrow { margin-bottom: 4px; text-align: center; color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
.cert-border h2 { margin: 0 0 16px; text-align: center; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; }
.cert-body { margin-bottom: 0; text-align: center; color: var(--plum-soft); font-size: 12.5px; line-height: 1.65; }
.cert-body strong { color: var(--plum); }
.cert-verdict { margin: 20px 0; text-align: center; color: var(--pink-deep); font-family: var(--font-display); font-size: 17px; letter-spacing: .1em; }
.cert-verdict span { color: var(--muted); font-family: var(--font-body); font-size: 9px; letter-spacing: .1em; }
.cert-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 14px; }
.signature-block { display: flex; min-width: 130px; flex-direction: column; }
.signature { color: var(--pink-deep); font-family: var(--font-hand); font-size: 30px; line-height: 1; }
.sign-line { height: 1px; margin: 6px 0 4px; background: rgba(63, 42, 51, .2); }
.sign-label { color: var(--muted); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.seal {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; color: #fff8e7; font-size: 20px;
  background: radial-gradient(circle at 35% 30%, #f7d98c, #d9a441 60%, #b47f2d);
  box-shadow: 0 6px 14px rgba(160, 110, 40, .25), inset 0 0 0 4px rgba(255, 255, 255, .25);
  transform: rotate(-8deg);
}
.cert-filed { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 9px; letter-spacing: .06em; }
.cert-date { display: block; margin-top: 3px; }

.unlock-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; }
.unlock-actions .text-link { font-size: 12px; }

.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none !important; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(48, 30, 38, .45); backdrop-filter: blur(8px); animation: fadeIn .25s ease both; }
.modal-card {
  position: relative; z-index: 1; width: min(560px, 100%); padding: clamp(26px, 5vw, 42px);
  border-radius: 30px; background: var(--white); box-shadow: 0 40px 100px rgba(40, 20, 30, .3);
  animation: modalIn .38s cubic-bezier(.2, .9, .25, 1.08) both;
}
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 23px; line-height: 1; cursor: pointer;
}
.modal-close:hover { background: #f8eee6; color: var(--plum); }
.note-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 16px; padding-right: 40px; }
.note-tag {
  padding: 6px 10px; border-radius: 999px; background: var(--tag-bg, var(--pink-soft));
  color: var(--tag-color, var(--pink-deep)); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.note-num { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.note-text { margin-bottom: 26px; font-family: var(--font-display); font-size: clamp(22px, 3.6vw, 30px); line-height: 1.36; letter-spacing: -.02em; }
.note-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.note-footer-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.note-popped { color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.calm-badge { padding: 5px 8px; border-radius: 999px; background: #e7f0d9; color: #4f7a3a; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 250;
  max-width: min(90vw, 460px); padding: 12px 18px; border-radius: 999px;
  background: var(--plum); color: var(--cream); font-size: 12px; line-height: 1.45; text-align: center;
  opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .28s, transform .28s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.confetti-layer { position: fixed; inset: 0; z-index: 260; overflow: hidden; pointer-events: none; }
.confetti-piece { position: absolute; display: block; border-radius: 2px; will-change: transform, opacity; }
.screen h1:focus, .screen h2:focus { outline: none; }
.balloon { isolation: isolate; }

.footer { position: relative; z-index: 2; padding: 24px 16px calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; }
.footer p { margin-bottom: 5px; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.footer-small { font-size: 10px !important; }
.footer .text-link { font-size: 10px; }

@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.4deg); } 50% { transform: translateY(-11px) rotate(1.4deg); } }
@keyframes hotPulse { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes chipIn { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: none; } }
@keyframes popAway { to { opacity: 0; transform: scale(1.22); } }
@keyframes puffAway { to { opacity: 0; transform: translateY(-26px) scale(.8); filter: blur(2px); } }
@keyframes returnIn { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes blobDrift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(24px, -18px, 0) scale(1.06); } }

/* ---------- Tablet / phone ---------- */
@media (max-width: 980px) {
  .game-hero { padding-top: 8px; }
  .game-layout { grid-template-columns: 1fr; gap: 18px; }
  .sidebar { position: static; }
  .confession { padding-top: 0; border-top: 0; }
  .confession summary { display: flex; padding: 12px 2px; }
  .confession-body { padding: 2px 2px 14px; }
  .progress-card { margin-top: 8px; }
  .game-heading { margin-top: 8px; }
  .balloon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; margin-inline: auto; }
}

@media (max-width: 700px) {
  .topbar { padding: 12px 16px; }
  .brand { font-size: 9px; letter-spacing: .12em; max-width: 250px; line-height: 1.4; }
  .brand em { font-size: 13px; }
  .game-hero { padding: 6px 0 20px; }
  .game-hero .eyebrow { margin-bottom: 12px; font-size: 9px; }
  .game-hero h1 { margin-bottom: 16px; font-size: clamp(36px, 10.4vw, 52px); line-height: .97; }
  .lede { margin-bottom: 12px; font-size: 15.5px; line-height: 1.58; }
  .hero-sign { margin-top: 16px; font-size: 21px; }
  .screen-game { padding: 4px 18px 44px; }
  .progress-card { padding: 15px 16px; border-radius: 20px; }
  .progress-label { margin: 4px 0 11px; font-size: 21px; }
  .hint { margin: 13px 0 10px; font-size: 11px; }
  .game-heading h2 { font-size: 38px; }
  .sub { font-size: 13px; }
  .balloon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4px; margin-top: 10px; }
  .balloon-slot { min-height: 196px; }
  .balloon { max-width: 142px; }
  .note-chip { width: 88px; margin-top: 18px; }
  .screen-unlock { padding: 12px 18px 44px; }
  .unlock-head { margin-bottom: 26px; }
  .unlock-head h1 { font-size: clamp(42px, 12vw, 58px); }
  .result-strip { border-radius: 18px; font-size: 10px; }
  .unlock-sub { margin-bottom: 14px; font-size: 12.5px; }
  .letter { margin-bottom: 30px; font-size: 17px; line-height: 1.7; }
  .then-now { grid-template-columns: 1fr; margin-bottom: 26px; }
  .then-now-col { border-left: 0; border-top: 1px solid var(--line); padding: 15px 20px; }
  .then-now-col:first-child { border-top: 0; }
  .then-now-col p { font-size: 15px; }
  .unlock-grid { grid-template-columns: 1fr; gap: 14px; }
  .promise-card { padding: 24px 22px; }
  .promise-card h2 { margin-bottom: 18px; font-size: 30px; }
  .promise-list li { font-size: 13px; }
  .certificate { padding: 9px; }
  .cert-border { padding: 22px 18px; }
  .cert-border h2 { font-size: 30px; }
  .cert-body { font-size: 12px; }
  .cert-verdict { margin: 16px 0; font-size: 16px; }
  .seal { width: 50px; height: 50px; font-size: 17px; }
  .signature { font-size: 26px; }
  .unlock-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .unlock-actions .btn { width: 100%; }
  .unlock-actions .text-link { text-align: center; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-card {
    width: 100%; max-width: 100%; max-height: 90svh; overflow-y: auto;
    padding: 30px 20px calc(22px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
  }
  .modal-card::before {
    content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px;
    transform: translateX(-50%); border-radius: 999px; background: rgba(63, 42, 51, .14);
  }
  .modal-close { top: 14px; right: 14px; width: 36px; height: 36px; font-size: 20px; }
  .note-text { font-size: clamp(22px, 6.6vw, 27px); }
  .note-footer { align-items: stretch; }
  .note-footer .btn { width: 100%; }
  .toast { width: max-content; max-width: calc(100vw - 32px); font-size: 11px; }
  .footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .brand { max-width: 200px; }
  .balloon-slot { min-height: 176px; }
  .balloon { max-width: 126px; }
  .balloon-string { height: 58px; }
  .note-chip { width: 80px; }
  .progress-label { font-size: 19px; }
}

@media (hover: none) {
  .balloon:hover .balloon-body { transform: none; }
  .note-chip:hover { transform: none; background: rgba(255, 255, 255, .62); }
  .btn:hover, .icon-btn:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .balloon-float, .blob { animation: none !important; }
}

@media print {
  @page { size: landscape; margin: 10mm; }
  body { background: #fff; }
  body > *:not(#main) { display: none !important; }
  #main > *:not(#unlock) { display: none !important; }
  #unlock > *:not(.unlock-grid) { display: none !important; }
  .unlock-grid { display: block !important; max-width: none; margin: 0; }
  .promise-card { display: none !important; }
  .certificate {
    display: block !important; width: 100%; max-width: 920px; margin: 0 auto;
    border-radius: 0; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .cert-border { min-height: 150mm; display: flex; flex-direction: column; justify-content: center; }
  .cert-body { font-size: 15px; }
  .toast, .modal { display: none !important; }
}

