/* Character sheet visual language, based on the compact paper-like mobile reference. */
.sheet-page { --sheet-ink:#181a22; --sheet-sub:#606977; color:var(--sheet-ink); }
.sheet-page .card { border:1px solid #e5e1df; border-radius:10px; background:#fff; box-shadow:0 1px 5px rgb(38 29 32 / 3%); }
.sheet-heading { position:relative; top:auto; z-index:1; gap:11px; padding:13px 0 9px; border:0; background:var(--bg); }
.sheet-heading .sheet-portrait { display:grid; place-items:center; flex:0 0 94px; width:94px; height:94px; border:1px solid #e6ccd1; border-radius:10px; background:linear-gradient(135deg,#e9d7d5,#bb8893 58%,#79334b); color:#fff; font:600 31px/1 Georgia,serif; letter-spacing:.02em; }
.sheet-heading .sheet-identity { flex:1; min-width:0; }
.sheet-heading h1 { font:700 clamp(1.8rem,4vw,2.3rem)/1.03 Georgia,'Times New Roman',serif; letter-spacing:-.035em; color:#13151d; }
.sheet-heading .sheet-name-button { display:flex; align-items:center; gap:5px; min-height:0; padding:0; border:0; background:transparent; box-shadow:none; text-align:left; color:#13151d; font:inherit; letter-spacing:inherit; }
.sheet-heading .sheet-name-button .icon { width:20px; height:20px; transform:rotate(90deg); color:var(--accent); }
.sheet-character-picker { display:grid; gap:7px; margin:12px 0 14px; max-height:min(50vh,420px); overflow:auto; }
.sheet-character-picker button { display:flex; flex-direction:column; align-items:flex-start; gap:3px; width:100%; min-height:60px; padding:10px 13px; text-align:left; background:#fff; }
.sheet-character-picker button[aria-current="true"] { border-color:#a96779; background:#fcf5f6; }
.sheet-character-picker strong { color:var(--sheet-ink); font-size:.95rem; }
.sheet-character-picker small { color:var(--sheet-sub); font-size:.76rem; }
#picker-all-characters { display:flex; align-items:center; justify-content:space-between; width:100%; border:0; border-top:1px solid var(--border); border-radius:0; padding:12px 4px 2px; color:var(--accent); font-weight:650; }
#picker-all-characters .icon { width:16px; height:16px; }
.sheet-heading p { color:#242932; font-size:.91rem; line-height:1.2; margin:5px 0 0; }
.sheet-heading .sheet-subclass { color:var(--sheet-sub); font-size:.82rem; margin-top:4px; }
.sheet-heading #sheet-menu { align-self:flex-start; margin-left:auto; color:#20232b; }
.sheet-nav { border-radius:11px; }
.sheet-no-spells .sheet-nav [data-tab="spells"] { display:none; }
.sheet-nav button { gap:5px; }
.sheet-nav button.active { color:var(--accent); }
.sheet-mode-character .sheet-actions,.sheet-mode-actions .sheet-overview { display:none; }
.sheet-overview,.sheet-actions { max-width:780px; margin:0 auto; }

/* Overview */
.overview-hp { position:relative; margin:15px 0 13px; padding:15px 16px 14px; }
.overview-hp-top { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--sheet-sub); font-size:.9rem; }
.overview-hp-top strong { font-weight:600; }
.overview-hp-top #hp-edit { display:flex; align-items:center; gap:4px; min-height:30px; padding:2px 0; font-size:.83rem; font-weight:500; color:var(--sheet-sub); }
.overview-hp-top #hp-edit .icon { width:16px; height:16px; transform:rotate(90deg); }
.overview-hp-number { font-size:3rem; font-weight:700; line-height:1.08; letter-spacing:-.045em; font-variant-numeric:tabular-nums; margin-top:4px; }
.overview-hp-number span { color:#6b737d; font-size:2rem; font-weight:400; letter-spacing:-.02em; }
.hp-progress { width:calc(100% - 43px); height:9px; background:#e6e7e8; border-radius:20px; overflow:hidden; margin:11px 0 0; }
.hp-progress .hp-fill { display:block; height:100%; background:var(--accent); border-radius:20px; }
.hp-percent { position:absolute; right:16px; margin-top:-19px; color:var(--sheet-sub); font-size:.77rem; font-variant-numeric:tabular-nums; }
.overview-hp-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:19px; }
.overview-hp-actions button { min-height:47px; padding:8px 5px; white-space:nowrap; color:#fff; font-size:1rem; font-weight:600; border-radius:8px; }
.overview-hp-actions .damage-button { background:#761c31; border-color:#761c31; }
.overview-hp-actions .heal-button { background:#506d59; border-color:#506d59; }
.overview-hp-actions .damage-button:hover { background:#621326!important; color:#fff!important; }
.overview-hp-actions .heal-button:hover { background:#3d5b47!important; color:#fff!important; border-color:#3d5b47!important; }
.overview-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; margin:0 0 13px; padding:11px 3px; }
.overview-stats>div,.overview-stats>button { min-width:0; display:grid; grid-template-columns:24px 1fr; column-gap:3px; align-items:center; align-content:center; text-align:left; padding:3px 7px; background:transparent; border:0; border-right:1px solid var(--border); border-radius:0; box-shadow:none; }
.overview-stats>div:last-child { border:0; }
.overview-stats .icon { width:21px; height:21px; grid-row:span 2; color:#242831; }
.overview-stats strong { min-width:0; font-size:1.35rem; font-weight:700; line-height:1.05; white-space:nowrap; }
.overview-stats span { color:var(--sheet-sub); font-size:.69rem; line-height:1.2; margin-top:3px; white-space:nowrap; }
.overview-stats small { grid-column:1/-1; font-size:.64rem; }
.overview-quick { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:17px; padding:10px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.overview-quick button { display:inline-flex; align-items:center; justify-content:center; white-space:nowrap; min-height:42px; color:var(--accent); background:#fff; border:1px solid #b78b96; }
.overview-quick #rest { color:var(--sheet-sub); border-color:#afb4bc; }
.overview-quick .icon { width:18px; height:18px; }
.overview-section-title { color:var(--sheet-sub); font-size:.92rem; font-weight:500; margin:20px 5px 7px; }
.overview-abilities { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0 0 12px!important; }
.overview-abilities .ability-box { position:relative; min-height:94px; padding:9px; border-radius:9px; text-align:center; box-shadow:0 1px 3px rgb(38 29 32 / 3%); }
.overview-abilities .ability-box .name { position:absolute; top:10px; left:10px; color:#616a77; font-size:.73rem; letter-spacing:0; font-weight:600; }
.overview-abilities .ability-box .icon { position:absolute; top:8px; right:8px; width:17px; height:17px; color:#687180; }
.overview-abilities .ability-box .mod { color:var(--sheet-ink); font-size:1.7rem; line-height:1; margin:18px 0 1px; }
.overview-abilities .ability-box .score { color:#747b86; font-size:.78rem; }
.overview-detail-link { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:55px; padding:10px 15px; margin:0 0 14px; color:var(--sheet-ink); font-size:.95rem; text-align:left; }
.overview-detail-link .icon { width:18px; height:18px; color:#77808a; }
.sheet-overview #session-controls { margin:-7px 0 12px; }
.sheet-overview #session-controls .session-row { margin:0; }
.sheet-overview #session-controls #conditions { display:none; }
.sheet-overview #session-controls .pill { background:#fff; }
.sheet-overview #resource-list { margin-top:15px; }
.sheet-overview #resource-panel { border:0; background:transparent; box-shadow:none; margin:0; padding:0; }
.sheet-overview #resource-panel>summary { color:var(--sheet-sub); font-size:.93rem; font-weight:500; padding:3px 5px 9px; }
.sheet-overview .resource-grid { display:grid; grid-template-columns:1fr; gap:0; padding:0 12px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.sheet-overview .resource-display { min-width:0; border-bottom:1px solid var(--border); }
.sheet-overview .resource-display:last-child { border-bottom:0; }
.sheet-overview .resource-display>summary { display:flex; align-items:center; gap:10px; min-height:55px; padding:8px 2px; list-style:none; }
.sheet-overview .resource-display>summary::-webkit-details-marker { display:none; }
.sheet-overview .resource-display>summary .resource-name { flex:1; min-width:0; color:var(--sheet-ink); font-size:.9rem; font-weight:650; }
.sheet-overview .resource-dots { display:flex; gap:5px; flex:none; }
.sheet-overview .resource-dots i { display:block; width:12px; height:12px; border:1.5px solid #c3c5c9; border-radius:50%; background:#fff; }
.sheet-overview .resource-dots i.filled { border-color:var(--accent); background:var(--accent); }
.sheet-overview .resource-count { color:#67707c; font-size:.78rem; font-weight:500; white-space:nowrap; }
.sheet-overview .resource-display>summary .icon { width:16px; height:16px; color:#838b95; transition:transform .15s; }
.sheet-overview .resource-display[open]>summary .icon { transform:rotate(90deg); }
.sheet-overview .resource-editor { padding:0 2px 11px; }
.sheet-overview .resource-explanation { display:grid; gap:9px; padding:0 2px 15px; }
.sheet-overview .resource-explanation>div { padding:12px 13px; border-left:3px solid #b88391; border-radius:0 7px 7px 0; background:#fbf6f6; }
.sheet-overview .resource-explanation strong { display:block; margin-bottom:5px; color:var(--sheet-ink); font-size:.8rem; }
.sheet-overview .resource-explanation p { margin:0; color:#555862; font-size:.8rem; line-height:1.5; white-space:pre-line; }
.sheet-overview .resource-counter { min-height:0; padding:5px 0; border:0; border-radius:0; background:transparent; margin:0; }
.sheet-overview .resource-counter>div:first-child>span { color:var(--sheet-ink); font-size:.9rem; font-weight:600; }
.sheet-overview .resource-counter>div:first-child>span>b { color:var(--sheet-sub); font-weight:500; }
.sheet-overview .resource-counter small { color:#7b8188; font-size:.67rem; }
.sheet-overview #custom-resource { margin-top:7px; }
.sheet-overview #session-details { margin-top:16px; }
.sheet-overview #session-details>summary { color:var(--sheet-sub); }
.sheet-overview #session-details #session-controls { margin:0; }
.sheet-overview #character-details { margin-top:18px; }
.sheet-overview #character-details>summary { color:var(--sheet-sub); }
.sheet-overview #character-editor { padding-top:3px; }

/* Actions and spell rows. */
.sheet-actions-heading { margin:18px 2px 12px; }
.sheet-actions-heading h2 { font-size:1.6rem; font-weight:700; line-height:1.2; letter-spacing:-.025em; }
.sheet-actions-heading button { border:0; padding:5px; font-size:.88rem; font-weight:650; }
.spell-slot-panel { padding:12px 14px 6px; margin:0 0 12px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.spell-slot-heading { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding-bottom:5px; }
.spell-slot-heading strong { font-size:.95rem; color:#303641; }
.spell-slot-heading>span { font-size:.75rem; color:#717986; }
.spell-slot-rows { display:grid; grid-template-columns:minmax(0,1fr); }
.spell-slot-row { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:56px; border-top:1px solid var(--border); }
.spell-slot-row:first-child { border-top:0; }
.spell-slot-level { min-width:0; font-size:.85rem; font-weight:600; color:#525b68; }
.spell-slot-controls { display:flex; flex:none; align-items:center; gap:4px; }
.spell-slot-controls button { width:44px; min-width:44px; height:44px; min-height:44px; padding:0; border:0; border-radius:8px; background:transparent; box-shadow:none; color:var(--accent); font-size:1.2rem; }
.spell-slot-controls button:hover:not(:disabled) { background:var(--surface-alt,#f6f2f3); }
.spell-slot-controls button:disabled { color:#a5a9b0; opacity:.65; }
.spell-slot-count { min-width:50px; text-align:center; white-space:nowrap; font-size:1rem; font-variant-numeric:tabular-nums; color:#717986; }
.spell-slot-count strong { color:#1b202a; font-weight:700; }
@media(min-width:650px) {
  .spell-slot-rows { grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); column-gap:24px; }
  .spell-slot-row { border-top:0; }
}
.sheet-actions>.play-tools { margin:10px 0 12px; }
.sheet-actions[data-current-play-view="actions"]>.play-tools { display:none; }
.sheet-actions>.play-tools .segmented { width:100%; padding:0; gap:8px; background:transparent; border:0; }
.sheet-actions>.play-tools .segmented button { flex:1; border:1px solid #aeb3bd; background:#fff; color:#5b626d; min-height:42px; border-radius:8px; font-size:.85rem; }
.sheet-actions>.play-tools .segmented button.active { color:#fff; background:var(--accent); border-color:var(--accent); }
.sheet-actions #play-content>.section-heading:first-child { display:none; }
.sheet-actions .roll-mode { display:none; }
.sheet-actions .roll-mode .eyebrow { color:var(--sheet-sub); }
.sheet-actions #action-primary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; overflow:visible; padding:0; margin:6px 0 5px; }
.sheet-actions #action-primary button { border-radius:8px; background:#fff; border-color:#aeb3bd; color:#555e6b; min-height:42px; }
.sheet-actions #action-primary button.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.sheet-actions .action-hint-row { display:flex; align-items:start; justify-content:space-between; gap:7px; flex-wrap:wrap; margin-bottom:11px; color:#818792; font-size:.75rem; }
.sheet-actions .action-hint-row>span { padding-top:7px; }
.sheet-actions .attack-count-note { margin:-4px 3px 12px; color:#68717e; font-size:.76rem; line-height:1.35; }
.sheet-actions .attack-count-note strong { color:var(--accent); font-weight:700; }
.sheet-actions #action-more-filters { margin-left:auto; }
.sheet-actions #action-more-filters>summary { min-height:30px; padding:4px 0; color:var(--accent); font-size:.76rem; font-weight:600; }
.sheet-actions #action-more-filters[open] { flex-basis:100%; margin-left:0; padding:8px; border:1px solid var(--border); border-radius:8px; background:#fff; }
.sheet-actions #action-more-filters[open]>summary { margin:0; }
.sheet-actions #action-filters { display:flex; padding:0; margin:3px 0 7px; gap:6px; }
.sheet-actions #action-filters button { flex:0 0 auto; border-radius:8px; background:#fff; border-color:#c8c4c2; color:#555e6b; min-height:35px; padding:5px 9px; }
.sheet-actions #action-filters button.active { background:#f9e9ed; border-color:#c7909c; color:var(--accent); }
.sheet-actions #action-more-filters>button { min-height:32px; padding:5px 8px; font-size:.77rem; }
.sheet-actions #acts>h3 { color:#68717e; font-size:.87rem; font-weight:500; letter-spacing:0; text-transform:none; margin:18px 4px 7px; }
.sheet-actions .action-group { border:1px solid var(--border); border-radius:10px; overflow:hidden; background:#fff; }
.sheet-actions .action-card,.sheet-actions .spell-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:9px; row-gap:7px; padding:11px; margin:0; border:0; border-bottom:1px solid var(--border); border-radius:0; background:#fff; box-shadow:none; }
.sheet-actions .action-group>.action-card:last-child,.sheet-actions .action-group>.spell-card:last-child { border-bottom:0; }
.sheet-actions .action-card .action-top,.sheet-actions .spell-card .action-top { min-width:0; }
.sheet-actions .action-card .name-button,.sheet-actions .spell-card .name-button { color:#1b202a; font-size:.95rem; line-height:1.18; font-weight:700; padding:0; overflow-wrap:normal; word-break:normal; hyphens:none; }
.sheet-actions .action-card .name-button small,.sheet-actions .spell-card .name-button small { color:#626c79; font-size:.72rem; font-weight:400; letter-spacing:0; line-height:1.3; margin-top:5px; }
.sheet-actions .action-card .name-button .weapon-attack-note { color:var(--accent); font-weight:600; }
.sheet-actions .action-values { display:flex; gap:7px; align-items:center; margin:0; }
.sheet-actions .action-values>div:first-child { display:none; }
.sheet-actions .action-values>div { flex:0 0 auto; width:auto; }
.sheet-actions .action-values .value-label { display:none; }
.sheet-actions .roll-button,.sheet-actions .static-value { display:flex; flex-direction:column; align-items:center; justify-content:center; width:70px; min-height:54px; padding:3px; border:1px solid #a9b0bb; border-radius:8px; background:#fff; color:#1e2631; font-size:1.15rem; font-weight:700; line-height:1.1; }
.sheet-actions .roll-button strong { display:block; font-size:1em; font-weight:700; line-height:1.15; }
.sheet-actions .roll-button small { display:block; color:#68727f; font-size:.65rem; font-weight:500; line-height:1.1; margin-top:2px; }
.sheet-actions .action-values>div:last-child .roll-button { min-width:72px; width:auto; }
.sheet-actions .action-card:has([data-heal]) .action-values>div:nth-child(2) { display:none; }
.sheet-actions .static-value { font-size:.74rem; font-weight:600; color:#56606d; text-align:center; max-width:80px; overflow-wrap:anywhere; }
.sheet-actions .cast-label { min-width:70px; min-height:48px; color:var(--accent); background:#fff; border-color:#a65b6b; }
.sheet-actions .spell-card:has([data-atk]) [data-cast] { display:none; }
.sheet-actions .spell-card:not(:has([data-atk])) .action-top { grid-column:1/-1; }
.sheet-actions .spell-card:not(:has([data-atk])) .action-values { display:none; }
.sheet-actions .feature-rolls,.sheet-actions .action-card>.badge,.sheet-actions .action-card>.form-error,.sheet-actions .action-card>[data-temp-hp],.sheet-actions .action-card>[data-deflect],.sheet-actions .action-card>[data-healing-dice] { grid-column:1/-1; }
.sheet-actions .action-card .resource-inline { grid-column:1/-1; flex-wrap:nowrap; padding-top:5px; margin-top:1px; }
.sheet-actions .action-card .resource-inline>div:first-child { min-width:0; flex:1; }
.sheet-actions .action-card .resource-inline small { display:none; }
.sheet-actions .action-card-plain-toggle .toggle-controls { grid-column:2; grid-row:1; border:0; margin:0; padding:0; justify-content:flex-end; }
.sheet-actions .action-card-plain-toggle .toggle-controls .row { justify-content:flex-end; flex-wrap:wrap; }
.sheet-actions .action-card-plain-toggle .toggle-controls [data-action-toggle],.sheet-actions .action-card-plain-toggle .toggle-controls [data-innate-sorcery] { min-height:38px; padding:5px 9px; white-space:nowrap; }
.sheet-actions .action-card-plain-toggle .name-button small { margin-top:3px; }
.sheet-actions .action-card .resource-action-state { display:block; color:var(--sheet-sub); font-size:.72rem; margin-top:2px; }
.sheet-actions #combat-reference { margin-top:20px; }
.sheet-actions #death-panel { margin-top:20px; }
.sheet-mode-spells #tbody .section-heading h2,.sheet-mode-gear #tbody .section-heading h2,.sheet-mode-journal #tbody .section-heading h2 { font-size:1.55rem; }
.journal-intro { color:var(--sheet-sub); font-size:.9rem; }
.journal-notes textarea { min-height:140px; }
.journal-feature { padding:11px 0; border-top:1px solid var(--border); }
.journal-feature strong { display:block; }
.journal-feature small { color:var(--muted); }
.journal-feature p { margin:4px 0; color:#414650; font-size:.85rem; white-space:pre-line; }
.journal-features summary { display:flex; justify-content:space-between; align-items:center; min-height:52px; padding:6px 0; }
.journal-features summary span { margin-left:auto; padding:2px 7px; border-radius:20px; background:#f4f1ef; color:#727a82; font-size:.7rem; }
.journal-features summary::after { content:'›'; margin-left:8px; color:#7b8289; font-size:1.4rem; line-height:1; transition:transform .15s; }
.journal-features details[open] summary::after { transform:rotate(90deg); }
.modal #dmg { background:#761c31; border-color:#761c31; color:#fff; }
.modal #heal { background:#506d59; border-color:#506d59; color:#fff; }
.modal #dmg:hover { background:#621326!important; border-color:#621326!important; color:#fff!important; }
.modal #heal:hover { background:#3d5b47!important; border-color:#3d5b47!important; color:#fff!important; }

@media (max-width:680px) {
  #app:has(.sheet-page) { padding:0 16px calc(92px + env(safe-area-inset-bottom)); }
  .sheet-heading { margin:0; padding:10px 0 5px; gap:9px; }
  .sheet-heading .sheet-portrait { width:96px; height:96px; flex-basis:96px; }
  .sheet-heading h1 { font-size:1.9rem; }
  .sheet-heading p { font-size:.8rem; }
  .sheet-heading .sheet-subclass { font-size:.76rem; }
  .sheet-heading #sheet-menu { width:34px; padding:6px; }
  .sheet-nav { position:fixed; left:0; right:0; bottom:0; z-index:20; display:grid; grid-template-columns:repeat(4,1fr); gap:0; margin:0; padding:6px 10px calc(6px + env(safe-area-inset-bottom)); border:0; border-top:1px solid #e6e2e0; border-radius:0; background:#fff; box-shadow:0 -3px 16px rgb(25 20 22 / 3%); }
  .sheet-nav button { display:flex; flex-direction:column; gap:1px; min-height:50px; padding:4px 2px; border:0; border-radius:0; color:#6c7480; background:transparent; font-size:.66rem; font-weight:500; }
  .sheet-nav button .icon { width:21px; height:21px; }
  .sheet-nav button.active { position:relative; color:var(--accent); background:transparent; border:0; }
  .sheet-nav button.active::after { content:""; position:absolute; bottom:0; width:48px; height:2px; border-radius:4px; background:var(--accent); }
  .sheet-mode-spells .sheet-nav [data-tab="play"] { position:relative; color:var(--accent); }
  .sheet-mode-spells .sheet-nav [data-tab="play"]::after { content:""; position:absolute; bottom:0; width:48px; height:2px; border-radius:4px; background:var(--accent); }
  .sheet-nav [data-tab="spells"] { display:none; }
  .sheet-page #tbody { padding-bottom:14px; }
  .sheet-actions .action-card,.sheet-actions .spell-card { padding:11px 10px; }
  .sheet-actions .action-values { gap:6px; }
  .sheet-actions .roll-button,.sheet-actions .static-value { width:69px; min-height:51px; font-size:1.05rem; }
  .sheet-actions .action-values>div:last-child .roll-button { min-width:72px; }
  .sheet-overview .resource-grid { grid-template-columns:1fr; }
  body.has-sheet #dice-tray .dice-launcher { display:none; }
  #dice-tray { bottom:calc(77px + env(safe-area-inset-bottom)); }
}
@media (max-width:480px) {
  .sheet-heading { gap:8px; }
  .sheet-heading .sheet-portrait { width:80px; height:80px; flex-basis:80px; }
  .sheet-heading h1 { font-size:1.8rem; }
  .sheet-heading .sheet-name-button { max-width:100%; gap:3px; }
  .sheet-heading .sheet-name-button .icon { flex:none; width:17px; height:17px; }
}
@media (max-width:360px) {
  .sheet-heading .sheet-portrait { width:64px; height:64px; flex-basis:64px; font-size:25px; }
  .sheet-heading h1 { font-size:1.625rem; }
  .sheet-heading .sheet-name-button { gap:2px; }
  .sheet-heading .sheet-name-button .icon { width:16px; height:16px; }
  .overview-stats>div,.overview-stats>button { grid-template-columns:21px 1fr; gap:3px; padding-inline:5px; }
  .overview-stats .icon { width:20px; height:20px; }
  .overview-stats strong { font-size:1.08rem; }
  .overview-stats span { font-size:.66rem; }
  .overview-quick { gap:6px; padding:7px; }
  .overview-quick button { min-width:0; padding:7px 4px; font-size:.82rem; }
  .overview-hp-actions button { font-size:.88rem; }
  .sheet-actions .roll-button,.sheet-actions .static-value { width:57px; min-width:57px; }
  .sheet-actions .action-values>div:last-child .roll-button { min-width:62px; }
  .journal-features details.card { margin:7px 0; padding:0 12px; }
  .journal-features summary { min-height:46px; padding:5px 0; }
}
/* Shared character art: the same model preview, picture, or initial everywhere. */
.character-art{display:grid;place-items:center;width:100%;height:100%;border-radius:inherit;overflow:hidden}
.character-art img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.character-art.character-initial{width:48px;height:54px;flex:0 0 48px}
.sheet-heading button.sheet-portrait{padding:0;border:0;cursor:pointer;overflow:hidden}
.sheet-heading button.sheet-portrait:focus-visible{outline:3px solid #861e3a;outline-offset:4px}
.appearance-editor h3{margin:0;font-size:19px}.appearance-editor .small{margin:5px 0 12px}
.appearance-model,.appearance-picture{border:1px solid #e3dedc;border-radius:14px;padding:18px;margin:18px 0;background:#fff}
.appearance-heading{display:flex;align-items:start;justify-content:space-between;gap:12px}.appearance-heading .quiet{font-size:14px;white-space:nowrap;padding:4px 0;min-height:40px}
.appearance-preview{width:100%;height:190px;display:grid;place-items:center;margin:0 0 12px;background:#f7f4f1;border-radius:10px;overflow:hidden}
.appearance-preview>.character-art{width:170px;height:170px;font:700 64px Georgia,serif;color:#79213b}.appearance-preview img{width:100%;height:100%;object-fit:contain}
.appearance-preview>img{width:190px;height:190px;max-width:100%;max-height:100%;min-height:0;object-fit:contain}
.appearance-orientation{display:flex;align-items:end;gap:12px;margin-top:14px}.appearance-orientation label{flex:1;min-width:0;font-size:14px}.appearance-orientation select{width:100%;margin-top:6px}.appearance-orientation button{white-space:nowrap}
.appearance-picture-row{display:flex;align-items:center;gap:18px}.appearance-picture-preview{width:72px;height:72px;border-radius:12px;overflow:hidden;background:#f1e6e8;color:#79213b;font:700 32px Georgia,serif}.appearance-picture-preview>img{width:100%;height:100%;object-fit:cover}
.appearance-editor .modal-footer button{white-space:nowrap;padding-inline:12px;font-size:15px}
.enc-play .piece-monogram.character-art{border-radius:50%}.map-token .character-art{border-radius:inherit}
@media(max-width:420px){.appearance-model,.appearance-picture{padding:14px}.appearance-orientation{gap:8px}.appearance-orientation button{padding:10px;font-size:14px}}
