/* Isolated, mobile-first field interface; no portal styles or CRUD handlers replaced. */
.game-app{--bg:#101b23;--surface:#192a35;--field:#11212c;--ink:#f3f6f8;--muted:#bbccd7;--line:#425966;--accent:#edb25b;--good:#8ee0b1;--bad:#ffb9bd;--attention:#ffd485;color-scheme:dark;margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 system-ui,-apple-system,'Segoe UI',sans-serif;min-height:100dvh;padding-bottom:100px}
.game-app.light{--bg:#f2f5f5;--surface:#fff;--field:#f2f5f7;--ink:#122532;--muted:#405968;--line:#8b9aa3;--good:#176239;--bad:#982433;--attention:#794700;color-scheme:light}
.game-app *,.fg-entry *{box-sizing:border-box}.game-app [hidden]{display:none!important}.game-app h1,.game-app h2,.game-app h3{line-height:1.18;letter-spacing:-.035em;margin:0 0 16px}.game-app h1{font-size:32px}.game-app h2{font-size:24px}.game-app h3{font-size:20px}.game-app p{margin:0 0 16px}.game-app a{color:inherit;text-underline-offset:4px}.game-app small,.game-app .muted{color:var(--muted)}
.game-app button,.game-app .button,.game-app input,.game-app select,.game-app textarea{font:inherit;border-radius:14px;min-height:52px}.game-app button,.game-app .button{display:inline-flex;align-items:center;justify-content:center;gap:10px;background:var(--accent);color:#142431;border:1px solid transparent;padding:12px 18px;font-weight:750;text-decoration:none;cursor:pointer;touch-action:manipulation}.game-app button:active{transform:translateY(1px)}.game-app button:disabled{opacity:.55;cursor:wait}.game-app .secondary{background:var(--surface);color:var(--ink);border-color:var(--line)}.game-app .danger{color:var(--bad);border-color:var(--bad);background:var(--surface)}.game-app .compact{font-size:14px;min-height:48px;padding:10px 12px}.game-app :focus-visible{outline:3px solid var(--accent);outline-offset:3px}.game-app .full{width:100%}.game-app .eyebrow{font-size:12px;font-weight:800;letter-spacing:.15em;color:var(--attention);margin-bottom:12px}.game-app .stack{display:grid;gap:16px}.game-app .pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.game-header{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:1100px;margin:auto;padding:16px 18px;border-bottom:1px solid var(--line)}.game-brand{display:flex;align-items:center;gap:10px;font-weight:900;text-decoration:none;line-height:1.1}.game-brand img{border-radius:50%;background:#fff}.game-brand small{display:block;font-size:10px;letter-spacing:.1em;margin-top:5px}.game-header-actions{display:flex;gap:8px}.game-main{width:min(100% - 32px,640px);margin:24px auto}.game-main.wide{max-width:1100px;width:calc(100% - 32px)}.game-card{padding:24px;border:1px solid var(--line);border-radius:22px;background:var(--surface);margin-bottom:20px;overflow-wrap:anywhere}.game-message{position:sticky;z-index:5;top:0;max-width:1100px;margin:0 auto;background:var(--field);color:var(--ink);padding:0 18px;overflow-wrap:anywhere}.game-message:not(:empty){padding-block:14px;border-bottom:1px solid var(--line)}.game-message.error{background:#572b34;color:#fff}.game-skip{position:fixed;top:-100px;left:10px;z-index:50;padding:14px;background:var(--accent);color:#142431!important}.game-skip:focus{top:10px}
.game-app label{display:grid;gap:8px;font-weight:650;margin-bottom:18px}.game-app input,.game-app select,.game-app textarea{background:var(--field);color:var(--ink);border:1px solid var(--line);padding:13px 14px;width:100%;min-width:0}.game-app input::placeholder{color:var(--muted)}.game-app input[type=checkbox]{width:24px;min-height:24px;height:24px;accent-color:var(--accent);margin:2px 0}.game-app label.check{display:flex;align-items:flex-start;gap:12px;font-size:15px;font-weight:500}.game-app input[type=file]{font-size:14px}.game-photo-field{border:0;padding:0;margin:0 0 18px}.game-photo-field legend{font-weight:650;margin-bottom:6px}.game-photo-field>small{display:block;margin-bottom:12px}.game-app .game-photo-actions{grid-template-columns:1fr;margin-bottom:0}.game-app label.photo-choice{display:inline-flex;width:100%;margin:0;text-align:center}.game-app .photo-input{position:absolute;width:1px;height:1px;min-height:0;padding:0;border:0;opacity:0;overflow:hidden}.game-app .photo-preview{width:110px;height:110px;object-fit:cover;border-radius:18px;margin:0 auto 14px}.game-app .role-options{margin-bottom:24px}.role-options button{flex-direction:column;text-align:left;align-items:flex-start}.role-options strong{font-size:20px}.role-options span{font-size:13px;font-weight:500}.role-options button[aria-pressed=true]{border:2px solid var(--accent)}
.game-zone-field{border:0;padding:0;margin:0 0 20px}.game-zone-field legend{font-size:24px;line-height:1.18;font-weight:800;letter-spacing:-.035em;margin-bottom:16px}.game-zone-options{display:grid;grid-template-columns:1fr;gap:12px}.game-app label.game-zone-choice{display:block;margin:0;cursor:pointer}.game-zone-choice input{position:absolute;width:1px!important;height:1px;min-height:0!important;padding:0!important;border:0!important;opacity:0;overflow:hidden}.game-zone-choice span{position:relative;display:flex;align-items:center;justify-content:center;min-height:70px;padding:16px 46px 16px 18px;border:2px solid transparent;border-radius:16px;font-size:19px;font-weight:850;text-align:center;box-shadow:0 8px 18px #06121b29;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.game-zone-choice span:after{content:'✓';position:absolute;right:18px;display:grid;place-items:center;width:28px;height:28px;border:2px solid currentColor;border-radius:50%;opacity:0;transform:scale(.75);transition:opacity .15s ease,transform .15s ease}.game-zone-choice input:checked+span{border-color:#fff;box-shadow:0 0 0 3px var(--surface),0 0 0 6px var(--accent),0 10px 22px #06121b55;transform:translateY(-1px)}.game-zone-choice input:checked+span:after{opacity:1;transform:scale(1)}.game-zone-choice input:focus-visible+span{outline:3px solid var(--accent);outline-offset:4px}.game-zone-choice.zone-head span{background:#f50067;color:#fff}.game-zone-choice.zone-torso span{background:#376b93;color:#fff}.game-zone-choice.zone-arm span{background:#e2aa5e;color:#142431}.game-zone-choice.zone-leg span{background:#f3dfbb;color:#142431}
.game-status{border-left:5px solid var(--attention)}.game-status.good{border-left-color:var(--good)}.game-status.blocked{border-left-color:var(--bad)}.status-heading{display:flex;align-items:center;gap:12px}.status-heading span{font-size:32px}.status-heading h2{margin-bottom:8px}.game-clock{font-size:clamp(48px,14vw,76px);font-weight:850;line-height:1.1;letter-spacing:-.06em;font-variant-numeric:tabular-nums;margin:20px 0 12px}.game-clock.waiting{font-size:22px;letter-spacing:0}.game-lives{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:18px;border-top:1px solid var(--line);margin-top:20px}.game-lives strong{font-size:34px;line-height:1}.game-hearts{color:var(--bad);font-size:23px;letter-spacing:4px;margin-top:12px;overflow-wrap:anywhere}.game-qr{text-align:center}.game-qr-image{background:#fff;max-width:310px;margin:18px auto;padding:4px;border-radius:14px;overflow:hidden}.game-qr-image svg{display:block;width:100%;height:auto}.game-token{display:block;overflow-wrap:anywhere;font-size:13px;color:var(--muted);user-select:all}.game-person{text-align:center}.game-person img{width:170px;height:170px;object-fit:cover;border-radius:24px;margin:0 auto 18px;display:block}.game-person .avatar{display:grid;place-items:center;width:110px;height:110px;font-size:40px;font-weight:800;border-radius:24px;background:var(--field);margin:0 auto 18px}.game-badge{display:inline-block;padding:7px 12px;border:1px solid var(--line);border-radius:12px;font-size:14px;color:var(--muted);margin-bottom:12px}.game-number{font-size:40px;color:var(--attention);display:block;font-weight:850;letter-spacing:.04em}.game-help{font-size:14px;color:var(--muted)}
.game-role-review{border-color:var(--accent);box-shadow:inset 0 4px 0 var(--accent)}.game-review-alert{padding:14px 16px;border-radius:14px;background:color-mix(in srgb,var(--accent) 14%,var(--field));border:1px solid var(--accent)}.game-review-alert p:last-child{margin-bottom:0}.game-review-confirm{padding:14px;border:1px solid var(--accent);border-radius:14px;background:var(--field)}
.game-role-section{padding:18px;border:1px solid var(--line);border-radius:18px;margin:18px 0 24px}.game-role-section.medical{border-top:5px solid #55cfa0}.game-role-section.operator{border-top:5px solid #65a8d8}.game-role-section-title,.game-role-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.game-role-section-title h3,.game-role-heading h3{margin-bottom:0}.game-role-section-title{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--line)}.game-role-section-title span,.game-role-tag{display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:6px 11px;border-radius:999px;font-size:13px;font-weight:800}.game-role-section-title span{background:var(--field)}.game-role-tag.medical{background:#173f36;color:#9aebc7;border:1px solid #55cfa0}.game-role-tag.operator{background:#18384f;color:#a9daf8;border:1px solid #65a8d8}.game-person-row.medical{background:color-mix(in srgb,#55cfa0 5%,var(--surface))}.game-person-row.operator{background:color-mix(in srgb,#65a8d8 5%,var(--surface))}
.game-protocol-group{margin-top:30px}.game-protocol-cards{display:grid;grid-template-columns:1fr;gap:12px}.game-protocol-card{display:grid;align-content:start;gap:14px;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--field)}.game-protocol-card p{margin:0;color:var(--muted)}.game-protocol-card-title{display:flex;align-items:center;gap:12px}.game-protocol-card-title>span{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:12px;background:var(--accent);color:#142431;font-weight:900}.game-protocol-card h4{font-size:18px;line-height:1.2;margin:0 0 4px}.game-protocol-card small{color:var(--attention);font-weight:750}.game-protocol-meta{display:flex;flex-wrap:wrap;gap:7px}.game-protocol-meta span{padding:5px 9px;border:1px solid var(--line);border-radius:999px;font-size:12px;color:var(--muted);background:var(--surface)}.game-protocol-card button{margin-top:auto}.game-protocol-editor{scroll-margin-top:20px}
.game-bottom{position:fixed;bottom:0;left:0;right:0;z-index:6;display:flex;justify-content:center;gap:5px;padding:10px 8px max(10px,env(safe-area-inset-bottom));background:var(--bg);border-top:1px solid var(--line)}.game-bottom button{min-height:52px;padding:10px;flex:1;max-width:180px;background:transparent;color:var(--muted);font-size:14px}.game-bottom button[aria-current=page]{background:var(--accent);color:#142431}.game-dialog{max-width:560px;width:calc(100% - 24px);max-height:92dvh;padding:24px;border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);overflow:auto}.game-dialog::backdrop,.fg-entry::backdrop{background:#06121bcc;backdrop-filter:blur(4px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.scanner-frame{background:#060d12;border:2px solid var(--accent);border-radius:20px;overflow:hidden;margin-bottom:18px;min-height:180px}.scanner-frame video{display:block;width:100%;max-height:48dvh;object-fit:cover}.game-history details{border:1px solid var(--line);border-radius:16px;margin-bottom:14px;padding:16px;background:var(--surface)}.game-history summary{cursor:pointer;min-height:48px;list-style:none;display:flex;gap:12px;align-items:center}.game-history summary:after{content:'＋';margin-left:auto}.game-history details[open] summary:after{content:'−'}.game-history summary small{display:block}.game-history summary img{width:56px;height:56px;object-fit:cover;border-radius:12px}.game-history dl{margin-bottom:0}.game-history dt{color:var(--muted);font-size:13px;margin-top:12px}.game-history dd{margin:3px 0 0}.game-protocol{border:1px solid var(--line);padding:18px;border-radius:16px;margin-bottom:12px}.game-protocol h3{margin-bottom:10px}.game-filter{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}.game-filter button{flex:1}.game-filter button[aria-pressed=true]{background:var(--accent);color:#142431}.game-person-row .game-filter{margin-bottom:0}.game-person-row .game-filter button{min-width:140px;line-height:1.25;overflow-wrap:normal;word-break:normal}.game-terms{white-space:pre-wrap;line-height:1.7;overflow-wrap:anywhere}.game-admin-nav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}.game-admin-nav button[aria-pressed=true]{background:var(--accent);color:#142431}.game-admin-grid{display:grid;gap:18px}.game-admin-row{display:grid;gap:12px;padding:18px;border:1px solid var(--line);border-radius:16px;margin-bottom:12px}.game-admin-row p{margin-bottom:8px}.game-request-photos{display:flex;gap:16px;flex-wrap:wrap}.game-request-photos figure{margin:0}.game-request-photos img{width:120px;height:140px;object-fit:cover;border-radius:14px}.game-request-photos figcaption{font-size:12px;color:var(--muted)}
.fg-entry{font:16px/1.5 system-ui,sans-serif;color:#f3f6f8;background:#192a35;border:1px solid #617987;border-radius:24px;width:min(520px,calc(100% - 24px));padding:24px;max-height:90dvh;overflow:auto}.fg-entry h2{font-size:26px;margin:0 0 12px;color:#f3f6f8}.fg-entry p{color:#bbccd7}.fg-entry .fg-close{float:right;border:1px solid #617987;background:#11212c;color:white;min-height:48px;min-width:48px;border-radius:14px;font-size:28px;cursor:pointer}.fg-entry a{display:block;color:#f3f6f8;text-decoration:none;background:#11212c;border:1px solid #617987;padding:20px;margin-top:16px;border-radius:18px;min-height:90px}.fg-entry a strong{display:block;color:#edb25b;font-size:22px;margin-bottom:6px}.fg-entry a span{color:#bbccd7;font-size:15px}.fg-entry :focus-visible{outline:3px solid #edb25b;outline-offset:3px}
@media(max-width:600px){.fg-entry{margin:auto auto 12px}.game-card{padding:22px 18px}.game-header{padding-inline:16px}.game-header-actions{gap:5px}.game-header-actions .compact{font-size:13px;padding:9px}.game-admin-nav{display:grid;grid-template-columns:1fr 1fr}.game-admin-nav button{padding-inline:8px}.game-admin-nav button:last-child:nth-child(odd){grid-column:1/-1}.game-role-section{padding:12px}.game-person-row{padding:16px 14px}.game-person-row .game-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}.game-person-row .game-filter button{width:100%;min-width:0;min-height:56px;padding:10px 8px;font-size:14px;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none}.game-person-row .game-filter button.danger:last-child:nth-child(odd){grid-column:1/-1}.game-protocol-card{padding:16px}.game-protocol-editor .pair{grid-template-columns:1fr}}
@media(max-width:340px){.game-person-row .game-filter{grid-template-columns:1fr}}
@media(min-width:520px){.game-app .game-photo-actions,.game-zone-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:800px){.game-main{margin-top:40px}.game-card{padding:30px}.game-admin-grid,.game-protocol-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.game-main h1{font-size:40px}.game-bottom{max-width:680px;margin:auto;border-inline:1px solid var(--line);border-radius:20px 20px 0 0}.game-main.wide{width:min(100% - 64px,1100px)}}
@media(prefers-reduced-motion:reduce){.game-app *{scroll-behavior:auto!important;transition:none!important}.game-app button:active{transform:none}}
