/* Functional text stays readable while the dungeon controls keep their footprint. */
.combat-command-grid .command-name,.movement-command .command-name { font-size:14px; line-height:17px; }
.combat-command-grid .command-cost { font-size:14px; line-height:17px; min-height:17px; }
.command-heading #combat-status { font-size:14px; line-height:1.3; }
.command-note { font-size:12px; line-height:1.35; }
.combat-command-grid .command-stock { font-size:12px; line-height:14px; }

#character-modal .bag-detail-copy small,#character-modal .equipment-details-copy small { font-size:14px; line-height:1.45; }
#character-modal .equipment-inspect-lore { font-size:13px; line-height:1.45; }
#character-modal.field-inventory[data-view="bag"] .sheet-party-name { font-size:14px; line-height:17px; }
#character-modal.field-inventory[data-view="bag"] :is(.bag-capacity span,.bag-space) { font-size:12px; }
#character-modal.field-inventory[data-view="bag"] :is(.bag-party-open,#btn-field-items,.bag-action-give) { font-size:14px!important; line-height:1.3; }
#character-modal.field-inventory[data-view="bag"] .bag-detail-copy small { font-size:14px; line-height:1.45; }
#character-modal.field-inventory[data-view="bag"] .bag-details { gap:4px; flex-wrap:nowrap; }
#character-modal.field-inventory[data-view="bag"] .bag-detail-copy { min-height:44px; overflow-wrap:anywhere; }
#character-modal.field-inventory[data-view="bag"] .bag-actions { max-height:none; padding-top:4px; gap:4px; flex:0 1 auto; }
#character-modal.field-inventory[data-view="bag"] .field-use-caption { font-size:12px; }
#character-modal.field-inventory[data-view="bag"] :is(.field-use-name,.field-use-value) { font-size:14px; line-height:17px; }
#character-modal.field-inventory[data-view="bag"] .field-use-value { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
#character-modal.field-inventory[data-view="bag"] .bag-actions .field-use-target { padding:3px 2px!important; gap:1px; min-height:44px!important; }
#character-modal.field-inventory[data-view="bag"] .field-use-face { width:18px; height:18px; }
#character-modal.field-inventory[data-view="bag"] .bag-party-supply { max-width:100%; min-width:0; white-space:normal; flex-shrink:1; }

/* Labels get room to wrap inside the existing scrollable skill map. */
#talents-modal .talent-node-card strong { font-size:14px; height:34px; line-height:17px; }
#talents-modal :is(.skill-detail-rank,.skill-requirement,.skill-learn-reason,.skill-detail-copy h4) { font-size:14px; line-height:1.4; }
#talents-modal .skill-detail-effect { font-size:16px; line-height:1.45; }
#talents-modal :is(.skill-explore-hint,.skill-map-extent,.talents-points-label) { font-size:12px; }
#character-modal .talents-points-label { font-size:12px; }

@media(max-width:1100px),(max-height:640px) {
  #character-modal.field-inventory[data-view="bag"][data-field-selected="true"] .character-modal-body { padding-right:234px; }
  #character-modal.field-inventory[data-view="bag"][data-field-selected="true"] .character-inspector { width:224px; }
  #character-modal.field-inventory[data-view="bag"] .sheet-party-member { min-height:62px!important; }
  #talents-modal .talent-node-card,#talents-modal .talent-node-card[data-role="milestone"] { height:62px; }
  #talents-modal .skill-node-symbol,#talents-modal .talent-node-card[data-role="adept"] .skill-node-symbol,#talents-modal .talent-node-card[data-role="milestone"] .skill-node-symbol { width:22px; height:22px; }
  #talents-modal .talent-node-card[data-role="milestone"] strong { font:600 14px/17px "Segoe UI",system-ui,sans-serif; height:34px; }
}
@media(orientation:landscape) and (min-width:561px) and (pointer:coarse) {
  .combat-command-grid .command-art,#btn-attack .command-art { width:28px; height:28px; }
  .combat-controls .control-group.combat-command-grid button { padding:5px 3px; gap:0; }
}
@media(max-width:720px) {
  #character-modal.field-inventory[data-view="bag"][data-field-selected="true"] .bag-capacity span { display:none; }
}
@media(max-height:380px) {
  #character-modal.field-inventory[data-view="bag"] .field-use-face { display:none; }
}
@media(max-width:560px) {
  #character-modal.field-inventory[data-view="bag"][data-field-selected="true"] .character-modal-body { padding-right:0; }
  #character-modal.field-inventory[data-view="bag"][data-field-selected="true"] .character-inspector { width:auto; }
}

/* One reading rhythm across windows and encounter overlays. */
.game-modal,.event-card,#onboarding-card {
  --menu-gap:16px;
  text-align:left;
  font-family:"Segoe UI",system-ui,sans-serif;
  line-height:1.5;
  color:#e6ddcb;
}
.game-modal :is(h2,h3,p),.event-card :is(h2,h3,p) { text-align:left; }
.rpg-window-header { align-items:center; gap:16px; }
.rpg-window-title { padding-left:0; }
.rpg-window-title::before { display:none; }
.game-modal :is(.hint,.storage-hint,.contract-card-desc,.bounties-cache-desc,.core-recipe-effect,.core-recipe-cost) { font-size:14px; line-height:1.5; color:#c4baa5; }
.game-modal :is(.forge-tabs,.hall-tabs,.shop-tabs) { gap:8px; }
.game-modal button:focus-visible,#settings-volume:focus-visible { outline:2px solid #efd095; outline-offset:3px; }
/* Bottom copy remains legible without changing the movement layout. */
/* Exactly two whole lines. combat.js scrolls to the newest line, so a box that
   is not a whole number of lines tall always showed a half-cut line at its top
   edge - hard to read once a guardian's warnings wrap and fill it. No gaps
   between entries for the same reason, and no padding above or below: a
   scrolled box clips at its padding edge, so padding showed a sliver of the
   line before. The newest stays bright and bold. */
#combat-log { font:500 14px/1.5 "Segoe UI",system-ui,sans-serif; text-align:left; color:#d8cebb; padding-inline:16px;
  padding-block:0; max-height:3em; }
#combat-log p { margin:0; }
.command-note,.victory-hint { font:500 14px/1.45 "Segoe UI",system-ui,sans-serif; color:#d0c5af; letter-spacing:0; text-align:left; }
.event-card { padding:20px; }
.event-card p { font-size:15px; line-height:1.5; }
#onboarding-card.rpg-window p { font-size:15px; line-height:1.5; }
.settings-modal.game-modal { width:min(480px,calc(var(--safe-vw) - 32px)); max-height:calc(var(--safe-dvh) - 32px); padding:24px; overflow-y:auto; pointer-events:auto; }
.settings-modal h2,.settings-modal h3,.settings-modal p { margin:0; }
.settings-body { display:grid; gap:16px; padding-top:20px; }
.settings-body h3 { font-size:18px; color:#f1dfba; }
.settings-body p { font-size:14px; color:#c4baa5; }
.settings-row { display:flex; justify-content:space-between; align-items:center; gap:16px; font-size:16px; font-weight:600; }
.settings-row button { min-height:44px; min-width:112px; }
#settings-volume { width:100%; min-height:44px; margin:0; accent-color:#d6b77b; cursor:pointer; }
#settings-volume-value { color:#f1dfba; font-variant-numeric:tabular-nums; }
#btn-settings { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
/* The account code: read off one screen, typed into another. */
.settings-code-row { flex-wrap:wrap; }
#settings-code { margin-left:auto; font:600 17px/1.2 ui-monospace,"Cascadia Mono",Consolas,monospace; letter-spacing:0.08em; color:#f1dfba; user-select:all; }
.settings-code-entry { display:flex; gap:12px; }
#settings-code-input { flex:1; min-width:0; min-height:44px; padding:0 12px; font:600 16px ui-monospace,"Cascadia Mono",Consolas,monospace; letter-spacing:0.08em; text-transform:uppercase; color:#f4e8c9; background:#0b0d10; border:2px solid #3b3328; }
#settings-code-input:focus { outline:2px solid var(--gold); outline-offset:2px; }
#settings-code-input::placeholder { color:#6f6656; }
.settings-code-entry button { min-height:44px; min-width:112px; }
#settings-code-status:empty { display:none; }
#settings-code-status[data-tone="warn"] { color:#e0a07a; }
#settings-code-status[data-tone="ok"] { color:#a9c98e; }
.settings-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:12px; color:var(--muted); }
#settings-privacy,#select-privacy { color:var(--muted); text-decoration:underline; text-underline-offset:3px; pointer-events:auto; }
#settings-privacy:hover,#select-privacy:hover { color:#efd095; }
#settings-privacy:focus-visible,#select-privacy:focus-visible { outline:2px solid #efd095; outline-offset:2px; }
.select-privacy-row { margin:8px 0 0; font-size:12px; font-weight:400; color:var(--muted); }
#settings-build { margin-left:auto; font-size:12px; color:var(--muted); text-align:right; font-variant-numeric:tabular-nums; }
#settings-build:empty { display:none; }
.select-code-link { display:block; margin:12px auto 0; min-height:44px; padding:0 12px; background:none; border:none; box-shadow:none; font:inherit; font-size:14px; color:var(--gold); text-decoration:underline; text-underline-offset:3px; cursor:pointer; pointer-events:auto; }
.select-code-link:hover { color:#efd095; }
.select-code-link:focus-visible { outline:2px solid #efd095; outline-offset:2px; }
/* A new code, for one that was seen. */
.settings-renew-row span { flex:1; min-width:0; font-size:13px; color:var(--muted); }
#btn-renew-code { min-height:44px; min-width:112px; }
#btn-renew-code[data-armed] { border-color:#825747; color:#e8b8a6; }
/* Google's own button, drawn in its own frame by js/ui/google-sign-in.js. */
.google-slot { display:flex; justify-content:center; min-height:44px; pointer-events:auto; }
.google-slot[hidden], #settings-google[hidden] { display:none; }
#select-google { margin-top:8px; }
#settings-google-help { font-size:13px; color:var(--muted); }
#settings-google .google-slot { justify-content:flex-start; }
#btn-unlink-google { min-height:44px; }
#settings-google-status:empty { display:none; }
#settings-google-status[data-tone="warn"] { color:#e0a07a; }
#settings-google-status[data-tone="ok"] { color:#a9c98e; }
@media(max-height:440px) {
  .settings-modal.game-modal { padding:18px; }
  .settings-body { gap:10px; padding-top:12px; }
}
