@charset "UTF-8";
:root {
  color-scheme: dark;
  --bg: #14171b;
  --surface: #1c2025;
  --surface-hover: #242a30;
  --line: #343b43;
  --text: #f4f5f6;
  --muted: #adb5be;
  --subtle: #87919c;
  --lime: #b5f36b;
  --lime-hover: #c7ff89;
  --radius: 14px;
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); line-height: 1.5; background: var(--bg); }
body.is-playing { background: #101316; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .45; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 5px; }
button, a, input { transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease; }
button svg, a svg, h2 svg, summary svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
button, input { border-radius: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; top: -100px; left: 20px; padding: 12px 20px; background: var(--lime); color: #182111; border-radius: 8px; }
.skip-link:focus { top: 12px; }
h1, h2, p { margin-top: 0; }
.header-inner, .catalog-main { max-width: 1280px; padding-left: 40px; padding-right: 40px; margin: auto; }
.header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 800; letter-spacing: -.06em; white-space: nowrap; }
.brand svg { width: 34px; height: 30px; color: var(--lime); stroke: none; }
.brand-dot { color: var(--lime); }
.catalog-main { padding-top: 16px; padding-bottom: 48px; }
.game-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.game-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: border-color .16s ease; }
.game-card:hover, .game-card:focus-within { border-color: var(--lime); }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #99a5ac; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-card[data-game="iron-garden"] .card-media img { object-fit: contain; }
.device-tag { position: absolute; right: 12px; top: 12px; background: #14171be8; color: var(--text); border-radius: 6px; padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.device-tag svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.card-body { padding: 24px; }
.card-copy { min-width: 0; }
.card-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; margin-bottom: 10px; }
.card-title h2 { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 750; letter-spacing: -.035em; }
.card-genre { color: var(--muted); font-size: 13px; }
.card-copy p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; word-break: keep-all; overflow-wrap: break-word; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.card-launch::after { content: ""; position: absolute; inset: 0; }
.card-launch svg { fill: currentColor; stroke: none; width: 16px; height: 16px; }
.card-guide { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; color: var(--muted); }
.card-guide svg { width: 15px; height: 15px; }
.card-guide:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.recent-menu { position: relative; z-index: 3; }
.recent-menu summary { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; color: var(--muted); list-style: none; }
.recent-menu summary::-webkit-details-marker { display: none; }
.recent-menu summary:hover, .recent-menu[open] summary { color: var(--text); background: var(--surface-hover); }
.recent-popover { position: absolute; right: 0; top: calc(100% + 8px); width: min(280px,calc(100vw - 32px)); padding: 6px; background: var(--surface-hover); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px #0006; }
.recent-item { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px; border-radius: 6px; font-size: 14px; }
.recent-item:hover { background: #ffffff0a; }
.recent-item img { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; }
.recent-item span { min-width: 0; overflow-wrap: anywhere; }
.recent-item svg { width: 16px; margin-left: auto; }
#clear-recent { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--muted); text-align: left; font-size: 12px; }
#clear-recent:hover { color: var(--text); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; min-height: 44px; padding: 10px 16px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.button-primary { background: var(--lime); color: #17220e; }
.button-primary:hover { background: var(--lime-hover); }
.button-quiet { border-color: #39434a; background: #20272c; color: #ccd4db; }
.button-quiet:hover { background: #303b41; }
.button svg { width: 17px; height: 17px; }
.player-view { min-height: 100dvh; padding: 0 28px; }
.player-header { display: flex; align-items: center; gap: 24px; min-height: 86px; max-width: 1600px; margin: auto; }
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #b2bec8; min-height: 42px; white-space: nowrap; }
.back-link:hover { color: var(--lime); }
.back-link svg { width: 20px; height: 20px; }
.player-header h1 { font-size: 19px; margin: 0; padding-left: 23px; border-left: 1px solid #37424b; letter-spacing: -.035em; line-height: 1.3; }
.player-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.play-stage { position: relative; max-width: 1600px; width: 100%; height: min(calc(100dvh - 154px), 900px); min-height: 280px; margin: auto; background: #080a0d; border: 1px solid #323a43; border-radius: 12px; overflow: hidden; }
#frame-slot, #frame-slot iframe { display: block; width: 100%; height: 100%; border: 0; }
.frame-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: #12181e; z-index: 1; pointer-events: none; }
.frame-loading p { font-size: 14px; color: #c4ccd4; margin: 0; }
.loading-ring { width: 28px; height: 28px; border: 2px solid #35402e; border-top-color: var(--lime); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.play-stage:fullscreen { max-width: none; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; background: #080a0d; }
.player-footer { display: flex; align-items: flex-start; gap: 20px; justify-content: space-between; margin: auto; max-width: 1600px; padding: 15px 1px 20px; }
.player-help { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; min-width: 0; }
.player-footer details { position: relative; font-size: 14px; }
.player-footer summary { color: #bec9d2; padding: 4px 0; min-height: 28px; }
#controls-content { position: absolute; z-index: 2; bottom: 35px; left: 0; width: min(430px,85vw); padding: 20px; background: #232c33; border: 1px solid #52606b; box-shadow: 0 8px 28px #0009; border-radius: 12px; }
.control-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.control-row kbd { min-width: 54px; background: #13191e; border: 1px solid #586571; border-bottom-width: 2px; border-radius: 5px; padding: 3px 7px; text-align: center; font: 11px inherit; }
#controls-content p { margin: 15px 0 0; color: #c4ccd4; line-height: 1.7; word-break: keep-all; }
#player-message { color: var(--lime); font-size: 12px; margin: 4px 0 0; max-width: 470px; word-break: keep-all; }
.player-return-note { color: #939eaa; font-size: 13px; margin: 4px 0 0; word-break: keep-all; text-align: right; }
.device-notice { display: none; }
.noscript { padding: 30px; background: #2a3328; }
.site-footer { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 13px; margin-top: 24px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover, .text-link { color: var(--lime); text-decoration: underline; text-underline-offset: 4px; }
.site-footer { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 12px; }
.document-main { max-width: 840px; margin: auto; padding: 28px 24px 48px; line-height: 1.85; overflow-wrap: break-word; word-break: keep-all; }
.document-main h1 { font-size: clamp(28px,5vw,40px); line-height: 1.3; margin-bottom: 24px; }
.document-main h2 { margin: 32px 0 12px; font-size: 21px; }
.document-main p { color: var(--muted); }
.document-lead { font-size: 17px; }
.game-document { max-width: 1280px; padding: 16px 40px 48px; }
.document-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 20px; color: var(--muted); font-size: 14px; }
.document-back:hover { color: var(--lime); }
.game-intro { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
.game-intro h1 { font-size: clamp(36px,4vw,52px); letter-spacing: -.04em; margin-bottom: 20px; }
.game-meta { font-size: 13px; margin-bottom: 12px; }
.game-meta span { padding: 0 5px; }
.game-intro .document-lead { max-width: 54ch; margin-bottom: 24px; }
.document-image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #99a5ac; border-radius: var(--radius); }
.game-guide { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); align-items: start; }
.game-controls { grid-column: 2; grid-row: 1; }
.game-description { grid-column: 1; grid-row: 1; }
.game-guide h2:first-child { margin-top: 0; }
.controls-note { margin: 16px 0 0; font-size: 14px; }

.controls-table { border-collapse: collapse; width: 100%; }
.controls-table th, .controls-table td { border-bottom: 1px solid var(--line); padding: 14px 12px; text-align: left; }
.controls-table th { width: 44%; font-weight: 500; color: var(--text); }
@media (max-width: 760px) {
  .header-inner, .catalog-main { padding-left: 20px; padding-right: 20px; }
  .header-inner { min-height: 72px; }
  .brand { font-size: 26px; }
  .brand svg { width: 30px; height: 27px; }
  .catalog-main { padding-top: 8px; padding-bottom: 24px; }
  .game-grid { grid-template-columns: 1fr; gap: 20px; }
  .card-body { padding: 16px; }
  .card-title { margin-bottom: 6px; }
  .card-copy p { font-size: 14px; }
  .card-actions { margin-top: 12px; gap: 10px; }
  .card-guide { font-size: 13px; }
  .game-document { padding: 8px 20px 32px; }
  .document-back { margin-bottom: 16px; }
  .game-intro, .game-guide { grid-template-columns: 1fr; gap: 24px; }
  .game-intro .document-lead { font-size: 16px; }
  .game-guide { margin-top: 32px; padding-top: 24px; }
  .game-controls, .game-description { grid-column: auto; grid-row: auto; }
  .card-title h2 { font-size: 24px; }
  .player-view { padding: 0 12px; }
  .player-header { min-height: 120px; display: grid; grid-template-columns: 1fr auto; gap: 7px 15px; padding: 10px 1px 12px; }
  .player-header h1 { grid-column: 2; grid-row: 1; border: 0; padding: 0; font-size: 17px; text-align: right; }
  .player-actions { grid-column: 1/-1; grid-row: 2; width: 100%; justify-content: flex-end; }
  .player-actions .button { flex: 1; font-size: 12px; }
  .play-stage { height: auto; aspect-ratio: 16 / 9; min-height: 0; border-radius: 8px; }
  .player-footer { flex-direction: column; gap: 9px; }
  .player-return-note { text-align: left; }
  .device-notice { display: block; background: #293123; color: #d2dfc1; border-left: 2px solid var(--lime); padding: 12px 14px; margin: 0 0 15px; font-size: 12px; line-height: 1.65; word-break: keep-all; }
  .device-notice:empty { display: none; }
}
@media (max-width: 380px) {
  .header-inner, .catalog-main { padding-left: 16px; padding-right: 16px; }
  .card-body { padding: 16px; gap: 12px; }
}
@media (max-height: 580px) and (orientation: landscape) {
  .player-view { padding: 0 8px; }
  .player-header { display: flex; padding: 0; min-height: 52px; gap: 15px; }
  .player-header h1 { padding-left: 14px; font-size: 16px; text-align: left; border-left: 1px solid #37424b; }
  .player-actions { width: auto; }
  .player-actions .button { min-height: 34px; padding: 6px 11px; font-size: 11px; }
  .play-stage { height: calc(100dvh - 98px); min-height: 0; aspect-ratio: auto; }
  .player-footer { padding-top: 7px; padding-bottom: 7px; flex-direction: row; }
  .device-notice { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.header-tools { display:flex; align-items:center; gap:8px; }
.language-menu { position:relative; z-index:4; font-size:14px; }
.language-menu summary { min-height:44px; padding:12px 8px; color:var(--muted); white-space:nowrap; }
.language-menu nav { position:absolute; right:0; top:calc(100% + 4px); min-width:160px; padding:6px; background:var(--surface-hover); border:1px solid var(--line); border-radius:10px; box-shadow:0 12px 30px #0006; }
.language-menu a { display:flex; align-items:center; min-height:44px; padding:8px 12px; border-radius:6px; }
.language-menu a:hover { background:#ffffff0a; }
.language-menu a[aria-current] { color:var(--lime); }
:lang(ja) .document-main, :lang(zh-Hans) .document-main, :lang(ja) .card-copy p, :lang(zh-Hans) .card-copy p { word-break:normal; }
