/* Modeless phone controls share their input elements with desktop. */
.workspace .stage-actions .mobile-open-controls,.mobile-range-fields{display:none}
.scene-label-short{display:none}
.mobile-controls-sheet:not([open]){display:none}
@media(max-width:900px){
 .workspace .controls.hud-controls{display:none}
 .workspace .stage-bottom{left:16px;right:16px;bottom:calc(68px + env(safe-area-inset-bottom,0px));padding:15px 0 0;display:block;background:none}
 .workspace .stage-bottom .scale-card{max-width:none;margin-bottom:12px;gap:3px;text-align:center}
 .workspace .scale-heading,.workspace .scale-note{display:none}
 .workspace .scale-card b{font-size:10px}
 .workspace .stage-actions{display:grid;grid-template-columns:1.15fr 1fr;gap:10px;width:100%;margin:0}
 .workspace .stage-actions .mobile-open-controls{display:flex;align-items:center;justify-content:center;min-width:0;min-height:60px;padding:12px 15px;border:1px solid #c2d3ac;border-radius:14px;background:#d8e5c6;color:#253e32;font-size:16px;font-weight:700;gap:10px;box-shadow:0 5px 24px #07171238;backdrop-filter:none}
 .workspace .stage-actions .mobile-open-controls span{display:grid;place-items:center;min-width:25px;height:25px;border-radius:50%;background:#b9cca7;color:#263e30;font-size:13px}
 .workspace .stage-actions .scene-report-button{min-width:0;min-height:60px;padding:10px 15px;width:100%;align-items:center}
 .workspace .stage-actions .scene-report-button>b{font-size:15px;gap:6px;justify-content:center}.workspace .stage-actions .scene-report-button i{font-size:20px}
 .hud-toolbar{bottom:calc(12px + env(safe-area-inset-bottom,0px));left:16px;right:16px;min-height:44px}.hud-toolbar .active-tags{min-height:44px;align-items:center}.hud-toolbar .active-tags button{font-size:12px;min-height:44px;padding:10px 13px}.hud-toolbar .empty-tag{font-size:11px;white-space:normal;line-height:1.6}.hud-toolbar>[data-action=reset]{min-height:44px;font-size:12px;padding:10px}
 .hud-scroll-hint{display:none}.workspace .crowd-bubble{bottom:calc(170px + env(safe-area-inset-bottom,0px));font-size:11px}.hud-feedback{bottom:calc(180px + env(safe-area-inset-bottom,0px))}
 .workspace .result{left:16px;right:16px}
 .mobile-controls-sheet[open]{display:flex;flex-direction:column;position:fixed;inset:auto 0 var(--sheet-keyboard,0px);margin:0 auto;width:100%;max-width:620px;height:min(82dvh,760px);max-height:calc(var(--sheet-available,100dvh) - 12px);padding:0;border:1px solid #6b8273;border-bottom:0;border-radius:23px 23px 0 0;background:#f5f5ec;color:#263e32;box-shadow:0 -12px 70px #05120f50;overflow:hidden;color-scheme:light;animation:mobileSheetIn .2s ease-out}
 .mobile-controls-sheet::backdrop{background:#081b234d;backdrop-filter:none}
 .mobile-sheet-handle{height:4px;width:36px;border-radius:4px;background:#c0cbbb;margin:10px auto 4px;flex:none}
 .mobile-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 20px 14px;flex:none}
 .mobile-sheet-header h2{font-size:22px;letter-spacing:-.6px;margin:0 0 6px}.mobile-sheet-header p{font-size:11px;line-height:1.6;color:#6a7e61;margin:0}
 .mobile-sheet-header button{min-width:44px;min-height:44px;border:1px solid #d6dece;border-radius:50%;color:#4c6645;background:#fffef7;font-size:19px}
 .mobile-sheet-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:0 16px;padding:0 0 12px;flex:none;border-bottom:1px solid #dce3d3}
 .mobile-sheet-tabs button{position:relative;min-width:0;min-height:46px;border:1px solid transparent;border-radius:11px;color:#5e7256;font-size:14px;padding:8px 3px;background:#e9eddf}
 .mobile-sheet-tabs button[aria-selected=true]{background:#2e4c3c;color:#f6f8ed;border-color:#2e4c3c;font-weight:700}
 .mobile-sheet-tabs button[data-active=true]:after{content:'';position:absolute;top:6px;right:6px;width:5px;height:5px;background:#c87f63;border-radius:50%}.mobile-sheet-tabs button[aria-selected=true]:after{background:#f3c6a3}
 .mobile-sheet-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-behavior:auto;scrollbar-width:thin;padding:16px 18px 24px;-webkit-overflow-scrolling:touch}
 .mobile-sheet-scroll:focus-visible{outline:2px solid #809c6e;outline-offset:-3px}
 .workspace .mobile-controls-sheet .controls.hud-controls{position:static;inset:auto;display:grid;grid-template-columns:minmax(0,1fr);gap:14px;width:100%;height:auto;max-height:none;overflow:visible;padding:0;margin:0;background:none;border:0;box-shadow:none;pointer-events:auto;color:#2c4536;color-scheme:light;scroll-snap-type:none}
 .mobile-controls-sheet .hud-basic,.mobile-controls-sheet .preferences-panel,.workspace .mobile-controls-sheet .control-fields,.mobile-controls-sheet .preferences-content,.mobile-controls-sheet .preference-grid{display:contents}
 .mobile-controls-sheet .hud-heading,.mobile-controls-sheet .preferences-header,.mobile-controls-sheet .scope-note,.mobile-controls-sheet .data-notice,.mobile-controls-sheet .pending-summary{display:none}
 .mobile-controls-sheet [data-mobile-group]{display:none!important}
 .mobile-controls-sheet[data-category=basic] [data-mobile-group=basic],.mobile-controls-sheet[data-category=body] [data-mobile-group=body],.mobile-controls-sheet[data-category=life] [data-mobile-group=life],.mobile-controls-sheet[data-category=money] [data-mobile-group=money],.mobile-controls-sheet[data-category=mbti] [data-mobile-group=mbti]{display:block!important}
 .mobile-controls-sheet .hud-controls .control-block,.mobile-controls-sheet .hud-controls .control-block+.control-block,.mobile-controls-sheet .hud-controls .preference-grid>label,.mobile-controls-sheet .hud-controls .preference-field,.mobile-controls-sheet .hud-controls .mbti-section{width:100%;min-width:0;min-height:0;flex:none;margin:0;padding:17px;border:1px solid #d7e0ce;border-radius:14px;background:#fffef8;backdrop-filter:none;scroll-snap-align:none}
 .mobile-controls-sheet .hud-controls .control-block:focus-within,.mobile-controls-sheet .hud-controls .preference-field:focus-within,.mobile-controls-sheet .hud-controls .preference-grid>label:focus-within{background:#fffef8;border-color:#8fa77c}
 .mobile-controls-sheet .hud-controls .control-title{margin:0 0 14px;min-height:28px;align-items:center;gap:8px}
 .mobile-controls-sheet .hud-controls .control-title h3,.mobile-controls-sheet .hud-controls .control-title>label,.mobile-controls-sheet .hud-controls .preference-grid label,.mobile-controls-sheet .hud-controls .preference-field>label{font-size:16px;line-height:1.6;color:#2c4737}
 .mobile-controls-sheet .hud-controls .tag{font-size:9px;padding:3px 6px;color:#6e7f60;background:#eef1e5;border-color:#d7dfcb}
 .mobile-controls-sheet .hud-controls select,.mobile-controls-sheet .hud-controls .number-range input{font-size:16px;min-height:50px;padding:12px 30px 12px 12px;border:1px solid #b8c8aa;background-color:#f6f8ef;color:#2b4835;backdrop-filter:none;border-radius:9px;color-scheme:light;box-sizing:border-box}
 .mobile-controls-sheet .hud-controls select option{color:#223e2d;background:#fffef8}
 .mobile-controls-sheet .hud-controls .preference-grid select{margin-top:9px;font-size:16px}
 .mobile-controls-sheet .hud-controls .number-range{gap:9px;margin-top:12px}.mobile-controls-sheet .hud-controls .number-range input{padding:12px 8px;width:100%;min-width:0}.mobile-controls-sheet .hud-controls .number-range input::placeholder{color:#809371}.mobile-controls-sheet .hud-controls .number-range span{color:#718461;font-size:14px}
 .mobile-controls-sheet .hud-controls .preference-grid .hud-field-note{display:block;font-size:11px;line-height:1.8;color:#738369;margin-top:10px}.mobile-controls-sheet .hud-controls .preference-grid label small,.mobile-controls-sheet .hud-controls .preference-field small{font-size:11px;line-height:1.8;color:#748365}.mobile-controls-sheet .hud-controls .preference-grid .assumption-warning{font-size:11px;color:#976d4b}
 .mobile-controls-sheet .hud-controls .segmented{display:flex;padding:4px;border:1px solid #cbd8bd;border-radius:12px;background:#edf2e4;gap:4px}.mobile-controls-sheet .hud-controls .segmented button{min-height:48px;font-size:16px;color:#58724c;padding:10px;border-radius:8px}.mobile-controls-sheet .hud-controls .segmented button[aria-pressed=true]{color:#f5f8eb;background:#36583f;box-shadow:none}
 .mobile-controls-sheet .hud-controls .switch{width:52px;height:44px;margin:0}.mobile-controls-sheet .hud-controls .switch input{width:52px;height:44px}.mobile-controls-sheet .hud-controls .switch span{inset:7px 0;border-radius:16px;background:#cdd8c2;border:0}.mobile-controls-sheet .hud-controls .switch span:after{width:24px;height:24px;left:3px;top:3px;background:#fff;transform:none}.mobile-controls-sheet .hud-controls .switch input:checked+span{background:#779763}.mobile-controls-sheet .hud-controls .switch input:checked+span:after{transform:translateX(22px)}
 .mobile-controls-sheet .hud-controls .range-body{opacity:1}.mobile-controls-sheet .hud-controls .range-value{margin:0 0 12px}.mobile-controls-sheet .hud-controls .range-value b,.mobile-controls-sheet .hud-controls .control-block:not(.active) .range-value b{font-size:14px;color:#557149}.mobile-controls-sheet .double-range,.mobile-controls-sheet .range-limits,.mobile-controls-sheet .range-hint{display:none}
 .mobile-controls-sheet .mobile-range-fields{display:block}.mobile-range-row{display:grid;grid-template-columns:30px 44px minmax(48px,1fr) 44px 24px;align-items:center;gap:6px;margin-top:10px}.mobile-range-row label,.mobile-range-row>span{font-size:12px;color:#6c815f}.mobile-range-row button{width:44px;height:48px;border-radius:10px;background:#e7eddc;color:#3a5830;border:1px solid #ccd9bd;font-size:23px;line-height:1}.mobile-range-row button:disabled{opacity:.35}.mobile-range-row input{min-width:0;width:100%;height:48px;padding:8px 4px;font-size:18px;line-height:1.3;text-align:center;color:#2c4935;background:#fff;border:1px solid #afc39d;border-radius:8px;font-variant-numeric:tabular-nums;appearance:textfield}.mobile-range-row input::-webkit-inner-spin-button{appearance:none}.mobile-range-fields>p{font-size:10px;color:#7a8d6c;line-height:1.7;margin:12px 0 0}
 .mobile-controls-sheet .hud-controls .mbti-section h3 small{font-size:11px;color:#73886a}.mobile-controls-sheet .hud-controls .mbti-section p{font-size:11px;line-height:1.7;color:#718667;margin:8px 0 14px}.mobile-controls-sheet .hud-controls .mbti-section>p:first-of-type{display:block}
 .mobile-controls-sheet .hud-controls #mbti-types{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.mobile-controls-sheet .hud-controls #mbti-types button{min-height:48px;padding:10px 2px;font-size:14px;color:#3e603b;background:#edf2e4;border:1px solid #c7d5ba;border-radius:9px;backdrop-filter:none}.mobile-controls-sheet .hud-controls #mbti-types button[aria-pressed=true]{background:#3c5e40;color:#f9faef;border-color:#3c5e40}.mobile-controls-sheet .hud-controls #mbti-summary{font-size:11px;line-height:1.8;margin:14px 0 0}
 .mobile-controls-sheet .hud-controls [aria-invalid=true]{border-color:#be725a;background:#fff1e9}
 .mobile-sheet-footer{flex:none;padding:12px 20px max(16px,env(safe-area-inset-bottom));border-top:1px solid #d3dec9;background:#f5f5ec;box-shadow:0 -7px 25px #283a1c08}
 .mobile-sheet-result{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}.mobile-sheet-result span{font-size:11px;color:#6a805c}.mobile-sheet-result strong{font-size:17px;font-weight:600;color:#2c4c36;text-align:right}.mobile-sheet-actions{display:grid;grid-template-columns:104px minmax(0,1fr);gap:10px}.mobile-sheet-actions button{min-height:50px;padding:12px;border:1px solid #c2d0b4;border-radius:12px;font-size:13px;color:#58704e;background:#ecf0e2}.mobile-sheet-actions #mobile-done{font-size:16px;font-weight:700;background:#334f3e;color:#f9faec;border-color:#334f3e}.mobile-sheet-actions #mobile-done:disabled{opacity:.5}.mobile-sheet-actions #mobile-done span{margin-left:12px}
 #mobile-control-error{font-size:12px;line-height:1.6;color:#9e5137;padding:8px 12px;border-radius:8px;background:#f8e6d9;margin:0 0 10px}#mobile-control-error:empty{display:none}
 .mobile-controls-sheet :focus-visible{outline:2px solid #72995b;outline-offset:3px}
 .mobile-controls-sheet[data-keyboard=true] .mobile-sheet-handle,.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-header p,.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-result{display:none}.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-header{padding:3px 16px}.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-header h2{font-size:18px;margin:0}.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-tabs{padding-bottom:5px}.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-tabs button{min-height:44px}.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-footer{padding:8px 16px}.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-actions button{min-height:44px;padding:8px}
}
@media(max-width:360px){.mobile-sheet-scroll{padding:12px}.mobile-controls-sheet .hud-controls .control-block,.mobile-controls-sheet .hud-controls .control-block+.control-block{padding:14px}.mobile-sheet-header{padding-left:16px;padding-right:16px}.mobile-sheet-header p{font-size:10px}.mobile-sheet-tabs{margin:0 12px}.mobile-sheet-tabs button{font-size:13px}.mobile-sheet-result{gap:6px}.mobile-sheet-result strong{font-size:15px}.mobile-sheet-footer{padding-left:16px;padding-right:16px}}
@media(max-width:900px) and (max-height:500px){.mobile-controls-sheet[open]{height:calc(var(--sheet-available,100dvh) - 6px);max-height:calc(var(--sheet-available,100dvh) - 6px)}.mobile-sheet-handle,.mobile-sheet-header p{display:none}.mobile-sheet-header{padding:4px 16px}.mobile-sheet-header h2{font-size:18px;margin:0}.mobile-sheet-tabs{padding-bottom:5px}.mobile-sheet-tabs button{min-height:44px}.mobile-sheet-footer{padding-top:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}.mobile-sheet-result{margin-bottom:6px}.mobile-sheet-actions button{min-height:44px}}
@keyframes mobileSheetIn{from{transform:translateY(35px);opacity:.7}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.mobile-controls-sheet[open]{animation:none}}

/* A modeless, single-condition dock leaves the upper crowd visible and live. */
.mobile-sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:900px){
 .workspace.mobile-editing .population-stage{height:var(--mobile-scene-height,60svh);transition:height .2s ease-out}
 .workspace.mobile-editing .stage-bottom,.workspace.mobile-editing .hud-toolbar,.workspace.mobile-editing .hud-feedback,.workspace.mobile-editing .crowd-bubble{display:none}
 .workspace.mobile-editing .ratio-readout,.workspace.mobile-editing .ratio-note,.workspace.mobile-editing .result details,.workspace.mobile-editing #empty-message{display:none}
 .workspace.mobile-editing .result{top:50px;pointer-events:none}.workspace.mobile-editing .result-number{font-size:32px;margin:0}.workspace.mobile-editing .result #result-caption{margin:3px 0 0;font-size:9px}.workspace.mobile-editing .result-kicker{margin-bottom:2px}
 .mobile-controls-sheet[open]{z-index:30;height:var(--compact-height,40dvh);max-height:var(--compact-height,40dvh);max-width:none;border-radius:18px 18px 0 0;box-shadow:0 -5px 20px #0617142b;animation:none}
 .mobile-sheet-header,.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;gap:4px;padding:5px 10px;align-items:center}
 .mobile-sheet-header button{height:44px;min-width:44px;padding:0;border:0;background:#e7eddf;border-radius:10px;font-size:21px}.mobile-sheet-header button:disabled{opacity:.35;cursor:default}
 .mobile-field-picker{min-width:0}.mobile-field-picker select{width:100%;min-width:0;min-height:44px;font-size:16px;font-weight:600;padding:8px 22px 8px 10px;border:1px solid #c7d4bc;border-radius:10px;background:#fffef8;color:#304c38}
 .mobile-sheet-scroll{padding:0 12px 5px}.workspace .mobile-controls-sheet .controls.hud-controls{gap:0}
 .workspace .mobile-controls-sheet [data-mobile-group][data-mobile-active=false]{display:none!important}
 .workspace .mobile-controls-sheet [data-mobile-group][data-mobile-active=true]{display:block!important}
 .mobile-controls-sheet .hud-controls .control-block,.mobile-controls-sheet .hud-controls .control-block+.control-block,.mobile-controls-sheet .hud-controls .preference-grid>label,.mobile-controls-sheet .hud-controls .preference-field,.mobile-controls-sheet .hud-controls .mbti-section{padding:7px 10px;border-radius:10px}
 .mobile-controls-sheet .hud-controls .control-title{margin:0 0 4px;min-height:26px}.mobile-controls-sheet .hud-controls .control-title h3,.mobile-controls-sheet .hud-controls .control-title>label{font-size:14px}
 .mobile-controls-sheet .hud-controls .tag,.mobile-controls-sheet .hud-controls .range-value,.mobile-range-fields>p,.mobile-controls-sheet .hud-controls .preference-grid .hud-field-note,.mobile-controls-sheet .hud-controls .preference-grid label small,.mobile-controls-sheet .hud-controls .preference-field small,.mobile-controls-sheet .hud-controls .mbti-section p,.mobile-controls-sheet .hud-controls #mbti-summary,.mobile-controls-sheet .hud-controls .mbti-section h3{display:none}
 .mobile-range-row{margin-top:4px;gap:5px;grid-template-columns:28px 44px minmax(48px,1fr) 44px 20px}.mobile-range-row input,.mobile-range-row button{height:44px}.mobile-range-row input{font-size:16px}
 .mobile-controls-sheet .hud-controls .number-range{margin-top:5px;gap:6px}.mobile-controls-sheet .hud-controls select,.mobile-controls-sheet .hud-controls .number-range input{min-height:44px;padding:8px;font-size:16px}.mobile-controls-sheet .hud-controls .preference-grid select{margin-top:5px}
 .mobile-controls-sheet .hud-controls #mbti-types{gap:5px}.mobile-controls-sheet .hud-controls #mbti-types button{min-height:44px;padding:6px 2px;font-size:13px}.mobile-controls-sheet .hud-controls #mbti-types button span{display:none}
 .mobile-sheet-footer,.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-footer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;padding:5px 10px max(5px,env(safe-area-inset-bottom));box-shadow:none;align-items:center}
 .mobile-sheet-result,.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-result{display:flex;flex-direction:column;gap:2px;align-items:flex-start;margin:0}.mobile-sheet-result span{font-size:9px}.mobile-sheet-result strong{font-size:14px;line-height:1.3;text-align:left}
 .mobile-sheet-actions{grid-template-columns:auto auto;gap:5px}.mobile-sheet-actions button,.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-actions button{min-height:44px;padding:8px 11px;font-size:12px}.mobile-sheet-actions #mobile-done{font-size:13px}
 #mobile-control-error{grid-column:1/-1;margin:0;padding:4px 8px;font-size:11px}
 .workspace.mobile-editing .member-pages{bottom:8px}
}
@media(prefers-reduced-motion:reduce){.workspace.mobile-editing .population-stage{transition:none}}

/* Keep the editor to a shallow toolbar; the live result belongs in the scene. */
@media(max-width:900px){
 .workspace .mobile-controls-sheet[open]{height:var(--compact-height,232px);max-height:var(--compact-height,232px);border-radius:14px 14px 0 0}
 .mobile-sheet-header,.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-header{grid-template-columns:44px minmax(0,1fr) 44px 44px;gap:3px;padding:4px 8px 2px}
 .mobile-sheet-header button{border-radius:8px}
 .mobile-sheet-header :focus-visible{outline-offset:-3px}
 .mobile-field-picker select{border:0;background:transparent;padding:7px 20px 7px 4px}
 .mobile-sheet-scroll{padding:2px 10px max(6px,env(safe-area-inset-bottom,0px));overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}
 .workspace .mobile-controls-sheet .controls.hud-controls{gap:0}
 .mobile-controls-sheet .hud-controls .control-block,.mobile-controls-sheet .hud-controls .control-block+.control-block,.mobile-controls-sheet .hud-controls .preference-grid>label,.mobile-controls-sheet .hud-controls .preference-field,.mobile-controls-sheet .hud-controls .mbti-section{padding:0;border:0;border-radius:0;background:transparent}
 .mobile-controls-sheet .hud-controls [data-mobile-field=sex] .control-title,.mobile-controls-sheet .hud-controls [data-mobile-field=region] .control-title,.mobile-controls-sheet .hud-controls .mbti-section .control-title,.mobile-controls-sheet .hud-controls .preference-field>label{display:none}
 .mobile-controls-sheet .hud-controls .preference-grid>label{font-size:0;line-height:0}
 .mobile-controls-sheet .hud-controls .preference-grid select,.mobile-controls-sheet .hud-controls .number-range{margin:0}
 .mobile-controls-sheet .hud-controls .number-range{gap:6px}
 .mobile-controls-sheet .hud-controls [data-mobile-field=income] .number-range:after{content:'만원 / 년';font-size:10px;line-height:1.2;align-self:center;white-space:nowrap;color:#64765d}
 .mobile-controls-sheet .hud-controls [data-mobile-field=income] .number-range{grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr) auto}
 .mobile-controls-sheet .hud-controls [data-mobile-field=asset] .number-range{margin-top:5px}
 .mobile-controls-sheet .hud-controls .control-title{height:38px;min-height:38px;margin:0;justify-content:flex-end}
 .mobile-controls-sheet .hud-controls .control-title>label:not(.switch){font-size:0;line-height:0}
 .mobile-controls-sheet .hud-controls .control-title>label:not(.switch):after{content:'조건 적용';font-size:11px;line-height:1.4;color:#697d60;margin-right:8px}
 .mobile-controls-sheet .hud-controls .switch,.mobile-controls-sheet .hud-controls .switch input{height:38px}.mobile-controls-sheet .hud-controls .switch span{inset:4px 0}
 .mobile-controls-sheet .mobile-range-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
 .mobile-range-row{display:grid;grid-template-columns:44px minmax(38px,1fr) 44px;grid-template-rows:14px 44px;gap:2px;margin:0;min-width:0}
 .mobile-range-row>label{grid-row:1;grid-column:1/4;font-size:10px;line-height:14px}.mobile-range-row>span{grid-row:1;grid-column:3;font-size:10px;line-height:14px;justify-self:end}
 .mobile-range-row button:nth-child(2){grid-row:2;grid-column:1}.mobile-range-row input{grid-row:2;grid-column:2;padding:4px 0;font-size:16px;height:44px}.mobile-range-row button:nth-child(4){grid-row:2;grid-column:3}
 .mobile-range-row button{height:44px;border-radius:7px;font-size:20px}
 .mobile-controls-sheet .hud-controls .segmented{padding:0;border:0;background:none}.mobile-controls-sheet .hud-controls .segmented button{min-height:44px;padding:8px}
 .mobile-controls-sheet .hud-controls #mbti-types{display:grid;grid-template-rows:repeat(4,32px);grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-flow:row;gap:3px;overflow:visible;padding:0;scroll-snap-type:none}
 .mobile-controls-sheet .hud-controls #mbti-types button{min-height:32px;height:32px;padding:2px;font-size:12px;line-height:1.2;border-radius:7px}
 #mobile-control-error{flex:none;margin:0;padding:4px 10px;border-radius:0;font-size:11px;line-height:1.35;max-height:34px;overflow:auto}
 .workspace .stage-top{display:flex;justify-content:space-between;gap:8px;height:56px;padding:6px 12px;align-items:center}
 .workspace .stage-top .live-pill{display:none}.workspace .scene-brand{flex:none;min-width:28px;min-height:44px}.workspace .scene-brand span{display:none}
 .workspace .scene-nav{min-width:0;gap:8px;align-items:center;justify-content:flex-end;white-space:nowrap}.workspace .scene-nav button{min-height:44px;font-size:10px;line-height:1.2;white-space:nowrap;padding:6px 0}
 .workspace .scene-nav .member-launch{min-height:36px;font-size:10px;padding:6px 8px;line-height:1.2}
 .workspace .scene-nav .scene-label-full{display:none}.workspace .scene-nav .scene-label-short{display:inline}
 .workspace .result,.workspace.mobile-editing .result{top:64px;left:12px;right:12px}.workspace.mobile-editing .result-number{font-size:30px}.workspace.mobile-editing .result-kicker{display:none}
 .workspace.mobile-editing .result #result-caption{min-height:0;margin:2px 0 0;font-size:10px;line-height:16px}
 .workspace.mobile-editing .result .type-comment{display:block;position:relative;inset:auto;height:70px;min-height:70px;max-width:360px;margin:6px auto 0;padding:3px 8px;pointer-events:none}
 .workspace.mobile-editing .result .type-comment .comment-header{display:none}
 .workspace.mobile-editing .result .type-comment h3{font-size:12px;line-height:18px;margin:0 0 2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .workspace.mobile-editing .result .type-comment p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:0;font-size:10px;line-height:14px;margin:0;color:#c0cebf}
 .mobile-controls-sheet .double-range{display:block;height:44px;min-height:44px;margin:0 14px;touch-action:none}
 .mobile-controls-sheet .double-range .range-track{top:20px;height:4px;border-radius:3px}
 .mobile-controls-sheet .double-range input{height:44px;top:0;left:-14px;width:calc(100% + 28px);touch-action:none}
 .mobile-controls-sheet .double-range input:focus-visible{outline:none;z-index:2}
 .mobile-controls-sheet .double-range input::-webkit-slider-thumb{width:28px;height:28px;border-width:3px;box-shadow:0 2px 6px #20352a26}
 .mobile-controls-sheet .double-range input::-moz-range-thumb{width:22px;height:22px;border-width:3px;box-shadow:0 2px 6px #20352a26}
 .mobile-controls-sheet .double-range input:focus-visible::-webkit-slider-thumb{outline:2px solid #365b40;outline-offset:3px}
 .mobile-controls-sheet .double-range input:focus-visible::-moz-range-thumb{outline:2px solid #365b40;outline-offset:3px}
}

.mobile-select-button{display:none}
/* Centered collapse handle and a quiet, compact navigation row. */
@media(max-width:900px){
 .workspace .mobile-controls-sheet[open]{border:1px solid #e2e6dc;border-bottom:0;border-radius:24px 24px 0 0;background:#faf9f4;box-shadow:0 -10px 36px #071b2033}
 .mobile-sheet-header,.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-header{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0 16px 4px;background:#faf9f4;border-bottom:1px solid #e8eade}
 .mobile-sheet-grip{display:grid;grid-template-columns:minmax(0,1fr) 80px minmax(0,1fr);align-items:center;height:44px;flex:none}
 .mobile-step-label{font-size:10px;line-height:16px;font-weight:500;letter-spacing:.3px;color:#85917f;white-space:nowrap}.mobile-step-label b{font-weight:600;color:#50684f;margin-left:5px;font-variant-numeric:tabular-nums}.mobile-step-label>span{color:#a0aa98}
 .mobile-sheet-header .mobile-collapse-handle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:80px;height:44px;min-height:44px;padding:0;border:0;border-radius:14px;background:transparent;color:#6d856a;box-shadow:none;touch-action:manipulation}
 .mobile-grip-mark{display:block;width:28px;height:3px;border-radius:99px;background:#b3c0a8}.mobile-collapse-handle svg{display:block}
 .mobile-sheet-header .mobile-collapse-handle:hover{background:#edf1e6}.mobile-sheet-header .mobile-collapse-handle:active{background:#e4ebdc}
 .mobile-field-status{justify-self:end;display:inline-flex;align-items:center;gap:4px;font-size:10px;line-height:16px;color:#87917e;padding:3px 7px;border-radius:99px;white-space:nowrap;background:#f0f2ea}
 .mobile-field-status[data-active=true]{color:#456746;background:#e7efdf}.mobile-field-status[data-active=true]:before{content:'';width:4px;height:4px;border-radius:50%;background:#70936a}
 .mobile-sheet-navigation{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;min-width:0;height:44px}
 .mobile-sheet-navigation button{position:relative;display:grid;place-items:center;min-width:44px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:#456249;box-shadow:none;touch-action:manipulation}
 .mobile-sheet-navigation button:before{content:'';position:absolute;inset:5px;border:1px solid #dce4d5;border-radius:50%;background:#f4f6ef}.mobile-sheet-navigation button svg{position:relative;width:17px;height:17px}
 .mobile-sheet-navigation button:hover:before{background:#e7eedf;border-color:#c8d7bb}.mobile-sheet-navigation button:active:before{background:#dde8d3}
 .mobile-sheet-navigation button:disabled{opacity:.28}.mobile-sheet-navigation button:disabled:before{border-color:transparent;background:transparent}
 .mobile-field-picker{display:block;min-width:0;border-radius:12px;background:#eef2e7}
 .mobile-field-picker select{display:block;appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;height:44px;min-height:44px;padding:9px 32px 9px 15px;border:1px solid #e4eadc;border-radius:12px;background-color:transparent;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m5 6 3 3 3-3' fill='none' stroke='%236c8263' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;color:#2d4b35;font-size:16px;font-weight:650;line-height:24px;letter-spacing:-.3px}
 .mobile-field-picker select:focus{border-color:#8ca77c}.mobile-sheet-header :focus-visible{outline:2px solid #749466;outline-offset:-3px}
 .mobile-sheet-scroll{padding:10px 16px max(8px,env(safe-area-inset-bottom,0px));background:#faf9f4}
 .mobile-controls-sheet .hud-controls select,.mobile-controls-sheet .hud-controls .number-range input{border:1px solid #d8e1cf;border-radius:12px;background-color:#fffefa;min-height:46px;padding:10px 12px;font-size:16px;color:#35503a;box-shadow:0 2px 3px #243e2b03}
 .mobile-controls-sheet .hud-controls select:focus,.mobile-controls-sheet .hud-controls .number-range input:focus{border-color:#8ba77c;background-color:#fffefa}
 .mobile-controls-sheet .hud-controls .segmented{gap:8px;padding:0}.mobile-controls-sheet .hud-controls .segmented button{min-height:46px;border:1px solid #e1e7d9;border-radius:12px;background:#f0f3e9;color:#68815e;font-weight:500}.mobile-controls-sheet .hud-controls .segmented button[aria-pressed=true]{background:#3d6246;color:#fffbed;border-color:#3d6246}
 .mobile-range-row button{border-color:#e0e7d7;border-radius:10px;background:#eef3e6;color:#5a7850}.mobile-range-row input{border-color:#dce4d3;border-radius:10px;background:#fffefa;color:#345039}
 .mobile-controls-sheet .hud-controls .control-title{height:28px;min-height:28px}.mobile-controls-sheet .hud-controls .control-title>label:not(.switch):after{font-size:10px;color:#849177}
 .mobile-controls-sheet .hud-controls .switch,.mobile-controls-sheet .hud-controls .switch input{height:28px}.mobile-controls-sheet .hud-controls .switch span{inset:0 0}
 .mobile-controls-sheet .hud-controls #mbti-types{grid-template-rows:repeat(4,30px);gap:3px}.mobile-controls-sheet .hud-controls #mbti-types button{min-height:30px;height:30px;padding:2px 0;border-radius:9px;background:#eff3e8;border-color:#dfe7d6;color:#5b7551;font-size:12px;font-weight:500}.mobile-controls-sheet .hud-controls #mbti-types button[aria-pressed=true]{background:#3d6246;border-color:#3d6246;color:#fffbed}
 .mobile-controls-sheet[data-field=mbti] .mobile-sheet-scroll{padding-top:4px;padding-bottom:4px}
 .mobile-controls-sheet:is([data-field=age],[data-field=height],[data-field=weight]) .mobile-sheet-scroll{padding-top:3px;padding-bottom:max(3px,env(safe-area-inset-bottom,0px))}
 .mobile-controls-sheet #mobile-control-error{margin:0 16px 6px;padding:4px 8px;border-radius:7px;background:#f8e8dc;color:#965942}
 .mobile-controls-sheet[data-keyboard=true] .mobile-sheet-grip{height:36px}.mobile-controls-sheet[data-keyboard=true] .mobile-collapse-handle{height:36px;min-height:36px}.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-header{padding-bottom:4px}.mobile-controls-sheet[data-keyboard=true] .mobile-sheet-scroll{padding-top:5px}
 .mobile-controls-sheet[data-keyboard=true] .mobile-sheet-navigation{display:none}.mobile-controls-sheet[data-keyboard=true] .mobile-step-label{font-size:0}.mobile-controls-sheet[data-keyboard=true] .mobile-step-label>*{display:none}.mobile-controls-sheet[data-keyboard=true] .mobile-step-label:after{content:attr(data-title);font-size:12px;font-weight:600;color:#4e6748}
}

/* A scrollable list stays inside the same fixed-height control surface. */
@media(max-width:900px){
 .mobile-controls-sheet .mobile-native-select{display:none!important}
 .mobile-controls-sheet .mobile-select-button{display:block;box-sizing:border-box;width:100%;min-height:46px;height:auto;padding:11px 36px 11px 14px;border:1px solid #d8e1cf;border-radius:12px;background:#fffefa;color:#2d4b35;font-family:inherit;font-size:16px;line-height:1.4;text-align:left;word-break:keep-all;overflow-wrap:anywhere;position:relative}
 .mobile-controls-sheet .mobile-select-button:after{content:'';position:absolute;right:16px;top:calc(50% - 4px);width:6px;height:6px;border-right:1.5px solid #6c8263;border-bottom:1.5px solid #6c8263;transform:rotate(45deg)}
 .mobile-controls-sheet .mobile-select-button[aria-expanded=true]:after{transform:rotate(225deg);top:calc(50% - 1px)}
 .mobile-controls-sheet .mobile-select-button[aria-expanded=true]{border-color:#78956b;background:#edf3e6}
 .mobile-sheet-navigation .mobile-select-button{min-width:0;min-height:44px;height:44px;border-color:#e4eadc;background:#eef2e7;font-weight:650;padding:9px 32px 9px 15px}
 .mobile-sheet-navigation .mobile-select-button:before{content:none}
 .mobile-controls-sheet[data-choosing=true] #control-dock{display:none!important}
 .mobile-controls-sheet[data-choosing=true] .mobile-sheet-scroll{padding:4px 12px max(4px,env(safe-area-inset-bottom,0px));overscroll-behavior:contain}
 .mobile-choice-list{display:grid;gap:3px;min-width:0;overflow-anchor:none}
 .mobile-choice-list[hidden]{display:none}
 .mobile-choice-list>button{position:relative;display:block;box-sizing:border-box;min-height:44px;width:100%;padding:10px 34px 10px 14px;border:1px solid transparent;border-radius:10px;background:transparent;color:#39513b;text-align:left;font-family:inherit;font-size:15px;line-height:1.45;word-break:keep-all;overflow-wrap:anywhere;touch-action:manipulation}
 .mobile-choice-list>button[aria-selected=true]{background:#e8efdf;color:#284b33;font-weight:700}
 .mobile-choice-list>button[aria-selected=true]:after{content:'✓';position:absolute;right:13px;top:12px;font-size:14px;color:#507649}
 .mobile-choice-list>button:focus-visible,.mobile-controls-sheet .mobile-select-button:focus-visible{outline:2px solid #749466;outline-offset:-2px}
 .mobile-choice-list>button:active{background:#dce8d2}
}
