/* A character dossier: persistent summary, focused sections and native controls. */
.sheet-refined.sheet-layout{display:block;max-width:none;margin-inline:0;width:100%;box-sizing:border-box}
@media print{}
.sheet-refined .sheet-form-card{gap:0;padding:0;border:1px solid var(--color-border);border-radius:24px;background:var(--color-surface);overflow:hidden;box-shadow:0 18px 50px #0002}
.sheet-refined .sheet-form-card>.sheet-dossier{margin:0;border:0;border-bottom:1px solid var(--color-border);border-radius:0;padding:28px 34px}
.sheet-dossier .preview-name{font-size:clamp(28px,3vw,40px);line-height:1.2;margin-top:10px}.sheet-dossier .preview-meta{margin-block:8px 14px}.sheet-dossier .preview-life{display:inline-block;padding:8px 14px;border:1px solid var(--color-border);border-radius:10px;font-weight:600}.sheet-dossier .preview-attrs{gap:10px;margin-top:14px;max-width:700px}.sheet-dossier .preview-attrs>*{padding:9px}.sheet-dossier .preview-power{margin-top:12px}
.sheet-tabs{display:flex;gap:4px;padding:12px 24px;background:var(--color-surface);border-bottom:1px solid var(--color-border);overflow-x:auto}.sheet-tabs button{flex:1;padding:13px 15px;min-height:48px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--color-text-muted);font:600 15px/1.3 Georgia,serif;cursor:pointer;white-space:nowrap}.sheet-tabs button[aria-selected=true]{background:var(--color-primary-highlight);border-color:var(--color-primary);color:var(--color-text)}.sheet-tabs button:hover{color:var(--color-text);background:var(--color-primary-highlight)}
.sheet-refined .sheet-guidance{font-size:14px;padding:14px 30px;margin:0;color:var(--color-text-muted);background:var(--color-surface)}
.sheet-refined .sheet-tab-panel{padding:8px 24px 24px;display:grid;gap:20px;min-width:0;background:var(--color-surface);animation:sheet-arrive .2s ease-out}
.sheet-refined .sheet-tab-panel[hidden],.sheet-refined .sheet-preview[hidden]{display:none!important}
.sheet-refined .sheet-tab-panel>.card{padding:26px;margin:0;border-radius:16px;min-width:0;align-self:start}
.sheet-refined .sheet-identity{grid-template-columns:minmax(240px,.8fr) minmax(0,1.6fr)}
.sheet-refined .portrait-heading .section-title{font-size:24px}.sheet-refined .portrait-card{gap:16px;position:relative}.sheet-refined .portrait-frame{width:100%;max-width:360px;background:var(--color-surface);box-shadow:inset 0 0 0 6px var(--color-surface),0 6px 22px #0002;border-radius:12px}
.sheet-refined .portrait-actions{gap:8px}.sheet-refined .portrait-actions .btn{font-size:13px;padding:10px 13px;min-height:44px}.sheet-refined #foto-status{font-size:12px}
.sheet-refined .section-title{font-size:26px;line-height:1.25;margin-bottom:18px}.sheet-refined .field-grid{gap:20px}.sheet-refined .field{min-width:0}.sheet-refined .field>label{font-size:12px;letter-spacing:.07em;text-transform:uppercase;margin-bottom:8px;color:var(--color-text-muted)}
.sheet-refined :is(.field input,.field select,.field textarea){width:100%;box-sizing:border-box;min-height:48px;padding:12px 14px;border:1px solid var(--color-border);background:var(--color-surface);color:var(--color-text);font:16px/1.5 Georgia,serif;border-radius:9px}
.sheet-refined .field textarea{min-height:160px;resize:vertical}.sheet-refined .field-hint{font-size:14px;line-height:1.7;margin-block:14px;color:var(--color-text-muted)}
.sheet-refined .field:has(#f-raca),.sheet-refined .field:has(#f-caminho){grid-column:1/-1}
.sheet-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:10px}.sheet-choices button{display:flex;flex-direction:column;gap:5px;text-align:left;padding:13px;min-height:76px;border:1px solid var(--color-border);border-radius:10px;background:var(--color-surface);color:var(--color-text);cursor:pointer;font:15px/1.4 Georgia,serif}.sheet-choices button span{font-size:12px;color:var(--color-text-muted)}.sheet-choices button[aria-pressed=true]{border-color:var(--color-primary);background:var(--color-primary-highlight);box-shadow:inset 3px 0 var(--color-primary)}
.sheet-refined .attr-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.sheet-refined .attr-box{padding:18px 8px}.sheet-refined .attr-box label{font-size:14px}.attribute-stepper{display:flex;justify-content:center;align-items:center;gap:2px;margin-top:12px}.attribute-stepper button{width:36px;min-height:44px;flex-shrink:0;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);color:var(--color-text);font-size:22px;cursor:pointer}.sheet-refined .attribute-stepper input{min-width:0;width:48px;padding:3px!important;border:0!important;background:transparent!important;font-size:26px;appearance:textfield;text-align:center}.attribute-stepper input::-webkit-inner-spin-button{appearance:none}
.sheet-refined .sheet-collections{grid-template-columns:repeat(2,minmax(0,1fr))}.sheet-collections>.card:first-child{grid-column:1/-1}.sheet-refined #pericias-editor{grid-template-columns:repeat(2,minmax(0,1fr))}.sheet-refined :is(#pv-itens,#pv-artefatos){display:grid;gap:12px;margin-top:18px;background:transparent}.sheet-refined .collection-card{padding:18px}.sheet-refined .collection-card h3{font-size:20px}.sheet-refined .collection-remove{display:grid;place-items:center;min-width:36px;line-height:1}.sheet-refined .quantity-field input{max-width:85px;background:var(--color-surface);border:1px solid var(--color-border);color:var(--color-text);border-radius:8px}
.sheet-refined .sheet-toolbar{display:flex;flex-wrap:wrap;gap:10px;padding:22px 28px;margin:0;border-top:1px solid var(--color-border);background:var(--color-surface)}.sheet-toolbar .btn{font-size:14px}.sheet-toolbar #btn-limpar{margin-left:auto}.sheet-refined .save-indicator{padding:0 28px 10px;background:var(--color-surface)}.sheet-refined .sheet-form-card>p.field-hint{margin:0;padding:0 28px 24px;background:var(--color-surface);font-size:12px}
.character-sheet :is(button,a,input,select,textarea,[tabindex]):focus-visible{outline:2px solid var(--color-primary);outline-offset:3px}.character-sheet .sheet-catalog-dialog{border-radius:16px}.character-sheet .catalog-option{border-radius:12px}.character-sheet .catalog-option.is-selected{box-shadow:inset 3px 0 var(--color-primary)}
@keyframes sheet-arrive{from{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:900px){.sheet-refined .sheet-identity{grid-template-columns:minmax(220px,.8fr) minmax(0,1.2fr)}.sheet-refined .sheet-tab-panel{padding:8px 16px 20px}.sheet-refined .sheet-tab-panel>.card{padding:20px}.sheet-refined .field-grid{grid-template-columns:1fr}.sheet-refined .field-grid>.field{grid-column:auto!important}.sheet-refined .attr-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.sheet-refined .sheet-identity,.sheet-refined .sheet-collections{grid-template-columns:1fr}.sheet-refined .sheet-dossier{padding:24px 18px!important}.sheet-refined .preview-attrs{grid-template-columns:repeat(3,minmax(0,1fr))}.sheet-tabs{padding:10px;display:grid;grid-template-columns:1fr 1fr}.sheet-tabs button{white-space:normal;font-size:13px}.sheet-refined .sheet-guidance{padding:14px 18px}.sheet-refined .sheet-tab-panel{padding:4px 10px 18px}.sheet-refined .attr-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sheet-refined #pericias-editor{grid-template-columns:1fr}.sheet-refined .sheet-toolbar{padding:18px 14px}.sheet-toolbar .btn{flex:1 1 42%}.sheet-refined .portrait-frame{max-width:340px}.sheet-refined .sheet-form-card{border-radius:16px}}
@media(prefers-reduced-motion:reduce){.sheet-refined .sheet-tab-panel{animation:none}}
@media print{.sheet-tabs,.sheet-guidance,.sheet-choices,.attribute-stepper button{display:none!important}.sheet-refined .sheet-tab-panel[hidden]{display:block!important}}

.sheet-refined .sheet-portraits{display:grid;grid-template-rows:1fr 1fr;gap:20px;align-self:stretch;min-width:0}
.sheet-refined .sheet-portraits>.portrait-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:16px;padding:24px;margin:0;border-radius:22px;min-width:0}
.sheet-refined .sheet-portraits .portrait-frame{width:100%;max-width:320px;aspect-ratio:3/4;flex:none}
.sheet-refined .sheet-portraits [hidden],.sheet-refined .sheet-power-options[hidden],.sheet-refined .sheet-power-options [hidden]{display:none!important}
.sheet-refined .sheet-power-options{grid-column:1/-1;padding:20px;margin:0;border-radius:20px;min-width:0}
.sheet-refined .sheet-identity{align-items:stretch}
html:root[data-theme] .sheet-refined .btn,html:root[data-theme] .catalog-option button{border-radius:16px}
@media(max-width:640px){.sheet-refined .sheet-portraits{grid-template-rows:1fr 1fr}.sheet-refined .sheet-portraits>.portrait-card{padding:20px}}

/* Compact summary and aligned collection controls. */
.sheet-refined .sheet-dossier{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px}
.sheet-dossier>.eyebrow,.sheet-dossier>.preview-name,.sheet-dossier>.preview-meta,.sheet-dossier>.preview-attrs{grid-column:1/-1;margin:0;max-width:none;width:100%}
.sheet-dossier>.preview-attrs{grid-row:4;grid-template-columns:repeat(5,minmax(0,1fr))}
.sheet-dossier>.preview-life{grid-row:5;margin:0;padding:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-weight:400;border-radius:14px}
.sheet-dossier>.preview-life strong{font-size:26px}.sheet-dossier>.preview-power{grid-row:5;grid-column:2;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}
.sheet-dossier .preview-power .mini-card{padding:18px;border-radius:14px}
.sheet-refined .sheet-identity{align-items:start}.sheet-refined .sheet-identity>.portrait-card{position:sticky;top:20px}
.sheet-refined .sheet-collections>.card:nth-child(n+2){align-self:stretch;display:grid;grid-template-rows:auto auto auto 1fr;align-content:start}
.sheet-collections>.card>.section-title{margin:0 0 12px}.sheet-collections>.card:nth-child(n+2)>.field-hint{min-height:64px;margin:0 0 16px}
.sheet-collections>.card>.btn{justify-self:start;min-height:44px;min-width:190px;margin:0}
.sheet-refined .sheet-toolbar .btn{min-height:44px}.sheet-refined .sheet-form-card>p.field-hint{max-width:none}
@media(max-width:640px){.sheet-refined .sheet-identity>.portrait-card{position:static}.sheet-dossier>.preview-attrs{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.sheet-dossier .preview-attrs .mini-card{padding:10px 2px}.sheet-dossier .preview-attrs span{font-size:10px}.sheet-refined .sheet-dossier{gap:12px 8px}.sheet-collections>.card>.field-hint{min-height:0}}

.sheet-dossier :is(.preview-life strong,.preview-power strong){font-size:26px}.sheet-dossier :is(.preview-life span,.preview-power span){font-size:15px}

.sheet-refined .field.resource-restore{justify-content:flex-end}
.sheet-refined .resource-restore>.btn{min-height:48px;width:100%;margin:0}
.sheet-refined .resource-restore:has(>#btn-vida-restaurar){grid-column:1/-1}

/* Portrait and mount share the identity column; mount preserves its native ratio. */
.sheet-refined .sheet-identity{align-items:stretch}
.sheet-refined .sheet-identity>.portrait-card{position:static;align-self:stretch;display:grid;grid-template-rows:auto auto;gap:24px}
.sheet-refined .portrait-slot{align-self:stretch;display:grid;grid-template-rows:auto minmax(200px,1fr) auto auto;gap:14px;width:100%;min-width:0;min-height:0}
.sheet-refined .portrait-slot .portrait-frame{width:100%;max-width:none;height:100%;min-height:200px;aspect-ratio:auto;position:relative}
.sheet-refined .portrait-slot .portrait-frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.sheet-refined .portrait-slot .field-hint{margin:0;font-size:12px}
@media(max-width:640px){.sheet-refined .portrait-slot .portrait-frame{aspect-ratio:3/4;height:auto;min-height:0}.sheet-refined .portrait-slot{grid-template-rows:auto auto auto auto}}
.sheet-refined .portrait-slot .portrait-actions{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:44px 44px;gap:8px;width:100%;min-height:96px;align-content:start}
.sheet-refined .portrait-slot .portrait-actions>.btn:first-child{grid-column:1/-1;justify-self:center}
.sheet-refined .portrait-slot .portrait-actions>.btn{min-width:0;padding:8px;font-size:13px;justify-content:center}
.sheet-refined .portrait-slot .portrait-actions>.btn[hidden]{display:flex!important;visibility:hidden}

/* Compact role use control; do not inherit full-sized numeric input dimensions. */
html body #sheet-role-info>label{display:flex;align-items:center;gap:10px;text-transform:none;letter-spacing:0;font-size:15px;cursor:pointer}
html body #f-papel-usado{width:18px!important;height:18px!important;min-height:18px!important;margin:0;padding:0;flex:0 0 18px;accent-color:var(--color-primary)}
#sheet-role-info{display:grid;gap:12px}#sheet-role-info .btn{width:fit-content;min-height:34px;padding:7px 12px;font-size:14px}
.mount-selector{display:grid;grid-template-columns:44px 1fr 44px;gap:10px;align-items:center;margin:18px 0}.mount-selector strong{text-align:center}.mount-selector .btn{padding:8px;min-width:0}
#montaria-detalhes{font-size:15px;line-height:1.6}#f-montaria-preview{object-fit:contain!important}

.sheet-refined .portrait-slot:has(#f-montaria-preview){grid-template-rows:auto auto auto auto;align-content:start}.sheet-refined .portrait-slot .portrait-frame:has(#f-montaria-preview){aspect-ratio:3/2;height:auto;min-height:0}
