:root {
  --bs-body-color: #242b35;
  --bs-body-bg: #fff;
  --bs-secondary-color: #606975;
  --bs-link-color: #286650;
  --bs-link-hover-color: #194533;
  --bs-border-color: #e4e8e5;
}
.site-container { max-width: 960px; padding-inline: 24px; }
.intro { padding-block: 72px 56px; }
.intro h1 { font-size: clamp(2.25rem, 6vw, 3.35rem); letter-spacing: -.045em; line-height: 1.15; }
.intro p { max-width: 690px; line-height: 1.8; }
.accent { color: var(--bs-link-color); }
.eyebrow { color: var(--bs-secondary-color); font-size: .875rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.section-rule { height: 1px; background: var(--bs-border-color); }
.brand-tile { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 42px; background: #f0f5f1; border-radius: 6px; font-size: 1.6rem; vertical-align: middle; }
.nav-link { color: var(--bs-secondary-color); padding: .5rem .75rem; border-radius: 6px; }
.nav-link:hover, .nav-link.active { color: var(--bs-link-color); background: #f0f5f1; }
.nav-link.active { font-weight: 600; }
.language-switch { order: 1; margin-left: auto; padding-left: 12px; }
.navbar > .nav { order: 2; }
.navbar-brand { max-width: 100%; white-space: normal; }
.language-option { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .65rem; border-radius: 6px; color: var(--bs-secondary-color); font-size: .875rem; text-decoration: none; }
.language-option:hover, .language-option.active { color: #194533; background: #f0f5f1; }
.language-option.active { font-weight: 600; }
.btn-primary { --bs-btn-bg: #286650; --bs-btn-border-color: #286650; --bs-btn-hover-bg: #194533; --bs-btn-hover-border-color: #194533; --bs-btn-active-bg: #194533; --bs-btn-active-border-color: #194533; --bs-btn-focus-shadow-rgb: 40, 102, 80; }
.learning-card { border-color: var(--bs-border-color); border-radius: 10px; }
.learning-card:hover, .learning-card:focus-within { border-color: #286650; background: #f7faf8; }
.learning-card p { line-height: 1.7; }
.section-link { color: var(--bs-body-color); }
a { text-underline-offset: 4px; }
a:focus-visible { outline: 3px solid #286650; outline-offset: 5px; border-radius: 2px; }
.skip-link { position: absolute; z-index: 10; top: 12px; left: 12px; padding: 8px; background: white; }
.lesson-nav a { padding: .5rem .9rem; border: 1px solid var(--bs-border-color); border-radius: 6px; text-decoration: none; }
.lesson-nav a:hover { background: #f0f5f1; }
.lesson-section { padding-block: 40px 48px; border-top: 1px solid var(--bs-border-color); scroll-margin-top: 24px; }
.lesson-section p { line-height: 1.8; }
.lesson-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 40px; margin-bottom: 12px; }
.lesson-heading h3 { margin: 0; }
.tile-family { margin-block: 24px 32px; }
.tile-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; margin-block: 16px; }
.mahjong-tile { display: block; width: 64px; max-width: 100%; height: auto; aspect-ratio: 3 / 4; }
.lesson-note { background: #f0f5f1; border-left: 3px solid #286650; padding: 20px 24px; border-radius: 0 8px 8px 0; }
.meld-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.meld-card { border: 1px solid var(--bs-border-color); border-radius: 10px; padding: 24px; }
.meld-card .eyebrow { letter-spacing: .04em; }
.blocks-quiz { padding: 24px; border: 1px solid #b9cec0; border-radius: 10px; background: #f7faf8; }
.quiz-answers { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-answer { min-height: 44px; padding: 10px 18px; color: #194533; background: white; border: 1px solid #8ba996; }
.quiz-answer:hover { color: #194533; background: #e7f0ea; border-color: #286650; }
.quiz-answer:disabled { opacity: 1; color: #606975; background: #f0f2f0; border-color: #d1d8d2; }
.quiz-answer[data-result="correct"] { color: #194533; background: #dceee2; border-color: #286650; }
.quiz-answer[data-result="retry"] { color: #794716; background: #fff1df; border-color: #a76a27; }
.quiz-feedback { min-height: 1.8em; }
.quiz-feedback[data-result="correct"] { color: #194533; }
.quiz-feedback[data-result="retry"] { color: #794716; }
.quiz-checkbox { display: flex; align-items: center; gap: 10px; border-radius: 6px; cursor: pointer; }
.quiz-checkbox .form-check-input { flex-shrink: 0; margin-top: 0; }
.quiz-checkbox:focus-within { outline: 3px solid #286650; outline-offset: 4px; }
.quiz-checkbox .form-check-input:checked { background-color: #286650; border-color: #286650; }
.blocks-quiz button:focus-visible, .blocks-quiz [tabindex="-1"]:focus-visible { outline: 3px solid #286650; outline-offset: 4px; box-shadow: none; }
.quiz-hand { margin-block: 20px 28px; }
.quiz-tile-gap { display: grid; place-items: center; width: 44px; aspect-ratio: 3 / 4; border: 2px dashed #286650; border-radius: 5px; color: #194533; font-size: 1.5rem; font-weight: 700; }
.quiz-tile-choice { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px; width: 112px; padding: 12px 8px; }
.quiz-tile-choice .mahjong-tile { width: 44px; }
.practice-hand { gap: 4px; margin-block: 24px; }
.practice-hand .mahjong-tile { width: 56px; }
.practice-family + .practice-family { margin-top: 20px; }
.practice-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 80px; padding: 8px 4px; font-size: .75rem; }
.practice-choice .mahjong-tile { width: 40px; }
.practice-choice[aria-pressed="true"], .practice-choice[aria-pressed="true"]:disabled { color: #194533; background: #dceee2; border-color: #286650; box-shadow: inset 0 0 0 2px #286650; }
.practice-solution { border-top: 1px solid var(--bs-border-color); padding-top: 20px; margin-top: 20px; }
.hand-example { padding: 24px; background: #f0f5f1; border-radius: 10px; margin-top: 24px; }
.hand-formula { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 700; color: #194533; margin-bottom: 8px; }
.hand-formula span { padding-inline: 8px; font-weight: 400; }
.winning-groups { display: flex; flex-wrap: wrap; gap: 24px 16px; }
.winning-groups figure { margin: 0; }
.winning-groups .tile-row { flex-wrap: nowrap; gap: 3px; margin-top: 8px; margin-bottom: 12px; }
.winning-groups .mahjong-tile { width: 44px; }
.winning-groups figcaption { font-weight: 600; }
.winning-groups figcaption span { display: block; color: var(--bs-secondary-color); font-weight: 400; font-size: .875rem; }
.lesson-next { border-top: 1px solid var(--bs-border-color); padding-top: 24px; }
.setup-list { padding-left: 1.25rem; line-height: 1.8; }
.setup-list li + li { margin-top: 12px; }
.setup-table-figure { margin-block: 32px; }
.setup-table { display: grid; grid-template-columns: 100px minmax(0, 1fr) 100px; grid-template-rows: auto minmax(180px, 1fr) auto; gap: 12px; max-width: 580px; margin: 0 auto 20px; }
.setup-seat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.setup-seat span { color: #286650; font-size: .875rem; }
.seat-west { grid-column: 2; grid-row: 1; }
.seat-north { grid-column: 1; grid-row: 2; }
.seat-south { grid-column: 3; grid-row: 2; }
.seat-east { grid-column: 2; grid-row: 3; }
.setup-table-centre { grid-column: 2; grid-row: 2; position: relative; display: grid; place-items: center; min-height: 180px; background: #f0f5f1; border-radius: 10px; padding: 32px; text-align: center; color: #194533; }
.setup-table-centre small { display: inline-block; font-size: .875rem; line-height: 1.5; margin-top: 8px; }
.setup-wall { position: absolute; border: 1px solid #286650; border-radius: 3px; background: repeating-linear-gradient(90deg, #286650 0 10px, #e0ece5 10px 12px); }
.wall-top, .wall-bottom { height: 16px; left: 24px; right: 24px; }
.wall-top { top: 10px; }
.wall-bottom { bottom: 10px; }
.wall-left, .wall-right { width: 16px; top: 30px; bottom: 30px; background: repeating-linear-gradient(0deg, #286650 0 10px, #e0ece5 10px 12px); }
.wall-left { left: 10px; }
.wall-right { right: 10px; }
.setup-steps { padding-left: 1.5rem; margin-top: 28px; }
.setup-steps > li { padding-left: 8px; margin-bottom: 32px; }
.setup-steps > li::marker { color: #286650; font-weight: 700; }
.wall-sample { display: grid; grid-template-columns: repeat(6, minmax(0, 36px)); gap: 4px; margin-block: 20px 12px; }
.wall-sample span { height: 24px; border: 1px solid #286650; border-radius: 3px; background: #f0f5f1; box-shadow: 0 3px 0 #286650; }
.setup-wind-table { min-width: 260px; }
.setup-wind-table caption { font-size: .875rem; }
.round-wind-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; background: #f0f5f1; border-radius: 10px; padding: 24px; margin-top: 24px; }
.round-wind-track > div { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.round-wind-track span { color: var(--bs-secondary-color); font-size: .875rem; }
.scoring-table { table-layout: fixed; }
.scoring-table th, .scoring-table td { padding: 16px 12px; vertical-align: top; line-height: 1.65; overflow-wrap: anywhere; }
.scoring-table th:first-child { width: 30%; padding-left: 0; }
.scoring-table th:nth-child(2) { width: 15%; }
.scoring-table th:last-child, .scoring-table td:last-child { padding-right: 0; }
.faan-value { color: #194533 !important; font-weight: 700; }
.limit-label { display: block; width: fit-content; margin-top: 4px; padding: 2px 6px; border-radius: 4px; background: #f0f5f1; font-size: .875rem; font-weight: 600; }
.score-example { max-width: 420px; }
.score-example > div { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; }
.score-example dt { font-weight: 500; }
.score-example dd { margin: 0; white-space: nowrap; }
.score-example .score-total { border-top: 1px solid #b9cec0; color: #194533; font-weight: 700; }
.score-total dt { font-weight: 700; }
@media (max-width: 575.98px) {
  .intro { padding-block: 48px 40px; }
  .nav-link { padding-inline: .6rem; }
  .meld-grid { grid-template-columns: 1fr; }
  .mahjong-tile { width: 52px; }
  .meld-card, .hand-example, .blocks-quiz { padding: 20px; }
  .setup-table { grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 6px; }
  .setup-table-centre { padding-inline: 28px; }
  .round-wind-track { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px; gap: 24px; }
  .scoring-table th, .scoring-table td { padding: 12px 6px; }
  .scoring-table th:first-child { width: 32%; }
  .scoring-table th:nth-child(2) { width: 19%; }
}
