/* Character tabs: combat, satchel, skills, and the worn equipment paper doll. */
.armor-stock-filter { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; }
.armor-stock-filter select { flex: 1; min-width: 0; padding: 8px; font: inherit; color: var(--ink); background: #e8ddc6; border: 1px solid #927a52; }
.inventory-tabs button { width: 25%; gap: 4px; flex-direction: column; padding: 10px 1px 8px; font-size: 10px; white-space: nowrap; }
.inventory-tabs .icon { width: 24px; height: 24px; }
.inventory-grid > [role='tabpanel'][hidden] { display: none; }
#attack-panel, #equipment-panel { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; scrollbar-width: thin; scrollbar-color: #94865c66 transparent; }
#attack-panel .combat-training { display: block; padding: 0; margin: 0 0 10px; border: 0; background: none; text-align: center; }
.attack-weapon-art .icon { width: 48px; height: 48px; filter: drop-shadow(0 3px 3px #0008); }
#attack-weapon-name, .worn-heading h3 { margin: 3px 0 5px; color: var(--gold); font: 19px Georgia, serif; }
#character-combat-level, .equipment-level { color: #c4c6ad; font-size: 11px; }
#combat-training-note { color: #b9bea8; font-size: 10px; line-height: 1.5; margin: 7px 0; }
.attack-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.attack-styles button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border: 1px solid #a9956266; background: linear-gradient(135deg, #66634655, #10251dde); box-shadow: inset 1px 1px #e8d6a21a; color: #e9d6a2; border-radius: 3px; }
.attack-styles button:hover { background: #71653c66; border-color: #dbc087; }
.attack-styles button[aria-pressed='true'] { background: linear-gradient(135deg, #854332e6, #492b25); border-color: #dfb571; box-shadow: inset 0 0 0 2px #25171355; }
.attack-art { display: block; height: 48px; }
.attack-art .icon { width: 48px; height: 48px; filter: drop-shadow(0 3px 2px #0008); }
.attack-styles strong { font: 15px Georgia, serif; }
.attack-styles small { font-size: 9px; min-height: 22px; display: grid; place-items: center; }
.attack-selected { color: #bcbca5; font-size: 9px; }
[aria-pressed='true'] .attack-selected { color: #f5d697; }
.worn-heading { text-align: center; margin-bottom: 12px; }
.worn-slots { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(5, 49px); gap: 6px; max-width: 240px; margin: auto; }
.worn-slots::before { content: ''; position: absolute; left: 16%; right: 16%; top: 29%; bottom: 9%; border: 2px solid #a48e5933; pointer-events: none; }
.worn-slot { z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; padding: 1px; border: 1px solid #a48e5966; background: linear-gradient(145deg, #495044, #1d3026); box-shadow: inset 1px 1px #f0daa11a, 0 2px 3px #08170d55; color: #c8b784; border-radius: 3px; }
.worn-slot .icon { width: 38px; height: 36px; flex: none; object-fit: contain; }
.worn-slot small { font-size: 7px; text-transform: uppercase; letter-spacing: .6px; white-space: nowrap; }
.worn-slot.empty { color: #82917a; opacity: .6; }
.worn-slot.empty .icon { opacity: .4; }
.worn-slot.occupied { border-color: #c5a767; background: radial-gradient(ellipse at center, #72644488, #21372c); }
button.worn-slot.occupied:hover { border-color: #f2d595; background: #746640; }
.equipment-art.filled { color: #c8b77e; }
[data-worn-slot='head'] { grid-area: 1 / 2; }
[data-worn-slot='cape'] { grid-area: 2 / 1; }
[data-worn-slot='necklace'] { grid-area: 2 / 2; }
[data-worn-slot='ammunition'] { grid-area: 2 / 3; }
[data-worn-slot='weapon'] { grid-area: 3 / 1; }
[data-worn-slot='body'] { grid-area: 3 / 2; }
[data-worn-slot='shield'] { grid-area: 3 / 3; }
[data-worn-slot='legs'] { grid-area: 4 / 2; }
[data-worn-slot='hands'] { grid-area: 5 / 1; }
[data-worn-slot='feet'] { grid-area: 5 / 2; }
[data-worn-slot='ring'] { grid-area: 5 / 3; }
.worn-hint { text-align: center; color: #adb8a1; font-size: 10px; line-height: 1.5; margin: 10px 0; }
.equipment-stats-button, .outfit-choices button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 9px 5px; border: 1px solid #b9a16b88; background: linear-gradient(#94805b33, #3b463333); color: #eddbad; }
.equipment-stats-button > .icon { width: 26px; height: 26px; }
.equipment-stats-button span { flex: 1; text-align: left; font: 14px Georgia, serif; }
.equipment-stats-button small { display: block; font: 9px sans-serif; color: #adb8a1; margin-top: 3px; }
.outfit-choices button { margin-bottom: 8px; flex-wrap: wrap; font-size: 10px; }
.outfit-choices .icon { width: 24px; height: 24px; }
.outfit-choices small { opacity: .7; }
.equipment-stats-panel { width: min(760px, calc(100vw - 30px)); }
.equipment-overview { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(170px, .95fr) minmax(200px, 1.1fr); gap: 14px; align-items: center; }
.equipment-overview h3 { color: var(--gold); font: 15px Georgia, serif; margin: 10px 0 5px; }
.equipment-overview-slots { transform: translateY(-18px); }
.equipment-overview-slots > h3 { text-align: center; margin-bottom: 12px; }
.equipment-character { align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: center; background: radial-gradient(ellipse at 50% 60%, #b4a36b30, transparent 65%); }
#equipment-preview { width: 100%; max-width: 230px; height: auto; aspect-ratio: 280 / 360; }
.equipment-character button { border: 1px solid #bda67577; padding: 7px 14px; color: var(--gold); font-size: 11px; }
#equipment-combat-level { font-size: 11px; margin-top: 12px; color: var(--gold); }
.equipment-bonuses dl { margin: 0; font-size: 11px; }
.equipment-bonuses dl > div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-bottom: 1px solid #c5ab7620; }
.equipment-bonuses dt { text-transform: capitalize; }
.equipment-bonuses dd { margin: 0; color: var(--gold); font-variant-numeric: tabular-nums; }
.equipment-bonuses p { font-size: 10px; line-height: 1.5; opacity: .7; }
@media (max-width: 700px) {
  .inventory-tabs button { font-size: 9px; }
  .equipment-overview { grid-template-columns: 1fr 1fr; gap: 12px; }
  .equipment-bonuses { grid-column: 1 / -1; }
  .equipment-overview .worn-slots { grid-template-rows: repeat(5, 46px); gap: 4px; }
}

/* Keep the new controls in the game's cream and engraved-brass folio. */
#hud .inventory-tabs button { min-height: 60px; padding: 8px 1px; letter-spacing: 0; }
#hud .attack-styles button { background: linear-gradient(135deg, #ede2c78c, #b9a78870); border: 3px double #91774799; box-shadow: inset 1px 1px #fff3d680, 0 2px 3px #50371922; }
#hud .attack-styles button:hover { background: #f1e2c4b3; }
#hud .attack-styles button[aria-pressed='true'] { background: linear-gradient(135deg, #934d3e, #663c31); border-color: #b89859; }
#hud .attack-styles button[aria-pressed='true'] :is(strong, small, span) { color: #fff0c6; }
#hud .worn-slot { background: linear-gradient(145deg, #c5b5958c, #a7997b70); border: 1px solid #927a5290; box-shadow: inset 1px 1px #fff5da55, 0 2px 3px #50371922; }
#hud .worn-slot.occupied { background: radial-gradient(ellipse at center, #fff0cbaa, #c2ac8277); border-color: #8a683b; }
#hud button.worn-slot.occupied:hover { background: #f6e7c8bb; }
#hud .worn-slot.empty { opacity: 1; background: linear-gradient(145deg, #ede4cf70, #b5a48745); }
#hud .worn-slot.empty .equipment-art { opacity: .56; filter: saturate(.5) sepia(.1); }
#hud .worn-slot.occupied .icon { filter: drop-shadow(0 2px 1px #4a362b60); }
#hud .worn-slot.occupied { box-shadow: inset 0 0 0 1px #f6e7bd, inset 0 0 14px #f9e9bf66, 0 2px 4px #50371922; }
#hud .inventory-tabs .equipment-art { object-fit: contain; filter: drop-shadow(0 1px 1px #49371f66); }
#hud .inventory-tabs .icon { width: 40px; height: 40px; }
#hud #tab-magic .icon { width: 36px; height: 36px; }
#hud .inventory-footer button { min-height: 48px; padding: 6px; }
#hud .inventory-footer .icon { width: 32px; height: 32px; }
#hud .equipment-stats-panel { padding: 18px 22px 0; background: linear-gradient(115deg, #d9ccb4f2, #eee4d0f2 50%, #d8c8acf2); }
#hud .equipment-stats-panel > header { padding-bottom: 12px; flex-shrink: 0; }
#hud .equipment-stats-panel > header h2 { font-size: 25px; }
#hud .equipment-stats-panel > header p { margin-bottom: 6px; }
#hud .equipment-stats-panel > .panel-body { padding: 12px 0 23px; background-size: 135px 20px; min-height: 0; }
#hud .equipment-stats-panel > footer { padding-block: 11px; }
#hud .equipment-overview .worn-slots { gap: 5px; }
#hud .equipment-bonuses p { font-size: 9px; margin: 7px 0 0; }
#hud .worn-heading { margin-bottom: 8px; }
#hud .worn-hint { margin: 7px 0; font-size: 9px; }
#hud .equipment-stats-button { padding: 6px 5px; }
@media (max-width: 700px) {
  #hud .equipment-stats-panel { width: min(540px, calc(100vw - 24px)); padding: 16px 16px 0; }
  #hud .equipment-stats-panel > header h2 { font-size: 22px; }
  #hud .equipment-stats-panel > .panel-body { background-image: none; }
  #hud .equipment-overview .worn-slot small { font-size: 6px; letter-spacing: .2px; }
  #hud .equipment-overview .worn-slot .icon { width: 34px; height: 34px; }
  .equipment-overview-slots { transform: translateY(-10px); }
}
#hud .equipment-stats-button, #hud .outfit-choices button { background: linear-gradient(#e8d9b788, #b9a17b66); border: 3px double #8b6d4290; }
#hud .equipment-character button { border-color: #987f5090; }
#hud .equipment-bonuses :is(dt, dd) { color: var(--ink); }
@media (max-width: 700px) { #hud .inventory-tabs button { font-size: 9px; } }

.city-commission h3 .icon { width: 48px; height: 48px; vertical-align: middle; margin-right: 8px; }

.worn-slot[data-worn-slot="ammunition"] { position: relative; }
.worn-ammo-count { position: absolute; top: 2px; right: 4px; font: bold 10px Arial, sans-serif; color: #473824; text-shadow: 0 1px #fff4dc; }

/* The lower row keeps the empty quest book and worn equipment within reach. */
#hud .inventory-footer { display:block; }
#hud .inventory-utilities { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid #9a82564d; }
#hud .inventory-footer .inventory-utilities button { min-height:30px;padding:4px 8px;gap:6px;font-size:11px; }
#hud .inventory-footer .inventory-utilities .icon { width:20px;height:20px; }
#hud .inventory-bottom-tabs { display:grid;grid-template-columns:repeat(4,minmax(0,1fr)); }
#hud .inventory-bottom-tabs button { min-height:62px;flex-direction:column;gap:3px;font-size:11px;line-height:1.2; }
#hud .inventory-bottom-tabs button + button { border-left:3px double #8e70454d; }
#hud .inventory-bottom-tabs button[aria-selected='true'] { background:#e9deca80;color:var(--rubric);box-shadow:inset 0 -2px #92683c; }
#hud .inventory-bottom-tabs .icon { width:29px;height:29px; }
#hud .inventory-bottom-tabs span { white-space:nowrap; }
@media(max-width:700px){#hud .inventory-bottom-tabs button { font-size:10px; }}
#hud #inventory-logout:disabled { opacity:.75;cursor:default; }
#hud #inventory-logout .icon { width:36px;height:36px;margin-block:-3.5px; }
#hud #inventory-logout:disabled:hover { background:#c9b79538;color:inherit; }
#quests-panel { flex:1;min-height:0;overflow:auto;padding:16px;color:var(--ink); }
.quest-list-heading { display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:3px double #9a82564d;padding-bottom:12px; }
.quest-list-heading h3 { margin:0;font:21px Georgia,serif;color:var(--rubric); }
.quest-list-heading span { font-size:11px;color:var(--muted);white-space:nowrap; }
.quest-list-empty { display:flex;align-items:center;flex-direction:column;text-align:center;padding:40px 10px; }
#hud .quest-list-empty>.icon { width:60px;height:60px;opacity:.7; }
.quest-list-empty h4 { margin:17px 0 8px;font:18px Georgia,serif; }
.quest-list-empty p { margin:0;max-width:210px;font-size:12px;line-height:1.6;color:var(--muted); }
#hud .skills-total { display:flex;flex-direction:column;gap:4px;text-align:right;letter-spacing:0;font-size:10px; }
#hud .skills-total strong { font:bold 15px Georgia,serif;color:var(--ink); }
