/* The traveller's folio: translucent cream, engraved brass and illuminated margins. */
:root {
  color-scheme: light;
  --gold: #765022;
  --gold-dim: #806b43;
  --cream: #382c20;
  --muted: #5c5140;
  --ink: #382c20;
  --panel: #d8ccb28f;
  --line: #88755340;
  --rubric: #803c31;
  --paper: radial-gradient(ellipse at 15% 0%, #f2eade18, transparent 62%),
    repeating-linear-gradient(4deg, #826b4204 0 1px, transparent 1px 4px),
    linear-gradient(105deg, #ccbea48f, #e4dac799 24%, #ded3bc94 72%, #cdbd9f8c);
  --folio: linear-gradient(105deg, #d6c8aedb, #e5dcc9e0 30%, #dbcfb7db);
  --brass: linear-gradient(135deg, #bca77c88, #dfcfaa99 22%, #9e875c80 49%, #cdbb9499 78%, #9d855c88);
}
body { font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif; }
#loading { background: #dcd1b9; color: var(--ink); }
#loading :is(p, .loading-crest, #load-status) { color: #795b35; }
#loading .load-track { background: #b8975b44; }
#loading .load-track i { background: #8a6639; }
#hud .region-reveal h2 { color: #fff0cd; }
#hud .screen-vignette { box-shadow: inset 0 -65px 65px -55px #3e2e2038; }

/* Tint only the surfaces, keeping ink crisp over the visible landscape. */
#hud :is(.chat, .inventory-grid, .panel, .combat-target, .toast, .teleport-cast, .interior-guide, :where(#gryphon-cast)) {
  color: var(--ink);
  background: var(--paper);
  border: 3px double #88734e80;
  border-radius: 2px;
  box-shadow: 0 3px 12px #37281620, inset 0 0 0 1px #eee5cf30;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
#hud :is(.chat, .inventory-grid, .panel, .combat-target, .toast, .teleport-cast, .interior-guide, :where(#gryphon-cast)) :is(p, small, span, strong, b, h2, h3, h4, label, summary, button, div, .icon) {
  color: var(--ink);
  text-shadow: none;
}
#hud :is(.chat, .inventory-grid, .panel, .combat-target, .toast, .teleport-cast, .interior-guide, :where(#gryphon-cast)) :is(small, .eyebrow, .panel-intro, .quest-note, .item-detail, .skill-xp, .combat-escape) { color: var(--muted); }
#hud :is(.chat, .inventory-grid, .panel, .combat-target) :is(h2, h3, .chat-tag, .skill-benefit, .city-reward, .quest-task strong) { color: var(--rubric); }
#hud :is(.chat, .inventory-grid, .panel, .combat-target, .toast) .icon { color: #795426; filter: none; }
#hud :is(.panel-body, .chat-lines, .journal-content, #items-panel, #skills-panel) { scrollbar-color: #907c5480 #d9cbb52e; }

#hud .safe-dot { background: #63724b; box-shadow: none; }

/* Brass compass with an ivory dial. */
#hud .map-cluster { top: 24px; }
#hud .minimap-wrap { background: var(--brass); border: 3px double #765a3080; padding: 7px; box-shadow: 0 0 0 2px #e0d2b550, 0 0 0 3px #95703b66, 0 5px 12px #37281626; }
#hud .map-inner { border: 1px solid #856437; }
#hud .map-topline, #hud .realm-status { color: #fff1d0; text-shadow: 0 1px 3px #302717, 0 0 3px #302717; }
#hud .map-topline { font-style: italic; font-size: 12px; }
#hud .map-topline .icon { color: #fff1d0; }
#hud :is(.compass-n, .compass-e, .compass-s, .compass-w) { color: #533d20; background: #ddd0b8b3; border: 1px solid #a18a6073; text-shadow: none; min-width: 16px; line-height: 16px; border-radius: 50%; }
#hud .compass-n { top: -15px; left: calc(50% - 9px); width: 18px; }
#hud .map-pin { background: var(--brass); border: 2px double #96744580; }
#hud .map-pin .icon { color: #4f3b24; }

/* Book leaves and numbered brass tabs, with room for all 28 inventory slots. */
#hud .chat { width: 352px; }
#hud .chat nav, #hud .inventory-tabs { background: linear-gradient(#c9b79538, #e1d4b924); border-bottom: 3px double #9a82564d; }
#hud .chat nav { height: 43px; padding: 4px 6px 0; gap: 0; }
#hud .chat nav button { padding-inline: 9px; gap: 5px; font-size: 12px; border-radius: 2px 2px 0 0; }
#hud .chat nav button.selected, #hud .inventory-tabs button[aria-selected='true'] { background: #e9deca45; color: var(--rubric); box-shadow: inset 0 2px #803c3180; }
#hud .chat nav button.selected::after { background: #e9deca45; }
#hud .chat-lines { font-size: 12px; }
#hud .chat-lines p { border-bottom-color: #93764720; }
#hud .chat-tag { font-size: 9px; font-variant: small-caps; }
#hud .chat-footer { border-top: 3px double #9e885045; padding: 7px 12px; background: #bdab841a; }
#hud .chat-footer i { background: #7b8051; }
#hud .inventory-grid { border-right: 0; width: 296px; height: clamp(344px, calc(58vh + 24px), 554px); padding: 0; }
#hud .inventory-tabs button { font-size: 14px; padding: 12px 4px; }
#hud .item-slots {
  gap: 3px; background: transparent; border: 0; min-height: 0;
  grid-template-rows: none; grid-auto-rows: max-content; align-content: start;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  scrollbar-gutter: stable; scrollbar-color: #907c5480 #d9cbb52e;
}
#hud .inventory-slot { aspect-ratio: 5 / 4; min-height: 44px; background: #baa57c1c; box-shadow: inset 0 1px 2px #8c6b361a; border: 1px solid #99825a33; border-radius: 2px; }
#hud .inventory-slot.occupied { background: radial-gradient(ellipse, #e9ddc64d, #c7b38d33); }
#hud .inventory-slot.occupied:hover, #hud .inventory-slot[aria-pressed='true'] { background: #e7d8b96b; outline: 1px solid #95653b80; outline-offset: -2px; }
#hud .inventory-slot .icon { color: #6b4c29; }
#hud .inventory-slot small { color: #654628; font-weight: bold; }
#hud .item-detail { border-top: 3px double var(--line); padding-top: 8px; font-size: 12px; }
#hud .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#hud .skill-tile { padding: 12px 9px 9px; background: #d1be9726; border: 3px double #9a825a66; box-shadow: inset 0 0 0 1px #eee2c62e; }
#hud .skill-tile[aria-pressed='true'] { background: #e6d7b94d; border-color: #8b4a3680; }
#hud .skill-tile[data-skill='attack'] .icon { color: #8b4435; }
#hud .skill-tile[data-skill='defence'] .icon { color: #4d645d; }
#hud .skill-name { font-variant: small-caps; font-size: 14px; letter-spacing: .4px; margin-top: 5px; }
#hud .skill-level b { font-size: 23px; }
#hud .skill-level small { font-size: 9px; }
#hud .total-level { background: #c3a16b20; border-block: 1px solid #b291594d; margin-top: 11px; }
#hud .skill-detail p { font-size: 12px; }
#hud .skill-detail-title span { font: 11px Georgia, serif; }
#hud .skill-progress { background: #cfbc94; border: 1px solid #a48b58; height: 7px; }
#hud .skill-progress i { background: linear-gradient(#80936a, #596746); }
#hud .journal-content { font-size: 12px; }
#hud .journal-content h3 { font-size: 23px; }
#hud .journal-content .quest-note, #hud .starter-invitation small { font-size: 11px; }
#hud .quest-guide, #hud .quest-steps li, #hud .objective-box, #hud .quest-brief, #hud .city-commission { background: #b9975320; border-color: #ae8b5255; border-radius: 1px; }
#hud .quest-steps li.current { background: #e8d9b945; border-color: #9c784373; }
#hud .quest-steps li { color: #71634b; }
#hud .quest-steps li.current { color: #85452f; }
#hud .quest-steps li.done { color: #4f6546; }
#hud .quest-steps li > span { background: #deceaa59; border-color: #9e845466; }
#hud .journal-places, #hud .city-journal { border-top-color: #94744555; }

/* A lightly etched cream rail holds the actions and ruby health inlay. */
#hud .actionbar { width: 480px; bottom: 20px; }
#hud .vitals { background: var(--paper); color: var(--ink); margin: 0 13px -1px; padding: 7px 11px 8px; border: 3px double #92794f73; border-radius: 35% 35% 0 0 / 8px 8px 0 0; text-shadow: none; }
#hud .vitals :is(span, small, b) { color: #513d25; }
#hud .vitals .icon { color: #8a4436; }
#hud .vital-track { height: 8px; background: #bfa783; border: 1px solid #8d643a; border-radius: 3px; overflow: hidden; }
#hud .vital-track i { background: linear-gradient(#b26955, #8d4234 60%, #71392f); box-shadow: inset 0 1px #d3a286; }
#hud .hotkeys { gap: 5px; padding: 9px 11px; border: 3px double #927a5280; border-radius: 4px; background: var(--paper); box-shadow: 0 3px 10px #30231626, inset 0 0 0 1px #eee4cd30; }
#hud .hotkeys::before, #hud .hotkeys::after { content: '✥'; color: #a18b66b3; font-size: 20px; top: calc(50% - 12px); left: -13px; text-shadow: 0 1px #e2d4b54d; }
#hud .hotkeys::after { left: auto; right: -13px; }
#hud .hotkeys .hotkey { height: 60px; border: 3px double #92794f66; border-radius: 5px 5px 11px 11px; background: linear-gradient(135deg, #ebe1cc3d, #c9b58d30); color: #513b27; box-shadow: 0 1px 2px #36231326, inset 0 1px #eee4cf33; }
#hud .hotkey > .icon { color: inherit; filter: none; width: 27px; height: 27px; margin-top: 7px; }
#hud .hotkeys .hotkey:hover, #hud .hotkeys .hotkey.active { background: #e5d6b866; border-color: #8b5c3080; color: #733e30; transform: translateY(-1px); }
#hud .hotkey:active { transform: translateY(1px); }
#hud .key-number { color: #765532; top: 1px; left: 3px; font-size: 10px; }
#hud .control-hint { color: #fff0d0; font-size: 9px; text-shadow: 0 1px 3px #332817, 0 0 3px #332817; }
#hud .control-hint span, #hud .control-hint em { color: inherit; }
#hud .corner-tools button { background: var(--paper); color: #594027; border: 3px double #87683c80; border-radius: 50%; box-shadow: 0 2px 3px #3e2d251a, inset 0 0 0 1px #e8dbc130; }
#hud .hotkey[data-tip]:hover::after, #hud .corner-tools [data-tip]:hover::after { background: #e0d3bce6; border: 3px double #ae8b5380; color: #4c3824; text-shadow: none; z-index: 20; }
#hud .corner-tools [data-tip]:hover::after { left: auto; right: 0; transform: none; }

/* Open folios, notices and combat use the same materials. */
#hud .panel { position: relative; padding: 28px 30px 0; border-width: 5px; background: var(--folio); }
#hud .panel > header { border-bottom: 3px double #9b794955; padding-bottom: 17px; }
#hud .panel > header h2 { font-variant: small-caps; font-size: 31px; }
#hud .panel > footer { border-top: 3px double #9b794955; }
#hud .panel .panel-body { background: url('./folio-flourish.svg') no-repeat center bottom / 180px 28px; padding-bottom: 34px; }
#hud .panel::before { content: ''; position: absolute; pointer-events: none; inset: 5px; border: 1px solid #ba9b6355; }
#hud .panel .primary-button, #hud .dialogue-options button, #hud .city-panel [data-city-action], #hud #inventory-wield, #hud .read-spell-button {
  background: linear-gradient(#e5d8ba59, #c8b18945); border: 3px double #a8885180; border-radius: 2px; color: #543b24; box-shadow: inset 0 1px #eee2c640, 0 1px 0 #ab8b5730;
}
#hud .panel .primary-button:hover, #hud .panel button:hover, #hud #inventory-wield:hover { background-color: #e3d3b36b; border-color: #83562f99; }
#hud .setting-row select, #hud .controls-list kbd { color: #4d3822; background: #e7dbc266; border: 1px solid #a78a5880; }
#hud .setting-row input { accent-color: #8a6640; }
#hud .appearance-preview { background: radial-gradient(ellipse, #d6d3af, #b9b58f); border-color: #b49b6d; }
#hud .appearance-preview button { background: #e5d2aa; }
#hud .quest-rewards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#hud .quest-rewards > span { background: #fff2cc80; border-color: #b3915955; }
#hud .quest-thanks { color: #704430; }
#hud .sky-scroll { border: 3px double #ad925d; background: #fff5d230; }
#hud .sky-scroll-seal { background: #dadbb7; border-color: #8e9868; box-shadow: 0 0 0 6px #8e986814; }
#hud .sky-scroll blockquote { color: #64704b; }
#hud .sky-cast-runes { text-shadow: none; }
#hud :is(.sky-cast-track, .teleport-progress) { background: #ccc39f; }
#hud :is(.sky-cast-track, .teleport-progress) i { background: linear-gradient(90deg, #637c67, #a6b887); box-shadow: none; }
#hud .interaction { background: var(--paper); border: 3px double #a3824f80; color: #4b3825; box-shadow: 0 3px 10px #4f3b2620; }
#hud .interaction kbd { color: #7f4131; background: #decca84d; border-color: #a9875380; }
#hud .toast { border-width: 3px; padding: 15px 24px; }
#hud .combat-target { border-top: 3px double #a87d4980; }
#hud .combat-emblem { background: #d8c29a45; border: 3px double #a6814973; }
#hud .weapon-medallion { background: radial-gradient(circle, #e6d7b94d, #b69c7233); }
#hud .strike-tile { background: #d7c39950; border-color: #b59b6650; }
#hud .strike-tile.current { background: #d7bf9366; border-color: #98663f80; box-shadow: inset 0 -2px #98663f80; }
#hud .enemy-health { background: #c3ac88; border-color: #9f7f53; }
#hud .enemy-windup, #hud .strike-tempo { background: #d4bf97; }
#hud .combat-feedback { background: #ded0b5b3; color: #6b3f2e; border-color: #ae895280; text-shadow: none; }
#hud .interior-guide { border-width: 3px; }
#hud #interior-floors button { background: #d6c5a34d; border-color: #b1956466; }
#hud #interior-floors button.current { background: #e5d7b96b; border-color: #8f684180; }

/* Engraved corner plates, fine ruling and marginal ornaments enrich the HUD
   without covering more of the world or fading the text with surface opacity. */
#hud :is(.chat, .inventory-grid, .combat-target, .panel, .hotkeys) {
  border-image: url('./folio-frame.svg') 48 / 25px / 0 stretch;
  box-shadow: 0 4px 14px #37281626, inset 0 0 0 5px #ebdfc318, inset 0 0 0 6px #86664030;
}
#hud .inventory-grid { border-right: 3px solid transparent; }
#hud .folio-heading {
  display: flex; align-items: center; gap: 10px; height: 30px; padding: 3px 16px 0;
  border-bottom: 1px solid #8e704540; font-variant: small-caps; letter-spacing: .8px;
  background: repeating-linear-gradient(90deg, #8c71410d 0 1px, transparent 1px 5px);
}
#hud .folio-heading > span { display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
#hud .folio-heading .icon { width: 14px; height: 14px; }
#hud .folio-heading > i { flex: 1; height: 20px; background: url('./folio-flourish.svg') center / 90px 16px no-repeat; }
#hud .folio-heading small { font-size: 8px; letter-spacing: 1px; }
#hud #chronicle-hide { display: grid; place-items: center; flex: none; width: 23px; height: 23px; padding: 3px; border: 1px solid #8e70454d; border-radius: 50%; background: #dbc7a02b; }
#hud #chronicle-hide .icon { width: 13px; height: 13px; }
#hud #chronicle-hide:hover { background: #e5d6b866; border-color: #8b5c3099; }
#hud #travellers-chronicle[hidden], #hud #chronicle-show[hidden] { display: none; }
#hud .chronicle-tab {
  position: absolute; left: 28px; bottom: 28px; z-index: 8;
  display: flex; align-items: center; gap: 9px; padding: 11px 16px;
  border: 3px solid transparent; border-image: url('./folio-frame.svg') 48 / 17px / 0 stretch;
  background: var(--paper); color: var(--ink); font-variant: small-caps; font-size: 13px;
  box-shadow: 0 3px 12px #37281620; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
#hud .chronicle-tab .icon { width: 19px; height: 19px; color: #795426; }
#hud .chronicle-tab small { font-size: 9px; border: 1px solid #8e704566; padding: 2px 4px; }
#hud .chronicle-tab:hover { background: var(--folio); }
#hud .chat nav { height: 36px; padding-top: 0; padding-inline: 10px; }
#hud .chat nav button { border-inline-end: 1px solid #8e704530; }
#hud .chat nav button:last-child { border-inline-end: 0; }
#hud .chat nav button.selected { box-shadow: inset 0 -2px #803c3180, inset 0 0 0 1px #8e704533; }
#hud :is(.chat-lines, .journal-content) {
  padding-inline: 18px;
  background: linear-gradient(90deg, transparent 10px, #906d3930 10px 11px, transparent 11px);
}
#hud .chat-footer { padding: 8px 16px; }
#hud .chat-footer strong { margin-left: auto; font-size: 10px; font-weight: normal; font-variant-numeric: tabular-nums; }
#hud .journal-heading { padding-bottom: 7px; border-bottom: 3px double #9b79493d; }
#hud .journal-content h3 { font-variant: small-caps; }
#hud .journal-content h3::first-letter { font-size: 1.3em; }
#hud .journal-reward { padding-block: 6px; border-block: 1px solid #8e704530; }
#hud .inventory-tabs { margin: 3px 5px 0; border-bottom-width: 3px; }
#hud .inventory-tabs button { font-variant: small-caps; letter-spacing: .4px; }
#hud .inventory-tabs button + button { border-left: 3px double #8e70454d; }
#hud #items-panel { gap: 8px; overflow: hidden; }
#hud .satchel-register {
  display: flex; justify-content: space-between; align-items: center; gap: 6px; flex: none;
  padding: 2px 0 6px; border-bottom: 3px double #8e70454d; font-size: 9px; font-variant: small-caps;
}
#hud .satchel-register > span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
#hud .satchel-register .icon { width: 12px; height: 12px; }
#hud .satchel-register b { font-weight: normal; font-variant-numeric: tabular-nums; }
#hud .inventory-slot {
  background: radial-gradient(circle at 3px 3px, #9b805847 0 1px, transparent 1.5px),
    radial-gradient(circle at calc(100% - 3px) calc(100% - 3px), #9b805847 0 1px, transparent 1.5px), #baa57c1c;
  box-shadow: inset 0 0 0 2px #e6d6b524, inset 0 0 0 3px #92764b1f;
}
#hud .inventory-slot.occupied { border-color: #8b6e4573; box-shadow: inset 0 0 0 1px #eee0bd40, inset 0 0 0 3px #92764b33; }
#hud .inventory-slot .icon { width: 25px; height: 25px; }
#hud .inventory-slot small { border-left: 1px solid #8e704533; padding-left: 4px; }
#hud .item-detail { position: relative; padding: 16px 4px 0; border-top: 0; }
#hud .item-detail::before { content: ''; position: absolute; top: -3px; left: 0; right: 0; height: 16px; background: url('./folio-flourish.svg') center / 150px 22px no-repeat; }
#hud .item-detail strong { font-variant: small-caps; font-size: 14px; color: var(--rubric); }
#hud .skill-tile { border-image: url('./folio-frame.svg') 48 / 18px / 0 stretch; }
#hud .skill-tile > .icon { width: 34px; height: 34px; padding: 3px; border: 3px double #90764d59; border-radius: 50%; background: #dfccaa26; }
#hud .skill-detail-title { padding-bottom: 6px; border-bottom: 3px double #8e704540; font-variant: small-caps; }
#hud :is(.vital-track, .skill-progress, .enemy-health) { position: relative; }
#hud :is(.vital-track, .skill-progress, .enemy-health)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), #4f3c303b calc(10% - 1px) 10%);
}
#hud .vitals { padding-block: 6px; border-radius: 9px 9px 0 0; box-shadow: inset 0 0 0 1px #dacaad60, inset 0 0 0 3px #977a4433; }
#hud .vitals > span:first-child > .icon { width: 19px; height: 19px; padding: 2px; border: 1px solid #97794f73; border-radius: 50%; background: #dbc59f4d; }
#hud .hotkeys { padding: 10px 14px; gap: 5px; }
#hud .hotkeys .hotkey { padding-bottom: 12px; box-shadow: inset 0 0 0 1px #e7d7b459, inset 0 0 0 3px #86664030, 0 2px 0 #6b51363d; }
#hud .hotkey > .icon { margin-top: 3px; }
#hud .key-number { top: 1px; left: 2px; min-width: 12px; border-right: 1px solid #8e704540; border-bottom: 1px solid #8e704540; background: #d0bb9433; line-height: 12px; }
#hud .action-caption { position: absolute; bottom: 3px; left: 1px; right: 1px; padding-top: 2px; border-top: 1px solid #8e704540; font-size: 8px; font-variant: small-caps; letter-spacing: .15px; }
#hud .hotkeys .hotkey.active { box-shadow: inset 0 0 0 1px #bca074, inset 0 0 0 3px #803c3140, 0 2px 0 #6b51363d; }
#hud .minimap-wrap { padding: 9px; background: repeating-conic-gradient(from -1deg, #765a3066 0deg 1deg, transparent 1deg 10deg), var(--brass); box-shadow: 0 0 0 2px #cbbb9580, 0 0 0 4px #80663a80, 0 0 0 6px #d9c9a559, 0 4px 14px #37281633; }
#hud .map-inner { box-shadow: 0 0 0 2px #e5d5b466, 0 0 0 3px #795e3a80; }
#hud .map-topline::before, #hud .map-topline::after { content: '❧'; color: #d7c59f; font-size: 17px; }
#hud .map-topline::after { transform: rotate(180deg); }
#hud .corner-tools button { box-shadow: 0 0 0 2px #d9c7a44d, 0 0 0 3px #92764b66, inset 0 0 0 2px #bda78059, 0 3px 6px #37281626; }

@media (max-width: 1200px) {
  #hud .chronicle-tab { left: 18px; }
  #hud .chat { width: 300px; left: 18px; }
  #hud .chat nav button { padding-inline: 6px; font-size: 11px; gap: 3px; }
  #hud .actionbar { width: 360px; }
  #hud .hotkeys { padding-inline: 7px; gap: 3px; }
  #hud .hotkeys .hotkey { height: 49px; }
  #hud .hotkey > .icon { width: 23px; height: 23px; margin-top: 1px; }
  #hud .action-caption { font-size: 6.5px; letter-spacing: 0; }
  #hud .folio-heading { gap: 5px; }
  #hud .folio-heading > span { font-size: 11px; }
  #hud .map-topline::before, #hud .map-topline::after { display: none; }
  #hud .inventory-grid { width: 270px; }
  #hud .control-hint { letter-spacing: 0; font-size: 8px; }
}
@media (max-width: 1000px) {
  #hud .chronicle-tab { left: 14px; bottom: 160px; }
  #hud .chat { width: 290px; left: 14px; bottom: 160px; }
  #hud .chat-lines, #hud .journal-content { height: 148px; }
  #hud .actionbar { left: 26px; transform: none; width: 352px; bottom: 17px; }
  #hud .inventory-grid { width: 260px; }
  #hud.in-combat .chat-lines, #hud.in-combat .journal-content { height: 58px; padding-block: 6px; }
  #hud.in-combat .journal-heading { display: none; }
  #hud.in-combat .journal-content h3 { font-size: 20px; line-height: 24px; margin: 0 0 3px; }
  #hud.in-combat .journal-content h3::first-letter { font-size: inherit; }
  #hud.in-combat #quest-objective { margin: 0; font-size: 11px; line-height: 15px; }
  #hud.in-combat .chat-footer { display: none; }
}
@media (max-width: 600px) {
  #hud .chronicle-tab { left: 15px; bottom: 156px; }
  #hud .map-cluster { width: 120px; top: 15px; right: 12px; }
  #hud .map-topline { font-size: 10px; }
  #hud .minimap-wrap { width: 96px; height: 96px; padding: 4px; }
  #hud .realm-status { display: none; }
  #hud .actionbar { left: 15px; width: calc(100% - 30px); bottom: 14px; }
  #hud .control-hint { display: none; }
  #hud .chat { width: 220px; bottom: 156px; }
  #hud .chat nav button { font-size: 10px; padding-inline: 5px; }
  #hud .chat nav .icon { display: none; }
  #hud .chat-lines, #hud .journal-content { height: 116px; }
  #hud .inventory-grid { bottom: 156px; width: 232px; height: 330px; max-height: calc(100vh - 300px); z-index: 2; }
  #hud:has(.inventory-grid:not([hidden])) .chat { visibility: hidden; }
  #hud .corner-tools { bottom: 120px; right: 15px; }
  #hud .build-mark { display: none; }
  #hud .panel { padding: 20px 18px 0; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  #hud .panel > header h2 { font-size: 25px; }
  #hud .setting-row { gap: 12px; }
  #hud .toast { min-width: 0; width: calc(100% - 30px); }
}

/* The shared gathering action occupies the same quiet centre as interaction. */
#hud .woodcutting-status {
  position: absolute; left: 50%; bottom: 190px; transform: translateX(-50%);
  width: min(340px, calc(100vw - 32px)); padding: 12px 15px; pointer-events: auto;
  color: #493a28; background: rgba(241, 230, 202, .94); border: 1px solid #987b4c;
  border-radius: 7px; box-shadow: 0 5px 25px #172b2630; font-size: 12px;
}
#hud .woodcutting-status[hidden] { display: none; }
#hud .woodcutting-title { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
#hud .woodcutting-title .icon { width: 22px; height: 22px; color: #795426; }
#hud .woodcutting-title button { margin-left: auto; padding: 4px 7px; font-size: 11px; }
#hud .woodcutting-status small { color: #695d45; }
#hud .woodcutting-status .skill-progress { margin: 8px 0; }
#hud .woodcutting-cycle { display: flex; justify-content: space-between; margin-top: 9px; font-size: 10px; color: #75674e; }
#hud .woodcutting-cycle + .skill-progress { margin-top: 4px; height: 5px; }
#hud #woodcutting-swing { transition: none; background: #75865a; }
#hud .woodcutting-cut #woodcutting-swing { background: #ad793a; }
#hud .woodcutting-cut #woodcutting-phase { color: #815523; }
#hud #woodcutting-gain { font-size: 11px; color: #49643c; }
#hud .woodcutting-guide { margin: 8px 0; }
#hud .woodcutting-guide summary { cursor: pointer; color: #795426; }
@media (max-width: 900px) { #hud .woodcutting-status { bottom: 130px; width: 285px; } }
#hud .skill-detail > .skill-progress { margin-top: 9px; }

/* Painted cutouts retain their own material colours against the folio. */
#hud img.icon-art { object-fit: contain; vertical-align: middle; user-select: none; }
#hud .hotkey > .icon-art { width: 34px; height: 34px; margin-top: 1px; filter: drop-shadow(0 1px 1px #49301955); }
#hud .inventory-slot .icon-art { position: absolute; width: calc(100% - 7px); height: calc(100% - 7px); max-width: 53px; max-height: 49px; object-fit: contain; filter: drop-shadow(0 1px 1px #49301945); }
/* Tight weapon framing fills the existing slot, with room for borders and counts. */
#hud .inventory-slot .inventory-weapon-art { top: 3px; left: 4px; width: calc(100% - 8px); height: calc(100% - 11px); max-width: none; max-height: none; pointer-events: none; }
#hud .inventory-slot small { z-index: 1; border: 0; border-radius: 3px; padding: 0 3px; background: #e3d3b3dc; color: #493720; text-shadow: 0 1px #f7ecd4; }
#hud .inventory-slot.occupied:hover, #hud .inventory-slot[aria-pressed='true'] { background-color: #e8d6ac80; box-shadow: inset 0 0 0 1px #85612e, inset 0 0 10px #a9843a30; }
#hud .skill-tile > .icon-art { padding: 0; border: 0; border-radius: 0; background: none; width: 36px; height: 36px; }
#hud .skill-tile:is([data-skill='firemaking'], [data-skill='smithing']) > .icon-art { width: 42px; height: 42px; }
#hud #combat-weapon-art .icon-art { width: 100%; height: 100%; }
#hud .city-item-summary { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; align-items: center; }
#hud .city-item-summary > .icon-art { width: 38px; height: 38px; grid-row: span 2; }
#hud .city-item-summary > small { grid-column: 2; }
#hud #chronicle-hide { border-color: transparent; background: transparent; opacity: .7; }
#hud #chronicle-hide:hover, #hud #chronicle-hide:focus-visible { opacity: 1; border-color: #8b5c3066; }
@media (max-width: 1200px) {
  #hud .hotkey > .icon-art { width: 27px; height: 27px; margin-top: 0; }
}

#hud .map-zoom-controls { align-items: center; flex-wrap: wrap; gap: 8px; }
#hud .map-zoom-controls strong { margin-right: auto; color: #57412a; }
#hud .map-zoom-controls button { min-width: 34px; padding: 6px 10px; }
#hud #map-zoom-level { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
#hud #full-map:focus-visible { outline: 2px solid #a17638; outline-offset: 3px; }

#hud #full-map { cursor: grab; touch-action: none; }
#hud #full-map.dragging { cursor: grabbing; }

/* Bottom inventory access keeps Settings discoverable without an Escape menu. */
#hud .inventory-footer { flex: none; margin: 0 6px 4px; border-top: 3px double #9a82564d; }
#hud .inventory-footer button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 9px; font-size: 13px; font-variant: small-caps; background: #c9b79538; }
#hud .inventory-footer .icon { width: 18px; height: 18px; }
#hud .inventory-footer button:hover, #hud .inventory-footer button[aria-expanded='true'] { background: #e9deca80; color: var(--rubric); }
#hud .inventory-footer button:focus-visible { outline: 2px solid #916335; outline-offset: -3px; }
/* Give the map instructions their own row, clear of the decorative flourish. */
#hud .map-panel { height: min(820px, calc(100dvh - 48px)); }
#hud .map-panel > header { flex: none; }
#hud .map-panel .panel-body { flex: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; overflow: hidden; background: none; padding-bottom: 12px; }
#hud .map-panel .map-paper { height: 100%; width: auto; max-width: 100%; max-height: none; aspect-ratio: 1; margin-inline: auto; }
#hud .map-panel .map-zoom-controls { margin: 0; }
#hud .map-panel .map-legend { flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 0; margin: 0; line-height: 1.5; text-align: center; }

#hud .mining-status [data-mining-swing] { transition: none; background: #778594; }
#hud .mining-status [data-mining-gain] { font-size: 11px; color: #49643c; }
#hud .mining-status [data-mining-reserve] { color: #786143; }
