:root {
  color-scheme: light;
  --paper: #f5f6ef;
  --white: #fff;
  --ink: #21362c;
  --muted: #53675b;
  --green: #28553d;
  --green-dark: #183d2c;
  --border: #dce3d6;
  --amber: #986022;
  --blue: #294779;
  --blue-dark: #203a65;
  --radius: 22px;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 300px; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible { outline: 3px solid #a45c1a; outline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.shell { width: min(100% - 64px, 1144px); margin-inline: auto; }
.topbar { position: sticky; top: 0; z-index: 5; background: #fcfdf8f5; border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 75px; gap: 20px; }
.brand { background: transparent; border: 0; padding: 4px 0; display: inline-flex; align-items: center; gap: 9px; font-size: 1.22rem; font-weight: 900; letter-spacing: -.07em; white-space: nowrap; }
.brand-sub { font-weight: 650; margin-left: 4px; color: #446451; }
.brand-mark { position: relative; display: grid; place-items: center; width: 39px; height: 39px; overflow: hidden; border-radius: 14px; background: #e1ebd7; }
.brand-mark i { position: relative; width: 17px; height: 20px; margin-top: 5px; border-radius: 43% 40% 53% 55%; transform: rotate(-19deg); background: linear-gradient(140deg, #c99451 15%, #8d542b 100%); box-shadow: inset 3px -1px 0 #6f461c2a; }
.brand-mark i::before { content: ""; position: absolute; left: -2px; top: -2px; width: 21px; height: 9px; background: #79491f; border-radius: 10px 10px 4px 4px; }
.brand-mark i::after { content: ""; position: absolute; left: 8px; top: -6px; width: 4px; height: 6px; background: #79491f; border-radius: 6px; }
.navigation { display: flex; align-items: center; gap: 7px; }
.navigation button, .locale { border: 1px solid transparent; border-radius: 12px; background: transparent; color: #496054; font-size: .88rem; font-weight: 780; min-height: 44px; }
.navigation button { padding: 8px 15px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.navigation button:hover { background: #eef2e8; }
.navigation button[aria-current="page"] { background: #e5eedf; color: var(--green-dark); }
.nav-icon { font-family: system-ui, sans-serif; font-weight: 750; font-size: 1.35em; line-height: 1; }
.locale { border-color: #cfdacb; min-width: 45px; }
.locale:hover, .locale[aria-pressed="true"] { background: #e5eedf; }
.workspace { min-height: calc(100vh - 154px); padding-top: 32px; padding-bottom: 34px; outline: none; }
.footer { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; padding: 20px 0; border-top: 1px solid var(--border); }
.skip { position: absolute; top: 0; left: 0; transform: translateY(-110%); z-index: 10; background: white; color: var(--ink); padding: 12px; }
.skip:focus { transform: translateY(0); }
.date-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; color: var(--muted); font-size: .88rem; font-weight: 720; }
.date-line .label { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--green); }
.hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(112deg, #e9f0d9 18%, #e1ecd3 53%, #d3e8d5 100%); border: 1px solid #d8e4d0; border-radius: 29px; min-height: 335px; display: grid; align-items: center; }
.hero::before { position: absolute; content: ""; z-index: -1; right: 2%; bottom: -170px; width: 48%; height: 440px; border-radius: 48% 54% 22% 10%; background: #bcd7b9; opacity: .58; transform: rotate(-10deg); }
.hero::after { position: absolute; content: ""; z-index: -1; right: -13%; bottom: -245px; width: 66%; height: 440px; border-radius: 50% 52% 0 0; background: #a9c9a8; opacity: .46; transform: rotate(-11deg); }
.hero-copy { position: relative; z-index: 2; padding: 32px 0 35px 48px; width: 61%; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.5rem); line-height: 1.12; letter-spacing: -.067em; font-weight: 900; margin-bottom: 17px; }
.hero h1 span { color: var(--green); }
.hero p { color: #426052; font-weight: 610; max-width: 26em; word-break: keep-all; }
.hero-art { position: absolute; width: min(42%, 410px); height: 103%; right: 6%; bottom: -3%; object-fit: contain; object-position: bottom center; filter: drop-shadow(0 13px 12px #36503925); }
.glint { position: absolute; top: 20%; right: 12%; color: #876025; font: 2rem/1 Georgia, serif; }
.glint.second { top: 32%; right: 39%; font-size: 1rem; color: #52784d; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 23px; }
.stat-tag { border-radius: 9px; background: #ffffffaf; border: 1px solid #ffffffcc; padding: 5px 10px; font-size: .78rem; font-weight: 800; color: #315140; }
.section-head { margin: 29px 0 13px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { font-size: 1.36rem; letter-spacing: -.04em; }
.section-head span { font-size: .84rem; color: var(--muted); }
.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.mission { position: relative; text-align: left; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: start; justify-content: center; min-height: 215px; gap: 6px; border: 1px solid transparent; border-radius: var(--radius); padding: 21px 24px; transition: box-shadow .18s, transform .18s; }
.mission:hover { transform: translateY(-2px); box-shadow: 0 7px 20px #203a6520; }
.mission.study { background: linear-gradient(105deg, #223f6a, #36598c); color: #fff; border-color: #294779; }
.mission.tori { background: linear-gradient(100deg, #f7edcf, #e5ecce); color: var(--green-dark); border-color: #e2e7cf; }
.mission::after { content: ""; position: absolute; z-index: -2; width: 50%; height: 120%; right: -8%; top: -14%; background: #ffffff18; border-radius: 55% 0 0 60%; transform: rotate(-12deg); }
.mission.tori::after { background: #cfdfb9; opacity: .62; }
.mission img { position: absolute; right: 3%; bottom: -10px; width: 37%; height: 96%; object-fit: contain; z-index: -1; }
.mission small { font-size: .76rem; font-weight: 820; letter-spacing: .04em; }
.mission h3 { font-size: 1.69rem; letter-spacing: -.055em; line-height: 1.15; }
.mission p { font-size: .88rem; max-width: 61%; word-break: keep-all; }
.mission.study p, .mission.study small { color: #e1ebfd; }
.mission.tori p, .mission.tori small { color: #405747; }
.track-line { display: flex; align-items: center; gap: 10px; width: 57%; min-width: 125px; margin-top: 12px; font-size: .8rem; font-weight: 800; }
.progress { height: 7px; border-radius: 99px; background: #dce7da; flex: 1; min-width: 0; overflow: hidden; }
.progress span { width: var(--progress, 0%); height: 100%; display: block; background: #4e835a; border-radius: inherit; }
.mission.study .progress { background: #ffffff36; }
.mission.study .progress span { background: #c7defe; }
.mission.tori .progress { background: #cbd9ba; }
.mission-cta { font-size: .85rem; font-weight: 850; margin-top: 3px; }
.home-note { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; text-align: left; gap: 12px; padding: 14px 15px; border: 1px solid var(--border); border-radius: 15px; background: #fcfdf9; color: #455b4f; font-size: .84rem; }
.home-note button { flex-shrink: 0; border: 0; background: transparent; color: var(--green-dark); font-weight: 800; padding: 5px; }
.page-frame { width: min(100%, 735px); margin-inline: auto; }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-title h1 { font-size: clamp(1.6rem, 4.2vw, 2.25rem); letter-spacing: -.075em; font-weight: 850; }
.page-title .page-tag { font-size: .83rem; font-weight: 800; white-space: nowrap; color: var(--muted); }
.panel { border-radius: var(--radius); border: 1px solid var(--border); background: #fff; padding: clamp(18px, 4vw, 34px); box-shadow: 0 4px 18px #22342b08; }
.panel + .panel { margin-top: 14px; }
.panel h2 { line-height: 1.3; font-size: clamp(1.25rem, 3.3vw, 1.8rem); letter-spacing: -.065em; }
.panel p { margin-top: 9px; color: var(--muted); }
.panel .vi { font-size: .9rem; font-weight: 520; color: #425e67; }
.primary, .secondary, .choice, .token, .microphone { min-height: 48px; border: 1px solid transparent; border-radius: 13px; padding: 10px 15px; font-weight: 800; }
.primary { background: var(--green); color: white; }
.primary:hover:not(:disabled) { background: var(--green-dark); }
.primary.blue { background: var(--blue); }
.primary.blue:hover:not(:disabled) { background: var(--blue-dark); }
.secondary { background: #eff3ec; color: var(--green-dark); border-color: #dce4da; }
.secondary:hover:not(:disabled) { background: #e3ecdf; }
.buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.buttons .primary, .buttons .secondary { flex: 1; min-width: max-content; }
.panel-title { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.type { border-radius: 7px; padding: 4px 8px; background: #eaf0f9; color: var(--blue-dark); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.steps { display: flex; gap: 5px; margin: 10px 0 24px; }
.steps span { flex: 1; background: #eef1f4; border-radius: 6px; padding: 5px 4px; text-align: center; color: #4a5d6f; font-size: .83rem; font-weight: 720; }
.steps .active { background: #deebfb; color: #163c70; }
.steps .complete { background: #e5f1e3; color: #2c623f; }
.tokens { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; background: #f3f6fb; border: 1px solid #e4ebf6; border-radius: 14px; padding: 18px 12px; margin-top: 16px; }
.token { background: white; border-color: #d9e4f1; color: var(--blue-dark); font-size: 1.08rem; padding: 6px 9px; }
.token:hover:not(:disabled), .choice:hover:not(:disabled) { border-color: #6f91be; background: #eaf1fc; }
.wrong { border-color: #b27258 !important; color: #803b2c !important; background: #fbede8 !important; }
.message { min-height: 1.5em; margin: 9px 0 0; color: #77402f !important; font-size: .88rem; }
.choice-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.choice { text-align: left; background: white; border-color: #dbe5ed; color: var(--blue-dark); }
.correct-sentence { background: #edf3fc; border-radius: 14px; padding: 17px; margin-top: 15px; color: var(--blue-dark); font-weight: 850; font-size: clamp(1.2rem, 3vw, 1.55rem); overflow-wrap: anywhere; }
.correct-sentence mark { background: #e1d5b2; color: #543820; border-radius: 4px; padding: 1px 4px; }
.listen-ok { color: #2a603d !important; }
.completed-panel { background: #f4f8f0; border-color: #d8e5d5; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 17px; }
.metrics li { border: 1px solid #dce5db; background: #f9fbf7; border-radius: 12px; padding: 10px 8px; text-align: center; font-size: .85rem; color: #41554a; }
.metrics b { display: block; color: var(--green-dark); font-size: 1.2rem; }
.record-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding: 10px 0; }
.record-list { margin-top: 12px; }
.record-list small { color: var(--muted); flex-shrink: 0; }
.storage-notice { background: #fff0cc; border: 1px solid #dac081; color: #603d1e; border-radius: 13px; padding: 10px; margin-bottom: 12px; }
.tori-stage { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: center; min-height: 270px; border-radius: 20px; padding: 13px 13px 0; background: linear-gradient(140deg, #e5eed6, #f7efd3); margin-bottom: 16px; }
.tori-stage::after { content: ""; position: absolute; z-index: -1; bottom: -160px; left: -5%; width: 110%; height: 260px; border-radius: 50% 50% 0 0; background: #d0e1ba; }
.tori-stage img { width: 185px; height: 174px; margin-top: auto; object-fit: contain; object-position: bottom; }
.tori-stage .bubble { max-width: min(460px, 100%); background: #fffef8; border-radius: 14px; padding: 10px 17px; text-align: center; color: var(--green-dark); font-weight: 850; font-size: clamp(1.05rem, 3vw, 1.32rem); box-shadow: 0 2px 10px #203a6511; }
.tori-stage .vi { display: block; font-size: .87rem; margin-top: 4px; color: #4d6053; }
.tori-spark { position: absolute; top: 42%; left: 28%; font-size: 1.85rem; color: #946428; }
.mic-actions { display: flex; gap: 9px; margin-top: 15px; }
.mic-actions button { flex: 1; }
.microphone { background: var(--green); color: white; }
.microphone:hover:not(:disabled) { background: var(--green-dark); }
.microphone.recording { background: #8c4131; }
.helper-note { font-size: .81rem; }
.tori-acorn { background: #f6ebce; color: #694618; padding: 5px 8px; border-radius: 7px; font-size: .81rem; font-weight: 800; white-space: nowrap; }
.snippet { overflow-wrap: anywhere; margin-top: 10px; border-radius: 10px; background: #f4f5ee; padding: 10px; }
.prompt-example { margin-top: 9px; font-size: .86rem; color: #486452; }
.secondary[aria-busy="true"] { cursor: wait; }
.mono { font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 700px) {
  .shell { width: min(100% - 30px, 520px); }
  .topbar-inner { min-height: 60px; }
  .navigation { position: fixed; bottom: 0; left: 0; right: 0; justify-content: center; gap: 3px; padding: 5px 7px calc(5px + env(safe-area-inset-bottom)); background: #fcfdf8; border-top: 1px solid var(--border); }
  .navigation button { justify-content: center; flex-direction: column; flex: 1; max-width: 115px; gap: 3px; min-height: 51px; padding: 5px; font-size: .74rem; }
  .workspace { padding-top: 18px; min-height: calc(100vh - 171px); }
  .footer { margin-bottom: 65px; }
  .hero { min-height: 255px; border-radius: 21px; }
  .hero-copy { padding: 21px 0 20px 17px; width: 65%; }
  .hero h1 { margin-bottom: 11px; font-size: clamp(1.7rem, 8vw, 2.7rem); }
  .hero p { font-size: .85rem; max-width: 13em; }
  .hero-art { height: 69%; width: 43%; right: 0; bottom: -1%; }
  .glint { right: 8%; top: 16%; font-size: 1.35rem; }
  .glint.second { display: none; }
  .hero-tags { margin-top: 13px; gap: 5px; }
  .stat-tag { padding: 3px 6px; font-size: .71rem; }
  .section-head { margin-top: 22px; }
  .section-head h2 { font-size: 1.15rem; }
  .section-head span { font-size: .77rem; }
  .mission-grid { grid-template-columns: 1fr; gap: 10px; }
  .mission { min-height: 159px; padding: 14px 17px; }
  .mission h3 { font-size: 1.5rem; }
  .mission img { width: 34%; right: 5%; height: 96%; }
  .track-line { margin-top: 6px; }
  .home-note { margin-top: 11px; align-items: start; }
  .panel-title { align-items: flex-start; }
}
@media (max-width: 355px) {
  .choice-list { grid-template-columns: 1fr; }
  .hero p { max-width: 11em; }
  .mic-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
