      :root {
        --paper: #f8f6ef;
        --white: #fffdf9;
        --navy: #12284b;
        --ink: #243c60;
        --muted: #6d7890;
        --sage: #5d856f;
        --sage-dark: #456e5d;
        --sage-soft: #e8efe8;
        --clay: #b66b45;
        --wood: #d6b789;
        --wood-deep: #493d31;
        --line: #d9d9d0;
      }

      * { box-sizing: border-box; }
      html { scroll-behavior: smooth; }
      body {
        margin: 0;
        min-width: 320px;
        overflow-x: hidden;
        background: var(--paper);
        color: var(--navy);
        font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        -webkit-font-smoothing: antialiased;
      }
      button, a { font: inherit; }
      button { cursor: pointer; }
      a { color: inherit; text-decoration: none; }

      .topbar {
        min-height: 86px;
        display: grid;
        grid-template-columns: minmax(180px, 0.9fr) minmax(260px, 1.2fr) minmax(260px, 1fr);
        align-items: center;
        gap: 24px;
        padding: 18px clamp(20px, 4vw, 68px);
        border-bottom: 1px solid #e5e3db;
        background: #fbfaf5;
      }
      .brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; }
      .brand-mark {
        width: 44px; height: 44px; display: grid; place-items: center;
        border: 1px solid #a9c0af; border-radius: 10px 2px 10px 2px;
        background: #eef3ec; color: var(--sage-dark);
        font: 700 25px/1 Georgia, serif; transform: rotate(45deg);
      }
      .brand-mark span { transform: rotate(-45deg); }
      .brand-copy { display: grid; gap: 2px; }
      .brand-name { font: 700 26px/1 Georgia, serif; letter-spacing: -0.03em; }
      .brand-subtitle { color: var(--sage-dark); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
      .title-lockup { justify-self: center; }
      .title-lockup h1 { margin: 0; font: 700 clamp(18px, 2vw, 27px)/1.2 Georgia, serif; letter-spacing: -0.025em; }
      .title-lockup p { margin: 6px 0 0; color: var(--sage-dark); font: 500 13px/1.2 Georgia, serif; letter-spacing: 0.08em; }
      .topnav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(14px, 2.2vw, 28px); color: var(--muted); font-size: 14px; }
      .topnav a, .topnav button { border: 0; padding: 6px 0; background: transparent; color: inherit; }
      .topnav a:hover, .topnav button:hover { color: var(--navy); }
      .language-pill { padding: 7px 13px; border: 1px solid #ccd6cd; border-radius: 999px; color: var(--sage-dark); background: #f2f6ef; font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
      .language-pill:hover { border-color: var(--sage-dark); background: #e8efe8; transform: translateY(-1px); }
      .language-pill:focus-visible { outline: 3px solid rgba(71, 111, 75, .28); outline-offset: 2px; }

      .page-content { width: min(1440px, 100%); margin: 0 auto; padding: 34px clamp(20px, 4vw, 68px) 58px; }
      .intro-strip { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 7px 0 27px; }
      .eyebrow, .section-kicker, .phase-label { margin: 0; color: var(--sage-dark); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
      .intro-strip h2 { max-width: 100%; margin: 9px 0 0; font: 700 clamp(23px, 3vw, 36px)/1.15 Georgia, serif; letter-spacing: -0.03em; overflow-wrap: anywhere; }
      .intro-copy { max-width: 310px; margin: 0 0 2px; color: var(--muted); font-size: 15px; line-height: 1.55; }
      .game-layout { display: grid; grid-template-columns: minmax(210px, 0.7fr) minmax(410px, 1.65fr) minmax(230px, 0.75fr); align-items: start; gap: clamp(22px, 3.2vw, 48px); }
      .board-column, .status-column, .learning-column { min-width: 0; }
      .board-frame, .game-board, .board-caption, .full-controls { min-width: 0; max-width: 100%; }

      .panel-surface { border: 1px solid #dfe5da; border-radius: 21px; background: var(--sage-soft); }
      .status-panel { padding: 24px 22px 20px; }
      .turn-display { display: flex; align-items: center; gap: 12px; margin: 19px 0 21px; }
      .turn-display strong { display: block; color: var(--navy); font: 700 20px/1.2 Georgia, serif; }
      .turn-display span:not(.player-dot) { display: block; margin-top: 4px; color: var(--sage-dark); font-size: 12px; }
      .player-dot { width: 33px; height: 33px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,0.65); border-radius: 50%; box-shadow: inset 0 0 0 5px rgba(255,255,255,0.2); }
      .player-dot.sage { background: var(--sage); }
      .player-dot.charcoal { background: #2f3b3b; }
      .action-callout { display: flex; align-items: center; gap: 12px; padding: 14px 15px; border-radius: 15px; color: #fff; background: var(--sage-dark); }
      .action-symbol { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,0.5); border-radius: 50%; font-size: 17px; }
      .action-callout strong, .action-callout span { display: block; }
      .action-callout strong { font-size: 14px; }
      .action-callout span { margin-top: 4px; color: #e8f0e9; font-size: 11px; line-height: 1.4; }
      .player-row { display: flex; align-items: center; gap: 11px; padding: 18px 0 14px; border-bottom: 1px solid #cad8cb; }
      .player-row .player-dot { width: 28px; height: 28px; }
      .player-row strong, .player-row span { display: block; }
      .player-row strong { font-size: 13px; }
      .player-row span { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
      .score-row { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; color: var(--muted); font-size: 12px; }
      .score-row strong { color: var(--navy); font: 700 18px Georgia, serif; }
      .quote-block { margin: 35px 0 0; padding: 0 7px; }
      .quote-mark { display: block; height: 22px; color: #d8c9ad; font: 700 55px/0.8 Georgia, serif; }
      .quote-block p { margin: 7px 0 12px; color: var(--navy); font: 700 17px/1.55 Georgia, serif; }
      .quote-block cite { color: var(--muted); font-size: 12px; font-style: normal; }
      .text-button { margin: 27px 7px 0; padding: 0 0 5px; border: 0; border-bottom: 1px solid var(--clay); color: var(--clay); background: transparent; font-size: 12px; font-weight: 800; }
      .text-button span { margin-left: 7px; font-size: 15px; }

      .board-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; min-height: 63px; margin-bottom: 16px; }
      .board-heading h2 { margin: 8px 0 0; color: var(--navy); font: 700 clamp(22px, 2.7vw, 32px)/1.18 Georgia, serif; letter-spacing: -0.03em; }
      .turn-note { max-width: 230px; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: right; }
      .board-frame { overflow: hidden; padding: clamp(13px, 2vw, 25px); border: 1px solid #dfd0b5; border-radius: 29px; background: #efe5d4; box-shadow: 0 19px 34px rgba(70,55,37,0.11); }
      .game-board { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 19px; background: var(--wood); }
      .board-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
      .board-lines rect, .board-lines line { fill: none; stroke: var(--wood-deep); stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.9; }
      .point-grid { position: absolute; inset: 0; }
      .point {
        position: absolute; width: clamp(25px, 6.5%, 42px); aspect-ratio: 1; transform: translate(-50%, -50%);
        display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent;
      }
      .point::before { content: ""; position: absolute; width: 33%; aspect-ratio: 1; border-radius: 50%; background: var(--wood-deep); }
      .point:hover::after, .point.selected::after, .point.valid::after { content: ""; position: absolute; inset: -8%; border: 3px solid var(--clay); border-radius: 50%; }
      .point.valid::after { border-color: var(--sage-dark); }
      .point.last::after { content: ""; position: absolute; inset: 5%; border: 2px solid rgba(255,250,235,0.78); border-radius: 50%; }
      .piece { position: relative; z-index: 1; width: 78%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 5px 8px rgba(42,31,21,0.25), inset 0 0 0 3px rgba(255,255,255,0.3); }
      .piece.sage { background: var(--sage); }
      .piece.charcoal { background: #2f3b3b; }
      .board-caption { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 2px 0; }
      .board-caption strong, .board-caption span { display: block; }
      .board-caption strong { color: var(--navy); font: 700 15px Georgia, serif; }
      .board-caption span { margin-top: 5px; color: var(--muted); font-size: 11px; }
      .outline-button { flex: 0 0 auto; padding: 10px 14px; border: 1px solid #c8d2c8; border-radius: 999px; color: var(--sage-dark); background: transparent; font-size: 12px; font-weight: 800; }
      .outline-button:hover { border-color: var(--sage-dark); background: #f0f5ee; }

      .learning-panel { padding: 24px 22px 22px; border-color: #e5e1d7; background: var(--white); }
      .learning-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
      .learning-header h2 { margin: 18px 0 0; color: var(--navy); font: 700 clamp(35px, 4vw, 49px)/0.95 Georgia, serif; letter-spacing: -0.05em; }
      .lesson-count { color: var(--muted); font-size: 12px; }
      .pronunciation { margin: 14px 0 20px; color: var(--muted); font-size: 12px; }
      .learning-body { margin: 0; color: var(--ink); font: 400 15px/1.65 Georgia, serif; }
      .learning-body em { color: var(--clay); font-style: normal; font-weight: 700; }
      .tip-box { display: flex; gap: 12px; margin-top: 24px; padding: 15px; border: 1px solid #dce7d9; border-radius: 15px; background: #edf3eb; }
      .tip-symbol { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--sage); font-size: 11px; }
      .tip-box strong { color: var(--navy); font-size: 13px; }
      .tip-box p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
      .learning-rule { display: flex; justify-content: center; margin: 23px 0 17px; }
      .learning-rule span { width: 85px; height: 1px; background: #d9c4a1; }
      .learning-footer { margin: 0; color: var(--sage-dark); font: 700 12px Georgia, serif; text-align: center; }

      .site-footer { min-height: 90px; padding: 40px 20px 25px; color: var(--muted); font-size: 12px; text-align: center; }
      .site-footer p { margin: 0; }
      .footer-rule { width: min(420px, 80%); height: 1px; margin: 0 auto 17px; background: #d9c4a1; }
      .modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(18,40,75,0.38); }
      .rules-modal { width: min(600px, 100%); max-height: min(780px, 90vh); overflow: auto; padding: 30px; border: 1px solid #e5e1d7; border-radius: 22px; background: var(--white); box-shadow: 0 24px 60px rgba(18,40,75,0.2); }
      .modal-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
      .modal-heading h2 { margin: 10px 0 0; color: var(--navy); font: 700 28px Georgia, serif; }
      .close-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--navy); background: transparent; font-size: 22px; line-height: 1; }
      .rules-list { display: grid; gap: 14px; margin: 25px 0 0; padding-left: 20px; color: var(--ink); font: 400 14px/1.55 Georgia, serif; }
      .rules-list strong { color: var(--navy); }
      .rules-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #e2ded4; color: var(--muted); font-size: 12px; line-height: 1.5; }
      [hidden] { display: none !important; }

      @media (max-width: 1120px) {
        .topbar { grid-template-columns: 1fr auto; }
        .title-lockup { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
        .topnav { grid-column: 2; grid-row: 1; }
        .game-layout { grid-template-columns: minmax(190px, 0.7fr) minmax(390px, 1.4fr); }
        .learning-column { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; }
        .learning-rule, .learning-footer { display: none; }
      }
      @media (max-width: 760px) {
        .topbar, .page-content, .game-layout, .board-column, .board-frame, .game-board { width: 100%; max-width: 100%; min-width: 0; }
        .intro-strip { min-width: 0; }
        .topbar { padding: 16px 20px; }
        .brand-mark { width: 38px; font-size: 22px; }
        .brand-name { font-size: 22px; }
        .title-lockup h1 { font-size: 21px; }
        .topnav { gap: 13px; font-size: 12px; }
        .topnav a:nth-child(2), #rulesButton { display: none; }
        .page-content { padding: 25px 20px 40px; }
        .intro-strip { display: block; padding-bottom: 24px; }
        .intro-copy { margin-top: 13px; }
        .game-layout { grid-template-columns: 1fr; gap: 28px; }
        .board-column { order: -1; }
        .board-heading { display: block; }
        .turn-note { display: block; max-width: none; margin-top: 9px; text-align: left; }
        .status-column { display: grid; gap: 20px; }
        .quote-block { margin: 4px 0 0; }
        .text-button { margin-top: 0; justify-self: start; }
        .learning-column { display: block; }
        .learning-panel { padding: 22px 20px; }
        .learning-rule, .learning-footer { display: none; }
        .board-caption { align-items: start; }
        .outline-button { padding: 9px 11px; }
      }
      @media (max-width: 450px) {
        .topnav { gap: 8px; }
        .language-pill { padding: 6px 9px; }
        .title-lockup p { font-size: 11px; }
        .board-caption { display: block; }
        .outline-button { margin-top: 14px; }
      }

      .full-controls {
        display: flex;
        width: 100%;
        overflow: hidden;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        margin: 0 0 16px;
        padding: 12px 14px;
        border: 1px solid #dfe5da;
        border-radius: 15px;
        background: #f2f6ef;
        color: var(--muted);
        font-size: 11px;
      }
      .full-controls label { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; font-weight: 800; color: var(--sage-dark); }
      .full-controls select { width: 100%; max-width: 100%; padding: 7px 28px 7px 9px; border: 1px solid #c8d2c8; border-radius: 9px; color: var(--navy); background: var(--white); font-size: 12px; }
      .computer-note { margin-right: auto; }
      .control-actions { display: flex; gap: 7px; }
      .small-button { padding: 7px 10px; border: 1px solid #c8d2c8; border-radius: 999px; color: var(--sage-dark); background: transparent; font-size: 11px; font-weight: 800; }
      .small-button:hover:not(:disabled) { border-color: var(--sage-dark); background: #e8efe8; }
      .small-button:disabled { cursor: not-allowed; opacity: 0.45; }
      .stats-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; padding: 15px; }
      .stats-panel div { display: grid; gap: 4px; }
      .stats-panel span { color: var(--muted); font-size: 10px; line-height: 1.3; }
      .stats-panel strong { color: var(--navy); font: 700 18px/1 Georgia, serif; }
      .move-history { margin-top: 20px; padding: 17px 18px 15px; background: #f2f6ef; }
      .history-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
      .history-heading h3 { margin: 7px 0 0; color: var(--navy); font: 700 18px/1.2 Georgia, serif; }
      .history-heading > span { color: var(--muted); font-size: 10px; }
      .move-history ol { display: grid; gap: 7px; margin: 14px 0 0; padding: 0; list-style: none; }
      .move-history li { display: flex; align-items: baseline; gap: 9px; color: var(--ink); font-size: 11px; line-height: 1.4; }
      .move-history li span { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; color: var(--sage-dark); background: #dce8dd; font-size: 9px; font-weight: 800; }
      .move-history .history-empty { color: var(--muted); font-style: italic; }
      @media (max-width: 760px) {
        .full-controls { display: grid; grid-template-columns: 1fr; align-items: stretch; gap: 10px; }
        .full-controls label { justify-content: space-between; }
        .full-controls select { min-width: 0; flex: 1; }
        .computer-note { margin: 0; }
        .control-actions { width: 100%; margin-left: 0; flex-wrap: wrap; }
        .control-actions .small-button { flex: 1 1 120px; }
        .stats-panel { margin-top: 0; }
      }
