:root {
  color-scheme: light;
  --ink: #173a35; --muted: #52655b; --paper: #f6f0df; --card: #fff9ea; --line: #c7c5ad;
  --forest: #102e2d; --cream: #fff2c8; --gold: #efbe6a; --text-main: var(--ink); --text-sub: var(--muted);
  --card-bg: var(--card); --sub-button-border: var(--line); --button-bg: #18644f;
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; overflow-wrap: anywhere; background: radial-gradient(ellipse at 88% 0%, #f7e8c8, transparent 780px), var(--paper); }
button, input, select { font: inherit; }
button, select, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #b54b29; outline-offset: 3px; }
.page { max-width: 1176px; margin-inline: auto; padding: 0 max(18px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); }
.masthead, .wordmark, .directory-head, .directory-heading, .sort-row, .finder, .site-footer { display: flex; align-items: center; }
.masthead { min-height: 66px; justify-content: space-between; gap: 10px; }
.wordmark { gap: 9px; font-weight: 830; letter-spacing: -.045em; white-space: nowrap; }
.brand-mark { flex: none; width: 32px; height: 32px; border: 2px solid var(--forest); border-radius: 50%; background: #24352a url("IMG_7589.JPG") 50% 35% / 142% auto; }
.masthead [data-lab-toolbar] { min-width: 0; overflow: clip; padding: 5px; margin: -5px; }
.masthead .lab-language-bar { margin: 0; gap: 6px; }
.masthead .lab-sound-toggle, .masthead .lab-language-select { min-height: 44px; border-color: var(--line); color: var(--ink); background-color: var(--card); border-radius: 8px; }
.masthead .lab-sound-toggle { min-width: 44px; margin: 0; }
.hero {
  position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.36fr);
  align-items: center; background: var(--forest); color: var(--cream); border-radius: 22px; overflow: hidden;
  border: 2px solid var(--forest); box-shadow: 0 5px 0 #233d32;
}
.hero-copy { position: relative; z-index: 1; padding: 32px clamp(23px, 3.3vw, 48px); }
.hero-copy::before { content: ""; display: block; width: 58px; height: 4px; margin-bottom: 21px; background: repeating-linear-gradient(100deg,var(--gold) 0 8px, transparent 8px 11px); }
.hero h1 { margin: 0; font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif; font-weight: 900; font-size: clamp(38px, 4.7vw, 66px); line-height: 1.19; letter-spacing: -.045em; text-wrap: balance; }
.hero p { color: #f4d89e; font-size: clamp(13px, 1.4vw, 17px); margin: 16px 0 0; line-height: 1.6; }
.park-map { position: relative; isolation: isolate; width: 100%; aspect-ratio: 3/2; }
.hero-art { display: block; position: absolute; z-index: -1; width: 100%; height: 100%; object-fit: fill; }
.map-pin { --marker: #fc996d; position: absolute; transform: translate(-50%,-50%); min-height: 44px; padding: 4px; background: none; border: 0; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-size: clamp(11px,1.2vw,16px); font-weight: 800; line-height: 1.1; color: var(--cream); }
.map-pin > * { background: #143430; border: 1.5px solid var(--marker); padding: 6px 9px 6px 15px; border-radius: 4px; box-shadow: 0 3px 0 #0c2726; }
.map-pin i { position: relative; background: var(--marker); color: #12322b; border-radius: 50%; padding: 0; margin-right: -9px; font: 900 18px/25px Georgia,serif; width: 26px; height: 26px; }
.map-pin.popular { --marker:#ffe29b; left: 3%; top: 89%; transform: translateY(-50%); }
.map-pin.action { left: 23%; top: 52%; }
.map-pin.puzzle { --marker:#89e1c6; left: 73%; top: 34%; }
.map-pin.timing { --marker:#ffd77a; left: 72%; top: 78%; }
.map-pin[aria-pressed="true"] > span { background: var(--marker); color: #0b3029; }
.map-pin:hover > span, .map-pin:focus-visible > span { outline: 2px solid var(--cream); }
.map-pin:disabled { opacity: .55; cursor: default; }
.notice { display: none; margin: 12px 0 0; padding: 10px 14px; border-inline-start: 3px solid #ae6632; background: #fff7df; font-size: 13px; }
.play-summary { margin-top: 20px; }
.play-summary dl {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px;
  margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  background: var(--line); font-variant-numeric: tabular-nums;
}
.play-summary dl > div { padding: 11px 14px; background: var(--card); }
.play-summary dl > div:nth-child(-n+2) { background: #e8ecd9; }
.play-summary dt { color: var(--muted); font-size: 13px; font-weight: 650; }
.play-summary dd { margin: 3px 0 0; font-size: clamp(19px, 2.6vw, 29px); font-weight: 800; line-height: 1.2; }
.play-summary small { color: var(--muted); font-size: 12px; font-weight: 600; }
.summary-feedback { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.summary-feedback button { min-height: 44px; padding: 4px 10px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 7px; }
@media (max-width: 620px) {
  .play-summary dl { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .play-summary dl > div { grid-column: span 2; padding: 8px 10px; }
  .play-summary dl > div:nth-child(-n+2) { grid-column: span 3; }
}
.directory { margin-top: clamp(29px, 4vw, 56px); }
.directory-head { gap: 8px 15px; justify-content: space-between; flex-wrap: wrap; }
.directory-heading { gap: 9px; }
.directory h2, .section-title { margin: 0; font-size: clamp(24px, 3vw, 36px); line-height: 1.23; font-weight: 850; letter-spacing: -.045em; }
#directoryTitle { scroll-margin-block-start: 14px; }
.game-count { display: inline-grid; place-items: center; min-width: 30px; padding: 4px 7px; background: #dfe5cb; border: 1px solid #b8c6a7; border-radius: 5px; font: 750 13px/1 ui-monospace,monospace; }
.sort-row { gap: 8px; min-width: 0; max-width: 100%; }
.sort-label { font-size: 13px; color: var(--muted); }
.sort-select, .finder button { min-height: 44px; padding: 6px 9px; background: var(--card); color: var(--ink); font-size: 13px; border: 1px solid var(--line); border-radius: 7px; }
.sort-select { min-width: 0; max-width: 100%; }
.sort-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.directory:has(.sort-select:disabled) .sort-status { position: static; width: auto; height: auto; clip-path: none; color: var(--muted); font-size: 13px; }
.finder { gap: 8px; margin: 12px 0 18px; flex-wrap: wrap; }
.search-field { display: flex; align-items: center; position: relative; min-width: min(100%,230px); max-width: 540px; flex: 1; }
.search-field i { position: absolute; left: 13px; width: 13px; height: 13px; border: 1.8px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search-field i::after { content: ""; position: absolute; width: 6px; height: 2px; background: var(--muted); transform: rotate(48deg); top: 10px; left: 8px; }
.search-field input { appearance: none; min-height: 44px; width: 100%; padding: 8px 12px 8px 37px; font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 7px; }
.search-field input::placeholder { color: #677168; opacity: 1; }
.finder button { font-weight: 700; }
.empty-results { padding-block: 20px; }
#gameList { --cols: 4; --gap: 16px; display: grid; grid-template-columns: repeat(var(--cols), minmax(0,1fr)); column-gap: var(--gap); row-gap: 0; overflow-anchor: none; }
.game-card { --accent: #a2d4bc; --chip: #284b42; min-width: 0; display: grid;  grid-template-columns: minmax(0,1fr); padding-bottom: var(--gap); }
.game-card[data-area="action"] { --accent: #ffc195; --chip: #774125; }
.game-card[data-area="puzzle"] { --accent: #a7e2c7; --chip: #23584b; }
.game-card[data-area="timing"] { --accent: #f6d982; --chip: #705319; }
.game-card .game-title { margin: 0; min-width: 0; font: inherit; }
.accordion-toggle { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; text-align: start; padding: 0; overflow: hidden; color: var(--ink); background: var(--card); border: 1px solid #b8b9a3; border-radius: 9px; box-shadow: 0 2px 0 #c5c2aa; }
.poster { display: grid; place-items: center; position: relative; width: 100%; aspect-ratio: 19/10; overflow: hidden; background: repeating-linear-gradient(125deg,#31524d 0 14px,#2c4a45 14px 28px); }
.printed-cover,.live-cover { position: absolute; inset: 0; width: 100%; height: 100%; }
.printed-cover { background-image: url("game-posters.webp"); background-size: 600% 800%; }
.live-cover { object-fit: cover; }
.poster-symbol { font-size: 34px; color: var(--cream); }
.game-caption { width: 100%; padding: 11px 12px 12px; display: grid; gap: 5px; }
.ticket-meta { display: flex; min-height: 1em; color: var(--chip); }
.area-label { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 750; }
.area-label i { display: inline-grid; place-items: center; border-radius: 50%; width: 16px; height: 16px; background: var(--accent); font: 800 12px/1 Georgia,serif; }
.accordion-title-text { font-size: clamp(16px,1.8vw,21px); font-weight: 850; letter-spacing: -.035em; line-height: 1.35; }
.release-date { color: var(--muted); font: 600 10px/1.3 ui-monospace,monospace; letter-spacing: .05em; }
#popularInfo p { margin: 0 0 12px; color: var(--muted); }
#popularInfo p:empty { display: none; }
.monthly-count { display: flex; align-items: center; gap: 7px; border-top: 1px dashed var(--line); padding: 6px 10px; width: 100%; margin-top: auto; font-size: 13px; font-weight: 700; }
.monthly-count b { background: #174c40; color: #fff3cf; padding: 2px 6px; border-radius: 4px; }
html:has(.game-dialog[open]) { overflow: hidden; }
.game-dialog {
  width: min(550px, calc(100% - 24px)); max-width: none;
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 0; border: 1px solid #9aa58c; border-radius: 15px; color: var(--ink); background: var(--card);
  box-shadow: 0 12px 60px #08251e66; overflow-y: auto; overscroll-behavior: contain;
}
.game-dialog::backdrop { background: #0a211ed9; }
.dialog-head { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 12px 9px 17px; background: var(--forest); color: var(--cream); }
.dialog-head h2 { font-size: clamp(18px,4.4vw,25px); margin: 0; }
.dialog-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #d2c49d; color: var(--cream); background: transparent; font-size: 26px; }
.game-dialog .accordion-content { display: grid; gap: 14px; padding: 16px; }
.game-thumbnail { display: block; max-width: 480px; width: 100%; margin: 0 auto; }
.game-thumbnail img { width: 100%; display: block; height: auto; border-radius: 6px; }
.game-description { margin: 0; font-size: 15px; line-height: 1.7; }
.stats,.stat-box,.actions { display: flex; align-items: center; flex-wrap: wrap; }
.stats { gap: 8px 20px; border-block: 1px dashed var(--line); padding-block: 8px; }
.stat-box { gap: 5px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-weight: 750; }
.actions { gap: 7px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border: 1px solid #144e3f; border-radius: 7px; color: white; background: #165643; font-size: 14px; font-weight: 750; text-decoration: none; text-align: center; }
.actions > .button:first-child:not(.secondary)::before { content: ""; border-block: 5px solid transparent; border-inline-start: 8px solid currentColor; margin-inline-end: 8px; }
.button.secondary { color: var(--ink); background: #e9eddd; border-color: #a7b7a4; }
.button.share-button { background: var(--card); border-color: var(--line); }
.button:disabled { color: var(--muted); background: #f0eddf; border-color: var(--line); }
.detail-link-wrap { display: flex; }
.supporter-area { margin-block: 46px 32px; }
#supporterList { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-top: 14px; }
.diagnosis-banner-link,.diagnosis-banner-img { display: block; width: 100%; }
.diagnosis-banner-img { height: auto; aspect-ratio: 3/1; border-radius: 9px; }
.supporter-card { display: grid; align-content: center; justify-items: start; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.supporter-title { font-size: 18px; margin: 0; }
.site-footer { flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; }
.site-footer p { margin: 0; }
.footer-title { font-weight: 750; }
.footer-link { display: inline-flex; align-items: center; min-height: 44px; }
.copyright { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: max(18px,env(safe-area-inset-bottom)); transform: translateX(-50%); opacity: 0; padding: 12px 16px; pointer-events:none; color: white; background: var(--forest); border-radius: 9px; max-width: 90vw; width: max-content; z-index: 25; }
.toast.show { opacity: 1; }
@media (min-width: 720px) {
  .hero-copy { margin-inline: 17px; border-block: 1px dashed #d2b77b70; }
}
@media (min-width: 611px) and (max-width: 940px) {
  #gameList { --cols: 3; --gap: 12px; }
}
@media (max-width: 610px) {
  .page { padding-inline: max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right)); }
  .masthead { min-height: 55px; }
  .masthead .lab-language-label { display: none; }
  .masthead .lab-sound-toggle { padding-inline: 8px; }
  .masthead .lab-language-select { min-width: 0; max-width: 32vw; padding-right: 6px; }
  .hero { display: block; border-radius: 14px; }
  .hero-copy { padding: 15px 16px 6px; }
  .hero-copy::before { display: none; }
  .hero h1 { font-size: clamp(26px,7.2vw,42px); }
  .hero p { margin: 3px 0 0; font-size: 13px; }
  .map-pin { font-size: 11px; }
  .map-pin i { width: 23px; height: 23px; line-height: 22px; }
  .directory { margin-top: 23px; }
  .directory-head { gap: 6px; }
  .directory-heading { gap: 5px; }
  .sort-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .sort-select { max-width: 44vw; }
  .finder { margin: 7px 0 12px; }
  #gameList { --cols: 2; --gap: 10px; }
  .game-caption { padding: 8px 9px 10px; gap: 4px; }
  .actions .button { flex-grow: 1; padding-inline: 11px; }
  .detail-link-wrap { flex-grow: 2; }
  #supporterList { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .wordmark { font-size: 14px; gap: 5px; }
  .masthead .sound-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
}
@media (hover:hover) {
  .accordion-toggle:hover { border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
  .button:hover { filter: brightness(.92); }
}
@media (prefers-reduced-motion:no-preference) {
  .map-pin { transition: scale .16s ease-out; }
  .map-pin:active { scale: .96; }
  .game-dialog[open] { animation: ticket-in .17s ease-out; }
  @keyframes ticket-in { from { opacity: .5; } to { opacity: 1; } }
}

.footer-links, .guide-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px; }
.guide { max-width: 960px; }
.guide .wordmark { white-space: normal; text-decoration: none; }
.guide-head { background: var(--forest); color: var(--cream); padding: clamp(18px, 4vw, 38px); border-radius: 16px; }
.guide-head h1 { margin: 0; font: 800 clamp(26px, 5vw, 43px)/1.25 "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif; }
.guide-head p { margin: 8px 0 0; line-height: 1.6; }
.guide-nav { margin-top: 12px; }
.guide section { margin-block: 24px; }
.guide h2 { margin: 0; padding-bottom: 6px; border-bottom: 2px solid var(--forest); font-size: 22px; }
.guide ul { list-style: none; margin: 0; padding: 0; }
.guide li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.guide h3, .guide li p { margin: 0; }
.guide li p { line-height: 1.65; }
.guide h3 a, .guide-nav a, .guide .ranking-link { display: inline-flex; align-items: center; min-height: 44px; }
.guide h3 a { font-size: 18px; text-underline-offset: 3px; }
.guide-cover { width: clamp(80px, 22vw, 136px); height: auto; margin-inline-end: 12px; border-radius: 6px; }
.guide .ranking-link { font-size: 13px; color: var(--muted); }
