.game-options{width:min(520px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 28px);box-sizing:border-box;padding:0;border:1px solid #52768b;border-radius:18px;color:#edfaff;background:#102638;box-shadow:0 24px 80px #0009;font-family:system-ui,sans-serif}
.game-options::backdrop{background:#06131daf;backdrop-filter:blur(3px)}
.game-options[open],.game-options-form{display:flex;flex-direction:column;min-height:0}
.game-options-form{width:100%;max-height:calc(100dvh - 30px)}
.game-options-scroll{display:contents}
.game-options header{padding:20px 22px 14px;flex-shrink:0}.game-options h2{margin:3px 0 8px;color:#bcffe4;font-size:24px;line-height:1.2}
.game-options-eyebrow{margin:0;font-size:11px;font-weight:750;letter-spacing:.08em;text-transform:uppercase;color:#92c4ca}
.game-options-summary,.snap-handwriting-note{margin:0;font-size:13px;line-height:1.4;color:#c1d3df;overflow-wrap:anywhere}
.game-options-body{padding:0 22px;overflow:auto;min-height:0;overscroll-behavior:contain}
.game-options fieldset{margin:0 0 16px;padding:0;border:0;min-width:0}.game-options fieldset[hidden]{display:none}.game-options legend{padding:0;margin:0 0 9px;font-size:14px;font-weight:750}
.game-option{display:flex;align-items:flex-start;gap:11px;min-height:44px;padding:12px;margin-bottom:8px;border:1px solid #506979;border-radius:10px;cursor:pointer;box-sizing:border-box;background:#ffffff06}
.game-option:has(:checked){border-color:#8deac5;background:#73dab317}.game-option:has(:disabled){opacity:.55;cursor:default}
.game-option input{flex:0 0 auto;margin:3px 0;width:18px;height:18px;accent-color:#85dfbf}.game-option strong,.game-option small{display:block}.game-option strong{font-size:15px}.game-option small{margin-top:3px;font-size:12px;line-height:1.45;color:#c3d8e1}
.game-options-note{font-size:12px;line-height:1.5;color:#b8d0da}
.game-options footer{display:flex;gap:10px;justify-content:flex-end;padding:14px 22px 20px;flex-shrink:0;border-top:1px solid #ffffff19}
.game-options button{min-height:44px;padding:9px 14px;border:1px solid #738fa0;border-radius:9px;font:600 14px system-ui,sans-serif;color:#edfaff;background:#ffffff08;cursor:pointer;touch-action:manipulation}
.game-options button[type=submit],.game-options [data-snap-writing=add]{background:#235d4c;border-color:#91ddbd}.game-options button:disabled{opacity:.45;cursor:default}.game-options :focus-visible{outline:3px solid #ffd68a;outline-offset:3px}
.game-options.is-rescue-options{width:min(700px,calc(100vw - 28px));background:#102837}
.is-rescue-options .game-options-scroll{display:block;min-height:0;overflow:auto;overscroll-behavior:contain}
.is-rescue-options header{padding-bottom:16px}.is-rescue-options h2{margin:22px 0 0;font-size:23px}
.is-rescue-options .game-options-body{overflow:visible;padding-bottom:6px}
.rescue-story:not([hidden]){position:relative;display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid #b1a4d445;border-radius:14px;background:#263449}
.rescue-story::after{content:"";position:absolute;bottom:-6px;left:38px;width:10px;height:10px;border-right:1px solid #b1a4d445;border-bottom:1px solid #b1a4d445;background:#263449;transform:rotate(45deg)}
.rescue-story svg{width:48px;flex:0 0 48px;align-self:center}.rescue-story p{margin:0;font-size:13px;line-height:1.5;color:#d3e1e9}.rescue-story strong{display:block;color:#f3e5ff;font-size:14px;margin-bottom:3px}
.game-options .rescue-mode-grid{display:grid;grid-template-columns:1fr;gap:14px;margin-bottom:16px}
.rescue-mode-legend{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.rescue-mode-card{--mode-accent:#91edcc;display:flex;flex-direction:column;min-width:0;border:1px solid #496574;border-radius:15px;background:#152f3e;transition:border-color .15s,background .15s}
.rescue-mode-shoot{--mode-accent:#f8cb82}
.rescue-mode-card:has(input[name=game-rescue-mode]:checked){border-color:var(--mode-accent);box-shadow:inset 0 0 0 1px var(--mode-accent);background:#1b3b47}
.rescue-mode-card:has(input[name=game-rescue-mode]:focus-visible){outline:2px dashed #ffd68a;outline-offset:3px}
.rescue-mode-card:has(input[name=game-rescue-mode]:disabled){background:#18303d}.rescue-mode-card:has(input[name=game-rescue-mode]:disabled) .rescue-mode-art{opacity:.45}
.rescue-mode-choice{display:grid;flex:1;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:0 18px;align-items:start;padding:14px;cursor:pointer;touch-action:manipulation}
.rescue-mode-choice:has(:disabled){cursor:default}
.rescue-mode-art{display:block;grid-column:1;grid-row:1/4;align-self:center;width:100%;height:auto;border-radius:10px}
.rescue-mode-heading{grid-column:2;display:flex;align-items:center;gap:9px;margin:0 0 7px;color:var(--mode-accent)}
.rescue-mode-heading input{width:20px;height:20px;flex:0 0 20px;margin:0;accent-color:var(--mode-accent)}.rescue-mode-heading strong{font-size:21px;line-height:1.2}
.rescue-mode-heading input:focus-visible{outline:none}
.rescue-mode-description{grid-column:2;margin:0;font-size:14px;line-height:1.5;color:#edf5f7}
.rescue-mode-rules{grid-column:2;display:flex;flex-direction:column;gap:8px;margin:12px 0 1px;padding-top:10px;border-top:1px solid #ffffff17;font-size:12px;line-height:1.5;color:#bed0da}.rescue-mode-rules b{font-weight:600;color:#dceae9}
.rescue-mode-unavailable{grid-column:2;margin:10px 0 0;padding:9px;border-radius:8px;background:#edc58213;color:#f2d4a5;font-size:12px;line-height:1.4}
.rescue-mode-controls{margin:0 14px 2px;border-top:1px solid #ffffff20}.rescue-mode-controls[hidden]{display:none}
.rescue-mode-controls summary{padding:12px 0;min-height:44px;box-sizing:border-box;color:#f8dba5;font:650 12px system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.game-options .rescue-mode-controls fieldset{margin:0 0 8px}.rescue-mode-controls .game-option{padding:9px;gap:8px}.rescue-mode-controls .game-option strong{font-size:13px}.rescue-mode-controls .game-option small{font-size:11px}
@media(hover:hover){.rescue-mode-card:not(:has(input[name=game-rescue-mode]:disabled)):hover{border-color:var(--mode-accent)}}
@media(max-width:560px){
  .is-rescue-options header{padding:16px 16px 12px}.is-rescue-options .game-options-body{padding:0 16px 0}.is-rescue-options h2{margin-top:20px;font-size:21px}
  .rescue-story:not([hidden]){padding:12px;gap:10px}.rescue-story svg{width:36px;flex-basis:36px}.rescue-story p{font-size:12px;line-height:1.45}.rescue-story strong{font-size:13px}
  .game-options .rescue-mode-grid{grid-template-columns:1fr;gap:12px;margin-bottom:16px}
  .rescue-mode-choice{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:0 12px;padding:12px;align-items:start}
  .rescue-mode-art{grid-column:1;grid-row:1/3;align-self:center}
  .rescue-mode-heading{grid-column:2;margin:0 0 6px;gap:7px}.rescue-mode-heading strong{font-size:19px}.rescue-mode-heading input{width:18px;height:18px;flex-basis:18px}
  .rescue-mode-description{grid-column:2;margin:0;font-size:12px;line-height:1.45}
  .rescue-mode-rules{grid-column:1/-1;gap:4px;margin:10px 0 0;padding-top:9px;font-size:11px;line-height:1.4}
  .rescue-mode-unavailable{grid-column:1/-1;margin:10px 0 0}
}
.snap-handwriting[open]{overflow:auto}.snap-handwriting header{padding-bottom:8px}.snap-handwriting h2{font-size:20px}.snap-handwriting-reference{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:8px}.snap-handwriting-reference strong{font-size:32px;line-height:1.2;overflow-wrap:anywhere}.snap-handwriting-reference span{font-size:13px;max-width:55%;overflow-wrap:anywhere}
.snap-handwriting-pad{padding:0 14px 12px;min-height:0;overflow:auto;overscroll-behavior:contain}.snap-handwriting .handwriting-input{max-width:none;margin:0;background:#edf4ef}.snap-handwriting .handwriting-board{width:min(100%,380px,52dvh);max-height:none;height:auto;margin-inline:auto;aspect-ratio:1}.snap-handwriting .handwriting-accepted,.snap-handwriting .handwriting-ink,.snap-handwriting .handwriting-hint{opacity:.45}
.snap-handwriting .handwriting-actions button{color:#173f36;background:#fffaf0}
@media(max-height:600px){.game-options header{padding-top:12px;padding-bottom:10px}.game-options footer{padding-top:10px;padding-bottom:12px}.snap-handwriting .handwriting-board{width:min(100%,260px,44dvh)}.snap-handwriting-reference strong{font-size:26px}}
@media(max-width:380px){.game-options header,.game-options-body{padding-left:14px;padding-right:14px}.game-options footer{padding-left:14px;padding-right:14px}.game-options footer button{flex:1;font-size:12px;padding:8px}.game-options h2{font-size:21px}}
