/* 0.48.7.1 — shared visual vocabulary for the new action hierarchy. */
:root{--action-positive4871:#9fbdac;--action-warn4871:#d1ab83;--action-row4871:rgba(116,145,131,.08)}
:root[data-theme="light"]{--action-positive4871:#365c4b;--action-warn4871:#80522c;--action-row4871:rgba(70,93,77,.055)}
html body .retired4871,html body #scene-back,html body #work-controls,html body #legacy-v44,html body #route-memo-delete{display:none!important}
#game-shell #primary-actions{display:flex!important;flex-wrap:wrap;gap:5px}
#game-shell #primary-actions>.scene-choice{flex:1 1 80px;min-width:0!important;padding:8px 5px!important;font-size:11px!important;white-space:nowrap}
#game-shell #primary-actions.hidden{display:none!important}
#game-shell [data-scene] .panel{margin:7px 0!important;border-color:var(--ui-border)!important;background:transparent!important;box-shadow:none!important;color:var(--ui-text)!important}
#game-shell [data-scene] .panel>.section-header h2,#game-shell [data-scene] h3{font-size:12px!important;line-height:1.45;margin:0!important}
#game-shell [data-scene] .panel>.section-header{margin-bottom:7px!important;padding-bottom:5px!important}
#game-shell [data-scene] .module-caption{line-height:1.55!important;font-size:10px!important;color:var(--ui-sub)!important;word-break:keep-all;overflow-wrap:anywhere}
#game-shell [data-scene] .row-actions{display:flex;gap:5px;flex-wrap:wrap}
#game-shell [data-scene] .v17-info{max-width:100%;min-width:0;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;border:1px solid var(--ui-border);background:var(--action-row4871);color:var(--ui-text);padding:9px;margin:5px 0}
#game-shell .subtabs4871{display:flex;gap:5px;margin:8px 0}
#game-shell .subtabs4871 button{flex:1;font-size:11px;padding:6px}
#game-shell .subtabs4871 button[aria-pressed="true"]{border-color:var(--ui-text);color:var(--ui-text);background:var(--action-row4871)}
#game-shell #gear-list,#game-shell #recipes-list{display:flex!important;flex-direction:column;gap:6px}
#game-shell #gear-list.hidden,#game-shell #recipes-list.hidden{display:none!important}
#game-shell .inventory-row4871{display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;grid-template-rows:auto auto;align-items:start;gap:3px 9px!important;padding:9px!important;margin:0!important;border:1px solid var(--ui-border)!important;border-radius:4px;background:var(--action-row4871)!important;min-width:0;max-width:100%;color:var(--ui-text)}
#game-shell .inventory-row4871>div:not(.item-actions4871){min-width:0;align-self:start}
#game-shell .inventory-row4871 h4{font-size:11px!important;line-height:1.5!important;margin:0!important;display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 7px;font-weight:700;color:var(--ui-text)!important}
#game-shell .inventory-row4871 p{font-size:10px!important;line-height:1.55!important;font-weight:400;margin:2px 0 3px!important;word-break:keep-all;overflow-wrap:anywhere}
#game-shell .inventory-row4871 small{font-size:9px!important;font-weight:400;line-height:1.5;display:block;color:var(--ui-sub)}
#game-shell .inventory-row4871 .item-actions4871{grid-column:2;justify-content:flex-end;min-height:26px;margin-top:1px}
#game-shell .pixel4871{display:flex;justify-content:center;align-items:center;grid-row:1/3;width:34px;height:34px;border-radius:3px;background:var(--shell-input);color:var(--ui-text);align-self:center}
#game-shell .pixel4871 svg{width:28px;height:28px;fill:currentColor;image-rendering:pixelated;display:block}
#game-shell .item-actions4871{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
#game-shell .item-action4871{display:inline-flex!important;justify-content:center!important;align-items:center!important;flex:none!important;width:28px!important;height:27px!important;min-width:28px!important;min-height:27px!important;padding:4px!important;border:1px solid var(--ui-border)!important;border-radius:4px!important;margin:0!important;background:var(--shell-panel)!important;color:var(--ui-text)!important}
#game-shell .item-action4871 .action-icon484{width:17px;height:17px}
#game-shell .equipped4871,#game-shell .craft-ready4871{font-size:9px!important;font-weight:600!important;color:var(--action-positive4871)!important}
#game-shell .bag-category4871{padding:4px 0 10px;border:0;margin:0;background:none}
#game-shell .bag-category4871>h4{font-size:11px!important;font-weight:700;border-bottom:1px solid var(--ui-border);padding:3px 0 7px;margin:2px 0 7px!important}
#game-shell .bag-category4871>.inventory-row4871{margin-bottom:6px!important}
#game-shell .base-project4871{border:1px solid var(--ui-border);padding:10px;margin:7px 0;border-radius:4px;background:var(--action-row4871)}
#game-shell .base-project4871 h4{font-size:12px;margin:0 0 4px}
#game-shell .base-project4871>small{font-size:10px;display:block;margin-bottom:7px}
#game-shell .base-project4871 .item-actions4871{justify-content:flex-end;margin-top:8px}
#game-shell .material-line4871{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10px;min-height:24px}
/* Timer button occupies the existing ring center, never its click-through overlay. */
#game-shell .pda-ring{position:relative}
#game-shell .pda-ring>.timer-stop4871{position:absolute!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important;width:48px!important;height:48px!important;min-width:0!important;min-height:0!important;border:0!important;border-radius:50%!important;background:transparent!important;padding:0!important;display:flex!important;justify-content:center!important;align-items:center!important;color:var(--ui-text)!important;font-size:12px!important;z-index:2;cursor:pointer}
#game-shell .timer-stop4871 i{display:none;font-style:normal;font-weight:900;font-size:23px;line-height:1}
#game-shell .timer-stop4871:hover span,#game-shell .timer-stop4871:focus-visible span{display:none}
#game-shell .timer-stop4871:hover i,#game-shell .timer-stop4871:focus-visible i{display:block}
#game-shell .timer-puzzle4871{margin:7px 0;padding:6px;font-size:10px;border:1px solid var(--ui-border);border-radius:5px}
#game-shell .timer-puzzle4871.hidden{display:none!important}
#game-shell .recovery-lead4871{font-size:13px!important;margin:5px 0 15px!important}
#game-shell .duration4871{display:flex;align-items:center;gap:5px;max-width:300px;margin:5px 0}
#game-shell .duration4871 label{flex:1;min-width:0;font-size:10px;text-align:center}
#game-shell .duration4871 input{display:block;width:100%;min-width:0;height:36px;box-sizing:border-box;text-align:center;padding:5px;font-size:14px}
#game-shell .duration4871 b{margin-top:15px;font-weight:400}
#game-shell .duration-options4871,#game-shell .recovery-start4871{display:flex;align-items:center;gap:7px;margin:9px 0;flex-wrap:wrap}
#game-shell .duration-options4871 select{flex:1;min-width:100px}
#game-shell .duration-options4871 button[aria-pressed=true]{background:var(--action-row4871);border-color:var(--ui-text)}
#game-shell #rest-form4871>small{font-size:10px;line-height:1.65;color:var(--ui-sub);display:block;margin-top:11px;word-break:keep-all}
#game-shell .recovery-start4871 button{flex:1;padding:8px}
#game-shell .clinic-target4871{display:flex;align-items:center;gap:8px;font-size:11px;margin:5px 0 11px}
#game-shell .clinic-target4871 select{flex:1;min-width:0}
#game-shell .treatment-row4871{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:6px 0;padding:9px;border:1px solid var(--ui-border);border-radius:4px}
#game-shell .treatment-row4871>div{min-width:0}
#game-shell .treatment-row4871 h4{font-size:11px;margin:0 0 4px!important}
#game-shell .treatment-row4871 small{font-size:9px;color:var(--ui-sub);word-break:keep-all;overflow-wrap:anywhere}
#game-shell .support-box4871,#game-shell #colony-rescue .cooperation-panel{padding:10px!important;border:1px solid var(--ui-border)!important;border-radius:5px!important;margin:9px 0!important;background:var(--action-row4871)!important}
#game-shell .support-box4871>h4{font-size:12px!important;margin:0 0 10px!important}
#game-shell .rescue-card4871{display:grid;grid-template-columns:34px minmax(0,1fr) 28px;gap:8px;align-items:center;border-top:1px solid var(--ui-border);padding:9px 0;min-width:0}
#game-shell .rescue-card4871 img{width:34px;height:34px;object-fit:cover;border-radius:4px;border:1px solid var(--ui-border)}
#game-shell .rescue-card4871 h4{margin:0!important;font-size:11px!important}
#game-shell .rescue-card4871 p{margin:4px 0!important;font-size:10px!important;line-height:1.6;white-space:pre-wrap;word-break:keep-all;overflow-wrap:anywhere}
#game-shell .rescue-card4871 small{font-size:9px}
#game-shell button:disabled{cursor:default!important}
#game-shell .colony-tabs button:disabled{pointer-events:auto!important}
#game-shell .cat-codex4871{border:1px solid var(--ui-border);border-radius:5px;padding:11px;margin:8px 0;background:var(--action-row4871)}
#game-shell .cat-codex4871>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#game-shell .cat-codex4871 h4{font-size:12px;margin:0}
#game-shell .cat-codex4871 :is(p,small){font-size:10px;line-height:1.65;word-break:keep-all}
/* Input/send pairs have no second border or asymmetric padding. */
#game-shell :is(.small-form,.game-mini-form,.pda-inline,.inline-form,#private-radio-form,#party-message-form-v45,#chat-form,#note-form){display:flex;align-items:center!important;gap:6px!important;padding:0!important;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;min-width:0}
#game-shell :is(.small-form,.game-mini-form,.pda-inline,.inline-form)>:is(input,textarea,select){flex:1;min-width:0;margin:0!important;align-self:center;box-sizing:border-box}
#game-shell :is(.small-form,.game-mini-form,.pda-inline,.inline-form)>button{flex:none;align-self:center;margin:0!important;display:inline-flex;align-items:center;justify-content:center}
#game-shell .note4871{border:0!important;border-bottom:1px solid var(--ui-border)!important;border-radius:0!important;padding:10px 0!important;margin:0!important;background:none!important}
#game-shell .note4871 .note-meta{display:flex;justify-content:space-between;align-items:center;gap:7px;font-size:11px;color:var(--ui-text)}
#game-shell .note4871 .note-meta small{font-size:9px;color:var(--ui-sub);font-weight:400}
#game-shell .note4871 .note-content{margin:6px 0 0!important;line-height:1.65;font-size:11px;white-space:pre-wrap;word-break:keep-all;overflow-wrap:anywhere}
#game-shell :is(#route-memo-form,.last-words-panel){border:0!important;border-top:1px solid var(--ui-border)!important;padding:12px 0!important;margin-top:13px!important;background:none!important}
#game-shell :is(#route-memo-form,.last-words-panel) :is(h4,label){font-size:12px!important;font-weight:700;display:block;margin:0 0 8px!important}
#game-shell :is(#route-memo-input,#last-words-input,#pending-wills textarea){width:100%;min-height:110px;box-sizing:border-box;resize:vertical;line-height:1.6;font-size:11px;padding:9px}
#game-shell .last-words-panel>p{font-size:9px!important;line-height:1.55;color:var(--ui-sub);margin:0 0 8px!important}
#game-shell #route-memo-form .row-actions,#game-shell #last-words-form{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}
#game-shell :is(#route-memo-form,#last-words-form) button{padding:5px 10px;font-size:10px;min-height:27px;width:auto;flex:none}
#game-shell #pending-wills details{margin:10px 0;padding:8px;border:1px solid var(--ui-border)}
#profile-dialog .achievement-entry.compact4871{display:grid;grid-template-columns:18px minmax(0,1fr);gap:8px;padding:8px 9px;border:1px solid var(--ui-border);background:var(--action-row4871);color:var(--ui-text)}
#profile-dialog .achievement-check4871{font-size:15px;line-height:1.5;color:var(--ui-text)}
#profile-dialog .achievement-top4871{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:11px}
#profile-dialog .achievement-copy4871 p{font-size:10px;line-height:1.55;margin:3px 0 0;word-break:keep-all}
#profile-dialog .title-chip4871{font-size:10px;padding:2px 6px;border:1px solid var(--ui-border);background:var(--shell-panel);color:var(--action-positive4871);margin:0;min-height:23px;opacity:1!important}
#profile-dialog .locked .title-chip4871{color:var(--ui-sub)}
#profile-dialog .achievement-entry .title-chip4871:disabled{cursor:default}
.action-dialog4871{color:var(--ui-text,#dee5de);background:var(--shell-panel,#202b25);border:1px solid var(--ui-border,#64766c);border-radius:9px;padding:18px;width:min(410px,calc(100vw - 32px));box-sizing:border-box;max-height:calc(100dvh - 32px);overflow:auto;font-family:inherit}
.action-dialog4871::backdrop{background:rgba(9,18,13,.55)}
.action-dialog4871 h3{font-size:15px;margin:0}
.action-dialog4871 p{font-size:12px;line-height:1.65;word-break:keep-all}
.action-dialog4871 label{display:block;font-size:11px;line-height:1.6;margin:10px 0}
.action-dialog4871 label[hidden]{display:none}
.action-dialog4871 :is(input,textarea,select){display:block;width:100%;min-width:0;box-sizing:border-box;margin:5px 0;background:var(--shell-input,#152019);color:var(--ui-text,#dee5de);border:1px solid var(--ui-border,#64766c);border-radius:4px;padding:9px;font:inherit}
.action-dialog4871 .dialog-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.action-dialog4871 button{background:var(--shell-input,#152019);color:var(--ui-text,#dee5de);border:1px solid var(--ui-border,#64766c);border-radius:4px;font:inherit;font-size:12px;padding:7px 11px;cursor:pointer}
.action-dialog4871 .dialog-header button{width:28px;height:28px;padding:0;display:flex;align-items:center;justify-content:center;font-size:19px}
.action-dialog4871 .dialog-actions4871{display:flex;justify-content:flex-end;gap:8px;margin-top:13px}
.action-dialog4871 .dialog-actions4871 button:last-child,#critical-form4871>button{border-color:var(--action-positive4871);font-weight:700}
.action-dialog4871 :is(#item-use-error4871,#critical-error4871){color:var(--action-warn4871);font-size:11px}
.critical-dialog4871{border-top:4px solid var(--action-warn4871)}
@media(max-width:480px){#game-shell #primary-actions>.scene-choice{font-size:10px!important;flex-basis:68px}#game-shell .scene-module-grid{grid-template-columns:1fr!important}#game-shell .inventory-row4871{grid-template-columns:29px minmax(0,1fr)!important;padding:8px!important;gap:3px 7px!important}#game-shell .pixel4871{width:29px;height:29px}#game-shell .inventory-row4871 h4{font-size:11px!important}.action-dialog4871{padding:14px}}
/* Legacy CSS hid every closed <details> in a scene, including new will forms.
   Hide inactive root scenes, not useful nested disclosures. */
#game-shell .scene-deck #scene-root [data-scene] details{display:block}
#game-shell .scene-deck #scene-root [data-scene] details.hidden{display:none!important}
#game-shell #pending-wills summary{font-size:11px;line-height:1.5;cursor:pointer}
#game-shell .inscription4871{margin-top:5px;font-size:10px}
