.game-page {
  color-scheme: light;
  position: relative;
  isolation: isolate;
  padding: 90px 0 12px;
  --red: #c92527;
  --ink: #22252a;
  --muted: #72767e;
  --line: #e0e3e8;
  --paper: #f7f8fa;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
.game-page * { box-sizing: border-box; }
.game-page { margin: 0; min-height: 100vh; }
.game-page section { padding: 0; }
.game-page h1, .game-page h2 { font-family: inherit; font-weight: 700; }
.game-page::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(#dce0e54d 1px, transparent 1px), linear-gradient(90deg, #dce0e54d 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000, transparent 90%);
}
.game-page button, .game-page a { -webkit-tap-highlight-color: transparent; }
.game-page button { font: inherit; cursor: pointer; }
.game-page button:disabled { cursor: default; }
.game-page a { color: inherit; }
.game-page button:focus-visible, .game-page a:focus-visible, .game-page [role="spinbutton"]:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
.game-page [hidden] { display: none !important; }
.game-page .game-container { width: min(1180px, calc(100% - 64px)); margin: auto; -webkit-user-select: none; user-select: none; }
.game-page .intro { padding: 54px 0 36px; }
.game-page .eyebrow, .game-page .task-label, .game-page .difficulty, .game-page .lock-state, .game-page .stat-label { font-family: "Courier New", monospace; }
.game-page .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
.game-page h1 { font-size: clamp(36px, 5vw, 58px); letter-spacing: -2px; line-height: 1.1; margin: 0 0 16px; }
.game-page h1 span { color: var(--red); }
.game-page .intro-copy { color: var(--muted); font-size: 18px; margin: 0; }
.game-page .level-selector { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 28px; }
.game-page .level-selector button { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: #62666e; font-size: 13px; }
.game-page .level-selector button[aria-pressed="true"] { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.game-page .level-number { font-family: "Courier New", monospace; font-size: 11px; opacity: .65; }
.game-page .level-check:empty { display: none; }
.game-page .level-check { color: #44815e; font-weight: 700; }
.game-page .progress-label { margin-left: auto; color: var(--muted); font-size: 12px; }
.game-page .binary-cipher { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.game-page .binary-cipher span { font-family: "Courier New", monospace; font-size: 22px; font-weight: 700; letter-spacing: 3px; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 14px 12px; text-align: center; }
.game-page .xor-mask { font-family: "Courier New", monospace; font-size: 22px; letter-spacing: 3px; font-weight: 700; padding: 14px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--red); text-align: center; margin: 18px 0; }
.game-page .game-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 36px; align-items: start; }
.game-page .puzzle-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: 0 12px 36px #20283805; }
.game-page .card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 24px; }
.game-page .task-label { color: var(--red); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.game-page .difficulty { color: var(--muted); font-size: 11px; }
.game-page h2 { font-size: 23px; line-height: 1.2; letter-spacing: -.6px; margin: 0 0 18px; }
.game-page .puzzle-card p { margin: 1em 0; font-size: 15px; line-height: 1.65; color: #595e66; }
.game-page .puzzle-card strong { color: var(--ink); }
.game-page #puzzle-copy ul { margin: 1em 0; padding-inline-start: 1.25em; list-style: disc outside; font-size: 15px; line-height: 1.65; color: #595e66; }
.game-page #puzzle-copy li + li { margin-top: 8px; }
.game-page .analyst-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 18px 0; font-size: 13px; text-align: center; }
.game-page .analyst-table caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 8px; }
.game-page .analyst-table th, .game-page .analyst-table td { padding: 9px 4px; border: 1px solid var(--line); }
.game-page .analyst-table thead { background: var(--paper); }
.game-page .analyst-table thead th { font-size: 12px; line-height: 1.4; font-weight: 600; }
.game-page .analyst-table tbody th { font-family: "Courier New", monospace; font-size: 17px; letter-spacing: 1px; }
.game-page .digit-alphabet { font-family: "Courier New", monospace; font-weight: 700; white-space: nowrap; word-spacing: 1px; }
.game-page .digit-alphabet span { color: var(--red); }
.game-page .cipher { display: flex; gap: 10px; margin: 22px 0; }
.game-page .cipher span { display: grid; place-items: center; flex: 1; height: 57px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); font-size: 29px; font-weight: 700; font-family: "Courier New", monospace; }
.game-page .puzzle-card .task-question { color: var(--ink); font-weight: 700; }
.game-page .hints { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.game-page .hint-button { width: 100%; display: flex; justify-content: space-between; gap: 10px; background: none; border: 0; padding: 4px 0; color: var(--red); font-size: 14px; text-align: left; }
.game-page .hint-button:disabled { color: var(--muted); }
.game-page #hint-count { font-family: "Courier New", monospace; }
.game-page .hint-list { padding-left: 20px; margin-bottom: 0; font-size: 14px; color: #62666e; line-height: 1.6; }
.game-page .hint-list:empty { display: none; }
.game-page .hint-list li + li { margin-top: 12px; }
.game-page .instrument { min-width: 0; padding-top: 6px; }
.game-page .instrument-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.game-page .lock-state { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.game-page .state-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px #c9252712; }
.game-page .stats { display: flex; gap: 24px; }
.game-page .stats > span { display: grid; gap: 5px; }
.game-page .stat-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.game-page .stats output { font-family: "Courier New", monospace; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.game-page .cryptex-scene { position: relative; padding: 68px 20px 38px; }
.game-page .cryptex { display: flex; align-items: center; position: relative; width: 100%; height: 235px; }
.game-page .end-cap { position: relative; z-index: 3; flex: 0 0 16%; height: 100%; pointer-events: none; transition: transform 900ms cubic-bezier(.2,.7,.2,1); }
.game-page .end-cap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.game-page .chamber { position: relative; flex: 1; height: 88%; margin: 0 -1%; }
.game-page .dial-bank { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.game-page .dial { display: grid; grid-template-rows: 30px 1fr 30px; min-width: 0; position: relative; border-radius: 11px; background: linear-gradient(180deg, #72777b 0%, #dedfe0 9%, #fbfbfb 22%, #fff 38%, #dadbdd 58%, #b8b9bc 74%, #73777d 92%, #afb1b5 100%); border-left: 2px solid #25272b; border-right: 3px solid #22252a; box-shadow: inset 3px 0 3px #fff9, inset -4px 0 3px #0003; transition: transform 900ms ease, opacity 500ms ease; }
.game-page .dial::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 1px #fff, inset 0 -2px 4px #0006; pointer-events: none; }
.game-page .dial-step { position: relative; z-index: 1; border: 0; background: none; color: #484c53; font-size: 18px; padding: 2px; transition: color 150ms, background 150ms; border-radius: 5px; }
.game-page .dial-step:hover { color: var(--red); background: #ffffff40; }
.game-page .dial-value { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; cursor: ns-resize; touch-action: pan-x; user-select: none; border-radius: 6px; outline-offset: 1px !important; }
.game-page .neighbor { font-family: "Courier New", monospace; font-size: 19px; line-height: 1; color: #777b834d; }
.game-page .digit { font-family: "Courier New", monospace; font-size: clamp(32px, 4vw, 49px); font-weight: 700; line-height: 1.3; color: #14171d; text-shadow: 0 1px 0 #fff; font-variant-numeric: tabular-nums; }
.game-page .dial.changed .digit { animation: tick 150ms ease-out; }
.game-page .alignment-mark { position: absolute; z-index: 4; top: 50%; width: 8px; height: 2px; background: var(--red); pointer-events: none; }
.game-page .alignment-mark--left { left: -5px; }
.game-page .alignment-mark--right { right: -5px; }
.game-page .glass { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 23px; background: linear-gradient(180deg, #ffffffa6, #ffffff0d 20%, #d4e3ee1c 50%, #ffffff99 91%, #a2adb440); border: 2px solid #b5bec870; box-shadow: inset 0 7px 3px #ffffffa6, inset 0 -5px 7px #8396a03b, 0 0 0 1px #fff9; opacity: 0; transition: opacity 600ms ease 350ms; }
.game-page .glass::after { content: ""; position: absolute; left: 5%; right: 5%; top: 12%; height: 2px; border-radius: 50%; background: #fff; box-shadow: 0 4px 12px #fff; }
.game-page .prize-key { width: 82%; fill: #d0252a; filter: drop-shadow(0 2px 0 #7f1316) drop-shadow(0 4px 8px #c9252733); }
.game-page .ground-shadow { height: 11px; width: 86%; margin: 22px auto 0; border-radius: 50%; background: #22252a38; filter: blur(7px); transition: opacity 800ms; }
.game-page .controls-help { text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0 0 22px; }
.game-page .actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 22px; }
.game-page .primary-button { display: inline-flex; justify-content: center; align-items: center; gap: 28px; min-height: 48px; padding: 14px 24px; background: var(--red); color: #fff; border: 1px solid var(--red); border-radius: 8px; font-weight: 700; font-size: 14px; transition: background 150ms, transform 150ms; }
.game-page .primary-button:hover { background: #b51c20; }
.game-page .primary-button:active { transform: translateY(1px); }
.game-page .reset-button { color: var(--muted); border: 0; background: none; padding: 12px 0; font-size: 13px; }
.game-page .reset-button:hover { color: var(--red); }
.game-page .feedback { min-height: 40px; margin: 18px auto 0; max-width: 450px; font-size: 13px; text-align: center; line-height: 1.5; color: var(--muted); }
.game-page .feedback.is-error { color: var(--red); }
.game-page .cryptex-scene.is-wrong .cryptex { animation: shake 360ms ease-in-out; }
.game-page .is-open .glass { opacity: 1; }
.game-page .is-open .dial { opacity: 0; pointer-events: none; }
.game-page .is-open .dial:nth-child(-n+2) { transform: translateX(-65px) rotateY(-25deg); }
.game-page .is-open .dial:nth-child(n+3) { transform: translateX(65px) rotateY(25deg); }
.game-page .is-open .end-cap--left { transform: translateX(-12px); }
.game-page .is-open .end-cap--right { transform: translateX(12px); }
.game-page .is-open .ground-shadow { opacity: .65; }
.game-page .instrument.is-solved .state-dot { background: #44815e; box-shadow: 0 0 0 4px #44815e14; }
.game-page .success-card { border-top: 1px solid var(--line); padding-top: 26px; text-align: center; }
.game-page .success-card h2 { font-size: 29px; }
.game-page .success-card p:not(.eyebrow) { color: #62666e; max-width: 480px; margin: 0 auto 18px; line-height: 1.6; font-size: 14px; }
.game-page .success-card .result-summary { font-family: "Courier New", monospace; font-weight: 700; color: var(--ink) !important; }
.game-page .noscript { color: var(--red); text-align: center; }
@keyframes tick { from { transform: translateY(5px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25%, 75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
@media (max-width: 1000px) {
  .game-page .game-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 24px; }
  .game-page .puzzle-card { padding: 22px; }
  .game-page .cryptex { height: 190px; }
  .game-page .digit-alphabet { font-size: 13px !important; word-spacing: 0; }
  .game-page .lock-state { font-size: 10px; letter-spacing: 0; }
  .game-page .stats { gap: 12px; }
}
@media (max-width: 760px) {
  .game-page .game-container { width: min(600px, calc(100% - 36px)); }
  .game-page .intro { padding: 36px 0 26px; }
  .game-page h1 { letter-spacing: -1.2px; }
  .game-page .intro-copy { font-size: 16px; }
  .game-page .level-selector { gap: 8px; }
  .game-page .level-selector button { padding: 12px 10px; font-size: 12px; gap: 5px; }
  .game-page .progress-label { flex-basis: 100%; margin: 4px 0 0; }
  .game-page .game-layout { grid-template-columns: 1fr; gap: 28px; }
  .game-page .puzzle-card { padding: 24px; }
  .game-page .puzzle-card h2 { margin-bottom: 12px; }
  .game-page .card-top { margin-bottom: 17px; }
  .game-page .puzzle-card p { margin: 10px 0; }
  .game-page .cipher { margin: 16px 0; max-width: 290px; }
  .game-page .digit-alphabet { font-size: 15px !important; }
  .game-page .instrument { padding-top: 0; }
  .game-page .cryptex-scene { padding: 34px 10px 24px; }
  .game-page .cryptex { height: clamp(160px, 38vw, 205px); }
  .game-page .digit { font-size: clamp(28px, 8vw, 42px); }
  .game-page .neighbor { font-size: 16px; }
  .game-page .controls-help { max-width: 300px; margin: 0 auto 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-page *, .game-page *::before, .game-page *::after { animation: none !important; transition: none !important; }
}
