      :root {
          --bg: #131a12;
          --bg-deep: #0d120c;
          --panel: #13223d;
          --panel-edge: #37492f;
          --ink: #eef5e6;
          --ink-soft: #a9bb9c;
          --accent: #f0683c;
          --accent-ink: #ffffff;
          --gold: #f0ac46;
          --felt: #2e6b3c;
          --shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
        --radius: 18px;
      }
      * { box-sizing: border-box; }
      html, body { height: 100%; }
      body {
        margin: 0;
        font-family: "Outfit", system-ui, sans-serif;
        color: var(--ink);
        background-image: url(back.png);
        background-attachment: fixed;
        background-size: cover;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
      }
      .page-title {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
      }
      .wrap { 
          width: min(1060px, 100%); 
          display: flex; 
          flex-direction: column; 
          gap: 12px; 
          padding: 14px 14px 22px;
      }

      /* ---------- scoreboard strip ---------- */
      .scorebar {
        display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px;
      }
      .hole-id {
        background: var(--panel); border: 1px solid var(--panel-edge);
        border-radius: var(--radius); padding: 10px 16px;
        display: flex; flex-direction: column; justify-content: center; min-width: 168px;
        box-shadow: var(--shadow);
      }
      .hole-id .kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
      .hole-id .name { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 20px; line-height: 1.05; }
      .hole-id .par { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
      .stats { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; }
      .stat {
        background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius);
        padding: 8px 16px; min-width: 104px; flex: 1;
        display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
        box-shadow: var(--shadow);
      }
      .stat .label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
      .stat .value { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 20px; line-height: 1; }
      .stat .value small { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
      .actions { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
      button {
        font-family: "Outfit", sans-serif; font-weight: 600; font-size: 14px;
        border-radius: 12px; border: 1px solid var(--panel-edge);
        background: var(--panel); color: var(--ink);
        padding: 10px 14px; cursor: pointer;
        transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
      }
      button:hover { border-color: var(--ink-soft); }
      button:active { transform: scale(0.96); }
      button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
      button.primary:hover { filter: brightness(1.07); }
      .score-butt {
          background-color: #2e6b3c;
      }
      /* ---------- course frame ---------- */
      .stage {
        position: relative; border-radius: 22px; overflow: hidden;
        box-shadow: var(--shadow);
        border: 1px solid var(--panel-edge);
        background: #6b4a2a;
      }
      canvas { display: block; width: 100%; height: auto; aspect-ratio: 920 / 560; touch-action: none; cursor: crosshair; }
      .hint {
        position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
        background: rgba(16, 24, 12, 0.72); color: #f2f7ea;
        font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
        pointer-events: none; white-space: nowrap; backdrop-filter: blur(3px);
        transition: opacity 0.4s ease;
      }
      .hint.gone { opacity: 0; }

      /* ---------- hole dots ---------- */
      .holes-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
      .dot {
        width: 40px; height: 40px; border-radius: 50%; padding: 0;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 15px; line-height: 1;
        position: relative;
      }
      .dot .sub { font-size: 9px; font-weight: 700; font-family: "Outfit", sans-serif; color: var(--ink-soft); line-height: 1; margin-top: 1px; }
      .dot.current { background: var(--accent); border-color: var(--accent); color: #fff; }
      .dot.current .sub { color: rgba(255,255,255,0.85); }
      .dot.done { background: var(--felt); border-color: var(--felt); color: #fff; }
      .dot.done .sub { color: rgba(255,255,255,0.85); }

      /* ---------- overlay panels ---------- */
      .overlay {
        position: absolute; inset: 0; display: none;
        align-items: center; justify-content: center;
        background: rgba(12, 20, 10, 0.45); backdrop-filter: blur(2px);
        padding: 16px;
      }
      .overlay.show { display: flex; }
      .card {
        background: var(--panel); color: var(--ink); border-radius: 20px;
        border: 1px solid var(--panel-edge);
        padding: 24px 26px; max-width: 560px; width: 100%;
        box-shadow: var(--shadow); text-align: center;
        max-height: 100%; overflow-y: auto;
      }
      .card .term {
        font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
        font-size: clamp(30px, 6vw, 46px); line-height: 1; margin: 0 0 6px;
      }
      .card .detail { color: var(--ink-soft); font-size: 15px; margin: 0 0 18px; }
      .card .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

      table.scorecard { border-collapse: collapse; width: 100%; margin: 6px 0 18px; font-size: 13px; }
      table.scorecard th, table.scorecard td { padding: 6px 2px; text-align: center; border-bottom: 1px solid var(--panel-edge); }
      table.scorecard th { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
      table.scorecard td.n, table.scorecard th.n { text-align: left; font-weight: 600; white-space: nowrap; padding-right: 8px; }
      table.scorecard td.tot, table.scorecard th.tot { font-weight: 800; }
      table.scorecard .under { color: #2f9e57; font-weight: 800; }
      table.scorecard .over { color: var(--accent); font-weight: 800; }
      .final-verdict { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 22px; margin: 2px 0 4px; }

      /* ---------- score post form ---------- */
      .score-form {
        display: flex; gap: 8px; justify-content: center; align-items: stretch;
        flex-wrap: wrap; margin: 2px 0 16px;
      }
      .score-form input {
        font-family: "Outfit", sans-serif; font-size: 14px; font-weight: 500;
        color: var(--ink); background: var(--panel);
        border: 1px solid var(--panel-edge); border-radius: 12px;
        padding: 10px 12px; min-width: 0;
      }
      .score-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
      .score-form input[name="name"] { flex: 1 1 170px; }
      .score-form input[name="shots"] { flex: 0 1 118px; text-align: center; font-weight: 700; }

      .howto {
        background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius);
        padding: 12px 18px; font-size: 14px; color: var(--ink-soft); line-height: 1.55;
        box-shadow: var(--shadow);
      }
      .howto b { color: var(--ink); }
      .howto .keys { display: flex; flex-wrap: wrap; gap: 6px 18px; }

    .game-scores-wrap {
      width: 100%;
      max-width: 320px;
      margin: 25px auto 0 auto;
   }
   .game-scores {
     background: #13223d;
     margin-top: 10px;
     border: 5px solid #6b4a2a;
     border-radius: 10px;
     font-size: 18px;
     padding: 10px 0 0 0;
  }
   .game-scores table {
     width: 100%;
     border-collapse: collapse;
  }
  .game-scores caption {
     font-family: "Libre Baskerville";
     font-weight: 600;
     padding-bottom: 10px;
     letter-spacing: 1px;
  }
  .game-scores tr th:last-of-type, .game-scores tr td:last-of-type {
    text-align: right;
  }
  .game-scores th, .game-scores td {
    padding: 6px 10px;
    font-size: 14px;
    text-align: left;
 }
 .game-scores th {
    font-weight: 400;
    background: #080d1c;
 }
 .game-scores tr:nth-child(even) {
    background-color: #0c1327;
 }
 .game-scores tr:nth-child(odd) {
    background-color: #162740;
 }
      @media (max-width: 620px) {
        .hole-id { min-width: 0; flex: 1 1 100%; }
        .stats { flex: 1 1 100%; }
        .stat { min-width: 0; padding: 8px 12px; }
        .stat .value { font-size: 18px; }
        .hole-id .name { font-size: 18px; }
        .dot { width: 34px; height: 34px; font-size: 13px; }
        .card { padding: 18px 16px; }
      }