:root {
  --rose: #d95792;
  --rose-dark: #9e3b6a;
  --blush: #fff0f6;
  --cream: #fffaf3;
  --lilac: #e9ddff;
  --lilac-dark: #74608d;
  --mist: #d7f4f3;
  --mist-dark: #2e747a;
  --gold: #efb85b;
  --ink: #443348;
  --muted: #806b7d;
  --line: #efd1dd;
  --white: #fffdfd;
  --shadow: 0 20px 55px rgba(150, 72, 111, .15);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--blush); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .9) 0 2%, transparent 20%),
    radial-gradient(circle at 93% 70%, rgba(220, 197, 255, .55) 0 5%, transparent 31%),
    linear-gradient(135deg, #fff5f8, #f9e9f1 48%, #eaf8f5);
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #6bb6be;
  outline-offset: 3px;
}
.skip-link { position: fixed; z-index: 50; top: .7rem; left: .7rem; transform: translateY(-180%); padding: .7rem 1rem; border-radius: 999px; background: var(--ink); color: white; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.app-header { width: min(1180px, calc(100% - 32px)); min-height: 78px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark, .icon-button, .text-button { border: 0; background: transparent; color: var(--ink); }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; padding: .5rem 0; font: 700 1.22rem/1 var(--serif); letter-spacing: -.02em; }
.wordmark-flower { font-size: 1.25rem; }
.header-tools { display: flex; align-items: center; gap: .5rem; }
.save-status { color: var(--muted); font-size: .78rem; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.62); font-size: 1.05rem; }
#app { width: min(1180px, calc(100% - 32px)); margin: 0 auto 6rem; }
.petal { position: fixed; z-index: -1; user-select: none; opacity: .5; filter: drop-shadow(0 10px 12px rgba(206, 93, 147, .16)); animation: drift 10s ease-in-out infinite; }
.petal-one { left: 3vw; top: 20vh; color: var(--rose); font-size: 2.5rem; }.petal-two { right: 2vw; top: 16vh; font-size: 3.8rem; animation-delay: -3s; }.petal-three { right: 8vw; bottom: 9vh; color: #a787e8; font-size: 2rem; animation-delay: -6s; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .72rem; border: 1px solid #efbbd1; border-radius: 999px; color: var(--rose-dark); background: rgba(255,255,255,.72); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: .48rem; height: .48rem; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 .23rem #ffe2ee; }
h1, h2, h3, p { margin-top: 0; } h1, h2, h3 { font-family: var(--serif); letter-spacing: -.035em; line-height: 1; }
h1 { max-width: 10ch; margin-bottom: 1rem; font-size: clamp(3.6rem, 9vw, 7.6rem); font-weight: 600; } h1 em { color: var(--rose); font-weight: 600; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 600; } h3 { font: 700 1.4rem/1.1 var(--serif); }
.lede { max-width: 38rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr); gap: 2.5rem; min-height: 590px; padding: clamp(2rem, 6vw, 5rem); overflow: hidden; border: 1px solid rgba(231, 158, 190, .6); border-radius: 34px; background: rgba(255, 253, 253, .72); box-shadow: var(--shadow); isolation: isolate; }
.hero::before { content: ''; position: absolute; z-index: -1; inset: 0; opacity: .55; background: repeating-linear-gradient(0deg, transparent 0 39px, rgba(215, 111, 157, .08) 40px 41px); }.hero::after { content: ''; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 75% 45%, rgba(219, 193, 255, .72), transparent 35%), radial-gradient(ellipse at 10% 90%, rgba(245, 209, 221, .85), transparent 34%); }
.hero-copy { align-self: center; }.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.65rem; }.primary-button, .secondary-button { min-height: 48px; padding: .82rem 1.08rem; border: 1px solid transparent; border-radius: 999px; font-weight: 800; font-size: .82rem; letter-spacing: .055em; text-transform: uppercase; transition: transform .2s, box-shadow .2s; }.primary-button { color: white; background: linear-gradient(110deg, var(--rose), #f18cb8); box-shadow: 0 12px 20px rgba(203, 68, 130, .25); }.secondary-button { color: var(--rose-dark); border-color: #efb6cc; background: rgba(255,255,255,.76); }.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 25px rgba(170, 75, 123, .22); }
.path-pills { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.5rem 0; }.path-pill { padding: .55rem .72rem; border: 1px solid var(--line); border-radius: 12px; color: var(--rose-dark); background: rgba(255,255,255,.67); font-size: .77rem; font-weight: 700; }
.passport-card { position: relative; align-self: center; width: min(100%, 325px); min-height: 390px; margin: auto; padding: 1.35rem; overflow: hidden; border: 1px solid rgba(255,255,255,.7); border-radius: 19px 38px 38px 19px; color: white; background: linear-gradient(145deg, #c9b6f0, #ee8fb7 68%, #f3bd76); box-shadow: 19px 22px 0 rgba(205, 139, 180, .13), 0 28px 45px rgba(111, 64, 95, .2); transform: rotate(5deg); }.passport-card::after { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(255,255,255,.55); border-radius: 12px 28px 28px 12px; pointer-events: none; }.passport-card > * { position: relative; z-index: 1; }.passport-label { padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.55); font-size: .65rem; font-weight: 800; letter-spacing: .17em; }.passport-seal { display: grid; place-items: center; width: 122px; height: 122px; margin: 3rem auto 1.2rem; border: 1px solid white; border-radius: 50%; font: 3rem/1 var(--serif); }.passport-card strong { display: block; text-align: center; font: 600 2rem/.9 var(--serif); }.passport-card small { display: block; margin-top: .8rem; text-align: center; font-size: .65rem; font-weight: 700; letter-spacing: .14em; }
.dream-tickets { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }.dream-ticket { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .65rem; border: 1px dashed #d587ab; border-radius: 10px; background: #fff7fb; color: #9a4c72; font-size: .76rem; font-weight: 700; }.dream-ticket.is-earned { border-style: solid; color: #72528c; background: #f7f0ff; }.dream-ticket.is-locked { opacity: .55; filter: saturate(.55); }
.mission-map { padding: clamp(1.6rem, 5vw, 3.4rem); border: 1px solid var(--line); border-radius: 30px; background: rgba(255,255,255,.66); box-shadow: var(--shadow); }.map-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2.4rem; }.xp-orb { min-width: 105px; padding: .75rem; border-radius: 16px; color: var(--rose-dark); background: #fff5f9; text-align: center; font: 800 .78rem var(--sans); }.mission-route { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }.mission-route::before { content: ''; position: absolute; top: 52px; right: 7%; left: 7%; border-top: 2px dashed #e4b0c7; }.mission-node { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 170px; padding: 1rem; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fffdfd; box-shadow: 0 8px 18px rgba(170, 96, 131, .08); text-align: left; transition: transform .2s, border-color .2s; }.mission-node:not(:disabled):hover { transform: translateY(-5px); border-color: #d57aa3; }.mission-node:disabled { cursor: default; opacity: .64; }.mission-icon { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 1rem; border-radius: 14px; background: var(--blush); font-size: 1.3rem; }.mission-node strong { font: 700 1.1rem/1 var(--serif); }.mission-node small { margin-top: .4rem; color: var(--muted); font-size: .72rem; line-height: 1.3; }.mission-state { margin-top: auto; color: var(--rose-dark); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.section-shell { max-width: 880px; margin: 2.5rem auto; }.back-link { display: inline-flex; gap: .45rem; align-items: center; margin-bottom: 1.2rem; border: 0; background: none; color: var(--rose-dark); font-weight: 700; }.lesson-card, .grammar-card, .activity-card, .reflection-card { padding: clamp(1.3rem, 4vw, 2.3rem); border: 1px solid var(--line); border-radius: 24px; background: rgba(255,253,253,.84); box-shadow: var(--shadow); }.lesson-card + .lesson-card, .grammar-card + .activity-card, .activity-card + .activity-card { margin-top: 1rem; }.grammar-card { border-color: #d9c8f0; background: linear-gradient(130deg, rgba(255,255,255,.96), rgba(243,235,255,.91)); }.grammar-card h3 { color: #6b5485; }.pattern { display: inline-block; margin: .5rem 0 1rem; padding: .6rem .75rem; border-radius: 10px; color: #704d87; background: #fff; font-weight: 800; font-size: .9rem; }.example-pair { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid #efb5cd; }.example-pair strong { display: block; color: var(--rose-dark); }.translation { color: var(--muted); font-size: .9rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .75rem; margin: 1.25rem 0; }.choice-card { min-height: 118px; padding: 1rem; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: white; text-align: left; }.choice-card.is-selected { border-color: var(--rose); background: #fff0f7; box-shadow: inset 0 0 0 1px var(--rose); }.choice-card .choice-icon { display: block; margin-bottom: .5rem; font-size: 1.3rem; }.choice-card strong { display: block; font: 700 1.05rem/1 var(--serif); }.choice-card small { display: block; margin-top: .35rem; color: var(--muted); font-size: .72rem; line-height: 1.25; }
label.field-label { display: block; margin: 1.2rem 0 .5rem; font-weight: 800; }.text-field, textarea, .glossary-search { width: 100%; padding: .82rem .9rem; border: 1px solid #e4bdce; border-radius: 13px; color: var(--ink); background: rgba(255,255,255,.9); }.text-field:focus, textarea:focus, .glossary-search:focus { border-color: var(--rose); outline: none; box-shadow: 0 0 0 3px rgba(217,87,146,.14); } textarea { min-height: 112px; resize: vertical; }
.builder-bank, .builder-zone { display: flex; flex-wrap: wrap; gap: .55rem; min-height: 58px; padding: .75rem; border-radius: 16px; }.builder-bank { background: #fff8fb; }.builder-zone { margin-top: .7rem; border: 1px dashed #dba0ba; background: rgba(255,255,255,.65); }.builder-block { min-height: 42px; padding: .62rem .75rem; border: 1px solid #eab7cb; border-radius: 10px; color: var(--rose-dark); background: white; font-size: .76rem; font-weight: 800; letter-spacing: .03em; }.builder-block:hover { background: #fff0f7; }.builder-block[draggable="true"] { cursor: grab; }.builder-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }.hint-box { margin-top: 1rem; padding: .8rem 1rem; border-radius: 13px; color: #765b83; background: #f5efff; }.success-box { margin-top: 1rem; padding: .9rem 1rem; border-radius: 13px; color: #2b716d; background: #e7f7f2; }
.scenario-list { display: grid; gap: 1rem; }.scenario { padding: 1rem; border: 1px solid #c6e5e4; border-radius: 16px; background: #f4fffe; }.scenario h3 { margin-bottom: .5rem; color: var(--mist-dark); }.option-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .7rem; }.option-chip { padding: .6rem .72rem; border: 1px solid #b8dddb; border-radius: 999px; color: #39787c; background: white; font-size: .78rem; }.option-chip.is-selected { color: white; border-color: var(--mist-dark); background: var(--mist-dark); }
.voice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }.voice-card { padding: 1rem; border: 1px solid #e5c5f1; border-radius: 16px; background: linear-gradient(135deg, #fff, #faf2ff); }.voice-card p { margin-bottom: .7rem; color: #6d5876; font-family: var(--serif); font-size: 1.23rem; }.audio-actions { display: flex; flex-wrap: wrap; gap: .5rem; }.audio-actions button { min-height: 38px; padding: .4rem .65rem; border: 1px solid #d8bce9; border-radius: 9px; color: #735689; background: white; font-size: .73rem; font-weight: 700; }
.glossary-fab { position: fixed; z-index: 11; right: max(1rem, calc((100vw - 1180px) / 2)); bottom: 1.15rem; min-height: 50px; padding: .7rem 1rem; border: 1px solid #efbad0; border-radius: 999px; color: var(--rose-dark); background: rgba(255,255,255,.94); box-shadow: 0 14px 30px rgba(154, 64, 108, .2); font-size: .82rem; font-weight: 800; }.glossary-panel { position: fixed; z-index: 30; top: 0; right: 0; display: flex; flex-direction: column; width: min(490px, 100%); height: 100dvh; padding: 1.2rem; overflow: auto; transform: translateX(105%); border-left: 1px solid var(--line); background: #fffafb; box-shadow: -18px 0 50px rgba(109, 54, 84, .14); transition: transform .25s ease; }.glossary-panel.is-open { transform: translateX(0); }.panel-top { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }.panel-top h2 { margin-bottom: .25rem; font-size: 2.2rem; }.panel-close { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--rose-dark); background: white; }.filter-row { display: flex; gap: .45rem; margin: .8rem 0; overflow-x: auto; padding-bottom: .3rem; }.filter-chip { flex: none; padding: .45rem .62rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: .7rem; font-weight: 700; }.filter-chip.is-active { color: white; border-color: var(--rose); background: var(--rose); }.glossary-entry { margin-top: .7rem; border: 1px solid #edd6df; border-radius: 14px; background: white; }.glossary-entry summary { display: flex; align-items: center; gap: .6rem; padding: .85rem; cursor: pointer; list-style: none; font-weight: 800; }.glossary-entry summary::-webkit-details-marker { display: none; }.glossary-entry-body { padding: 0 .85rem .9rem; color: var(--muted); font-size: .86rem; }.glossary-entry-body p { margin-bottom: .6rem; }.entry-term { color: var(--rose-dark); }.entry-actions { display: flex; flex-wrap: wrap; gap: .45rem; }.entry-actions button { min-height: 34px; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; color: var(--rose-dark); background: #fff8fb; font-size: .68rem; font-weight: 800; }
.toast { position: fixed; z-index: 60; right: 1rem; bottom: 5rem; max-width: min(380px, calc(100% - 2rem)); padding: .8rem 1rem; transform: translateY(1rem); border: 1px solid #bde3dc; border-radius: 13px; opacity: 0; color: #256e67; background: #effcf8; box-shadow: 0 12px 30px rgba(32, 106, 97, .15); transition: opacity .2s, transform .2s; font-weight: 700; }.toast.is-visible { transform: translateY(0); opacity: 1; }
.settings-dialog { width: min(460px, calc(100% - 2rem)); padding: 1.5rem; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: #fffafb; box-shadow: var(--shadow); }.settings-dialog::backdrop { background: rgba(73, 36, 58, .28); backdrop-filter: blur(3px); }.dialog-heading { display: flex; align-items: center; gap: .6rem; }.dialog-heading h2 { margin: 0; font-size: 2rem; }.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .9rem 0; font-weight: 700; }.toggle-row input { position: absolute; opacity: 0; }.toggle-indicator { width: 46px; height: 27px; padding: 3px; border-radius: 99px; background: #dfc9d5; transition: background .2s; }.toggle-indicator::after { display: block; width: 21px; height: 21px; border-radius: 50%; background: white; content: ''; transition: transform .2s; }.toggle-row input:checked + .toggle-indicator { background: var(--rose); }.toggle-row input:checked + .toggle-indicator::after { transform: translateX(19px); }.dialog-actions { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1rem; }.text-button { color: var(--rose-dark); font-weight: 800; }.soft-danger { min-height: 42px; padding: .55rem .72rem; border: 1px solid #e5bacb; border-radius: 10px; color: #934265; background: #fff6f9; font-size: .78rem; font-weight: 800; }
.empty-state { padding: 2rem; color: var(--muted); text-align: center; }.mission-complete { text-align: center; }.mission-complete .seal { display: grid; place-items: center; width: 90px; height: 90px; margin: 0 auto 1rem; border: 1px solid #f3c778; border-radius: 50%; color: var(--gold); background: #fff8e9; font-size: 2.5rem; }
.hidden { display: none !important; }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
@keyframes drift { 50% { transform: translate3d(8px, -18px, 0) rotate(9deg); } }
@media (max-width: 920px) { .hero { grid-template-columns: 1fr; }.passport-card { margin-top: 0; }.mission-route { grid-template-columns: repeat(3,1fr); }.mission-route::before { display: none; } }
@media (max-width: 760px) { .app-header, #app { width: min(100% - 24px, 1180px); }.app-header { min-height: 66px; }.save-status { display: none; }.hero { min-height: 0; padding: 1.5rem; border-radius: 25px; }.passport-card { width: 240px; min-height: 300px; transform: rotate(3deg) scale(.92); transform-origin: top center; }.passport-seal { width: 84px; height: 84px; margin: 1.6rem auto .8rem; }.mission-map { padding: 1.15rem; }.map-heading { display: block; }.xp-orb { display: inline-block; margin-bottom: 1rem; }.mission-route { grid-template-columns: 1fr; }.mission-node { min-height: 124px; }.voice-grid { grid-template-columns: 1fr; }.glossary-panel { padding: 1rem; }.dream-tickets { margin-bottom: 1rem; } h1 { font-size: clamp(3.1rem, 17vw, 5rem); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.progress-chip { padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--rose-dark); background: rgba(255,255,255,.8); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.glossary-panel { visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
.glossary-panel.is-open { visibility: visible; transition: transform .25s ease, visibility 0s; }
.builder-block, .audio-actions button, .entry-actions button, .option-chip, .filter-chip, .back-link { min-height: 44px; }
.builder-block.is-placed { border-style: solid; background: #fff0f7; }
.option-chip.is-active { border-color: var(--rose); box-shadow: inset 0 0 0 2px var(--rose); color: var(--rose-dark); }
.option-chip[disabled] { cursor: default; opacity: .75; }
.match-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .7rem; }
.match-column { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
@media (max-width: 760px) { .match-columns { grid-template-columns: 1fr 1fr; gap: .5rem; } .progress-chip { font-size: .7rem; } }
