* { box-sizing: border-box; }
:root { color-scheme: light; --paper: #f3f0e4; --ink: #294a3e; --muted: #6e8072; --line: #d3ddc8; --green: #2d6b4d; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.6; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { min-height: 44px; border: 1px solid #becdb2; border-radius: 11px; background: #fffdf4; color: var(--ink); padding: 10px 13px; cursor: pointer; font-weight: 650; touch-action: manipulation; }
button:hover:not(:disabled) { background: #eaf2df; border-color: #60876a; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #bc8734; outline-offset: 3px; }
[hidden] { display: none !important; }
.page { max-width: 1120px; margin: auto; padding: 22px 30px 0; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.back-home { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: #48684d; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.club-mark { color: #7f8c68; font-size: 12px; white-space: nowrap; }
.club-mark span { font-size: 22px; color: #819059; vertical-align: middle; }
.hero { padding: 34px 0 25px; }
.eyebrow { font-size: 10px; margin: 0 0 7px; color: #7d8a63; font-weight: 750; letter-spacing: 1.8px; }
h1 { font-size: clamp(35px, 5vw, 51px); line-height: 1.25; letter-spacing: 1px; margin: 0 0 12px; font-weight: 800; }
h1 span { color: #bb9350; }
.lead { margin: 0; color: #647d65; font-size: 15px; line-height: 1.9; }
.hero-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.hero-tags span { padding: 4px 9px; border-radius: 5px; background: #e5e9d3; font-size: 11px; color: #6b8057; }
.puzzle-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.puzzle-actions button { min-height: 46px; font-size: 13px; }
.notice { margin: 0 0 12px; padding: 12px 15px; border: 1px solid #dac28e; border-radius: 11px; color: #7c632e; background: #fff5d9; font-size: 12px; }
.notice p { margin: 3px 0; }
.club-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: 22px; align-items: start; }
.panel { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: #fffdf6; box-shadow: 0 5px 0 #e4e7d2; }
.section-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 17px; }
h2 { margin: 0; font-size: 21px; line-height: 1.4; }
.leaf-mark { color: #afb98e; font-size: 38px; line-height: 1; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mode-switch button { font-size: 12px; padding: 9px 5px; background: #f5f6e9; border-color: #d7e0c5; }
.mode-switch button[aria-pressed="true"] { background: #e4edd7; color: #365c36; border-color: #6c8d57; box-shadow: inset 0 0 0 1px #6c8d57; }
.puzzle-meta { margin-top: 14px; display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #7c8a70; padding-bottom: 11px; border-bottom: 1px dashed #d5dec4; }
.puzzle-meta code { letter-spacing: 1px; font-family: ui-monospace, monospace; color: #607852; }
.scoreboard { display: grid; grid-template-columns: 1fr .7fr 1fr; gap: 8px; margin-top: 16px; }
.score { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border: 1px solid #d9e3ca; border-radius: 12px; background: #eff4e5; }
.score > span { font-size: 11px; color: #69825a; }
.score strong { font-size: 28px; line-height: 1.35; font-family: ui-rounded, "SF Pro Rounded", sans-serif; }
.green-score strong { color: #34704d; }
.gold-score { background: #fcf3d9; border-color: #e5d7ad; }
.gold-score > span, .gold-score strong { color: #9b7934; }
.empty-score { background: transparent; border-color: transparent; }
.empty-score strong { font-size: 22px; color: #9aaa86; padding-top: 5px; }
.player-letter { display: inline-block; margin-right: 3px; font-size: 11px; }
.turn-line { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 10px; color: #5f7955; font-size: 12px; }
.turn-line > span:last-child { color: #93a07e; font-size: 11px; }
#turn { font-weight: 700; }
.board { width: 100%; display: grid; grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: 3px; padding: 5px; border: 1px solid #aab98f; border-radius: 12px; background: #d5ddbd; }
.cell { position: relative; min-width: 44px; min-height: 44px; width: 100%; aspect-ratio: 1; padding: 2px; border-radius: 5px; border: 1px solid #e8edda; background: #edf0dd; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.cell:hover { background: #e4ecd0; border-color: #90a474; }
.cell[aria-disabled="true"] { cursor: default; }
.cell[data-legal="true"] { cursor: pointer; background: #f8faeb; }
.cell[data-last="true"] { box-shadow: inset 0 0 0 2px #365e3b, inset 0 0 0 4px #f4f8e8; }
.cell[data-flipped="true"] { border: 2px dashed #9e8754; }
.cell:focus-visible { z-index: 1; outline-offset: -3px; outline-width: 3px; }
.piece { position: relative; width: 82%; height: 82%; display: flex; align-items: center; justify-content: center; border-radius: 50%; box-shadow: 0 2px 0 #526a3e20; }
.piece.green { background: #4d8656; border: 1px solid #32673b; color: #f9f7e5; }
.piece.gold { background: #edcf83; border: 1px solid #b2964f; color: #6a5523; }
.leaf-svg { position: absolute; width: 72%; height: 72%; opacity: .45; }
.leaf-svg path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.piece-letter { position: relative; font-size: clamp(13px, 1.8vw, 22px); font-weight: 750; line-height: 1; }
.legal-dot { width: 18%; height: 18%; min-width: 8px; min-height: 8px; border-radius: 50%; background: #97ae6b; border: 1px solid #718d49; }
.cell[data-turn="gold"] .legal-dot { background: #cfb56e; border-color: #a78c46; }
.board-legend { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 11px; color: #86976b; font-size: 9px; }
.board-legend span { display: inline-flex; align-items: center; gap: 4px; }
.board-legend i { display: inline-block; width: 10px; height: 10px; }
.legal-example { border-radius: 50%; background: #97ae6b; }
.last-example { border: 3px double #4f7550; border-radius: 2px; }
.flip-example { border: 1px dashed #9e8754; border-radius: 2px; }
.live-status { font-size: 12px; color: #476d45; min-height: 45px; margin: 15px 0 5px; }
.last-move { font-size: 10px; color: #94a079; margin: 0; min-height: 18px; }
.result { margin-top: 15px; background: #f1f4e4; border: 1px solid #dce5c9; border-radius: 12px; padding: 14px; }
.result h3 { margin: 0 0 5px; font-size: 15px; }
.result p { margin: 0; color: #70865f; font-size: 11px; }
.result[data-phase="finished"] { border-color: #b2c18e; background: #eaf1db; }
.save-note { font-size: 10px; color: #8e9b7b; margin: 13px 0 0; }
.side-stack { display: grid; gap: 21px; }
.capture-example { margin: 19px 0; padding: 14px 10px; border: 1px dashed #cedbb7; border-radius: 11px; background: #f4f7e8; }
.capture-example > div { display: flex; justify-content: center; align-items: center; gap: 7px; }
.mini-piece, .mini-empty { display: inline-flex; justify-content: center; align-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 11px; font-weight: 700; }
.mini-green { background: #4d8656; color: #fff8e5; border: 1px solid #32673b; }
.mini-gold { background: #edcf83; color: #6a5523; border: 1px solid #b2964f; }
.mini-empty { border: 1px dashed #aaba8d; color: #93a477; background: #fffef6; }
.example-caption { font-size: 10px; margin-left: 4px; color: #879a6d; }
.example-arrow { display: block; text-align: center; color: #a6b68c; padding: 3px 0; font-size: 17px; }
.rules { padding-left: 20px; margin: 16px 0; color: #69825b; font-size: 12px; }
.rules li { padding-left: 3px; margin-bottom: 9px; }
.strategy-note { font-size: 12px; color: #5e7b4c; background: #eff2df; border-left: 3px solid #aabd80; padding: 11px 13px; margin: 18px 0 13px; }
.small-note { font-size: 10px; color: #8d9c77; line-height: 1.8; margin: 10px 0; }
.count { font-size: 11px; color: #7e925e; white-space: nowrap; }
.records { max-height: 315px; overflow-y: auto; padding: 2px 3px 2px 0; }
.empty-record { padding: 28px 5px; text-align: center; font-size: 12px; color: #9bab7c; }
.record-item { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px dashed #dce4cb; }
.record-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.record-seed { color: #667e50; font-family: ui-monospace, monospace; font-size: 12px; }
.record-score, .record-date { font-size: 10px; color: #8da071; }
.record-item button { min-width: 73px; font-size: 11px; padding: 8px; border-color: #d2dfbb; }
.share-panel { margin-top: 25px; padding: 15px 18px; background: #e6ebd6; color: #7e9062; font-size: 11px; border-radius: 12px; }
.share-panel p { margin: 0; }
.share-panel label { display: block; margin: 12px 0 5px; }
#share-fallback { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #bccda1; border-radius: 8px; background: #fcfff1; color: #4f7043; font-size: 12px; }
footer { padding: 28px 0; text-align: center; color: #a4af89; font-size: 10px; letter-spacing: 1px; }
footer span { padding: 0 4px; }
dialog { width: min(440px, calc(100% - 32px)); border: 1px solid #c2d0aa; border-radius: 19px; padding: 27px; background: #fffdf4; color: var(--ink); box-shadow: 0 20px 70px #294a3e33; }
dialog::backdrop { background: #294a3e66; backdrop-filter: blur(3px); }
dialog h2 { font-size: 23px; }
dialog > p:not(.eyebrow) { margin: 14px 0 22px; font-size: 13px; color: #74865f; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.dialog-actions button { font-size: 12px; padding: 10px 5px; }
.primary { background: #3c754a; border-color: #3c754a; color: #fffced; }
.primary:hover:not(:disabled) { background: #2f623c; border-color: #2f623c; }
@media (max-width: 900px) {
  .page { padding-inline: 22px; }
  .club-layout { gap: 16px; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .panel { padding: 17px; }
  .game { padding: 12px; }
  h2 { font-size: 19px; }
  .mode-switch button { font-size: 11px; }
  .piece-letter { font-size: 16px; }
  .capture-example { padding: 12px 6px; }
  .capture-example > div { gap: 5px; }
  .example-caption { margin-left: 1px; font-size: 9px; }
  .mini-piece, .mini-empty { width: 24px; height: 24px; }
}
@media (max-width: 700px) {
  .page { padding: 14px 16px 0; }
  .club-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .site-header { gap: 8px; }
  .back-home { font-size: 12px; }
  .club-mark { font-size: 10px; }
  .hero { padding: 27px 0 23px; }
  .lead { font-size: 14px; }
  .puzzle-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
  .puzzle-actions button { font-size: 12px; }
  .panel { border-radius: 17px; }
  .game { padding: 12px; }
  .game .section-heading { padding: 4px 3px 0; }
  .side-stack { gap: 20px; }
  .mode-switch button { min-height: 46px; font-size: 12px; }
  .puzzle-meta { padding-inline: 3px; }
  .turn-line { padding-inline: 3px; }
  .piece-letter { font-size: 15px; }
  .board-legend { font-size: 9px; gap: 6px 9px; }
  .rulebook, .collection { padding: 20px 18px; }
  .mini-piece, .mini-empty { width: 30px; height: 30px; }
  .example-caption { font-size: 10px; margin-left: 6px; }
  .share-panel { margin-top: 21px; }
  dialog { padding: 23px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  button:active:not(:disabled) { transform: none; }
}
