:root { color-scheme: light; }
body { background: #f2f2f2; color: #222; font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Sans", sans-serif; }
a { color: inherit; text-underline-offset: 3px; }
.site-header { max-width: 970px; margin: auto; padding: 20px 20px 12px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font: 900 19px/1.2 system-ui, sans-serif; text-decoration: none; letter-spacing: -.5px; }
.home-link { font-size: 13px; }
.header-start { display: flex; align-items: center; gap: 16px; min-width: 0; }
.back-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border: 1px solid #b8b5ad; border-radius: 6px; text-decoration: none; white-space: nowrap; font-size: 13px; }
.back-button:hover { background: #e6e1d8; }
.language-control { position: relative; display: block; flex: 0 0 auto; }
#language-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.language-control::after { content: ''; position: absolute; inset-inline-end: 13px; top: 18px; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); pointer-events: none; }
.language-control select { appearance: none; -webkit-appearance: none; display: block; width: 156px; max-width: 42vw; height: 44px; padding-block: 8px; padding-inline: 12px 34px; border: 1px solid #c4c4be; border-radius: 8px; background: #fff; color: #222; font: 13px/1.3 system-ui,sans-serif; cursor: pointer; text-overflow: ellipsis; }
.language-control select option { background: #fff; color: #222; }
.language-control select:hover { border-color: #817b6d; }
.game-guide-link { display: inline-block; padding-block: 12px; font-size: 14px; }
.howto { white-space: pre-line; }
.game-heading { text-align: center; padding: 8px 16px 12px; }
.game-heading h1 { margin: 0; font-size: clamp(18px, 4.6vw, 24px); line-height: 1.4; }
.game-heading p { margin: 5px 0 0; color: #666; font-size: 12px; }
#cv { width: min(100%, calc((100svh - 170px) * 9 / 16)); }
.ad-section { margin: 160px auto 0; max-width: 970px; text-align: center; }
.ad-label { margin: 0 0 8px; color: #666; font: 11px/1.5 system-ui,sans-serif; letter-spacing: .07em; }
.adsbygoogle { display: block; width: 100%; height: 90px; }
.site-footer { max-width: 720px; margin: 28px auto 0; padding: 24px 20px max(24px, env(safe-area-inset-bottom)); text-align: center; color: #666; font-size: 12px; line-height: 2; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; column-gap: 20px; }
.site-footer button { font: inherit; color: inherit; border: 0; background: transparent; text-decoration: underline; cursor: pointer; padding: 0; }
.site-footer p { margin: 8px 0 0; }
.ad-section[hidden] { display: none; }
.policy { max-width: 720px; padding: 20px; margin: auto; line-height: 1.8; }
.policy h1 { font-size: 28px; }
.policy h2 { margin-top: 32px; font-size: 20px; }
.policy p { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid #906028; outline-offset: 4px; }
body.rec .site-header, body.rec .game-heading, body.rec .ad-section, body.rec .site-footer { display: none; }
@media (max-width: 727px) { .adsbygoogle { height: 50px; } }
@media (max-width: 480px) {
  .site-header { padding: 12px 16px 8px; gap: 8px; }
  .header-start { gap: 10px; }
  .site-header .brand { font-size: 16px; }
  .back-button { padding: 8px; font-size: 12px; }
  .language-control { gap: 4px; }
  .language-control select { width: 132px; max-width: 38vw; }
  #language-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
  body { background: #1b1b1b; color: #eee; }
  .game-heading p, .ad-label, .site-footer { color: #bbb; }
  .back-button:hover { background: #303030; }
  .language-control select, .language-control select option { background: #282a2c; color: #f2f2ee; border-color: #55595e; }
}
