:root { color-scheme: light; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif; color: #243c35; background: #fbfaf6; }
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #2a725e; outline-offset: 3px; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 30; padding: 10px; background: white; }
.skip-link:focus { top: 10px; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding: 12px max(20px, calc((100vw - 860px)/2)); border-bottom: 1px solid #e2e7e0; background: white; }
.header a { color: #245f50; text-decoration: none; }
.brand { font-size: 20px; font-weight: 800; }
.back { font-size: 13px; font-weight: 700; }
.page { max-width: 860px; margin: 0 auto; padding: 32px 20px 80px; }
.eyebrow { margin: 0 0 8px; color: #39715f; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 0 0 10px; font-size: clamp(27px, 5vw, 37px); }
.intro { max-width: 700px; margin: 0 0 25px; color: #52635d; line-height: 1.8; }
.game { position: relative; padding: 25px 25px 22px; border: 1px solid #e4ddce; border-radius: 20px; background: #f8f3e9; }
.game-title, .tray-label { margin: 0; text-align: center; font-size: 17px; font-weight: 800; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 14px; min-height: 210px; margin: 18px 0 24px; padding: 22px; border: 2px solid #c6ae88; border-radius: 22px; background: #e7d4b2; box-shadow: inset 0 5px 12px #78604419, 0 7px 0 #d5bd98; }
.hole, .piece { display: grid; place-items: center; width: 100%; min-width: 0; border: 0; background: none; cursor: pointer; }
.hole { min-height: 140px; border-radius: 20px; }
.hole .shape { background: #c3ac88; box-shadow: inset 3px 5px 9px #816e5270, 1px 2px 0 #fff7; }
.hole.filled .shape { background: var(--piece-color); box-shadow: inset -4px -5px 0 #664b3424, 0 3px 8px #6c563d33; }
.hole:not(.filled):active { background: #fff3; }
.shape { display: block; width: min(25vw, 94px); height: min(25vw, 94px); }
.circle { border-radius: 50%; }
.square { border-radius: 10px; }
.triangle { clip-path: polygon(50% 3%, 99% 94%, 1% 94%); }
.tray-label { font-size: 15px; }
.tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 520px; margin: 13px auto 0; }
.piece { position: relative; z-index: 2; min-height: 126px; border: 2px solid #e1dccf; border-radius: 22px; background: #fffefa; box-shadow: 0 4px 0 #e4ddce; touch-action: none; user-select: none; -webkit-user-select: none; }
.piece .shape { width: min(20vw, 82px); height: min(20vw, 82px); background: var(--piece-color); box-shadow: inset -5px -5px 0 #624c3026, 2px 4px 6px #6a563b25; pointer-events: none; }
.piece[data-shape="circle"], .hole[data-shape="circle"] { --piece-color: #d97f6b; }
.piece[data-shape="square"], .hole[data-shape="square"] { --piece-color: #e2ae4b; }
.piece[data-shape="triangle"], .hole[data-shape="triangle"] { --piece-color: #6d9e85; }
.piece[aria-pressed="true"] { border-color: #276851; background: #eef6ed; box-shadow: 0 0 0 3px #27685133; }
.piece.dragging { z-index: 10; cursor: grabbing; transition: none; box-shadow: 0 10px 24px #56452c3d; }
.piece[hidden], .again[hidden] { display: none; }
.feedback { min-height: 27px; margin: 20px 0 0; color: #255e4f; text-align: center; font-size: 16px; font-weight: 800; }
.again { display: block; margin: 14px auto 0; padding: 12px 25px; border: 0; border-radius: 10px; background: #245f50; color: white; font-weight: 800; cursor: pointer; }
.parent-prompt { margin: 20px 0 0; padding: 14px 17px; border-left: 3px solid #7caa8d; background: #f0f5ed; font-weight: 700; line-height: 1.7; }
.guide, .research { margin-top: 56px; }
.section-kicker { margin: 0 0 8px; color: #39715f; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.guide h2, .research h2 { margin: 0 0 12px; font-size: clamp(23px, 4vw, 30px); letter-spacing: .02em; }
.section-lead { max-width: 690px; margin: 0; color: #52635d; font-size: 15px; line-height: 1.9; }
.guide-steps { display: grid; gap: 0; margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid #dce4da; }
.guide-steps li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; padding: 22px 4px; border-bottom: 1px solid #dce4da; }
.step-number { padding-top: 2px; color: #6c9b83; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.guide-steps h3, .research-points h3 { margin: 0 0 6px; font-size: 18px; }
.guide-steps p, .research-points p { margin: 0; color: #52635d; font-size: 14px; line-height: 1.9; }
.guide-close { margin: 17px 0 0; color: #53645b; font-size: 13px; line-height: 1.8; }
.research { padding-top: 36px; border-top: 1px solid #dce4da; }
.research-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 29px; }
.research-points > div { padding-top: 14px; border-top: 3px solid #8db49b; }
.research-points h3 { font-size: 16px; }
.research a { color: #246052; text-underline-offset: 3px; }
.research-limit { margin: 30px 0 0; padding: 16px 19px; border-left: 3px solid #b69b6c; background: #f5f1e7; color: #4f5a52; font-size: 13px; line-height: 1.9; }
.sources { margin-top: 30px; padding-top: 21px; border-top: 1px solid #dce4da; }
.sources h3 { margin: 0 0 9px; font-size: 14px; }
.sources ol { margin: 0; padding-left: 23px; }
.sources li { padding: 5px 0; color: #647067; font-size: 12px; line-height: 1.8; }
@media (max-width: 600px) {
  .header { min-height: 60px; }
  .page { padding: 25px 14px 75px; }
  .intro { font-size: 14px; }
  .game { padding: 20px 11px; border-radius: 17px; }
  .board { gap: 4px; min-height: 147px; padding: 7px; border-radius: 17px; }
  .hole { min-height: 120px; }
  .hole .shape { width: min(25vw, 87px); height: min(25vw, 87px); }
  .tray { gap: 7px; }
  .piece { min-height: 104px; border-radius: 15px; }
  .piece .shape { width: min(20vw, 72px); height: min(20vw, 72px); }
  .guide, .research { margin-top: 46px; }
  .section-lead { font-size: 14px; }
  .guide-steps li { grid-template-columns: 35px minmax(0, 1fr); gap: 8px; padding: 19px 2px; }
  .guide-steps h3 { font-size: 16px; }
  .research-points { grid-template-columns: 1fr; gap: 23px; }
}
@media (prefers-reduced-motion: no-preference) { .hole.filled .shape { animation: settle .28s ease-out; } @keyframes settle { from { transform: scale(1.15); } to { transform: scale(1); } } }
