:root {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  color: #253e37; background: #eceee6; font-synthesis: none;
  --ink: #253e37; --green: #1d5148; --muted: #697b6c; --paper: #fffcf2; --line: #d3d9cc;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 90% 10%, #e0e8da, transparent 50%); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; transition: background .15s, color .15s; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #cc7536; outline-offset: 4px; }
button, h1, h2, h3, p { margin-top: 0; }
.masthead, .workspace { width: min(760px, calc(100% - 48px)); margin-inline: auto; }
.masthead { height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #c9d1c3; }
.back-link { color: var(--muted); text-decoration: none; font: 600 10px/1.4 monospace; letter-spacing: .1em; display: flex; align-items: center; min-height: 44px; gap: 9px; }
.project-mark { display: flex; align-items: center; gap: 8px; font: 700 11px/1.3 monospace; letter-spacing: .1em; }
.project-mark i { width: 25px; height: 25px; border: 1px solid var(--green); border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-style: normal; }
.quiet-button { min-height: 44px; border: 0; background: transparent; font-size: 12px; font-weight: 700; }
.quiet-button span { display: inline-grid; place-items: center; margin-left: 6px; width: 20px; height: 20px; border: 1px solid #819382; border-radius: 50%; }
.page-heading { padding: 24px 0 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.eyebrow { color: var(--muted); font: 600 9px/1.4 monospace; letter-spacing: .14em; margin-bottom: 9px; }
h1 { margin-bottom: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; letter-spacing: .08em; line-height: 1.2; }
h1 > span { color: #b27840; }
.heading-note { color: #77836e; font-family: "Yu Mincho", serif; font-size: 13px; line-height: 1.9; letter-spacing: .1em; margin: 0 4px 0 0; }
.map-panel { background: #f9fbf2; border: 1px solid #c4d0bf; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 0 #dde1d6; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 18px 23px 10px; gap: 12px; }
.small-label { font: 700 9px/1.6 monospace; letter-spacing: .12em; color: var(--muted); }
.panel-heading h2 { margin: 3px 0 0; font-size: 17px; letter-spacing: .08em; }
.map-edition { display: grid; justify-items: end; }
#map-number { font: 500 9px/1.4 monospace; color: var(--muted); }
.text-button { border: 0; background: none; font-size: 11px; padding: 4px 0 0 10px; min-height: 44px; color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.map-live-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 4px 18px 10px; border: 1px solid #d0dcc7; border-radius: 4px; background: #eef3e5; overflow: hidden; }
.map-live-summary > div { padding: 12px 16px; min-width: 0; }.map-live-summary > div + div { border-left: 1px solid #d0dcc7; }
.metric-label { display: block; font-size: 10px; color: var(--muted); margin-bottom: 5px; letter-spacing: .03em; }
.map-live-summary strong { font: 500 30px/1.1 Georgia, serif; font-variant-numeric: tabular-nums; }.map-live-summary p { margin: 0; }
.map-multiplier p { color: #a16d2e; font: 500 19px/1.2 Georgia, serif; }.map-multiplier strong { font-size: 27px; }
.map-score { background: #f7f3e4; }.map-score.is-ready { background: #e0edd4; }.map-score small { margin-left: 7px; color: #829170; font-size: 9px; white-space: nowrap; }
.map-controls { display: grid; grid-template-columns: 44px auto 1fr; align-items: center; gap: 6px; padding: 0 18px; }
.map-controls .undo-button, .map-controls .reset-button { min-height: 44px; padding: 6px 12px; border: 1px solid #cbd6c2; border-radius: 4px; background: #f0f5e8; color: #496747; font-size: 11px; }
.map-controls .undo-button { padding: 0; font-size: 24px; }.map-controls .reset-button { min-width: 68px; white-space: nowrap; }.map-controls button:disabled { opacity: .45; }.map-controls button:not(:disabled):hover { background: #e1ecd4; }
.map-controls .primary-button { justify-self: end; width: auto; min-height: 44px; padding: 10px 14px; font-size: 12px; gap: 8px; white-space: nowrap; }.map-controls .primary-button:disabled { opacity: 1; }.map-controls .primary-button:not(:disabled):hover { background: #2c6856; }
.map-progress { display: flex; align-items: center; gap: 10px; padding: 12px 20px 0; color: #75856a; font-size: 10px; }
#visited-count { padding: 5px 7px; border-radius: 3px; background: #e6eede; color: #456647; font: 700 11px/1 monospace; }.map-progress > span:last-child { margin-left: auto; font-size: 9px; }
.route-map { position: relative; width: calc(100% - 10px); max-width: 660px; aspect-ratio: 720 / 544; margin: 0 auto; }
.map-feedback { margin: 0 20px 12px; min-height: 34px; color: #617357; font-size: 11px; line-height: 1.7; }.map-feedback.is-warning { color: #9d4a38; }.map-feedback.is-ready { color: #276042; font-weight: 700; }
#map-art { width: 100%; height: 100%; display: block; }
#grid-labels text { font: 11px monospace; fill: #92a187; text-anchor: middle; }
.route-line { stroke: #527860; stroke-width: 4.5; stroke-linecap: round; fill: none; }
.route-line.is-last { stroke: #244f44; stroke-width: 5.5; }
.route-arrow { fill: #527860; }
.preview-line { stroke: #a88542; stroke-width: 3; stroke-dasharray: 7 7; fill: none; }
.preview-label rect { fill: #fff8df; stroke: #d0b879; rx: 5; }.preview-label text { fill: #866729; font: 700 17px monospace; text-anchor: middle; dominant-baseline: central; }
.station { position: absolute; width: 58px; height: 58px; transform: translate(-50%, -50%); padding: 0; border: 0; border-radius: 50%; background: transparent; z-index: 2; }
.station-dot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 33px; height: 33px; border: 3px solid var(--point-color); border-radius: 50%; color: var(--point-color); background: #f9fbf2; font: 800 14px/1 monospace; box-shadow: 0 0 0 4px #f9fbf2; }
.station.is-visited .station-dot { background: var(--point-color); color: white; }
.station.is-current .station-dot { box-shadow: 0 0 0 4px #f9fbf2, 0 0 0 6px var(--point-color); }
.station.is-bonus .station-dot { outline: 1px dashed #b18849; outline-offset: 7px; }
.station.is-bonus-next .station-dot { outline-style: solid; outline-color: #aa7c2e; background: #fff0c5; }
.station:hover .station-dot, .station:focus-visible .station-dot { scale: 1.08; }
.visit-number { position: absolute; right: 0; top: -2px; min-width: 18px; height: 18px; border-radius: 50%; background: #eef3e5; color: #5c7752; font: 700 10px/18px monospace; border: 1px solid #b7caaa; }
.visit-number[hidden], .station-caption[hidden] { display: none; }
.station-caption { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); padding: 2px 4px; border: 1px solid #d8c58f; border-radius: 3px; background: #fff6db; color: #8b6c31; font-size: 9px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.station-start .station-caption { color: var(--green); border: 0; background: #f9fbf2; font: 700 9px/1.4 monospace; letter-spacing: .1em; }
.bonus-section { border-top: 1px solid #d9e1d1; padding: 15px 18px 13px; background: #f0f4e8; }
.bonus-section > .small-label { font-family: inherit; font-size: 11px; letter-spacing: .02em; margin-bottom: 10px; }.bonus-section > p > span { float: right; font-size: 9px; font-weight: 500; color: #7d8e73; }
.bonus-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.bonus-card { padding: 11px 12px; border: 1px solid #d3d8bd; border-radius: 4px; background: #fffdf0; }
.bonus-condition { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.point-swatch { width: 22px; height: 22px; flex: 0 0 22px; display: inline-grid; place-items: center; border-radius: 50%; border: 2px solid var(--point-color); color: var(--point-color); background: #fcfff6; font: 800 12px monospace; }
.bonus-condition > strong { margin-left: auto; color: #a26d28; font: 700 19px Georgia, serif; white-space: nowrap; }
.bonus-state { display: block; margin-top: 7px; font-size: 9px; color: #8d947e; letter-spacing: .03em; }
.bonus-card.matched { background: #e4efda; border-color: #73966e; }.bonus-card.matched .bonus-state { color: #3f7149; font-weight: 700; }
.bonus-card.missed { background: #eceee4; border-color: #d6dccb; }.bonus-card.missed .bonus-condition { opacity: .65; }
.bonus-caption { font-size: 9px; color: #869176; margin: 10px 0 0; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 14px 17px; color: #fff9e8; background: var(--green); border: 1px solid var(--green); border-radius: 3px; font-size: 13px; font-weight: 700; letter-spacing: .03em; }.primary-button:not(:disabled):hover { background: #2c6856; }.primary-button:disabled { color: #919681; background: #e4e6d8; border-color: #daddcb; }
.score-context { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 11px 18px; border-top: 1px solid #d9e1d1; background: #f8faf1; }
.score-formula { color: #7d8b70; font: 500 9px/1.6 monospace; margin: 0; }.score-formula > span { font-size: 8px; color: #919b85; white-space: nowrap; }
.best-score { font-size: 10px; color: #4c704a; margin: 0; }
.page-footnote { margin: 20px 0 25px; display: flex; justify-content: space-between; gap: 12px; color: #7d8875; font-size: 10px; }.page-footnote span { font: 500 9px/1.5 monospace; }
dialog { width: min(460px, calc(100% - 32px)); border: 1px solid #d9dccc; border-radius: 7px; padding: 26px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 100px #152e3544; max-height: calc(100dvh - 32px); overflow-y: auto; }
dialog::backdrop { background: #203c38a1; backdrop-filter: blur(4px); }
.dialog-header, .result-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.close-button { min-width: 44px; min-height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: #76806b; font-size: 24px; padding: 0; border-radius: 50%; }.close-button:hover { background: #edf0e1; }
.intro-illustration { position: relative; width: min(238px, calc(100% - 16px)); margin: 15px auto 25px; padding: 16px; color: var(--green); border: 1px solid #b5b594; border-radius: 3px; background: #eef0dc; box-shadow: 4px 5px 0 #dfe2d1; transform: rotate(-5deg); }
.intro-illustration span { display: block; font: 600 9px monospace; letter-spacing: .15em; border-bottom: 1px solid #acb194; padding-bottom: 6px; }.intro-illustration b { display: block; font: 700 clamp(16px, 4.8vw, 20px)/1.3 monospace; margin: 12px 0; }.intro-illustration i { display: block; font-size: 11px; font-style: normal; }.intro-illustration em { position: absolute; right: 15px; bottom: 12px; font-size: 25px; color: #af7343; }
.help-dialog h2 { text-align: center; font-family: "Yu Mincho", serif; font-size: 24px; margin-bottom: 22px; }
.help-steps { list-style: none; counter-reset: steps; padding: 0; margin: 0; display: grid; gap: 15px; }
.help-steps li { counter-increment: steps; position: relative; padding-left: 31px; }.help-steps li::before { content: "0" counter(steps); position: absolute; top: 2px; left: 0; color: #9a7b44; font: 700 12px/1.4 monospace; }.help-steps strong { display: block; font-size: 12px; margin-bottom: 4px; }.help-steps span { display: block; font-size: 11px; line-height: 1.7; color: #717e64; }
.help-reassurance { font-size: 10px; color: #869075; margin: 22px 0 14px; text-align: center; line-height: 1.7; }
.result-dialog { background: #ebeee2; padding: 20px 24px 24px; }.result-top { margin-bottom: 10px; }
.issued-ticket { position: relative; padding: 20px 20px 15px; background: repeating-linear-gradient(25deg, transparent 0 5px, #baac7d10 5px 6px), #f8efcf; border: 1px solid #c4b990; border-radius: 3px; box-shadow: 3px 4px 0 #d6d6bf; }
.ticket-top { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #52644d; padding-bottom: 8px; font-size: 10px; letter-spacing: .08em; }.ticket-top span:last-child { font: 600 8px monospace; color: #879071; }
.ticket-label { text-align: center; font-family: inherit; margin: 22px 0 7px; font-size: 10px; }
#result-title { text-align: center; margin: 0 0 17px; }#ticket-score { font: 500 53px/1.1 Georgia, serif; letter-spacing: -.03em; }#result-title > span { font: 600 13px monospace; margin-left: 7px; color: #7d8a69; }
.ticket-route { font: 700 11px/1.9 monospace; text-align: center; color: #6f795d; overflow-wrap: anywhere; }
.ticket-numbers { display: flex; gap: 15px; padding: 12px 0; border-block: 1px solid #c9c8a9; }.ticket-numbers p { display: flex; align-items: baseline; gap: 9px; margin: 0; flex: 1; }.ticket-numbers span { font-size: 9px; color: #7d8466; white-space: nowrap; }.ticket-numbers strong { font: 600 21px/1.2 Georgia, serif; }
.ticket-calculation { margin: 9px 0 15px; font: 500 10px/1.6 monospace; text-align: center; color: #8c8d6e; }
.ticket-bonuses { display: grid; gap: 7px; margin-bottom: 18px; }.ticket-bonus { padding: 9px 10px; display: flex; align-items: center; justify-content: space-between; gap: 7px; border: 1px dashed #bcb88e; color: #8b8e72; font-size: 10px; }.ticket-bonus strong { font-size: 13px; }.ticket-bonus.matched { border: 1px solid #83a26d; color: #456f46; background: #e6edcc; }.ticket-bonus.missed { opacity: .65; }
.ticket-perforation { border-top: 2px dashed #c7c4a2; margin-inline: -20px; }
.ticket-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 13px; color: #8c8b6a; font-size: 8px; }.ticket-bottom span:first-child { font-family: monospace; }
.result-message { margin: 20px 0 17px; font-size: 12px; text-align: center; color: #59704f; line-height: 1.8; }
.result-actions { display: grid; gap: 8px; }.secondary-button { width: 100%; min-height: 48px; border: 1px solid #b9c9ae; border-radius: 3px; background: transparent; color: var(--green); font-size: 12px; font-weight: 700; }.secondary-button:hover { background: #dde8d1; }
@media (max-width: 720px) {
  .masthead, .workspace { width: min(540px, calc(100% - 24px)); }.masthead { height: 58px; gap: 8px; }.back-link { font-size: 8px; letter-spacing: .03em; gap: 4px; }.project-mark { font-size: 8px; letter-spacing: .03em; gap: 5px; }.project-mark i { width: 21px; height: 21px; }.quiet-button { font-size: 11px; }
  .page-heading { padding: 22px 0 20px; }.eyebrow { font-size: 7px; letter-spacing: .06em; }.heading-note { font-size: 10px; letter-spacing: .03em; }h1 { font-size: 30px; }
  .panel-heading { padding: 14px 15px 6px; }.panel-heading h2 { font-size: 15px; }
  .map-live-summary { margin: 4px 12px 9px; }.map-live-summary > div { padding: 10px 11px; }.metric-label { font-size: 9px; }.map-live-summary strong { font-size: 27px; }.map-multiplier strong { font-size: 24px; }.map-multiplier p { font-size: 15px; }.map-score small { margin-left: 4px; font-size: 8px; }
  .map-controls { padding-inline: 12px; }.map-controls .primary-button { padding-inline: 11px; font-size: 11px; }.map-progress { padding: 12px 14px 0; gap: 8px; }.map-feedback { margin: 0 15px 12px; font-size: 10px; }
  .route-map { width: calc(100% - 8px); margin-bottom: 4px; }.station { width: 48px; height: 48px; }.station-dot { width: 27px; height: 27px; border-width: 2px; font-size: 12px; }.station-caption { top: calc(50% + 21px); font-size: 8px; padding: 1px 3px; }.visit-number { width: 16px; height: 16px; min-width: 16px; font-size: 9px; line-height: 15px; top: -1px; right: 0; }.station-start .station-caption { font-size: 8px; }
  .bonus-section { padding: 12px; }.bonus-section > p > span { display: none; }.bonus-card { padding: 10px 8px; }.bonus-cards { gap: 7px; }.bonus-condition { font-size: 10px; gap: 4px; }.bonus-condition > strong { font-size: 18px; }.bonus-state { font-size: 8px; }.point-swatch { width: 21px; height: 21px; flex-basis: 21px; font-size: 11px; }
  .score-context { padding: 10px 12px; }.page-footnote { align-items: flex-start; font-size: 9px; line-height: 1.7; }.page-footnote span { white-space: nowrap; font-size: 7px; }
  dialog { padding: 19px; }.help-dialog h2 { font-size: 22px; }.intro-illustration { margin-block: 9px 24px; }.result-dialog { padding: 16px; }.issued-ticket { padding: 17px 14px 14px; }.ticket-perforation { margin-inline: -14px; }.ticket-numbers strong { font-size: 20px; }.ticket-numbers { gap: 9px; }
}
@media (max-width: 360px) {
  .heading-note { display: none; }.project-mark { font-size: 7px; }.project-mark i { display: none; }.back-link span { font-size: 7px; }
  .map-live-summary > div { padding-inline: 8px; }.map-live-summary strong { font-size: 24px; }.map-multiplier strong { font-size: 22px; }.map-controls { gap: 4px; }.map-controls .reset-button { min-width: 58px; padding-inline: 6px; }.map-controls .primary-button { padding-inline: 8px; gap: 6px; }
  .bonus-condition > strong { font-size: 16px; }.ticket-numbers p { display: grid; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
