.game-page {
  min-height: 100%;
  height: auto;
  overflow-y: auto;
  color: #f1efe9;
  background:
    radial-gradient(ellipse at 75% 4%, rgba(173, 131, 52, .13), transparent 38rem),
    radial-gradient(ellipse at 8% 58%, rgba(46, 80, 74, .15), transparent 35rem),
    #11110f;
  color-scheme: dark;
}
.game-page :focus-visible { outline-color: #dfb64e; }
.game-topbar { position: absolute; color: #f1efe9; }
.game-wordmark .mark { border-color: #dfb64e; }
.game-wordmark .mark::after { border-color: #dfb64e; border-right-color: transparent; }
.game-wordmark > span:last-child { color: #dfb64e; letter-spacing: .14em; font-size: 10px; }
.game-page .nav-dock { background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.game-page .nav-dock a { color: rgba(255,255,255,.75); }
.game-page .nav-dock a:hover, .game-page .nav-dock a[aria-current="page"] { background: rgba(223,182,78,.16); color: #f5d783; }
.game-build-label { font-size: 10px; letter-spacing: .12em; color: #b8aa80; }
.game-shell { width: min(1120px, 100%); margin: auto; padding: 108px 22px 42px; }
.game-loading { color: #d7c99f; }
.game-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 24px; }
.game-kicker { color: #d5b65e; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.game-heading h1 { margin: 8px 0 5px; font-size: clamp(30px, 5vw, 54px); font-weight: 300; letter-spacing: -.045em; }
.game-heading p { color: #aaa79e; margin: 0; line-height: 1.5; }
.game-prototype-note { max-width: 250px; border: 1px solid rgba(223,182,78,.26); border-radius: 14px; padding: 12px 14px; color: #c6c0b2; font-size: 12px; line-height: 1.5; }
.game-prototype-note strong { color: #f0d27b; display: block; margin-bottom: 3px; }
.game-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.game-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.game-tab, .game-action, .game-quiet {
  border: 1px solid rgba(255,255,255,.12); border-radius: 999px; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.game-tab { padding: 9px 15px; background: rgba(255,255,255,.045); color: #c5c1b7; font-size: 13px; }
.game-tab[aria-pressed="true"] { color: #f3d67f; border-color: rgba(223,182,78,.48); background: rgba(223,182,78,.12); }
.game-tab:hover, .game-quiet:hover { border-color: rgba(223,182,78,.52); }
.game-quiet { padding: 8px 12px; color: #c5c1b7; background: transparent; font-size: 12px; }
.game-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .75fr); gap: 16px; align-items: start; animation: game-enter .55s cubic-bezier(.22,1,.36,1) both; }
.game-card { border: 1px solid rgba(255,255,255,.09); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.025)); box-shadow: 0 24px 70px rgba(0,0,0,.18); }
.game-page .game-card {
  background: linear-gradient(135deg, rgba(58, 73, 87, .54), rgba(58, 49, 86, .34));
  border-color: rgba(135, 223, 255, .2);
  backdrop-filter: blur(20px) saturate(1.45);
  -webkit-backdrop-filter: blur(20px) saturate(1.45);
}
.game-story { padding: clamp(20px, 4vw, 34px); min-height: 390px; }
.game-aside { display: grid; gap: 14px; }
.game-panel { padding: 19px; }
.game-scene {
  --scene-accent: #edcf83;
  isolation: isolate;
  position: relative;
  min-height: 326px;
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 25px;
  background: #29313a;
  box-shadow: 0 28px 75px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.12);
  animation: scene-enter .7s cubic-bezier(.22,1,.36,1) both;
}
.game-scene::before, .game-scene::after { content: ""; position: absolute; pointer-events: none; z-index: 1; }
.game-scene::before {
  inset: 0;
  background: linear-gradient(90deg, rgba(14,18,24,.76), rgba(14,18,24,.35) 38%, transparent 70%),
    linear-gradient(0deg, rgba(15,17,17,.48), transparent 56%);
}
.game-scene::after {
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 90px rgba(9,12,16,.22), inset 0 1px rgba(255,255,255,.08);
}
.game-scene--first-resource { --scene-accent: #e9b777; }
.game-scene--first-creation { --scene-accent: #c8e6d8; }
.game-scene--first-exchange { --scene-accent: #b6d9df; }
.game-scene--the-choice { --scene-accent: #e2c985; }
.game-scene--consequences { --scene-accent: #b8d1ad; }
.game-scene--completion { --scene-accent: #f1dba5; }
.scene-render-surface { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(ellipse at 52% 28%, #25394a, #111923 74%); }
.game-world-canvas { display: block; width: 100%; height: 100%; }
.game-world-canvas[data-webgl="unavailable"], .game-world-canvas[data-webgl="lost"] { display: none; }
.game-scene[data-scene="first-resource"] .scene-render-surface { background: radial-gradient(ellipse at 50% 28%, #50372a, #171b1b 76%); }
.game-scene[data-scene="first-creation"] .scene-render-surface { background: radial-gradient(ellipse at 50% 28%, #29423f, #131a1d 76%); }
.game-scene[data-scene="first-exchange"] .scene-render-surface { background: radial-gradient(ellipse at 50% 28%, #233f4d, #121a20 76%); }
.game-scene[data-scene="the-choice"] .scene-render-surface { background: radial-gradient(ellipse at 50% 28%, #3d314d, #171820 76%); }
.game-scene[data-scene="consequences"] .scene-render-surface { background: radial-gradient(ellipse at 50% 28%, #2e4337, #141b1a 76%); }
.game-scene[data-scene="completion"] .scene-render-surface { background: radial-gradient(ellipse at 50% 28%, #3c3b57, #141822 76%); }
.scene-copy { position: absolute; z-index: 3; left: clamp(22px, 4vw, 42px); top: 34px; width: min(38%, 350px); }
.scene-signal { display: inline-flex; gap: 8px; align-items: center; color: var(--scene-accent); font-size: 9px; letter-spacing: .18em; }
.scene-signal i { width: 6px; height: 6px; border-radius: 50%; background: var(--scene-accent); box-shadow: 0 0 14px var(--scene-accent); animation: scene-signal 2.2s ease-in-out infinite; }
.scene-copy h2 { margin: 17px 0 8px; max-width: 340px; color: #f4f0e6; font-size: clamp(25px, 3.4vw, 43px); font-weight: 300; letter-spacing: -.045em; line-height: 1.02; text-wrap: balance; }
.scene-copy p { max-width: 310px; margin: 0; color: rgba(240,235,222,.72); font-size: 12px; line-height: 1.55; }
.scene-index { position: absolute; z-index: 3; top: 29px; right: 32px; display: grid; gap: 7px; text-align: right; color: rgba(238,232,216,.6); font-size: 8px; letter-spacing: .16em; }
.scene-index strong { color: rgba(245,231,195,.9); font-size: 17px; font-weight: 300; letter-spacing: .08em; }
.scene-index i { color: rgba(238,232,216,.48); font-size: 9px; font-style: normal; }
.scene-holo { position: absolute; z-index: 2; padding: 8px 10px; border: 1px solid rgba(206,231,225,.21); border-radius: 6px; background: linear-gradient(145deg, rgba(203,229,222,.1), rgba(165,197,207,.025)); color: rgba(217,238,228,.68); font-size: 7px; letter-spacing: .16em; backdrop-filter: blur(8px); }
.scene-holo--left { left: 38px; bottom: 25px; display: grid; width: 94px; gap: 5px; }
.scene-holo--left i { display: block; width: 74%; height: 1px; background: rgba(217,238,228,.36); }
.scene-holo--left i:nth-of-type(2) { width: 52%; }
.scene-holo--left i:nth-of-type(3) { width: 63%; }
.scene-holo--right { right: 31px; bottom: 34px; display: flex; align-items: center; gap: 8px; }
.scene-holo--right b { width: 5px; height: 5px; border-radius: 50%; background: var(--scene-accent); box-shadow: 0 0 12px var(--scene-accent); }
.scene-filmgrain { position: absolute; z-index: 2; inset: 0; pointer-events: none; opacity: .12; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.game-panel h2, .game-story h2 { margin: 0 0 10px; font-weight: 400; letter-spacing: -.025em; }
.game-story h2 { font-size: clamp(25px, 3.5vw, 37px); }
.game-label { color: #b9ad8b; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.game-objective { margin: 12px 0 22px; color: #c7c2b6; line-height: 1.65; }
.game-dialogue { border-left: 2px solid #b49443; padding: 3px 0 3px 15px; margin: 20px 0; color: #dfdbd0; line-height: 1.7; }
.game-speaker { color: #e2c36a; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.game-progress { display: grid; grid-template-columns: repeat(7, minmax(20px, 1fr)); gap: 6px; margin: 0 0 24px; }
.game-progress span { height: 4px; border-radius: 99px; background: rgba(255,255,255,.12); }
.game-progress span.done { background: #d6b24e; }
.game-progress span.current { background: linear-gradient(90deg, #d6b24e 50%, rgba(255,255,255,.15) 50%); }
.game-action { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 10px 17px; background: #d6b24e; border-color: #d6b24e; color: #17150f; font-weight: 600; }
.game-action:hover { background: #edcc69; border-color: #edcc69; transform: translateY(-1px); }
.game-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.game-action.secondary { color: #f0d47f; background: rgba(214,178,78,.08); border-color: rgba(214,178,78,.4); }
.game-action.secondary:hover { background: rgba(214,178,78,.16); }
.game-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 20px; }
.game-choice-card { border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.035); color: #eeeae0; padding: 16px; text-align: left; cursor: pointer; }
.game-choice-card:hover { border-color: rgba(223,182,78,.56); background: rgba(223,182,78,.08); }
.game-choice-card strong { display: block; color: #efd47f; margin-bottom: 7px; }
.game-choice-card span { font-size: 13px; color: #bdb8ac; line-height: 1.55; }
.game-avatar-list { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0; }
.game-avatar { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.04); padding: 9px 12px; color: #e6e1d5; cursor: pointer; }
.game-avatar[aria-pressed="true"] { border-color: #d6b24e; background: rgba(214,178,78,.12); color: #f2d982; }
.game-avatar-mark { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(214,178,78,.19); color: #f3d47b; }
.game-name-field { display: grid; gap: 7px; max-width: 340px; color: #c6c1b6; font-size: 13px; }
.game-name-field input { height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.18); color: #f4f0e7; padding: 0 13px; font: inherit; }
.game-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.game-stat { border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 11px; }
.game-stat span { display: block; color: #aaa69b; font-size: 11px; margin-bottom: 5px; }
.game-stat strong { color: #f0d47f; font-size: 20px; font-weight: 400; }
.game-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.game-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.08); padding: 8px 0; color: #d8d3c8; font-size: 13px; }
.game-list li:last-child { border-bottom: 0; }
.game-muted { color: #aaa69b; }
.game-empty { color: #aaa69b; font-size: 13px; line-height: 1.55; }
.game-notice { margin: 0 0 14px; padding: 11px 14px; border: 1px solid rgba(223,182,78,.26); border-radius: 12px; color: #e7d697; font-size: 13px; }
.game-notice.error { border-color: rgba(194,40,58,.5); color: #ffc2c9; }
.game-character { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.game-character:last-child { border-bottom: 0; padding-bottom: 0; }
.game-character strong { display: block; color: #e9d07b; font-weight: 500; }
.game-character small { color: #aaa69b; }
.game-character p { margin: 7px 0 0; color: #c8c3b8; font-size: 13px; line-height: 1.55; }
.game-footer { color: #89867e; font-size: 11px; text-align: center; margin: 18px 0 0; line-height: 1.6; }
.game-beacon { width: 100%; height: 84px; position: relative; overflow: hidden; border-radius: 14px; background: radial-gradient(ellipse at 50% 120%, rgba(214,178,78,.28), transparent 58%), linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.01)); margin: 13px 0 19px; }
.game-beacon::before, .game-beacon::after { content: ""; position: absolute; border: 1px solid rgba(214,178,78,.52); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.game-beacon::before { width: 130px; height: 36px; }
.game-beacon::after { width: 240px; height: 58px; opacity: .42; }
@keyframes scene-signal { 50% { opacity: .45; box-shadow: 0 0 5px var(--scene-accent); } }
@keyframes scene-enter { from { opacity: 0; transform: scale(1.012); filter: brightness(.82); } to { opacity: 1; transform: scale(1); filter: brightness(1); } }
@keyframes game-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  .game-topbar { position: absolute; align-items: flex-start; flex-wrap: wrap; }
  .game-topbar .nav-dock { order: 3; width: 100%; overflow-x: auto; }
  .game-build-label { display: none; }
  .game-shell { padding: 128px 14px 28px; }
  .game-heading { align-items: flex-start; flex-direction: column; }
  .game-prototype-note { max-width: none; }
  .game-scene { min-height: 292px; }
  .scene-render-surface { inset: 0; }
  .scene-copy { top: 23px; left: 22px; width: 52%; }
  .scene-copy h2 { margin-top: 12px; font-size: clamp(22px, 7vw, 32px); }
  .scene-copy p { max-width: 230px; font-size: 11px; }
  .scene-index { top: 22px; right: 19px; font-size: 7px; }
  .scene-holo--left { left: 19px; bottom: 17px; }
  .scene-holo--right { right: 16px; bottom: 24px; font-size: 6px; }
  .game-columns { grid-template-columns: 1fr; }
  .game-story { min-height: 0; }
  .game-choice { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .game-tab, .game-action, .game-quiet { transition: none; }
  .game-scene, .game-columns { animation: none; }
  .game-scene *, .game-scene::before, .game-scene::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
