/* VOICE: warm, lively, welcoming — Ivy's HelloTalk café lessons, but you can tap everything
   IDEA: an illustrated lavender café where the room crew sits together and talks through each lesson
   PICTURE: layered café scenes (backdrop, the crew, a wooden table with croissants, boba, strawberry matcha, tanghulu)
   COLOUR and TYPE: bright lavender + soft pink, deep-purple headings, light panels; Fredoka titles, Nunito body, Caveat accents
   LAYOUT: awning → hero scene → sticky menu tabs → one clear teaching panel at a time; stacks to one column on phones */

:root {
  color-scheme: light;
  --bg: #fbf7ff; --lav: #f1e8ff; --lav2: #e6d8ff; --pink: #ffe6f2; --pink2: #fbcfe8;
  --ink: #2a1650; --head: #3b0f7a; --soft: #5d4a86; --line: #e2d4fb;
  --p: #7c3aed; --pd: #5b21b6; --rose: #db2777;
  --peach: #ffe5d2; --peachink: #b4501c; --sky: #dcecff; --skyink: #1e40af;
  --good: #dcfce7; --goodink: #166534; --bad: #ffe4e6; --badink: #be123c;
  --card: #fff; --shadow: 0 14px 34px -22px #5b21b6;
}
* { box-sizing: border-box; min-width: 0 }
html { scroll-padding-top: 76px }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 Nunito, system-ui, sans-serif; overflow-x: clip }
h1, h2, h3 { font-family: Fredoka, Nunito, sans-serif; color: var(--head); line-height: 1.1; margin: 0; text-wrap: balance }
h1 { font-size: clamp(32px, 5.4vw, 52px) }
h2 { font-size: clamp(26px, 4vw, 36px) }
h3 { font-size: 21px }
p { margin: 0 0 10px }
button { font: inherit; color: inherit; cursor: pointer }
:focus-visible { outline: 3px solid var(--p); outline-offset: 3px; border-radius: 10px }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 max(4vw, 16px) }
.hand { font-family: Caveat, cursive; font-weight: 700 }
.mod { background: var(--p); color: #fff; border-radius: 8px; padding: 0 .32em; font-weight: 800; white-space: nowrap }
.vb { background: var(--peach); color: var(--peachink); border-radius: 8px; padding: 0 .32em; font-weight: 800 }

/* awning */
.awning { position: relative; height: 104px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22120%22%20height%3D%2296%22%20viewBox%3D%220%200%20120%2096%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22l%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23b79cf5%22/%3E%3Cstop%20offset%3D%22.7%22%20stop-color%3D%22%239573e6%22/%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%237c56d6%22/%3E%3C/linearGradient%3E%3ClinearGradient%20id%3D%22c%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fffaf2%22/%3E%3Cstop%20offset%3D%22.7%22%20stop-color%3D%22%23f7ecdf%22/%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ead9c7%22/%3E%3C/linearGradient%3E%3ClinearGradient%20id%3D%22s%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%220%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23000%22%20stop-opacity%3D%22.10%22/%3E%3Cstop%20offset%3D%22.25%22%20stop-color%3D%22%23000%22%20stop-opacity%3D%220%22/%3E%3Cstop%20offset%3D%22.75%22%20stop-color%3D%22%23fff%22%20stop-opacity%3D%220%22/%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23fff%22%20stop-opacity%3D%22.18%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d%3D%22M0%200h60v62a30%2030%200%200%201-60%200z%22%20fill%3D%22url%28%23l%29%22/%3E%3Cpath%20d%3D%22M60%200h60v62a30%2030%200%200%201-60%200z%22%20fill%3D%22url%28%23c%29%22/%3E%3Cpath%20d%3D%22M0%200h60v62a30%2030%200%200%201-60%200z%22%20fill%3D%22url%28%23s%29%22/%3E%3Cpath%20d%3D%22M60%200h60v62a30%2030%200%200%201-60%200z%22%20fill%3D%22url%28%23s%29%22/%3E%3Cpath%20d%3D%22M4%2062a26%2026%200%200%200%2052%200%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-opacity%3D%22.35%22%20stroke-width%3D%222%22/%3E%3Cpath%20d%3D%22M64%2062a26%2026%200%200%200%2052%200%22%20fill%3D%22none%22%20stroke%3D%22%23c9b08f%22%20stroke-opacity%3D%22.45%22%20stroke-width%3D%222%22/%3E%3C/svg%3E") repeat-x 0 12px / 120px 96px; filter: drop-shadow(0 10px 8px #5b21b633) }
.awning::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16px; background: linear-gradient(#6d3fd0, #8b5cf6); box-shadow: 0 3px 0 #5b21b6, 0 6px 10px -4px #2e106566; z-index: 1 }
.awning::after { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 22px; background: linear-gradient(#0000002a, #0000); pointer-events: none }
@media (max-width: 600px) { .awning { height: 80px; background-size: 90px 72px; background-position: 0 10px } .awning::before { height: 12px } .awning::after { top: 12px } }

/* compact header on inner pages */
.brand { display: none; text-decoration: none; font: 600 clamp(19px, 3vw, 24px) Fredoka, sans-serif; color: var(--head); padding: 14px 0 6px }
.brand .hand { color: var(--rose); font-size: .95em; margin-right: 6px }
header.compact .brand { display: block } header.compact .hero, header.compact .parts { display: none }
/* hero */
.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 3.5vw, 44px); align-items: center; padding: clamp(18px, 3vw, 34px) 0 10px }
.pillsub { display: inline-block; background: var(--pink); color: var(--p); font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(17px, 2.2vw, 21px); padding: 6px 18px; border-radius: 999px; margin: 12px 0 14px; border: 2px solid #fff; box-shadow: 0 6px 16px -10px var(--rose) }
.lede { color: var(--soft); font-size: 18px; max-width: 46ch }
.ready { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--pd); background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 15px }
.ready i { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #22c55e33 }
.btns { display: flex; flex-wrap: wrap; gap: 10px }
.btn { border: 0; background: var(--p); color: #fff; font-weight: 800; font-size: 16px; padding: 12px 22px; border-radius: 999px; min-height: 48px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 10px 20px -12px var(--pd) }
.btn:hover { background: var(--pd) }
.btn.soft { background: #fff; color: var(--pd); border: 2px solid var(--line); box-shadow: none }
.btn.soft:hover { border-color: var(--p) }
.btn[disabled] { opacity: .45; cursor: not-allowed }

/* scenes */
.scene { margin: 0; container-type: inline-size }
.stage { position: relative; aspect-ratio: 16/11; overflow: hidden; border-radius: 30px; border: 6px solid #fff; box-shadow: 0 24px 50px -28px #5b21b6aa; background: var(--lav) }
.bd { position: absolute; inset: 0; width: 100%; height: 100% }
.pp { position: absolute; bottom: 22%; height: auto; filter: drop-shadow(0 10px 10px #5b21b62a); z-index: 2 }
.pp.back { bottom: 26%; z-index: 1 }
.tb { position: absolute; left: -5%; width: 110%; bottom: -3%; height: 33%; z-index: 3 }
.it { position: absolute }
.it img { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 5px #5b21b62e) }
.sb { position: absolute; top: 4%; z-index: 5; max-width: 46%; background: #fff; border: 2.5px solid var(--lav2); border-radius: 20px; padding: .45em .85em; font-weight: 800; font-size: max(13px, 2.5cqw); line-height: 1.35; color: var(--head); box-shadow: 0 10px 22px -14px #5b21b6 }
.sb::after { content: ""; position: absolute; bottom: -12px; width: 18px; height: 18px; background: #fff; border: 2.5px solid var(--lav2); border-top: 0; border-left: 0; transform: rotate(45deg) skew(10deg, 10deg) }
.sb.tl::after { left: 38% } .sb.tr::after { right: 38% }
.chat { display: none; margin-top: 12px; gap: 8px; flex-direction: column }
.chat p { display: flex; align-items: center; gap: 10px; margin: 0; background: #fff; border: 2px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 8px 12px; font-weight: 800; color: var(--head); align-self: flex-start; max-width: 92% }
.chat p.r { align-self: flex-end; border-radius: 18px 18px 6px 18px; flex-direction: row-reverse }
.chat img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--lav); flex: none }
@container (max-width: 520px) { .sb { display: none } .chat { display: flex } }
.scene.photo .stage { aspect-ratio: 1586/992 }
.scene.photo .paint { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
.scene.photo .chat { display: flex }
.lcard .thumb { width: calc(100% + 32px); margin: -16px -16px 4px; aspect-ratio: 1586/992; object-fit: cover; border-radius: 22px 22px 0 0; display: block }

/* parts roadmap */
.parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 6px }
.part { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 12px 14px }
.part b { flex: none; background: var(--p); color: #fff; font: 600 15px/1.1 Fredoka, sans-serif; border-radius: 14px; padding: 10px 12px; text-transform: uppercase; max-width: 9em }
.part span { color: var(--soft); font-weight: 700; font-size: 15px; line-height: 1.35 }

/* nav */
nav.tabs { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--line) }
nav .row { display: flex; gap: 8px; overflow-x: auto; padding: 10px max(4vw, 16px); scrollbar-width: none }
nav a { flex: none; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--head); font-weight: 800; font-size: 16px; background: #fff; border: 2px solid var(--line); padding: 8px 16px 8px 10px; border-radius: 999px; min-height: 46px }
nav a .navico { height: 30px; width: auto; max-width: 44px; object-fit: contain }
nav a[aria-current="page"] { background: var(--p); border-color: var(--p); color: #fff }

main.wrap { padding-top: 26px; padding-bottom: 96px; min-height: 60vh }
.view { display: none } .view.on { display: block; animation: rise .35s ease-out }
@keyframes rise { from { opacity: 0; transform: translateY(8px) } }
.sec { margin-top: 34px }
.sechead { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap }
.sechead .hand { color: var(--rose); font-size: 24px; display: block; line-height: 1 }
.muted { color: var(--soft) }

/* lesson grid */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px }
.lcard { text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .2s, border-color .2s; min-height: 160px; position: relative }
a.lcard:hover { transform: translateY(-3px); border-color: var(--p) }
.lcard .num { font: 600 15px Fredoka, sans-serif; color: var(--p); background: var(--lav); border-radius: 999px; padding: 3px 12px; align-self: flex-start }
.lcard h3 { font-size: 20px }
.lcard .faces { display: flex; margin-top: auto }
.lcard .faces img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--pink); border: 2.5px solid #fff; margin-right: -10px }
.lcard .done { position: absolute; right: 14px; top: 14px; font-size: 13px; font-weight: 800; color: var(--goodink); background: var(--good); border-radius: 999px; padding: 3px 10px }
.lcard.soon { background: transparent; border-style: dashed; box-shadow: none; min-height: 110px }
.lcard.soon .num { background: #fff }
.lcard.soon h3 { color: var(--soft); font-size: 18px }
.tag-soon { font-size: 13px; font-weight: 800; color: var(--rose); background: var(--pink); border-radius: 999px; padding: 3px 10px; align-self: flex-start }

/* lesson detail */
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; scroll-snap-type: x proximity }
.strip a, .strip span { flex: none; scroll-snap-align: start; min-width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font: 600 17px Fredoka, sans-serif; text-decoration: none; border: 2px solid var(--line); background: #fff; color: var(--head) }
.strip a[aria-current="page"] { background: var(--p); color: #fff; border-color: var(--p) }
.strip span { color: #b9a9d9; border-style: dashed; background: transparent; font-size: 15px }
.lhead { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(18px, 3vw, 36px); align-items: center; margin-top: 8px }
.lhead .hand { color: var(--rose); font-size: 26px }
.uses { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px }
.use { background: #fff; border: 2px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: var(--shadow) }
.use .lab { display: inline-block; background: var(--lav); color: var(--pd); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .02em; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px }
.use .ex { font-size: 19px; font-weight: 700; margin: 4px 0; line-height: 1.5 }
.use .note { color: var(--soft); font-size: 15.5px; margin: 10px 0 0; padding-top: 10px; border-top: 2px dashed var(--line) }
.say { border: 0; background: var(--lav); color: var(--pd); font-weight: 800; font-size: 14px; border-radius: 999px; padding: 7px 14px; min-height: 38px; margin-top: 10px }
.forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px }
.form { background: linear-gradient(160deg, var(--lav), #fff); border-radius: 22px; padding: 14px 16px; border: 2px solid #fff }
.form b { display: block; font-size: 13px; text-transform: uppercase; color: var(--p); letter-spacing: .03em }
.form p { font-size: 18px; font-weight: 700; margin: 4px 0 0 }
.form small { color: var(--soft); font-weight: 700 }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px }
.rule { background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 14px 16px }
.no, .yes { display: block; border-radius: 12px; padding: 6px 12px; font-weight: 800; margin-bottom: 6px }
.no { background: var(--bad); color: var(--badink); text-decoration: line-through; text-decoration-thickness: 2px }
.yes { background: var(--good); color: var(--goodink) }
.rule small { color: var(--soft); font-weight: 700; font-size: 15px }
.tip { display: flex; gap: 14px; align-items: center; background: var(--pink); border-radius: 24px; padding: 14px 18px; font-weight: 800; color: var(--head); font-size: 18px; border: 2px solid #fff; box-shadow: 0 10px 24px -18px var(--rose) }
.tip img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; background: #fff; flex: none }
.turn { background: #fff; border: 2px solid var(--line); border-radius: 28px; padding: clamp(16px, 3vw, 26px) }
.turn ol { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px }
.turn li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; background: var(--bg); border-radius: 18px; padding: 10px 12px }
.turn li > b { width: 34px; height: 34px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; font-family: Fredoka; grid-row: span 2 }
.turn .q { font-size: 18px; font-weight: 800 }
.turn .ans { display: none; color: var(--goodink); font-weight: 700 }
.turn .ans small { display: block; color: var(--soft); font-weight: 600; font-size: 15px }
.turn li.open .ans { display: block }
.reveal { border: 0; background: none; color: var(--p); font-weight: 800; padding: 0; justify-self: start; min-height: 32px; text-decoration: underline; text-underline-offset: 3px }
.turn li.open .reveal { display: none }
.next { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 30px }

/* levels */
.levels { display: inline-flex; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 12px }
.lvl { border: 0; background: transparent; font-weight: 800; font-size: 15px; color: var(--head); padding: 8px 18px; border-radius: 999px; min-height: 40px }
.lvl[aria-pressed="true"] { background: var(--p); color: #fff }
.lvl.adv[aria-pressed="true"] { background: linear-gradient(90deg, #7c3aed, #db2777) }
.advnote { color: var(--rose); font-weight: 800; font-size: 15px; margin: -4px 0 12px }
.stars { background: linear-gradient(160deg, #f3e8ff, #fde7f3); border: 2px solid #fff; border-radius: 26px; padding: 6px 18px; box-shadow: 0 14px 30px -22px #7c3aed }
.stars[open] { padding-bottom: 18px }
.stars summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 12px 0; font: 600 22px Fredoka, sans-serif; color: var(--head) }
.stars summary::-webkit-details-marker { display: none }
.stars summary::after { content: "＋"; margin-left: auto; color: var(--p) }
.stars[open] summary::after { content: "－" }
.stars summary small { font: 700 14px Nunito, sans-serif; color: var(--rose) }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: thin }
.chip { flex: none; border: 2px solid var(--line); background: #fff; color: var(--head); font-weight: 800; font-size: 15px; padding: 8px 16px; border-radius: 999px; min-height: 44px }
.chip[aria-pressed="true"] { background: var(--p); border-color: var(--p); color: #fff }
.chip[disabled] { opacity: .45; cursor: not-allowed }

/* quiz */
.qwrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: 24px; align-items: start }
.qcard { background: #fff; border: 2px solid var(--line); border-radius: 30px; padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow) }
.qtop { display: flex; justify-content: space-between; color: var(--soft); font-weight: 800; font-size: 14px }
.bar { height: 10px; background: var(--lav); border-radius: 9px; margin: 10px 0 18px; overflow: hidden }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--p), #ec4899); transition: width .35s }
.asker { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 14px }
.face { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top; background: linear-gradient(160deg, var(--lav2), var(--pink)); border: 4px solid #fff; box-shadow: 0 8px 18px -10px var(--pd); flex: none }
.qbub { background: var(--lav); border-radius: 22px 22px 22px 6px; padding: 12px 18px; font: 600 clamp(20px, 3vw, 25px)/1.3 Fredoka, sans-serif; color: var(--head) }
.blank { display: inline-block; min-width: 3em; border-bottom: 3px solid var(--p); text-align: center; color: var(--p) }
.multi { background: var(--pink); color: var(--rose); font-weight: 800; border-radius: 14px; padding: 8px 12px; font-size: 15px; margin-bottom: 12px }
.opts { display: grid; gap: 10px }
.opt { text-align: left; border: 2.5px solid var(--line); background: var(--bg); border-radius: 18px; padding: 12px 16px; font-weight: 800; font-size: 18px; min-height: 54px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; align-items: center }
.opt::before { content: ""; width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--lav2); background: #fff; grid-row: span 2 }
.opt.box::before { border-radius: 7px }
.opt[aria-pressed="true"] { border-color: var(--p); background: var(--lav) }
.opt[aria-pressed="true"]::before { background: var(--p); border-color: var(--p); box-shadow: inset 0 0 0 4px #fff }
.opt:hover:not(:disabled) { border-color: var(--p) }
.opt .why { display: none; font-weight: 600; font-size: 15.5px; color: var(--ink); grid-column: 2 }
.checked .opt .why { display: block }
.opt.right { background: var(--good); border-color: #22c55e }
.opt.right::before { content: "✓"; background: #22c55e; border-color: #22c55e; color: #fff; display: grid; place-items: center; font-size: 15px; box-shadow: none }
.opt.wrong { background: var(--bad); border-color: #fb7185 }
.opt.wrong::before { content: "✗"; background: #fb7185; border-color: #fb7185; color: #fff; display: grid; place-items: center; font-size: 15px; box-shadow: none }
.opt.missed { border-style: dashed; border-color: #22c55e }
.verdict { margin-top: 14px; font-weight: 800; font-size: 17px }
.side { position: sticky; top: 90px; display: grid; gap: 14px }
.statcard { background: #fff; border: 2px solid var(--line); border-radius: 24px; padding: 16px; display: flex; gap: 12px; align-items: center }
.statcard b { font: 600 30px Fredoka; color: var(--p) }
.ivyend { display: flex; gap: 16px; align-items: center; margin: 8px 0 14px }
.ivyend .face { width: 116px; height: 116px }

/* flashcards */
.flip { perspective: 1400px; max-width: 640px; height: 360px; cursor: pointer; margin-bottom: 14px }
.fi { position: relative; width: 100%; height: 100%; transition: transform .55s; transform-style: preserve-3d }
.flip.turned .fi { transform: rotateY(180deg) }
.fc { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 30px; border: 3px solid #fff; box-shadow: 0 22px 44px -26px #5b21b6; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 22px; overflow: hidden }
.ffront { background: radial-gradient(circle at 50% 115%, var(--pink2), transparent 55%), linear-gradient(155deg, var(--lav2), #fff) }
.ffront .icon img { height: 110px; width: auto; margin-bottom: 8px; filter: drop-shadow(0 10px 10px #5b21b633) }
.ffront .lt { font-weight: 800; color: var(--soft); font-size: 15px }
.ffront h3 { font-size: clamp(30px, 6vw, 44px); margin: 6px 0 }
.ffront small { color: var(--p); font-weight: 800 }
.fback { background: #fff; transform: rotateY(180deg); justify-content: flex-end; padding-bottom: 0 }
.fback .exs { font-size: 19px; font-weight: 700; margin-bottom: 6px }
.fback .note { color: var(--soft); font-size: 15px; max-width: 46ch }
.fback img { width: 150px; margin-top: auto; display: block }
.ctrls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }

/* review */
.nine { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px }
.nine div { background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 14px }
.nine .mod { font-size: 20px }
.nine p { margin: 8px 0 6px; color: var(--soft); font-weight: 700; font-size: 15px }
.nine a { font-weight: 800; color: var(--p); font-size: 14px; margin-right: 8px }
.meanbox { background: #fff; border: 2px solid var(--p); border-radius: 24px; padding: 18px }
.meanbox .row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px }
.meanbox .row .mod { font-size: 18px }
.peek { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px }
.peek > div { background: rgba(255,255,255,.6); border: 2px dashed var(--lav2); border-radius: 22px; padding: 16px }
.peek h3 { font-size: 19px; margin-bottom: 6px }
.progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px }

/* coach */
.coach { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; align-items: flex-end; gap: 6px; max-width: min(400px, calc(100vw - 24px)); pointer-events: none; opacity: 0; transform: translateY(30px) scale(.92); transition: opacity .3s, transform .4s cubic-bezier(.3, 1.6, .5, 1) }
.coach.show { opacity: 1; transform: none }
.coach .who { position: relative; flex: none; width: 112px; height: 112px; border-radius: 50%; background: linear-gradient(160deg, var(--lav2), var(--pink)); border: 4px solid #fff; box-shadow: 0 14px 28px -12px #5b21b6aa; overflow: hidden }
.coach .who img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
.coach .badge { position: absolute; left: 76px; top: -10px; width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 25px; box-shadow: 0 6px 14px -6px #0006; z-index: 2 }
.coach.ok .badge { animation: five .6s ease-out } .coach.miss .who { animation: nod .7s ease-in-out }
@keyframes five { 0% { transform: scale(.2) rotate(-40deg) } 60% { transform: scale(1.3) rotate(15deg) } }
@keyframes nod { 30% { transform: rotate(-6deg) } 60% { transform: rotate(5deg) } }
.coach .say2 { background: #fff; border: 2.5px solid var(--p); border-radius: 22px 22px 22px 6px; padding: 12px 16px; box-shadow: 0 14px 30px -14px #5b21b6aa; margin-bottom: 30px }
.coach .say2 b { display: block; font: 700 28px/1 Caveat, cursive; color: var(--p); margin-bottom: 4px }
.coach .say2 span { font-weight: 700; font-size: 16px }
.conf { position: fixed; z-index: 49; pointer-events: none; width: 11px; height: 11px; border-radius: 3px; animation: pop 1.1s ease-out forwards }
@keyframes pop { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0 } }
.coachwrap { position: relative; flex: none }

footer { background: linear-gradient(90deg, #efe4ff, #fde4f1); color: var(--head); text-align: center; padding: 22px 16px 26px; font-weight: 800; font-size: 17px; border-top: 2px solid #fff; box-shadow: 0 -10px 30px -24px #5b21b6 }
footer .line { display: block; line-height: 1.6 }
footer .line::before { content: "💜"; margin-right: 10px }
footer .line::after { content: "💜"; margin-left: 10px }

@media (max-width: 1100px) and (min-width: 861px) { .part { flex-direction: column; align-items: flex-start; gap: 8px } .part b { max-width: none } }
@media (max-width: 860px) {
  .hero, .lhead, .qwrap { grid-template-columns: minmax(0, 1fr) }
  .side { position: static; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) }
  .parts { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 600px) {
  body { font-size: 16px }
  .flip { height: 400px }
  .coach { left: 10px; right: 10px; bottom: 10px; max-width: none }
  .coach .who { width: 86px; height: 86px } .coach .badge { left: 56px }
  .stage { border-width: 4px; border-radius: 22px }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } .conf { display: none } }
