:root {
  --brand: #664F40;
  --brand-dark: #4f3c30;
  --orange: #EC9009;
  --teal: #005E61;
  --gold: #EBAD01;
  --sky: #5B9BD5;
  --grass: #70AD47;
  --bg: #FFFFFF;
  --card: #F5F0E8;
  --card2: #EEEAE2;
  --text: #333333;
  --text2: #5C5C5C;
  --text3: #8A8580;
  --border: #CCCCCC;
  --danger: #B23A3A;
  --highlight: #FFFF00;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(102,79,64,0.08);
  --shadow-lg: 0 8px 30px rgba(102,79,64,0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans TC", "Noto Sans", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card2);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo, .logo:hover { text-decoration: none; }
.logo .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}
.header-cta {
  background: var(--brand);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}
.header-cta:hover { background: var(--brand-dark); text-decoration: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.08s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-line {
  background: var(--gold); color: var(--brand-dark);
  box-shadow: var(--shadow);
}
.btn-line:hover { background: var(--orange); color:#fff; }
.btn-google-source {
  background: #fff; color: #1a73e8;
  border: 2px solid #1a73e8;
  box-shadow: var(--shadow);
}
.btn-google-source:hover { background: #1a73e8; color: #fff; }
.footer-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.day-footer {
  text-align: center;
  padding: 32px 16px 24px;
  margin-top: 8px;
}
.day-footer .copy { margin-top: 14px; font-size: 0.82rem; color: var(--muted, #888); }
.btn-outline {
  background: transparent; color: var(--brand);
  border: 2px solid var(--brand);
}
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-sm { padding: 9px 20px; font-size: 0.9rem; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, #FFFFFF 0%, #F8F3EB 100%);
  padding: 70px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--card2);
}
.hero .eyebrow {
  display: inline-block;
  background: var(--card);
  color: var(--teal);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  color: var(--brand);
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.hero .subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--text);
  font-weight: 500;
  max-width: 640px;
  margin: 0 auto 18px;
}
.hero .desc {
  font-size: 0.98rem;
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero .desc .hl {
  background: linear-gradient(transparent 60%, var(--highlight) 60%);
  font-weight: 700;
  color: var(--text);
  padding: 0 2px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Section ===== */
section { padding: 60px 0; }
.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  color: var(--brand);
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--text2);
  margin-bottom: 40px;
  font-size: 1rem;
}

/* ===== Feature cards ===== */
.features { background: var(--bg); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  border: 1px solid var(--card2);
}
.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: inline-flex;
  width: 60px; height: 60px;
  align-items: center; justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow);
}
.feature-card h3 {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand);
  margin-bottom: 10px;
}
.feature-card p { color: var(--text2); font-size: 0.95rem; }

/* ===== Day list ===== */
.days { background: var(--card); }
.day-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.day-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 24px;
  border: 1px solid var(--card2);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.day-card, .day-card:hover { text-decoration: none; color: inherit; }
.day-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.day-num {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--brand);
  color: var(--gold);
  font-weight: 900;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.day-info { flex: 1; min-width: 0; }
.day-info .t { font-weight: 700; color: var(--text); font-size: 1.02rem; margin-bottom: 4px; }
.day-info .type {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  display: inline-block;
}
.type-translation { background: #E3EFEF; color: var(--teal); }
.type-choice { background: #FBEFD6; color: var(--orange); }
.day-card .go { color: var(--brand); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }

/* ===== Community ===== */
.community {
  background: var(--brand);
  color: #fff;
  text-align: center;
}
.community h2 { color: #fff; font-size: clamp(1.5rem,4vw,2rem); font-weight: 900; margin-bottom: 16px; }
.community p { color: #f0e9e2; max-width: 600px; margin: 0 auto 30px; font-size: 1.02rem; }
.community .hl { color: var(--gold); font-weight: 700; }

/* ===== Practice (day) page ===== */
.practice-bar {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card2);
  z-index: 5;
}
.practice-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.back-link {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  color: var(--brand); display: flex; align-items: center; gap: 6px;
}
.back-link:hover { text-decoration: none; }
.practice-body { padding: 40px 0 80px; }
.practice-body .container { max-width: 720px; }

.day-badge {
  display: inline-block;
  background: var(--card);
  color: var(--teal);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.practice-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  color: var(--brand);
  margin-bottom: 30px;
}

.block { margin-bottom: 30px; }
.block-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.block-label::before {
  content: "";
  width: 4px; height: 16px;
  background: var(--gold);
  border-radius: 2px;
}

.sentence-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
  border-left: 5px solid var(--brand);
}
.sentence-en {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 18px;
}
.speak-btn {
  background: #fff;
  border: 2px solid var(--brand);
  color: var(--brand);
  padding: 9px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.speak-btn:hover { background: var(--brand); color: #fff; }
.speak-btn.speaking { background: var(--orange); border-color: var(--orange); color: #fff; }
.speak-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.speak-btn-slow { border-color: var(--teal); color: var(--teal); }
.speak-btn-slow:hover { background: var(--teal); color: #fff; }
.speak-btn-slow.speaking { background: var(--orange); border-color: var(--orange); color: #fff; }

.translation-text {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 500;
}

/* Security insight */
.insight-box {
  background: var(--card2);
  border-radius: var(--radius);
  padding: 22px 24px;
  border-left: 5px solid var(--orange);
}
.insight-tag {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 6px 15px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.insight-scenario {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
}
.insight-examples {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
}
.insight-examples li {
  position: relative;
  padding: 6px 0 6px 22px;
  color: var(--text2);
  font-size: 0.96rem;
  line-height: 1.7;
}
.insight-examples li::before {
  content: "›";
  position: absolute;
  left: 4px;
  color: var(--orange);
  font-weight: 900;
}

/* 昨日複習 */
.review-box {
  background: #fff;
  border: 1px solid var(--card2);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.review-day {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 10px;
}
.review-q {
  font-size: 1.02rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 10px;
}
.review-a { margin-bottom: 8px; color: var(--text); }
.review-a-label {
  display: inline-block;
  background: var(--grass);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin-right: 6px;
}
.review-cat { color: var(--text2); font-size: 0.95rem; margin-bottom: 12px; }
.review-cat strong { color: var(--brand); }
.review-link { font-size: 0.9rem; font-weight: 700; color: var(--teal); }

/* 翻譯題：多種寫法 */
.answer-variants { margin: 0 0 6px; padding-left: 0; list-style: none; }
.answer-variants li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--card2);
}
.answer-variants li:last-child { border-bottom: none; }
.variant-text {
  display: block;
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
}
.variant-note {
  display: block;
  color: var(--text3);
  font-size: 0.88rem;
  margin-top: 3px;
}

/* Vocab table */
.vocab-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.vocab-table th {
  background: var(--brand);
  color: #fff;
  text-align: left;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 700;
}
.vocab-table td {
  padding: 12px 18px;
  border-top: 1px solid var(--card2);
  font-size: 1rem;
}
.vocab-table td:first-child { font-weight: 700; color: var(--teal); }
.vocab-table tr:nth-child(even) td { background: var(--card); }
.vocab-speak-btn {
  background: none;
  border: 1.5px solid var(--teal);
  color: var(--teal);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  transition: all 0.18s ease;
  line-height: 1.4;
  font-family: inherit;
}
.vocab-speak-btn:hover { background: var(--teal); color: #fff; }
.vocab-speak-btn.speaking { background: var(--orange); border-color: var(--orange); color: #fff; }

/* Quiz */
.quiz-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
}
.quiz-question {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.6;
}
.quiz-input {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  background: #fff;
  margin-bottom: 18px;
  color: var(--text);
}
.quiz-input:focus { outline: none; border-color: var(--brand); }

.options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid var(--card2);
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s ease;
}
.option:hover { border-color: var(--brand); }
.option.selected { border-color: var(--brand); background: #fdfbf7; }
.option .key {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--card2);
  color: var(--text2);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.option.selected .key { background: var(--brand); color: #fff; }
.option.correct { border-color: var(--grass); background: #f0f7ea; }
.option.correct .key { background: var(--grass); color: #fff; }
.option.wrong { border-color: var(--danger); background: #fbeeee; }
.option.wrong .key { background: var(--danger); color: #fff; }
.option.locked { cursor: default; }

.answer-box {
  display: none;
  margin-top: 18px;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  border-left: 5px solid var(--grass);
}
.answer-box.show { display: block; }
.answer-box.wrong-result { border-left-color: var(--danger); }
.answer-box .result-line { font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.answer-box .result-line.ok { color: var(--grass); }
.answer-box .result-line.no { color: var(--danger); }
.answer-box .ref-label { font-size: 0.85rem; color: var(--text3); font-weight: 700; margin-bottom: 4px; }
.answer-box .ref-text { color: var(--text); font-weight: 500; }
.answer-box .explanation { margin-top: 10px; color: var(--text2); font-size: 0.95rem; }

/* Nav footer of practice */
.day-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--card2);
  flex-wrap: wrap;
}
.day-nav button, .day-nav a {
  background: var(--card);
  color: var(--brand);
  border: none;
  padding: 11px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.18s ease;
}
.day-nav button:hover, .day-nav a:hover { background: var(--card2); text-decoration: none; }
.day-nav button:disabled { opacity: 0.4; cursor: not-allowed; }
.day-nav .nav-mid { color: var(--text2); font-weight: 700; }

.finish-cta {
  margin-top: 36px;
  background: var(--brand);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
}
.finish-cta h3 { color: #fff; font-size: 1.3rem; margin-bottom: 8px; }
.finish-cta p { color: #f0e9e2; margin-bottom: 22px; }

/* ===== Footer ===== */
.site-footer {
  background: var(--card);
  padding: 40px 0 30px;
  text-align: center;
  border-top: 1px solid var(--card2);
}
.site-footer .footer-cta { margin-bottom: 24px; }
.site-footer .footer-cta h3 { color: var(--brand); font-size: 1.2rem; margin-bottom: 14px; font-weight: 900; }
.site-footer .brand { font-weight: 900; color: var(--brand); margin-bottom: 6px; }
.site-footer .copy { color: var(--text3); font-size: 0.85rem; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .feature-grid { grid-template-columns: 1fr; }
  .day-grid { grid-template-columns: 1fr; }
  section { padding: 48px 0; }
  .hero { padding: 50px 0 44px; }
  .day-card .go { display: none; }
  .header-cta { padding: 7px 12px; font-size: 0.82rem; }
  .sentence-en { font-size: 1.15rem; }
}
