:root {
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #10233d;
  font-synthesis: none;
  --navy: #173f78;
  --blue: #2e68bc;
  --blue-soft: #eaf2ff;
  --ink: #10233d;
  --muted: #64748b;
  --line: rgba(27, 69, 119, .13);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #0e2748; }
body {
  margin: 0;
  min-height: 100vh;
  background: #0e2748;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("images/toeic-bg.webp") center/cover no-repeat;
  transform: scale(1.015);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 27, 56, .42), rgba(9, 35, 69, .18) 30%, rgba(7, 25, 49, .58)),
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.16), transparent 46%);
}
button { font: inherit; }
button:focus-visible { outline: 3px solid rgba(46,104,188,.34); outline-offset: 2px; }
.app-shell { width: min(100%, 620px); min-height: 100vh; margin: 0 auto; padding: 18px 14px 32px; }
.glass {
  border: 1px solid rgba(255,255,255,.62);
  background: rgba(255,255,255,.89);
  box-shadow: 0 20px 50px rgba(5, 22, 45, .18);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
}
.hero { border-radius: 28px; padding: 20px; }
.brand-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.eyebrow { margin: 0 0 6px; font-size: .72rem; font-weight: 900; letter-spacing: .13em; color: var(--blue); }
h1 { margin: 0; font-size: clamp(1.75rem, 7vw, 2.45rem); line-height: .98; letter-spacing: -.055em; }
h1 span { color: var(--navy); }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--navy); font-size: 1.4rem; cursor: pointer; }
.day-dashboard { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.day-copy { display: grid; gap: 2px; }
.day-copy > span { font-weight: 900; color: var(--blue); font-size: .88rem; letter-spacing: .08em; }
.day-copy strong { font-size: 1.2rem; letter-spacing: -.025em; }
.day-copy small { color: var(--muted); }
.progress-ring {
  width: 78px; height: 78px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: conic-gradient(var(--blue) var(--progress, 1%), #e5ecf5 0);
  position: relative; flex: 0 0 auto;
}
.progress-ring::before { content: ""; position: absolute; inset: 7px; background: white; border-radius: 50%; }
.progress-ring span, .progress-ring small { position: relative; z-index: 1; }
.progress-ring span { font-size: 1.5rem; font-weight: 900; line-height: 1; }
.progress-ring small { font-size: .7rem; color: var(--muted); }
.day-progress { margin-top: 16px; }
.day-progress > div:first-child { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; }
.day-progress strong { color: var(--navy); }
.progress-track { height: 8px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #e4ebf3; }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--navy), #4a86d8); transition: width .25s ease; }
.category-tabs { display: grid; grid-template-columns: repeat(5, minmax(76px,1fr)); gap: 7px; margin: 12px 0; padding: 8px; border-radius: 20px; overflow-x: auto; }
.category { min-width: 78px; border: 0; border-radius: 14px; padding: 10px 5px 9px; color: #53657a; background: transparent; cursor: pointer; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.category span { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 5px; border-radius: 9px; background: #edf2f8; color: var(--navy); font-size: .92rem; }
.category.active { color: #fff; background: var(--navy); }
.category.active span { background: rgba(255,255,255,.18); color: #fff; }
.learning-card { min-height: 430px; padding: 22px 20px 24px; border-radius: 28px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.badge, .part-badge { display: inline-flex; align-items: center; min-height: 30px; border-radius: 999px; padding: 0 11px; font-size: .76rem; font-weight: 900; }
.badge { color: var(--navy); background: var(--blue-soft); }
.part-badge { color: #fff; background: var(--navy); }
.word-title { margin: 34px 0 5px; color: #174f9d; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.25rem, 11vw, 3.25rem); letter-spacing: -.035em; word-break: break-word; }
.word-pos { display: inline-block; margin-bottom: 12px; color: var(--muted); font-size: .88rem; }
.meaning { margin: 0 0 20px; color: var(--ink); font-size: 1.18rem; font-weight: 850; line-height: 1.55; }
.section-label { margin: 22px 0 7px; color: var(--blue); font-size: .74rem; font-weight: 900; letter-spacing: .08em; }
.example-box, .tip-box, .chunk-box, .rule-box, .explanation-box { border: 1px solid var(--line); border-radius: 17px; padding: 15px 16px; }
.example-box { background: #f8fbff; }
.example-en { margin: 0; font-size: 1.02rem; line-height: 1.7; color: #183250; }
.example-ko { margin: 8px 0 0; color: #617086; font-size: .89rem; line-height: 1.62; }
.tip-box { margin-top: 12px; background: #f2f6fc; color: #35526f; line-height: 1.6; font-size: .9rem; }
.sentence-title { margin: 32px 0 12px; color: var(--navy); font-size: 1rem; }
.sentence-main { margin: 0; color: #112d50; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.42rem, 6.5vw, 2rem); line-height: 1.55; }
.chunk-box { margin-top: 16px; background: #f2f7fd; color: #27527d; line-height: 1.65; }
.grammar-title { margin: 30px 0 10px; font-size: clamp(1.5rem, 6vw, 2rem); color: var(--navy); letter-spacing: -.035em; }
.rule-box { background: #edf4ff; color: #183f70; font-weight: 750; line-height: 1.65; }
.trap { margin-top: 12px; border-left: 4px solid #d28a32; padding: 12px 14px; background: #fff7e8; border-radius: 0 14px 14px 0; color: #614518; line-height: 1.6; }
.quiz-area { margin-top: 24px; }
.question { margin: 28px 0 17px; color: #112a49; font-family: Georgia, "Times New Roman", serif; font-size: 1.14rem; line-height: 1.72; white-space: pre-line; }
.quiz-options { display: grid; gap: 9px; }
.quiz-option { width: 100%; border: 1px solid #d7e0ea; border-radius: 14px; padding: 13px 14px; text-align: left; background: #fbfdff; color: #233b57; cursor: pointer; line-height: 1.45; }
.quiz-option.correct { border-color: #2f8a67; background: #e7f5ef; }
.quiz-option.wrong { border-color: #bd6161; background: #faeaea; }
.quiz-result { min-height: 24px; margin: 13px 2px 0; font-weight: 800; color: #29435f; }
.explanation-box { margin-top: 12px; background: #edf4ff; color: #294c72; line-height: 1.62; }
.learning-actions { display: grid; grid-template-columns: .9fr 1.35fr; gap: 9px; margin: 12px 0; }
.primary-button, .secondary-button { border-radius: 17px; padding: 15px 12px; font-weight: 850; cursor: pointer; }
.primary-button { border: 0; color: #fff; background: var(--navy); box-shadow: 0 10px 24px rgba(23,63,120,.25); }
.primary-button.completed { background: #2e7d61; }
.secondary-button { border: 1px solid rgba(255,255,255,.8); color: var(--navy); background: rgba(255,255,255,.9); }
.secondary-button[hidden] { display: none; }
.navigation-row { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 9px; padding: 10px; border-radius: 20px; text-align: center; }
.navigation-row button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--navy); font-size: 1.6rem; cursor: pointer; }
.navigation-row button:disabled { opacity: .3; cursor: default; }
.navigation-row div { display: grid; gap: 1px; }
.navigation-row strong { color: var(--navy); }
.navigation-row small { color: var(--muted); font-size: .74rem; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 12px; padding: 14px 10px; border-radius: 20px; }
.stats div { display: grid; gap: 4px; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats span { color: var(--muted); font-size: .73rem; }
.stats strong { color: var(--navy); font-size: 1.18rem; }
.footer-actions { display: flex; justify-content: center; gap: 20px; margin: 14px 0; }
.text-button { padding: 5px; border: 0; background: transparent; color: rgba(255,255,255,.88); text-decoration: underline; cursor: pointer; font-size: .84rem; }
footer { padding: 14px 16px; border-radius: 18px; }
footer p { margin: 0; color: #66768a; font-size: .76rem; line-height: 1.55; }
.toast { position: fixed; left: 50%; bottom: max(25px, env(safe-area-inset-bottom)); z-index: 10; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 999px; background: #0d2748; color: #fff; font-size: .85rem; box-shadow: 0 12px 30px rgba(0,0,0,.25); transition: .22s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 460px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .hero, .learning-card { border-radius: 24px; }
  .category-tabs { grid-template-columns: repeat(5, 78px); }
  .learning-card { min-height: 450px; padding-left: 17px; padding-right: 17px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
