@font-face { font-family: Manrope; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/manrope-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/manrope-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/manrope-latin-800-normal.woff2') format('woff2'); }
:root {
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Malgun Gothic", sans-serif;
  color: #1c2b29; background: #fff; font-synthesis: none; color-scheme: light;
  --muted: #5d716d; --line: #e3eae7; --paper: #f5f8f6; --accent: #247359; --button-text: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: var(--accent); text-underline-offset: 3px; }
button:focus-visible, select:focus-visible, canvas:focus-visible, a:focus-visible { outline: 3px solid #ad781e; outline-offset: 3px; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1168px; margin: auto; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { color: inherit; font-weight: 800; font-size: 17px; text-decoration: none; letter-spacing: -.035em; }
.brand span, .intro h1 span { color: var(--accent); }
select { min-height: 40px; width: 110px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: inherit; padding: 8px; font-size: 12px; cursor: pointer; }
.intro { max-width: 620px; margin: 36px auto 28px; padding: 0 20px; text-align: center; }
h1 { font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: -.045em; margin: 0 0 16px; }
.intro p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 auto 20px; }
.primary { background: var(--accent); color: var(--button-text); font-weight: 700; font-size: 14px; border: 0; border-radius: 5px; min-height: 44px; padding: 11px 24px; }
.primary:hover { filter: brightness(.92); }
.game-section { width: min(1120px, calc(100% - 48px)); margin: 0 auto 36px; scroll-margin-top: 12px; }
.preview, .player { overflow: hidden; border-radius: 8px; background: #204f50; }
.preview img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display: block; }
.prose { width: min(600px, calc(100% - 40px)); margin-left: auto; margin-right: auto; }
.instructions { border-top: 1px solid var(--line); padding-top: 26px; }
.instructions h2 { font-size: 12px; line-height: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.instructions ul { padding-left: 19px; margin: 0; }
.instructions li { font-size: 14px; line-height: 1.625; margin-bottom: 8px; padding-left: 3px; }
kbd { font: inherit; white-space: nowrap; }
.site-footer { border-top: 1px solid var(--line); padding: 22px 0 30px; margin-top: 26px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.site-footer p { margin: 0 0 12px; }
.site-footer nav { line-height: 2; }
.site-footer nav a { display: inline-block; padding: 4px 3px; }
.site-footer a[aria-current] { font-weight: 700; }
.document { padding-top: 32px; min-height: 55dvh; }
.back-link { display: inline-block; margin-bottom: 32px; font-size: 13px; }
.document h1 { font-size: 36px; line-height: 1.2; margin-bottom: 12px; }
.document-date { font-size: 12px; color: var(--muted); margin-bottom: 30px; }
.changelog-list { padding-left: 20px; font-size: 15px; line-height: 1.8; }
.changelog-list li + li { margin-top: 6px; }
.changelog-history .changelog-entry { border-top: 1px solid var(--line); padding-top: 24px; margin-bottom: 32px; }
.changelog-entry time { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; margin-bottom: 8px; }
.changelog-history .changelog-entry h2 { color: var(--accent); font-size: 18px; margin-bottom: 12px; }
.changelog-entry .changelog-list { margin: 0; }
.document section { margin: 0 0 26px; }
.document h2 { font-size: 17px; line-height: 1.5; margin: 0 0 8px; }
.document section p { font-size: 14px; line-height: 1.8; margin: 0; overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.player-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--paper); min-height: 50px; padding: 3px 8px; flex-shrink: 0; }
.player-toolbar button { color: inherit; border: 0; background: transparent; border-radius: 4px; padding: 10px; min-height: 44px; font-size: 13px; }
.player-toolbar button:hover { background: var(--line); }
.player-label { font-size: 12px; color: var(--muted); }
.music-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; }
.music-toggle svg { flex-shrink: 0; }
.canvas-wrap { position: relative; aspect-ratio: 16/9; min-height: 0; touch-action: none; }
.unity-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.loading, .boot { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #204f50; color: #fff7e9; min-height: 240px; }
.loading { position: absolute; inset: 0; padding: 24px; text-align: center; }
.loading strong { font-size: 42px; font-weight: 700; margin: 16px 0; }
.loading small { font-size: 18px; margin-left: 4px; }
.loading p { font-size: 14px; margin: 14px 0; line-height: 1.6; }
.loading h2 { font-size: 21px; margin: 0; }
.player-error { padding: 24px; text-align: center; border-radius: 8px; }
.player-error h2 { font-size: 21px; margin: 0; }
.player-error p { font-size: 14px; line-height: 1.6; margin: 14px 0; }
.loading progress { accent-color: #f4b65b; width: min(240px,80%); height: 5px; }
.player.expanded, .player:fullscreen { width: 100%; height: 100dvh; border: 0; border-radius: 0; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.player.expanded { position: fixed; inset: 0; z-index: 20; }
.expanded .canvas-wrap, :fullscreen .canvas-wrap { flex: 1; aspect-ratio: auto; }
@media (max-width: 600px) {
  .header-inner { padding: 10px 16px; }
  .brand { font-size: 15px; }
  .intro { margin-top: 30px; margin-bottom: 24px; }
  h1 { font-size: 40px; }
  .game-section { width: calc(100% - 16px); margin-bottom: 28px; scroll-margin-top: 8px; }
  .player-label { display: none; }
  .player-toolbar button { font-size: 12px; padding: 8px; }
  .player .canvas-wrap { aspect-ratio: auto; height: 70dvh; min-height: 320px; }
  .expanded .canvas-wrap, :fullscreen .canvas-wrap { height: auto; min-height: 0; }
  .document h1 { font-size: 30px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .player .canvas-wrap { height: calc(100dvh - 74px); min-height: 220px; aspect-ratio: auto; }
  .expanded .canvas-wrap, :fullscreen .canvas-wrap { height: auto; min-height: 0; }
}
@media (prefers-color-scheme: dark) {
  :root { color: #e8efeb; background: #15211d; color-scheme: dark; --muted: #afc2b9; --line: #35483e; --paper: #24382e; --accent: #9bc9bc; --button-text: #203a33; }
}

/* Adapt the reference player shell to the isolated, accepted Where's Bill runtime. */
[hidden] { display: none !important; }
#preview { display: block; width: 100%; height: 100%; object-fit: cover; }
#frame-slot, #frame-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.toolbar-actions { display: flex; align-items: center; }
#error-back { font: inherit; font-size: 14px; min-height: 44px; margin-left: 8px; padding: 10px 16px; border: 1px solid currentColor; border-radius: 5px; color: inherit; background: transparent; }
.notice { position: absolute; bottom: 16px; left: 16px; right: 16px; padding: 12px; border-radius: 5px; background: var(--paper); color: var(--muted); font-size: 13px; line-height: 1.6; }
.game-section.expanded, .game-section:fullscreen { width: 100%; height: 100dvh; margin: 0; border-radius: 0; background: var(--paper); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.game-section.expanded { position: fixed; inset: 0; z-index: 20; }
.game-section.expanded .player, .game-section:fullscreen .player { display: flex; flex-direction: column; height: 100%; border-radius: 0; }
.game-section.expanded .canvas-wrap, .game-section:fullscreen .canvas-wrap { flex: 1; aspect-ratio: auto; height: auto; min-height: 0; }
body[data-state='idle'] .player .canvas-wrap { aspect-ratio: 16/9; height: auto; min-height: 0; }
.document p { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
html[dir='rtl'] .instructions ul { padding-right: 19px; padding-left: 0; }
html[dir='rtl'] .instructions li { padding-left: 0; padding-right: 3px; }
