/* Sem cabeçalhos repetidos: uma barra global, abas e conteúdo. */
:root{--ux-control:36px;--ux-gap:12px;--ux-muted:var(--ink-soft)}
.editing .workspace-bar,.editing .sheet-masthead,.editing .toolbar>.eyebrow{display:none!important}
.editing .toolbar{min-height:52px;padding:8px 16px;gap:12px}
.editing .content-scroll{padding:0 12px 12px;background:none}
.editing #sheet{grid-template-columns:312px minmax(0,1fr)}
.editing #editor-view{max-width:none}
.toolbar .actions{margin-left:auto;flex-wrap:nowrap;gap:12px;min-width:0}
.toolbar .actions #save-status{font:11px/1.5 var(--font-mono);margin:0;color:var(--ink-soft)}
.toolbar #edit-sheet{font:500 13px var(--font-body);padding:8px 16px;min-height:var(--ux-control);white-space:nowrap}
.toolbar .top-library{min-height:var(--ux-control);font-size:12px;padding:8px 12px;white-space:nowrap}
.more-actions{position:relative;flex-shrink:0}
.more-actions>summary{font-size:12px;min-height:var(--ux-control);padding:8px 12px;border:1px solid var(--line);cursor:pointer;list-style:none}
.more-actions>summary:after{content:' ▾';color:var(--ink-soft)}
.more-actions-body{position:absolute;right:0;top:calc(100% + 8px);width:200px;z-index:20;background:var(--surface);border:1px solid var(--line);box-shadow:0 8px 32px #0005;padding:8px;display:grid;gap:4px}
.more-actions-body button{text-align:left;width:100%;min-height:40px;font-size:13px;padding:8px 12px}
.personal-dossier{padding:16px;scrollbar-gutter:auto}
.personal-dossier .identity-layout{gap:16px}
.personal-dossier #identity-fields>label{font-size:12px;min-height:28px}
.personal-dossier .attribute-grid{gap:8px}
.personal-dossier .attribute{padding:8px 4px}
.personal-dossier .attribute strong{font-size:13px}
.personal-dossier .attribute input{font-size:26px;line-height:1.2}
.personal-dossier .attribute .halves{font-size:10px;margin:4px -2px 0}
.personal-dossier .portrait{height:176px;max-width:168px;transform:rotate(-1deg)}
.personal-dossier .checks{gap:8px 12px;margin-top:12px}
.personal-dossier .checks label{font-size:12px;line-height:1.5;min-height:28px;cursor:pointer}
.personal-dossier .checks input[type=checkbox]{width:16px;height:16px}
.personal-dossier .minor h3{font-size:14px}
.personal-dossier .minor{margin:16px 0 8px}
.field-readout,.table-readout{display:none}
.editing:not(.sheet-edit) .has-readout>input,.editing:not(.sheet-edit) .has-readout>textarea{display:none!important}
.editing:not(.sheet-edit) .field-readout,.editing:not(.sheet-edit) .table-readout{display:block;color:var(--ink);font-size:14px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.editing:not(.sheet-edit) .personal-dossier .field-readout{font-size:14px;flex:1;min-width:0}
.editing:not(.sheet-edit) [data-key=name]+.field-readout{font:500 24px/1.2 var(--font-display)}
.editing:not(.sheet-edit) .empty-field{display:none!important}
.editing:not(.sheet-edit) .portrait-area>button,.editing:not(.sheet-edit) .portrait-fit,.editing:not(.sheet-edit) #derive,.editing:not(.sheet-edit) .edit-only{display:none!important}
.editing:not(.sheet-edit) .portrait{pointer-events:none;cursor:default}
.editing:not(.sheet-edit) .portrait:has(#portrait[hidden]){height:88px;max-width:88px;border:0;box-shadow:none;outline:0;transform:none}
.editing:not(.sheet-edit) #portrait-placeholder{font-size:0}
.editing:not(.sheet-edit) #portrait-placeholder small{display:none}
.editing:not(.sheet-edit) #portrait-placeholder .portrait-symbol{font:48px var(--font-display);margin:0}
.editing:not(.sheet-edit) .portrait-area{display:block}
.editing:not(.sheet-edit) .personal-dossier #identity-fields>label{min-height:24px;gap:12px}
.editing:not(.sheet-edit) #identity-fields>label:first-child{font-size:0}
.editing:not(.sheet-edit) .personal-dossier .extra-biography>summary{font-size:11px;min-height:32px;padding:8px 0}
.editing:not(.sheet-edit) .attribute input{pointer-events:none;border:0;cursor:default;color:var(--ink)}
.editing:not(.sheet-edit) .skill input[type=number]{border:0;background:transparent;pointer-events:none}
.editing:not(.sheet-edit) .skill .halves{font-size:10px}
.editing:not(.sheet-edit) #add-skill,.editing:not(.sheet-edit) #add-weapon,.editing:not(.sheet-edit) #add-item{display:none}
.editing:not(.sheet-edit) #weapons .edit-control,.editing:not(.sheet-edit) #inventory .edit-control{display:none!important}
.editing:not(.sheet-edit) #weapons td>button:not(.weapon-test),.editing:not(.sheet-edit) #inventory .inventory-row>button{display:none}
.editing:not(.sheet-edit) #weapons .table-readout{font-size:13px;white-space:normal;padding:8px}
.editing:not(.sheet-edit) #inventory .table-readout{font-size:13px}
.sheet-edit .game-action{display:none!important}
.sheet-edit .hint{display:block}
.editing:not(.sheet-edit) #historia>.hint,.editing:not(.sheet-edit) #pericias>.hint,.editing:not(.sheet-edit) #development>.hint{display:none}
.editing:not(.sheet-edit) .tab-content .story>label{padding:12px 0;border-bottom:1px solid var(--line);font-size:12px}
.section-empty{padding:24px;border:1px dashed var(--line);margin-top:16px}
.section-empty p{font-size:14px;line-height:1.7;color:var(--ink-soft);margin-bottom:16px}
.section-empty button{min-height:40px;font-size:13px}
.personal-dossier .resource-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.personal-dossier .resource{position:relative;padding:8px;border-top:2px solid var(--red-deep)}
.personal-dossier .resource>label{font-size:11px;line-height:1.4;margin-bottom:8px}
.personal-dossier .resource input{font-size:24px;line-height:1.1}
.resource-steps{display:flex;gap:8px;margin-top:8px}
.resource-steps button{flex:1;font:20px var(--font-display);padding:0;min-width:32px;min-height:32px}
.resource-steps button:disabled{opacity:.4;cursor:default}
.resource-test{font:10px var(--font-mono);min-height:28px;margin-top:8px;width:100%;padding:4px}
.sheet-edit .resource-steps,.sheet-edit .resource-test{display:none}
.editing:not(.sheet-edit) .personal-dossier .resource input{border:0;background:none;pointer-events:none}
.editing:not(.sheet-edit) .personal-dossier .resource-values label{font-size:0}
.tab-content{padding:24px 24px 56px}
.sheet-main nav{padding:0 16px;background:var(--surface);border-top:0}
.sheet-main nav a{font-size:13px;min-height:44px;padding:12px 16px}
.tab-content .section-head{padding-bottom:12px;margin-bottom:16px;gap:16px}
.tab-content .section-head h2{font-size:24px}
.tab-content .skill{min-height:44px;padding:6px 4px;gap:8px}
.tab-content .skill label{font-size:13px;line-height:1.4}
.tab-content .skill input[type=checkbox]{width:18px;height:18px;margin:0 4px;cursor:pointer}
.tab-content .skill input[type=checkbox]:checked:before{font-size:16px;inset:-4px 0 0}
.tab-content .roll{min-height:32px;min-width:40px;font-size:10px;padding:6px}
.skill-chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.skill-chips button{min-height:32px;font-size:12px;padding:4px 12px}
.skill-chips button[aria-pressed=true]{border-color:var(--red-text);background:var(--bg);color:var(--red-text)}
.skills-heading{font-size:10px!important}
.quick-items{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.quick-items>span{width:100%;font-size:12px;color:var(--ink-soft)}
.quick-items button{min-height:36px;font-size:12px;padding:6px 10px}
.quantity-steps{display:flex;gap:4px}
.quantity-steps button{min-height:32px;min-width:32px;font-size:18px;padding:0}
.editing:not(.sheet-edit) .inventory-row{grid-template-columns:100px minmax(0,1fr) 48px 72px;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}
.setup-hint{border-left:2px solid var(--red-text);background:var(--bg);padding:16px;margin-bottom:24px;display:flex;align-items:center;gap:16px}
.setup-hint p{font-size:13px;line-height:1.6;flex:1;color:var(--ink-soft)}
.setup-hint button{min-height:40px;white-space:nowrap;font-size:12px}
.editing .dice-tray{right:20px;bottom:12px;width:320px;max-width:calc(100vw - 32px);box-shadow:0 8px 32px #0004}
.editing .dice-tray:has(#dice-panel[hidden]){width:144px;box-shadow:none}
.dice-close{display:block;margin:8px 0 12px auto;font-size:12px;min-height:32px}
#dice-panel output{font-size:16px}
#action-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:32px;background:var(--surface);color:var(--ink);border:1px solid var(--red-deep);box-shadow:0 24px 80px #0007}
#action-dialog::backdrop{background:#0009}
#action-dialog h2{font:500 26px/1.2 var(--font-display);margin-bottom:16px}
#action-dialog label{font-size:13px;margin:16px 0}
#action-dialog input,#action-dialog select{min-height:44px;font-size:15px;margin-top:8px;width:100%;padding:10px 12px}
.dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}
.dialog-actions button{min-height:40px;font-size:13px}
#undo-notice{position:fixed;left:50%;transform:translateX(-50%);bottom:16px;z-index:30;display:flex;align-items:center;gap:16px;background:var(--ink);color:var(--bg);padding:12px 16px;max-width:calc(100vw - 32px);box-shadow:0 8px 24px #0004;font-size:13px}
#undo-notice button{background:transparent;color:inherit;border:1px solid currentColor;min-height:36px;font-size:13px;white-space:nowrap}
[aria-invalid=true]{outline:2px solid var(--red-text);outline-offset:1px}
button:focus-visible,summary:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--red-text);outline-offset:3px}
@media(min-width:1700px){.editing #sheet{grid-template-columns:340px minmax(0,1fr)}.personal-dossier .portrait{height:208px;max-width:192px}}
@media(max-width:1100px) and (min-width:1001px){.editing #sheet{grid-template-columns:280px minmax(0,1fr)}.personal-dossier{padding:12px}.tab-content{padding:20px 16px 56px}.sheet-main nav a{padding:12px;font-size:12px}}
@media(max-width:1000px){.editing #sheet{display:flex}.editing .content-scroll{padding:0 8px 8px}.personal-dossier[open]{padding:0 20px 20px}.personal-dossier[open]>summary{margin:0 -20px 20px}.personal-dossier>summary{min-height:44px;padding:12px 20px;font-size:14px}.personal-dossier .portrait{height:176px;max-width:160px}.personal-dossier .resource-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.tab-content{padding:24px 16px 56px}.sheet-main nav{top:0;padding:0 8px;scrollbar-width:thin}.sheet-main nav a{padding:12px;font-size:13px;min-height:44px}.editing .toolbar .actions{width:auto}.editing .toolbar>.eyebrow{display:none}.setup-hint{align-items:flex-start;flex-direction:column;gap:12px}}
@media(max-width:600px){.editing .toolbar{flex-wrap:nowrap;padding:8px;gap:8px}.toolbar .actions{gap:8px}.editing .toolbar .actions #save-status{display:none}.toolbar #edit-sheet{font-size:12px;padding:8px 12px}.toolbar .top-library{font-size:12px;padding:8px}.more-actions>summary{font-size:12px;padding:8px}.personal-dossier[open]{padding:0 16px 16px}.personal-dossier[open]>summary{margin:0 -16px 16px}.personal-dossier .resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.personal-dossier .attribute .halves{font-size:10px}.personal-dossier .attribute strong{font-size:13px}.personal-dossier .portrait{width:128px;max-width:128px;height:160px}.tab-content .section-head h2{font-size:22px}.tab-content .skill label{font-size:12px}.tab-content .skill .halves{font-size:9px!important;min-width:48px}.tab-content .skill input[type=number]{font-size:18px;width:42px}.tab-content .roll{min-width:36px}.tab-content .skill{gap:4px}.editing:not(.sheet-edit) .inventory-row{grid-template-columns:80px minmax(0,1fr) 32px 68px;gap:4px}.editing:not(.sheet-edit) #inventory .table-readout{font-size:12px}.tab-content .fields{gap:16px}#action-dialog{padding:24px}.more-actions-body{width:200px}.sheet-main:after{display:none}}
@media print{.toolbar,.more-actions,.resource-steps,.resource-test,.skill-chips,.quick-items,.game-action,.setup-hint,.section-empty,#undo-notice,#action-dialog{display:none!important}.field-readout,.table-readout{display:none!important}.editing:not(.sheet-edit) .has-readout>input,.editing:not(.sheet-edit) .has-readout>textarea,.editing:not(.sheet-edit) #weapons .edit-control,.editing:not(.sheet-edit) #inventory .edit-control{display:block!important}.editing:not(.sheet-edit) .empty-field{display:block!important}.editing:not(.sheet-edit) #portrait-placeholder{font-size:0}.editing #sheet{display:block!important}.editing:not(.sheet-edit) .inventory-row{display:grid;grid-template-columns:120px 1fr 48px}.personal-dossier .resource-grid{grid-template-columns:repeat(4,1fr)}.personal-dossier input{font-size:14px!important}.personal-dossier .attribute input{font-size:24px!important}}
.library-tools{display:flex;gap:16px;align-items:flex-end;flex-wrap:wrap}.library-tools label{font-size:12px}.library-tools select{display:block;min-height:40px;margin-top:8px;font-size:13px;max-width:240px;padding:8px 12px}.library-filters{flex-wrap:wrap}.library-filters>#library-count{margin-left:auto}.library-filters>.library-tools{width:100%}.skill-edit{min-width:32px;min-height:32px;padding:4px;font-size:16px}.editing:not(.sheet-edit) .skill-edit{display:none!important}.editing .attribute input::placeholder,.editing .resource input::placeholder{opacity:1;color:var(--ink-soft)}.more-actions:not([open])>.more-actions-body{display:none}.editing .toolbar>.top-library{display:inline-flex;align-items:center}.toolbar>.top-library[hidden]{display:none!important}.personal-dossier .attribute .roll{min-height:32px}.personal-dossier .portrait:focus-visible{outline:2px solid var(--red-text)}
@media(max-width:600px){.library-tools{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:12px}.library-tools select{max-width:100%;width:100%;font-size:12px}.library-filters>#library-count{margin-left:0}.skill-edit{min-width:28px;padding:2px}}
@media print{.library-tools,.skill-edit{display:none!important}}
.tab-content .skill input[type=number]{appearance:textfield;-moz-appearance:textfield}.tab-content .skill input::-webkit-inner-spin-button,.tab-content .skill input::-webkit-outer-spin-button{appearance:none;margin:0}.editing .dice-tray:has(#dice-panel[hidden]){display:none!important}#dice-toggle{display:none!important}#top-dice{font-size:12px;min-height:36px;padding:8px 12px}.skill-heading{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);padding:0!important;margin:0!important;border:0!important}.skill-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:16px}.skill-toolbar>.search{min-width:180px;flex:1;display:flex;gap:8px;align-items:center;font-size:12px}.skill-toolbar>.search>input{margin:0;max-width:none;flex:1;min-height:40px}.skill-toolbar .skill-tools{margin:0;display:flex;flex-wrap:wrap;gap:12px}.skill-toolbar .skill-tools select{font-size:12px;min-height:36px}.skill-toolbar .skill-chips{width:100%;margin:0}.tab-content .skill input[type=number]{font-variant-numeric:tabular-nums}.editing .toolbar .top-library{border-color:transparent}.sheet-main:after{display:none}.personal-dossier .resource-steps button{min-height:36px}.personal-dossier>summary{white-space:normal;line-height:1.5}.tab-content .skill .halves{white-space:nowrap}
@media(max-width:600px){#top-dice{padding:8px;font-size:12px;min-width:52px}.toolbar .actions{gap:6px}.toolbar #edit-sheet{padding:8px;font-size:11px}.toolbar .top-library{padding:8px 4px;font-size:11px}.more-actions>summary{padding:8px;font-size:11px}.skill-toolbar>.search{width:100%;flex:auto}.skill-toolbar .skill-tools{gap:8px 12px}.skill-toolbar .skill-tools label{font-size:11px}.skill-toolbar .skill-tools .inline-check{font-size:11px}.tab-content .skill input[type=number]{width:42px;min-width:42px;padding:4px 0;text-align:center}.tab-content .skill .halves{min-width:46px;font-size:9px!important}.tab-content .roll{min-width:36px;font-size:9px}.personal-dossier .resource-steps button{min-height:44px}.tab-content{padding-top:16px}}
@media print{.skill-toolbar,#top-dice{display:none!important}.skill-heading{position:static!important;clip-path:none;width:auto!important;height:auto!important}}
.print-text{display:none}
@media print{.print-text{display:block!important;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.6;padding:8px;min-height:48px;border:1px solid #ccc;color:#15291e}.editing #sheet textarea.print-hide{display:none!important}}

/* Em consulta, o valor do atributo faz parte da área clicável da rolagem. */
.editing:not(.sheet-edit) .personal-dossier .attribute input{pointer-events:none}
