@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Quicksand:wght@500;600;700&display=swap");

:root {
  --ink: #213b45;
  --ink-soft: #60747a;
  --navy: #17343d;
  --navy-2: #244e55;
  --paper: #fbf7ec;
  --paper-2: #eee7d7;
  --mint: #a9d6bf;
  --mint-deep: #578c73;
  --gold: #efbd58;
  --coral: #e78572;
  --shadow: 0 18px 50px rgba(24, 48, 52, 0.13);
  --line: rgba(38, 70, 70, .11);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #e9efe8; color: var(--ink); font-family: "Noto Sans SC", sans-serif; }
body { background-image: radial-gradient(circle at 80% 8%, rgba(239,189,88,.13), transparent 25%), radial-gradient(circle at 20% 70%, rgba(87,140,115,.1), transparent 30%); }
button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 235px 1fr;
  background: linear-gradient(135deg, #edf3ed, #f6f1e5);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  padding: 28px 18px 22px;
  flex-direction: column;
  color: #f9f3e4;
  background:
    radial-gradient(circle at 20% 12%, rgba(239,189,88,.15), transparent 24%),
    var(--navy);
}

.brand { display: flex; align-items: center; padding: 0 8px 25px; gap: 11px; }
.brand img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 7px 12px rgba(0,0,0,.25)); }
.brand b { display: block; font-size: 19px; }
.brand span { display: block; color: var(--gold); font-family: "Quicksand", sans-serif; font-size: 8px; letter-spacing: .16em; }

#main-nav { display: grid; gap: 5px; }
.nav-item {
  display: grid;
  padding: 12px 14px;
  border: 0;
  border-radius: 13px;
  grid-template-columns: 31px 1fr;
  align-items: center;
  color: rgba(255,255,255,.68);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.nav-item span { color: var(--gold); font-family: "Quicksand", sans-serif; }
.nav-item.is-active { color: white; background: rgba(255,255,255,.1); }

.sidebar-companion { margin-top: auto; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.05); }
.sidebar-companion p { margin: 0 0 8px; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.7; }
.sidebar-companion span { color: var(--gold); font-size: 11px; }

main { min-width: 0; padding: 30px clamp(22px, 4vw, 60px) 50px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
#page-kicker { color: #a18248; font-family: "Quicksand", sans-serif; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.topbar h1 { margin: 5px 0 0; font-size: clamp(27px, 4vw, 38px); }
.top-actions { display: flex; align-items: center; gap: 9px; }
#streak-chip { padding: 8px 13px; border-radius: 99px; color: #6c5940; background: #f3dfb6; font-size: 12px; }
.points-chip { min-height: 34px; padding: 7px 12px; border: 1px solid rgba(181,104,98,.18); border-radius: 99px; color: #9a554f; background: #f7ddda; cursor: pointer; font-size: 12px; font-weight: 700; }
.points-chip.just-earned { animation: points-pop .7s ease; }
@keyframes points-pop { 45% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(231,133,114,.12); } }
.install-app-button { min-height: 34px; padding: 7px 12px; border: 0; border-radius: 99px; color: #f9f3e4; background: var(--navy-2); cursor: pointer; font-size: 11px; font-weight: 700; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: white; box-shadow: var(--shadow); cursor: pointer; }

.hero-dashboard {
  position: relative;
  display: grid;
  min-height: 260px;
  padding: 30px;
  overflow: hidden;
  border-radius: 28px;
  grid-template-columns: 1fr 220px;
  color: white;
  background: linear-gradient(135deg, #1e4650, #376a68);
  box-shadow: var(--shadow);
}
.hero-dashboard::after { position: absolute; width: 320px; height: 320px; right: -80px; top: -110px; border-radius: 50%; content: ""; background: rgba(255,255,255,.06); }
.hero-copy { position: relative; z-index: 1; }
.hero-copy span { color: var(--gold); font-size: 11px; }
.hero-copy h2 { max-width: 480px; margin: 8px 0; font-size: clamp(27px, 4vw, 42px); }
.hero-copy p { max-width: 520px; color: rgba(255,255,255,.72); line-height: 1.7; }
.hero-character { position: absolute; right: 15px; bottom: -42px; width: 235px; filter: drop-shadow(0 20px 28px rgba(4,16,18,.34)); }

.primary-button, .secondary-button {
  min-height: 45px;
  padding: 11px 18px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 700;
}
.primary-button { color: #263b3f; background: linear-gradient(135deg, #f4d486, var(--gold)); box-shadow: 0 9px 24px rgba(239,189,88,.2); }
.secondary-button { color: #557067; background: #e1ece3; }

.dashboard-grid { display: grid; margin-top: 18px; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.panel { padding: 21px; border: 1px solid rgba(75,88,78,.1); border-radius: 21px; background: rgba(255,255,255,.7); box-shadow: 0 10px 30px rgba(36,56,48,.07); }
.panel { transition: transform .2s ease, box-shadow .2s ease; }
.panel:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(36,56,48,.1); }
.panel h3 { margin: 0 0 7px; }
.panel p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.metric { margin-top: 17px; color: var(--mint-deep); font-family: "Quicksand", sans-serif; font-size: 27px; font-weight: 700; }
.progress-bar { height: 7px; margin-top: 13px; overflow: hidden; border-radius: 99px; background: #dfe7de; }
.progress-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--mint-deep)); }

.page-section { display: grid; gap: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; }
.section-head h2 { margin: 0; }
.section-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; }
.word-search { width: 100%; min-height: 46px; padding: 10px 15px; border: 1px solid #d6cebd; border-radius: 14px; outline: none; color: var(--ink); background: rgba(255,255,255,.72); }
.word-search:focus { border-color: #77a187; box-shadow: 0 0 0 3px rgba(119,161,135,.12); }
.filter-chip { padding: 8px 13px; border: 1px solid #d6cebd; border-radius: 99px; color: #60736b; background: transparent; cursor: pointer; }
.filter-chip.is-active { border-color: #79a78b; background: #dfece2; }
.library-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.library-summary span { padding: 10px 13px; border: 1px solid #ded5c3; border-radius: 13px; color: var(--ink-soft); background: rgba(255,255,255,.58); font-size: 12px; }
.library-summary b { margin-right: 3px; color: var(--mint-deep); font-family: "Quicksand", sans-serif; font-size: 16px; }
.load-more { width: min(340px, 100%); margin: 4px auto 0; }
.phonetic, .study-phonetic { color: #8a7659; font-family: "Quicksand", sans-serif; }
.phonetic { display: block; margin: -2px 0 5px; font-size: 11px; }
.study-phonetic { margin: -4px 0 12px; font-size: 16px; }
.card-meta { display: flex; min-height: 27px; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-size: 10px; }
.lesson-item, .speaking-item { display: flex; flex-direction: column; gap: 10px; }
.lesson-item h3, .speaking-item h3 { margin-bottom: 0; }
.lesson-item button, .speaking-item button { margin-top: auto; }
.mission-box { padding: 11px 12px; border-radius: 12px; color: #506860; background: #e4eee5; font-size: 12px; line-height: 1.65; }
.lesson-step { margin: 16px 0; padding: 15px; border-radius: 14px; background: #e5eee6; line-height: 1.7; }
.lesson-step p { margin: 7px 0 0; }
.breakdown-list { display: grid; margin: -8px 0 20px; gap: 6px; }
.breakdown-list span { padding: 9px 11px; border-radius: 10px; background: rgba(255,255,255,.65); font-size: 12px; }
.conversation-flow { display: grid; margin: 12px 0 18px; gap: 9px; }
.conversation-flow div { display: grid; max-width: 86%; padding: 10px 12px; border-radius: 4px 14px 14px 14px; gap: 4px; background: #e5ebe4; }
.conversation-flow div.is-you { margin-left: auto; border-radius: 14px 4px 14px 14px; background: #f2dfb9; }
.conversation-flow b { color: #7d6744; font-size: 10px; }
.conversation-flow span { line-height: 1.55; }
.alternatives { margin: 14px 0; padding: 12px 14px; border: 1px solid #ddd4c3; border-radius: 13px; background: rgba(255,255,255,.5); }
.alternatives summary { cursor: pointer; font-weight: 700; }
.alternatives li { margin: 7px 0; line-height: 1.5; }
.word-title-line { display: flex; align-items: center; gap: 8px; }
.priority-tag { padding: 3px 7px; border-radius: 99px; font-size: 9px; font-weight: 700; }
.priority-high { color: #785a25; background: #f4dfad; }
.priority-cet4 { color: #3e6857; background: #d6e8dc; }
.priority-foundation { color: #64716d; background: #e7ebe7; }

.eyebrow { color: #c39645; font-family: "Quicksand", sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.daily-route { display: grid; margin-top: 24px; gap: 15px; }
.daily-route .section-head p { color: var(--ink-soft); font-size: 12px; }
.route-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.route-card { display: grid; min-height: 88px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; color: var(--ink); background: rgba(255,255,255,.68); cursor: pointer; text-align: left; box-shadow: 0 10px 26px rgba(37,60,52,.05); }
.route-card > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #745f39; background: #f3dfb4; font-family: "Quicksand", sans-serif; font-weight: 700; }
.route-card b, .route-card small { display: block; }
.route-card small { margin-top: 4px; color: var(--ink-soft); line-height: 1.4; }
.route-card em { color: var(--mint-deep); font-family: "Quicksand", sans-serif; font-size: 16px; font-style: normal; font-weight: 700; }

.exam-hero { display: grid; padding: 27px; border-radius: 25px; grid-template-columns: 1fr auto; align-items: center; gap: 25px; color: white; background: linear-gradient(135deg, #183943, #346b67 72%, #6f8663); box-shadow: var(--shadow); }
.exam-hero h2 { margin: 6px 0; font-size: clamp(25px,4vw,36px); }
.exam-hero p { max-width: 610px; margin: 0; color: rgba(255,255,255,.72); line-height: 1.7; }
.exam-score { display: grid; min-width: 125px; padding: 18px; border: 1px solid rgba(255,255,255,.15); border-radius: 18px; background: rgba(255,255,255,.08); text-align: center; }
.exam-score b { color: var(--gold); font: 700 36px "Quicksand", sans-serif; }
.exam-score span, .exam-score small { color: rgba(255,255,255,.76); }
.exam-score small { margin-top: 7px; font-size: 10px; }
.exam-map { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.exam-section-card { display: grid; padding: 16px; border: 1px solid var(--line); border-radius: 17px; grid-template-columns: 35px 1fr; gap: 10px; background: rgba(255,255,255,.66); }
.exam-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: #785e30; background: #f2dfb9; font-weight: 700; }
.exam-section-card h3 { margin: 0; font-size: 15px; }
.exam-section-card em { color: var(--mint-deep); font-style: normal; }
.exam-section-card p { margin: 4px 0; color: var(--ink-soft); font-size: 11px; }
.exam-section-card small { color: #7b867f; line-height: 1.4; }
.training-note { padding: 12px 14px; border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; color: #756b5a; background: rgba(242,234,217,.86); font-size: 11px; line-height: 1.6; }
.practice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.practice-card { display: flex; min-height: 190px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; flex-direction: column; gap: 10px; background: rgba(255,255,255,.72); box-shadow: 0 8px 24px rgba(35,54,47,.05); }
.practice-card.has-error { border-color: rgba(210,112,91,.42); background: linear-gradient(145deg,rgba(255,255,255,.8),rgba(248,225,219,.65)); }
.practice-card h3, .practice-card p { margin: 0; }
.practice-card p { color: var(--ink-soft); font-size: 12px; }
.practice-card button { margin-top: auto; }
.practice-status { color: #907444; font-size: 10px; font-weight: 700; }
.audio-prompt, .outline-box { margin: 15px 0; padding: 14px; border-radius: 14px; background: #e5eee7; line-height: 1.65; }
.audio-prompt { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reading-passage { margin: 16px 0; padding: 18px; border-radius: 15px; color: #354d51; background: #eee8d9; font-family: "Quicksand","Noto Sans SC",sans-serif; line-height: 1.85; }
.lesson-options { display: grid; margin: 14px 0; gap: 8px; }
.lesson-option { padding: 12px 14px; border: 1px solid #d8d0c0; border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.7); cursor: pointer; text-align: left; }
.lesson-option:hover { border-color: #88a990; }
.lesson-option.is-correct { border-color: #6f9d7c; background: #dcebdd; }
.lesson-option.is-wrong { border-color: #c97867; background: #f3d8d1; }
.answer-explanation { margin-top: 15px; padding: 15px; border-radius: 14px; background: #dfeae1; line-height: 1.7; }
.answer-explanation p { margin: 7px 0; }
.answer-explanation span, .answer-explanation small { color: var(--ink-soft); }
.profile-tools { display: flex; padding: 22px; border: 1px solid var(--line); border-radius: 21px; align-items: center; justify-content: space-between; gap: 22px; background: rgba(255,255,255,.68); }
.profile-tools h2 { margin: 5px 0; }
.profile-tools p { max-width: 680px; margin: 0; color: var(--ink-soft); line-height: 1.7; }
.profile-tool-actions { display: flex; min-width: 230px; flex-direction: column; gap: 8px; }
.install-guide { display: grid; margin: 18px 0; gap: 9px; }
.install-guide article { padding: 15px; border: 1px solid #ded5c6; border-radius: 14px; background: rgba(255,255,255,.6); }
.install-guide p { margin: 6px 0 0; color: var(--ink-soft); line-height: 1.7; }
.install-guide.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.install-lead { margin: 8px 0 14px; color: var(--ink-soft); line-height: 1.75; }
.install-alert { margin: 12px 0; padding: 13px 14px; border: 1px solid #efc1ac; border-radius: 14px; color: #8a4933; background: #fff1e8; line-height: 1.65; }
.ios-install-steps { display: grid; gap: 10px; margin: 16px 0; }
.ios-install-steps article { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 15px; border: 1px solid rgba(36,78,85,.13); border-radius: 17px; background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(244,238,224,.78)); }
.ios-install-steps article > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: var(--navy-2); font-weight: 800; }
.ios-install-steps b { display: block; margin-bottom: 4px; color: var(--ink); }
.ios-install-steps p { margin: 0; color: var(--ink-soft); line-height: 1.65; }
.install-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.update-banner { position: fixed; z-index: 90; right: 20px; bottom: 20px; max-width: calc(100vw - 40px); padding: 13px 18px; border: 0; border-radius: 14px; color: white; background: #244e55; box-shadow: var(--shadow); cursor: pointer; }

.reward-route { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(255,248,238,.88), rgba(245,221,217,.82)); }
.reward-route > span { color: #985952; background: #f4d7d3; }
.reward-hero { position: relative; display: grid; min-height: 270px; padding: 28px; overflow: hidden; border-radius: 27px; grid-template-columns: 180px 1fr 150px; align-items: center; gap: 24px; color: #fffaf0; background: linear-gradient(135deg, #563c3c, #8e5e58 55%, #ad7c68); box-shadow: var(--shadow); }
.reward-hero::after { position: absolute; right: -90px; top: -120px; width: 320px; height: 320px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; content: ""; }
.reward-photo-slot { position: relative; z-index: 1; display: grid; height: 205px; overflow: hidden; border: 2px solid rgba(255,255,255,.35); border-radius: 24px; place-items: center; background: rgba(255,255,255,.1); }
.reward-photo-slot img { width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: .82; }
.reward-photo-slot span { position: absolute; right: 8px; bottom: 8px; left: 8px; padding: 6px; border-radius: 9px; background: rgba(45,25,25,.58); font-size: 9px; text-align: center; }
.reward-copy { position: relative; z-index: 1; }
.reward-copy h2 { max-width: 600px; margin: 7px 0; font-size: clamp(27px,4vw,43px); line-height: 1.2; }
.reward-copy p { max-width: 580px; color: rgba(255,255,255,.75); line-height: 1.7; }
.heart-balance { display: inline-flex; margin-top: 7px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.17); border-radius: 14px; align-items: center; gap: 9px; background: rgba(255,255,255,.1); }
.heart-balance b { color: #ffd2c9; font: 700 20px "Quicksand",sans-serif; }
.heart-balance span { color: rgba(255,255,255,.7); font-size: 11px; }
.reward-egg { position: relative; z-index: 1; width: 175px; align-self: end; filter: drop-shadow(0 18px 24px rgba(40,20,20,.3)); }
.reward-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; align-items: start; }
.reward-grid { display: grid; margin-top: 14px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.reward-card { display: flex; min-height: 255px; padding: 18px; border: 1px solid rgba(121,77,65,.13); border-radius: 21px; flex-direction: column; gap: 9px; background: linear-gradient(145deg,rgba(255,255,255,.82),rgba(249,238,224,.7)); box-shadow: 0 10px 28px rgba(70,43,38,.06); }
.reward-card h3, .reward-card p { margin: 0; }
.reward-card p { color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.reward-card button { margin-top: auto; }
.reward-icon { display: grid; width: 52px; height: 52px; border-radius: 17px; place-items: center; background: #f4dfc3; font-size: 28px; }
.reward-cost { display: flex; margin-top: auto; align-items: end; justify-content: space-between; gap: 8px; }
.reward-cost b { color: #a55750; font: 700 20px "Quicksand",sans-serif; }
.reward-cost span { color: #8c7b70; font-size: 10px; }
.reward-side { display: grid; gap: 12px; }
.points-rules, .custom-reward { padding: 18px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.72); }
.points-rules h3, .custom-reward h3 { margin: 0 0 13px; }
.points-rules > div { display: flex; padding: 8px 0; border-bottom: 1px dashed #ded5c6; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.points-rules b { color: var(--mint-deep); }
.points-rules small { display: block; margin-top: 12px; color: #8a7e70; line-height: 1.55; }
.custom-reward label { display: grid; margin-top: 9px; gap: 5px; color: var(--ink-soft); font-size: 10px; }
.custom-reward input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #d8d0c2; border-radius: 10px; outline: none; background: rgba(255,255,255,.7); }
.custom-reward button { width: 100%; margin-top: 12px; }
.custom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.redemption-history { display: grid; gap: 12px; }
.history-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.history-list article { display: grid; padding: 13px; border: 1px solid var(--line); border-radius: 14px; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; background: rgba(255,255,255,.65); }
.history-list b, .history-list small { display: block; }
.history-list small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.history-list em { color: #9c6961; font-size: 10px; font-style: normal; }
.empty-wish { padding: 22px; border: 1px dashed #cdbeb0; border-radius: 16px; color: #88796e; text-align: center; }

.daily-mission-board { display: grid; margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 23px; gap: 15px; background: rgba(255,255,255,.58); box-shadow: 0 12px 32px rgba(36,56,48,.06); }
.daily-task-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.daily-task { display: grid; padding: 13px; border: 1px solid #ded6c7; border-radius: 15px; grid-template-columns: 31px 1fr; align-items: center; gap: 8px; background: rgba(255,255,255,.62); }
.daily-task > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; color: #765e39; background: #f3dfb9; font-weight: 700; }
.daily-task b, .daily-task small { display: block; }
.daily-task small { margin: 2px 0 6px; color: var(--ink-soft); font-size: 9px; }
.daily-task i { display: block; height: 4px; overflow: hidden; border-radius: 99px; background: #dfe6df; }
.daily-task em { display: block; height: 100%; border-radius: inherit; background: var(--mint-deep); }
.daily-task.is-complete { border-color: #a9c8ae; background: #e4eee4; }
.memory-hint { margin: 0; color: #8a796c; font-size: 11px; line-height: 1.6; }
.two-month-plan { display: grid; margin-top: 18px; padding: 22px; grid-template-columns: minmax(0,1.15fr) minmax(260px,.85fr); gap: 16px; align-items: center; border: 1px solid rgba(36,78,85,.12); border-radius: 23px; background: linear-gradient(135deg, rgba(229,244,238,.9), rgba(255,244,224,.9)); box-shadow: 0 12px 32px rgba(36,56,48,.06); }
.two-month-plan h2 { margin: 5px 0 8px; }
.two-month-plan p { margin: 0; color: var(--ink-soft); line-height: 1.7; }
.plan-pill-grid { display: grid; gap: 8px; }
.plan-pill-grid span { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid rgba(36,78,85,.1); border-radius: 15px; background: rgba(255,255,255,.62); color: var(--ink-soft); line-height: 1.45; }
.plan-pill-grid b { color: var(--mint-deep); font-size: 12px; }
.goal-settings { display: grid; margin: 18px 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.goal-settings label { display: flex; min-height: 50px; padding: 9px 12px; border: 1px solid #ddd4c4; border-radius: 13px; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255,255,255,.58); }
.goal-settings input { width: 78px; padding: 8px; border: 1px solid #d0c8b9; border-radius: 9px; text-align: center; }
.goal-preset-row { display: flex; margin-bottom: 13px; flex-wrap: wrap; gap: 8px; }
.wide-button { width: 100%; }
.encouragement-button { margin-top: 12px; }

.memory-reward { display: grid; min-height: 520px; margin: -34px; grid-template-columns: minmax(250px,42%) 1fr; overflow: hidden; border-radius: 28px; background: #fbf7ec; }
.memory-photo { position: relative; display: grid; min-height: 520px; padding: 25px; place-items: center; color: white; background: linear-gradient(145deg,#394f53,#87685d); background-position: center; background-size: cover; text-align: center; }
.memory-photo::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg,transparent 35%,rgba(24,30,31,.5)); }
.memory-photo > div { position: relative; z-index: 1; display: grid; margin-top: auto; gap: 6px; }
.memory-photo span { color: #f3cfca; font-size: 52px; }
.memory-photo b { font-size: 18px; }
.memory-photo small { color: rgba(255,255,255,.7); }
.memory-message { display: flex; padding: 48px 38px 35px; flex-direction: column; justify-content: center; }
.memory-message h2 { margin: 9px 0 18px; font-size: clamp(28px,4vw,42px); }
.memory-message blockquote { margin: 0; color: #43585a; font-size: clamp(17px,2.3vw,22px); line-height: 1.9; }
.memory-sign { margin: 20px 0 28px; color: #a06158; font-size: 12px; }
.memory-message button { align-self: flex-start; }
.memory-reward.is-daily-complete .memory-photo { background-image: linear-gradient(145deg,rgba(68,50,52,.25),rgba(136,91,78,.35)); }

.egg-dialogue-stage { display: grid; min-height: 205px; margin: -5px 0 20px; padding: 20px; overflow: hidden; border-radius: 24px; grid-template-columns: 185px 1fr; align-items: center; gap: 19px; background: linear-gradient(145deg,#f4e3c2,#dcebdd); }
.egg-portrait { position: relative; display: grid; height: 175px; place-items: end center; }
.egg-portrait img { width: 178px; transform-origin: 50% 90%; filter: drop-shadow(0 16px 20px rgba(60,43,29,.2)); transition: transform .2s ease; }
.egg-speech { position: relative; padding: 17px; border-radius: 6px 19px 19px 19px; background: rgba(255,255,255,.7); }
.egg-speech::before { position: absolute; left: -13px; top: 23px; border-top: 12px solid transparent; border-right: 14px solid rgba(255,255,255,.7); border-bottom: 12px solid transparent; content: ""; }
.egg-speech h3 { margin: 8px 0 4px; }
.egg-speech p { margin: 0; line-height: 1.65; }
.egg-speech small { display: block; margin-top: 8px; color: var(--ink-soft); }
.voice-wave { position: absolute; z-index: 2; right: 0; top: 18px; display: flex; height: 25px; align-items: center; gap: 3px; opacity: 0; }
.voice-wave i { display: block; width: 3px; height: 8px; border-radius: 9px; background: #a45c53; }
.egg-dialogue-stage.is-speaking .egg-portrait img { animation: egg-talk .55s ease-in-out infinite alternate; }
.egg-dialogue-stage.is-speaking .voice-wave { opacity: 1; }
.egg-dialogue-stage.is-speaking .voice-wave i { animation: voice-bar .5s ease-in-out infinite alternate; }
.egg-dialogue-stage.is-speaking .voice-wave i:nth-child(2) { animation-delay: .15s; }
.egg-dialogue-stage.is-speaking .voice-wave i:nth-child(3) { animation-delay: .3s; }
@keyframes egg-talk { to { transform: translateY(-5px) rotate(1.5deg); } }
@keyframes voice-bar { to { height: 24px; } }

.word-list, .lesson-grid, .cinema-grid, .speaking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.word-row, .lesson-item, .cinema-item, .speaking-item {
  position: relative;
  padding: 18px;
  border: 1px solid #dfd6c4;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 24px rgba(35,54,47,.05);
}
.word-row { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.word-row h3, .lesson-item h3, .cinema-item h3, .speaking-item h3 { margin: 0 0 5px; font-family: "Quicksand", "Noto Sans SC", sans-serif; }
.word-row p, .lesson-item p, .cinema-item p, .speaking-item p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.due-badge { padding: 6px 9px; border-radius: 99px; color: #765f3c; background: #f2dfba; font-size: 10px; }
.due-badge.is-due { color: #8c4d41; background: #f4d5cd; }

.memory-timeline { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.memory-step { padding: 10px 4px; border-radius: 11px; color: #718078; background: #e6ece3; font-size: 10px; text-align: center; }
.memory-step.is-current { color: #4c654f; background: #cfe3d3; box-shadow: inset 0 0 0 2px #81a98d; }

.companion-card { display: grid; padding: 25px; border-radius: 24px; grid-template-columns: 150px 1fr; align-items: center; gap: 20px; background: linear-gradient(145deg, #f4e5c5, #e1ece1); }
.companion-card img { width: 150px; filter: drop-shadow(0 15px 20px rgba(67,47,30,.16)); }

.dialogue-demo { margin: 18px 0; padding: 16px; border-left: 4px solid var(--gold); border-radius: 0 13px 13px 0; background: rgba(255,255,255,.55); line-height: 1.7; }
.keyword-row { display: flex; flex-wrap: wrap; gap: 7px; }
.keyword-row span { padding: 6px 9px; border-radius: 99px; color: #49675b; background: #d7e8da; font-size: 11px; }

.cinema-poster {
  display: grid;
  height: 135px;
  margin: -18px -18px 15px;
  place-items: center;
  border-radius: 18px 18px 0 0;
  color: white;
  background: linear-gradient(135deg, #274a55, #936b5a);
  font-size: 42px;
}
.copyright-note { padding: 14px; border-radius: 14px; color: #6e6558; background: #f2ead9; font-size: 12px; line-height: 1.65; }

.modal { position: fixed; z-index: 50; inset: 0; display: grid; padding: 20px; place-items: center; background: rgba(14,34,39,.62); backdrop-filter: blur(10px); }
.study-card { position: relative; width: min(680px, 100%); max-height: 92vh; padding: 34px; overflow-y: auto; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.close-button { position: absolute; top: 15px; right: 15px; display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #62736e; background: #e5ebe3; cursor: pointer; font-size: 22px; }
.study-word { text-align: center; }
.study-word h2 { margin: 12px 0 2px; font-family: "Quicksand", sans-serif; font-size: clamp(48px, 9vw, 78px); }
.study-meaning { min-height: 100px; margin: 22px 0; padding: 22px; border-radius: 18px; background: #ede8d9; text-align: left; }
.grade-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grade-row button { min-height: 55px; border: 0; border-radius: 13px; cursor: pointer; }
.grade-again { background: #f3d3cc; }.grade-hard { background: #efdfc3; }.grade-good { background: #dbe9dc; }.grade-easy { background: #c9e3d3; }

.video-stage { margin-top: 14px; }
.video-stage video { width: 100%; max-height: 340px; border-radius: 16px; background: #152d35; }
.subtitle-line { margin: 12px 0; padding: 15px; border-radius: 13px; background: #eee8d8; font-family: "Quicksand", sans-serif; line-height: 1.6; }

.is-hidden { display: none !important; }
.mobile-nav { display: none; }

@media (min-width: 1200px) {
  main { max-width: 1500px; width: 100%; margin: 0 auto; }
  .dashboard-grid { grid-template-columns: repeat(4, 1fr); }
  .word-list, .lesson-grid, .cinema-grid, .speaking-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 700px) and (max-width: 1000px) {
  .app-shell { grid-template-columns: 190px 1fr; }
  .sidebar { padding-inline: 12px; }
  .hero-dashboard { grid-template-columns: 1fr 165px; }
  .hero-character { width: 190px; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .exam-map, .practice-grid { grid-template-columns: repeat(2, 1fr); }
  .reward-layout { grid-template-columns: 1fr; }
  .reward-side { grid-template-columns: 1fr 1fr; }
  .daily-task-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 699px) {
  body { padding-bottom: calc(73px + env(safe-area-inset-bottom)); }
  .app-shell { display: block; min-height: 100vh; }
  .sidebar { display: none; }
  main { padding: max(18px, env(safe-area-inset-top)) 14px 30px; }
  .topbar { align-items: center; margin-bottom: 19px; }
  .topbar h1 { font-size: 27px; }
  #streak-chip { display: none; }
  .points-chip { padding: 7px 9px; font-size: 10px; }
  .install-app-button { padding: 7px 9px; font-size: 9px; }
  .hero-dashboard { min-height: 300px; padding: 23px; grid-template-columns: 1fr; }
  .hero-copy { max-width: 76%; }
  .hero-character { right: -13px; bottom: -25px; width: 170px; opacity: .9; }
  .dashboard-grid, .word-list, .lesson-grid, .cinema-grid, .speaking-grid { grid-template-columns: 1fr; }
  .route-grid, .practice-grid, .exam-map { grid-template-columns: 1fr; }
  .reward-hero { min-height: 390px; padding: 20px; grid-template-columns: 105px 1fr; align-items: start; gap: 14px; }
  .reward-photo-slot { height: 135px; border-radius: 18px; }
  .reward-copy h2 { font-size: 27px; }
  .reward-copy p { grid-column: 1 / -1; }
  .reward-egg { position: absolute; right: -12px; bottom: -22px; width: 142px; opacity: .82; }
  .reward-layout, .reward-grid, .reward-side, .history-list { grid-template-columns: 1fr; }
  .reward-card { min-height: 235px; }
  .daily-mission-board { padding: 16px; }
  .daily-mission-board .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .daily-task-grid, .goal-settings { grid-template-columns: 1fr; }
  .two-month-plan { grid-template-columns: 1fr; padding: 18px; }
  .memory-reward { min-height: 0; margin: -29px -17px -22px; grid-template-columns: 1fr; border-radius: 24px; }
  .memory-photo { min-height: 260px; }
  .memory-message { padding: 28px 20px 24px; }
  .memory-message button { width: 100%; }
  .profile-tools { align-items: stretch; flex-direction: column; }
  .profile-tool-actions { min-width: 0; }
  .update-banner { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; }
  .egg-dialogue-stage { padding: 15px; grid-template-columns: 105px 1fr; gap: 10px; }
  .egg-portrait { height: 130px; }
  .egg-portrait img { width: 125px; }
  .egg-speech { padding: 13px; }
  .exam-hero { padding: 21px; grid-template-columns: 1fr; }
  .exam-score { grid-template-columns: auto 1fr; align-items: center; text-align: left; }
  .exam-score small { grid-column: 1 / -1; }
  .audio-prompt { align-items: stretch; flex-direction: column; }
  .panel { padding: 17px; }
  .memory-timeline { grid-template-columns: repeat(3, 1fr); }
  .companion-card { padding: 18px; grid-template-columns: 90px 1fr; }
  .companion-card img { width: 90px; }
  .study-card { max-height: calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 29px 17px calc(22px + env(safe-area-inset-bottom)); border-radius: 24px; }
  .install-guide.compact { grid-template-columns: 1fr; }
  .install-actions > button { flex: 1 1 100%; }
  .grade-row { grid-template-columns: repeat(2, 1fr); }
  .mobile-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 8px env(safe-area-inset-bottom);
    grid-template-columns: repeat(6, 1fr);
    border-top: 1px solid rgba(30,55,60,.1);
    background: rgba(251,247,236,.94);
    box-shadow: 0 -10px 30px rgba(25,45,45,.09);
    backdrop-filter: blur(16px);
  }
  .mobile-nav button { display: grid; place-items: center; border: 0; color: #718079; background: transparent; font-size: 18px; }
  .mobile-nav button span { font-size: 8px; }
  .mobile-nav button.is-active { color: var(--mint-deep); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
