/* The identity uses the same physical face as the table cards; its controls follow below. */
.in-battle .battle.table-fit .hero-panel{display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:12px;min-width:0;max-height:100%;overflow-y:auto;scrollbar-width:thin}
.in-battle .battle.table-fit .hero-panel>.hero-portrait{height:var(--table-field-card-height);min-height:var(--table-field-card-height);width:var(--table-field-card-width);max-height:none;max-width:100%;flex:none;align-self:center;grid-column:auto;grid-row:auto}
.in-battle .battle.table-fit .hero-copy{display:flex;flex-direction:column;align-items:stretch;gap:3px;min-width:0;grid-column:auto;grid-row:auto}
.in-battle .battle.table-fit .hero-copy>.eyebrow{margin:0;font-size:8px;letter-spacing:1px}
.in-battle .battle.table-fit .hero-copy>h3{font-size:22px;line-height:1.1;white-space:normal;overflow-wrap:anywhere;margin:0}
.in-battle .battle.table-fit .hero-copy>.health-dial{--dial-width:112px;display:block;align-self:center;grid-column:auto;grid-row:auto;margin:3px 0;max-width:100%}
.in-battle .battle.table-fit .hero-panel>.modified-stats,.in-battle .battle.table-fit .hero-panel>.statuses,.in-battle .battle.table-fit .hero-panel>.pile-grid{position:static;grid-column:auto;grid-row:auto;flex:none}
.identity-form-control{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-height:34px;padding:6px 5px!important;margin-top:3px;font-size:10px!important;letter-spacing:0!important;line-height:1.25;text-transform:none!important;border-color:#6aa5b377!important;background:linear-gradient(120deg,#285063,#173443)!important;color:#d8f5ff!important}
.identity-form-control>span:first-child{font-size:19px;line-height:1}
.in-battle .battle.table-fit .form-label-full{display:inline;white-space:normal}
.in-battle .battle.table-fit .form-label-compact{display:none}
.identity-form-control:disabled{opacity:.48}
.in-battle .decision-active-status{font-size:11px;color:#c8dfed}
.in-battle .table-mobile .battle-layout{grid-template-columns:var(--table-sidebar) minmax(0,1fr);grid-template-rows:var(--table-summary) minmax(0,1fr) var(--table-hand);grid-template-areas:'overview overview' 'commander arena' 'hand hand'}
.in-battle .table-mobile .arena{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr)}
.in-battle .table-landscape .battle-layout{grid-template-columns:var(--table-sidebar) var(--table-overview-width) minmax(0,1fr);grid-template-areas:'commander overview arena' 'commander hand hand'}
.in-battle .table-landscape .arena-zone{grid-template-rows:22px minmax(0,1fr);padding:4px;gap:3px}
.in-battle .table-landscape .zone-heading{height:22px}
.in-battle .table-mobile .field-card .field-actions,.in-battle .table-landscape .field-card .field-actions{display:none}
.in-battle .battle.table-mobile .hero-panel,.in-battle .battle.table-landscape .hero-panel{padding:6px;gap:4px;height:auto}
.in-battle .battle.table-mobile .hero-copy,.in-battle .battle.table-landscape .hero-copy{gap:1px}
.in-battle .battle.table-mobile .hero-copy>h3,.in-battle .battle.table-landscape .hero-copy>h3{font-size:16px;line-height:1.05}
.in-battle .battle.table-mobile .hero-copy>.health-dial,.in-battle .battle.table-landscape .hero-copy>.health-dial{--dial-width:82px;margin:1px 0}
.in-battle .battle.table-mobile .identity-form-control,.in-battle .battle.table-landscape .identity-form-control{min-height:24px;width:100%;max-width:100%;margin:2px 0 0;padding:3px!important;font-size:9px!important;white-space:normal}
.in-battle .battle.table-mobile .identity-form-control>span:first-child,.in-battle .battle.table-landscape .identity-form-control>span:first-child{font-size:16px}
#dialog.game-choice>#close-dialog{display:none}
#dialog.decision-dialog{width:min(880px,calc(100vw - 24px))}
.decision-header{display:flex;gap:18px;align-items:center;margin-bottom:20px;padding-bottom:18px;border-bottom:1px solid #829caf33;min-width:0}
.decision-source{display:block;width:86px;height:120px;flex:none;border-radius:5px;background:transparent;border:0;padding:0}
.decision-source.is-landscape{width:134px;height:96px}
.decision-source>.card-art,.decision-source>.card-fallback{width:100%;height:100%;object-fit:contain;min-height:0}
.decision-heading{min-width:0}.decision-heading>.eyebrow{font-size:10px;margin-bottom:7px}
.decision-heading h2{font-size:32px;line-height:1.05;margin:0 0 8px}
.decision-heading>p{font-size:14px;line-height:1.55;color:#c1d5e2;margin:0;white-space:pre-line}
.decision-source-label{display:block;font-size:11px;color:#cce7a8;margin:7px 0 0}
.decision-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:10px}
.decision-options>.choice-option{margin:0;width:100%;min-height:48px;line-height:1.4}
.decision-options>.choice-with-art{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;align-items:center;text-align:left;padding:10px}
.decision-options>.choice-with-art>.card-art,.decision-options>.choice-with-art>.card-fallback{width:72px;height:100px;object-fit:contain;min-height:0;max-height:100px}
.decision-options>.choice-with-art:has(>.is-landscape){grid-template-columns:112px minmax(0,1fr)}
.decision-options>.choice-with-art>.is-landscape{width:112px;height:80px}
.decision-allocation .allocation-row{display:grid;grid-template-columns:72px minmax(0,1fr) 70px;align-items:center;gap:12px;margin:10px 0;padding:10px;background:#0e1c2b88;border:1px solid #7899a633;border-radius:5px}
.decision-allocation .allocation-row>.card-art,.decision-allocation .allocation-row>.card-fallback{width:72px;height:82px;object-fit:contain;min-height:0}
.decision-allocation .allocation-row:not(:has(>.card-art,>.card-fallback)){grid-template-columns:minmax(0,1fr) 70px}
.decision-allocation input{width:70px;min-height:42px}
.picker-header:has(.picker-source){padding-left:66px;position:relative;min-height:72px}
.picker-source{position:absolute;left:0;top:0;width:52px;height:72px;padding:0;border:0;background:transparent}
.picker-source>.card-art,.picker-source>.card-fallback{width:100%;height:100%;object-fit:contain;min-height:0}
.picker-resource-bank .generator-chip.is-unavailable{opacity:.7;border-style:dashed;cursor:default;background:#192530}
.picker-resource-bank .is-unavailable .generator-art{filter:saturate(.4)}
.picker-resource-bank .is-unavailable small{color:#efc69b}
.undo-button{white-space:nowrap}
.undo-preview{padding:14px 16px;border:1px solid #7ec2e277;border-radius:8px;background:linear-gradient(130deg,#193c53,#0c2032);box-shadow:0 12px 38px #0009;color:#deedf7;font:12px/1.5 Command,Arial,sans-serif;pointer-events:none}
.undo-preview-title{display:block;color:#e7f5ff;font-size:14px;line-height:1.35}
.undo-preview-lines{margin:8px 0 0;padding:0 0 0 16px;color:#bbd4e5}
.undo-preview-lines:empty{display:none}
.undo-preview-line+li{margin-top:4px}
.modal-undo-row{display:flex;align-items:center;min-height:30px;height:30px;flex:none;margin:0 34px 8px 0}
.modal-undo-row .undo-button{min-height:30px;padding:5px 12px;font-size:10px;border-color:#689bb466;background:#17334a;color:#d1eaf8}
.modal-undo-row .undo-button:disabled{opacity:.42;cursor:default}
#dialog.card-picker.has-undo #dialog-body,#dialog.picker-zoom.has-undo #dialog-body{display:flex;flex-direction:column}
#dialog.card-picker.has-undo .picker-shell,#dialog.picker-zoom.has-undo .picker-zoom-shell{height:auto;min-height:0;flex:1}
@media(max-width:699px){.in-battle .battle-tools{gap:3px}.in-battle .battle-tools .small-btn{padding:6px;font-size:8px}.in-battle .mission-title{overflow:hidden}.in-battle .round-label{display:block;overflow:hidden;text-overflow:ellipsis}.modal-undo-row .undo-button{font-size:10px;min-height:30px}}
@media(max-width:599px),(max-height:540px){.decision-header{gap:12px;margin-bottom:12px;padding-bottom:12px}.decision-source{width:57px;height:80px}.decision-source.is-landscape{width:90px;height:64px}.decision-heading h2{font-size:24px}.decision-heading>p{font-size:12px;line-height:1.45}.decision-heading>.eyebrow{font-size:8px;letter-spacing:1px}.decision-options{gap:7px}.decision-options>.choice-with-art{grid-template-columns:48px minmax(0,1fr);gap:9px;padding:7px}.decision-options>.choice-with-art>.card-art,.decision-options>.choice-with-art>.card-fallback{width:48px;height:67px;max-height:67px}.decision-options>.choice-with-art:has(>.is-landscape){grid-template-columns:78px minmax(0,1fr)}.decision-options>.choice-with-art>.is-landscape{width:78px;height:56px}.picker-header:has(.picker-source){min-height:54px;padding-left:46px}.picker-source{width:36px;height:50px}}
