/* A seat at Sayge's table. All controls live on one tactile playing surface. */
:root {
  --gold: #c9a260;
  --gold-bright: #f6dca4;
  --muted: #b9afa5;
  --text: #f0e7d9;
  --panel: #251e28;
  --line: #796047;
}

body {
  background: #151110;
}

.page-shell { width: 100%; max-width: 1320px; padding: 0 28px; }
.masthead { height: 83px; border: 0; gap: 18px; }
.brand { gap: 10px; min-width: 0; }
.brand-copy { min-width: 0; }
.brand-mark { width: 34px; height: 42px; filter: none; flex-shrink: 0; }
.brand-mark svg { width: 33px; height: 33px; }
.brand strong { display: block; font-size: 23px; letter-spacing: .4px; line-height: 1.15; }
.brand small { font-size: 8px; letter-spacing: 1.8px; color: #bbac95; }
.header-actions { gap: 22px; font-size: 12px; flex-shrink: 0; }
.header-divider { display: none; }
.header-actions .text-button { color: #c6b9a7; font-size: 12px; }
.sound-button { gap: 8px; padding: 8px 12px; min-height: 37px; border: 1px solid #766047; background: #231a13; border-radius: 3px; font-size: 11px; color: #e3c99d; }
.sound-button span { display: inline; }
.sound-button svg { width: 17px; height: 17px; }
.sound-button:hover { background: #392719; border-color: #b9965a; }
.sound-button[aria-pressed=true] { background: #3d2c1d; border-color: #c9a260; color: #ffe4ac; }
.sound-button[aria-busy=true] { opacity: .7; }
.sound-controls { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 115px; }
.sound-controls .sound-button { justify-content: center; }
.volume-control { display: flex; align-items: center; gap: 7px; height: 22px; color: #c6b9a7; font-size: 10px; }
.volume-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.volume-control input { width: 0; flex: 1; min-width: 0; height: 22px; margin: 0; accent-color: #d4b076; cursor: pointer; }
.volume-control output { min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }

.game-table {
  position: relative;
  isolation: isolate;
  padding: 12px 15px 16px;
  background: #251d29;
  border: 34px solid #342315;
  border-image: url('assets/tabletop.png') 115 fill / 34px / 0 stretch;
  border-radius: 3px;
  box-shadow: 0 0 0 1px #5c432c, 0 12px 38px #0008;
}
.game-table::before {
  content: '';
  position: absolute;
  inset: -13px;
  border: 0;
  border-radius: 0;
  background: #100b1766;
  pointer-events: none;
  z-index: -1;
}
.intro { text-align: center; padding: 0 0 15px; }
.eyebrow { font-size: 9px; letter-spacing: 2.6px; color: #ccac75; }
.eyebrow span { width: 23px; background: #8a6e465c; }
.intro h1 { font-size: clamp(24px, 2.3vw, 28px); margin: 6px 0 5px; letter-spacing: -.5px; color: #f6e5c3; text-shadow: 0 2px 2px #140e14; }
.intro h1 em { color: #f6d28e; }
.intro p { color: #cbbbac; font-size: 12px; }
.table-rail { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0 17px; border-top: 1px solid #b4976538; }
.dimension-tabs { width: 340px; max-width: 100%; margin: 0; padding: 3px; gap: 3px; border: 1px solid #877047; background: #161018; box-shadow: inset 0 0 0 1px #0e0c0e, 0 2px 3px #0005; border-radius: 4px; }
.dimension-tabs button { padding: 8px 10px; gap: 7px; font-size: 12px; color: #c8baab; border-radius: 2px; }
.dimension-tabs button[aria-selected=true] { background: #54402b; color: #ffe6ae; border-color: #bc955b; box-shadow: inset 0 1px #e8c48c20; }
.dimension-tabs button:not([aria-selected=true]):hover { background: #352734; color: #ffe6ae; }
.dimension-tabs button.is-complete:not([aria-selected=true]) { color: #e1cc9f; }
.step-number, .step-check { display: grid; place-items: center; width: 17px; height: 17px; flex-shrink: 0; border: 1px solid #927c55; border-radius: 50%; font: 10px var(--font-body); }
.step-check { display: none; }
.dimension-tabs button.is-complete .step-number { display: none; }
.dimension-tabs button.is-complete .step-check { display: grid; order: -1; color: #f4d896; border-color: #a89361; background: #423b29; }
.expansion-setting { gap: 9px; padding: 0 2px; }
.expansion-icon svg { width: 22px; height: 22px; }
.expansion-setting label { color: #e4d5bc; font-size: 11px; }
.expansion-setting div>span { font-size: 10px; color: #b9a994; margin-top: 0; }
.switch { margin-left: 8px; }
.switch>span { background: #151017; border-color: #867058; }
.switch>span:after { background: #bba888; }
.switch input:checked+span { background: #7c5a32; border-color: #d3ae6a; }

.forge-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); align-items: stretch; gap: 39px; padding: 8px 0 25px; }
.fortune-panel { position: relative; min-width: 0; }
.fortune-table { position: relative; isolation: isolate; max-width: 100%; margin: 0; background: none; border: 0; box-shadow: none; }
.fortune-table::before, .fortune-table::after { content: none; }
.table-heading { padding: 0 8px; min-height: 49px; text-align: center; }
.table-heading>span, #reading-progress { display: block; color: #c6a778; font-size: 8px; font-weight: 600; letter-spacing: 2px; line-height: 1.5; margin-bottom: 5px; }
.table-heading h2 { color: #f0ddbc; font-size: 18px; line-height: 1.4; letter-spacing: -.25px; text-wrap: balance; }
#reading-progress { color: #c8b6c2; font-size: 9px; letter-spacing: 1px; }
.deck-stage { position: relative; height: 315px; width: 100%; max-width: 340px; margin: 0 auto; perspective: 1100px; }
.table-sigil { position: absolute; inset: 5px; display: grid; place-items: center; pointer-events: none; color: #caa576; opacity: .12; }
.table-sigil svg { width: 100%; height: 100%; stroke-width: .6; }
.deck-shadow { position: absolute; width: 230px; height: 21px; left: 50%; bottom: 8px; transform: translateX(-50%); background: #100a14; border-radius: 50%; filter: blur(6px); opacity: .8; }
.deck-card { position: absolute; left: 50%; top: 50%; width: 190px; height: 285px; transform: translate(-50%, -50%); border-radius: 7px; }

.main-card { padding: 0; border: 0; background: none; z-index: 2; cursor: pointer; color: #ffe8b4; perspective: 1100px; transition: filter .2s; }
.main-card:disabled { opacity: 1; cursor: default; }
.main-card:hover:not(:disabled) { filter: brightness(1.12); }
.main-card:focus-visible { outline: 3px solid #ffe0a0; outline-offset: 6px; }
.card-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .4s cubic-bezier(.23, .75, .27, 1); }
.main-card.is-revealed .card-inner { transform: rotateY(180deg); }
.card-back, .card-front { position: absolute; inset: 0; display: flex; align-items: center; flex-direction: column; border: 1px solid #d3b375; border-radius: 7px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 8px 17px #0009; overflow: hidden; }
.card-back { background: #30233c url('assets/fortune-card-back.png') center / cover no-repeat; justify-content: space-between; padding: 25px 15px 26px; }
.card-category { padding: 4px 11px; background: #24162f; border: 1px solid #b59b61; color: #ffe0a0; font: 600 9px var(--font-heading); letter-spacing: 1.6px; box-shadow: 0 2px 5px #0004; }
.card-back-label { font: 500 11px var(--font-heading); background: #22172d; padding: 6px 8px; border-block: 1px solid #937341; color: #ffebbc; }
.card-front { --card-color: #ffe0a0; transform: rotateY(180deg); padding: 17px 17px 13px; gap: 5px; background: #30233c url('assets/fortune-card-back.png') center / cover no-repeat; }
.card-front::before { content: ''; position: absolute; inset: 9px; z-index: 0; background: #1d1920; border: 1px solid #b99d66; border-radius: 2px; }
.card-front>span, .card-front>strong { position: relative; z-index: 1; }
.card-front-eyebrow { color: #d8c395; font-size: 8px; letter-spacing: 1.5px; font-weight: 600; line-height: 1.6; }
.card-portrait { width: 77px; height: 77px; flex-shrink: 0; padding: 3px; margin: 3px 0 1px; border: 1px solid var(--card-color); background: #0e0c11; box-shadow: 0 0 0 3px #352c30; border-radius: 3px; overflow: hidden; }
.card-portrait .game-icon { width: 100%; height: 100%; image-rendering: auto; }
.card-portrait:has(.faction-crest) { width: 79px; height: 97px; padding: 0; border: 0; background: none; box-shadow: none; }
.card-name { font: 600 22px/1.14 var(--font-heading); letter-spacing: -.45px; color: var(--card-color); max-width: 100%; overflow-wrap: normal; text-align: center; text-wrap: balance; }
.card-divider { color: #c5a568; font-size: 10px; line-height: 1; margin: 2px 0; }
.card-flavor { color: #e1d2c6; font: italic 11.5px/1.4 Georgia, serif; text-align: center; max-width: 150px; text-wrap: pretty; }
.card-footnote { margin-top: auto; padding-top: 3px; font-size: 8px; line-height: 1.4; letter-spacing: .45px; text-transform: uppercase; color: #c4af82; text-align: center; max-width: 100%; }
.table-caption { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 5px 10px; text-align: center; color: #cab8bb; font-size: 10px; line-height: 1.5; }
.table-caption .live-dot { background: #d3b174; box-shadow: none; }
.selection-actions { display: flex; justify-content: center; gap: 8px; width: 100%; margin: 1px auto 0; }
.draw-button { display: flex; flex: 1; min-width: 0; min-height: 48px; align-items: center; justify-content: center; gap: 7px; padding: 9px; border: 1px solid #dab674; border-radius: 3px; background: #75502e; box-shadow: inset 0 0 0 2px #34251e, inset 0 0 0 3px #a78351, 0 3px 0 #120d12; color: #fff0cd; font: 700 12px var(--font-heading); text-shadow: 0 1px 1px #352211; transition: background .15s, transform .15s; }
.draw-button:hover:not(:disabled) { background: #986c3b; transform: translateY(-1px); }
.draw-button:active:not(:disabled) { transform: translateY(1px); }
.draw-button:disabled { opacity: .65; }
.draw-button>svg { width: 18px; height: 18px; }
.draw-button .action-arrow { color: #ffe3a0; font: 19px/1 var(--font-body); }
#redraw-button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 11px; min-height: 48px; flex-shrink: 0; border: 1px solid #8e7353; background: #2a1f2a; box-shadow: inset 0 0 0 2px #161119; color: #e7c991; font-size: 11px; transition: background .15s; }
#redraw-button svg { width: 15px; height: 15px; }
#redraw-button:hover:not(:disabled) { background: #493142; border-color: #d9b875; }
.selection-actions:has(.draw-button[hidden]) #redraw-button { width: 100%; }
.draw-helper { display: flex; align-items: center; justify-content: center; gap: 7px; color: #bca9ac; font-size: 10px; line-height: 1.6; margin-top: 8px; min-height: 16px; text-align: center; }
.draw-helper kbd { border-color: #7f665e; color: #bea98d; }
.fortune-panel .result-banner { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.stop-button { font-size: 11px; padding: 8px 15px; border-color: #b58468; color: #f7d2ac; background: #442b28; margin-top: 12px; }

.fortune-table.is-shuffling .card-back-label { background: #462544; color: #fff3d6; }

.table-empty { position: absolute; inset: 32px 15px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; text-align: center; background: #251b2c; border: 1px solid #b08b59; box-shadow: inset 0 0 0 4px #17121d, 0 5px 15px #0007; padding: 20px; z-index: 3; }
.table-empty svg { width: 32px; height: 32px; color: #dfc085; }
.table-empty strong { font: 500 19px/1.4 var(--font-heading); color: #ffe0a0; }
.table-empty span { font-size: 12px; line-height: 1.7; color: #ded2bd; }
.fortune-table.is-empty .deck-card, .fortune-table.is-empty .deck-shadow { visibility: hidden; }
.fortune-table .particles { z-index: 4; overflow: hidden; inset: -12px 0; }

/* The choices are playing cards: lift a card to choose it, toggle to banish it. */
.pool-panel { align-self: stretch; margin: 0; padding: 0 0 0 31px; border: 0; border-left: 1px solid #bc986638; background: none; box-shadow: none; border-radius: 0; min-width: 0; }
.pool-panel::before, .pool-panel::after { content: none; }
.panel-heading { justify-content: center; gap: 8px; }
.panel-heading h2 { font-size: 20px; color: #f2dfbb; }
.panel-heading>svg { width: 19px; height: 19px; color: #d1af78; }
.panel-intro { text-align: center; font-size: 11px; color: #c4b2ad; margin: 5px 0 12px; line-height: 1.65; }
.pool-toolbar { padding: 0 0 9px; margin-bottom: 12px; border-bottom: 1px solid #b18e632c; color: #c6ae94; font-size: 9px; letter-spacing: 1.5px; }
.pool-toolbar button { min-height: 26px; font-size: 10px; color: #e4c692; }
.option-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: start; gap: 13px 11px; min-height: 0; }
.option-row { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; min-height: 164px; border: 1px solid #8b6d4c; border-radius: 6px; padding: 6px; background: #211a24; box-shadow: inset 0 0 0 3px #17111d, inset 0 0 0 4px #a07e4942, 0 4px 7px #0007; transition: transform .18s, box-shadow .18s, border-color .18s; }
.option-row:last-child { border-bottom: 1px solid #8b6d4c; }
.option-row::before { content: '✦'; position: absolute; top: 9px; left: 11px; font-size: 9px; color: #a5844f; pointer-events: none; }
.option-row:hover { background: #2b202c; border-color: #d0aa71; transform: translateY(-4px); box-shadow: inset 0 0 0 3px #17111d, inset 0 0 0 4px #a07e4960, 0 8px 12px #0008; }
.option-row.selected { background: #3b2c34; border-color: #f1d094; box-shadow: inset 0 0 0 3px #231921, inset 0 0 0 4px #cba36a, 0 5px 10px #0008; }
.option-row.selected::before { content: '✓'; color: #ffe3a7; font: 600 11px var(--font-body); }
.option-name { flex: 1; width: 100%; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px 2px 9px; text-align: center; color: var(--class-color); background: none; }
.option-name strong { display: block; font: 600 14px/1.32 var(--font-heading); overflow-wrap: normal; text-wrap: balance; }
.option-name small { font-size: 9px; line-height: 1.4; color: #c1b0ab; margin-top: 3px; }
.option-name .option-icon { width: 56px; height: 56px; padding: 2px; background: #0e0c10; border: 1px solid #ae8a53; box-shadow: 0 0 0 2px #493741; border-radius: 4px; }
.option-row.selected .option-name::after { content: none; }
.option-name:focus-visible { outline-offset: 1px; border-radius: 3px; }
.option-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 30px; width: 100%; border-top: 1px solid #a0845f38; font-size: 9px; color: #c7b7a8; }
.option-toggle input { display: grid; place-items: center; position: relative; width: 14px; height: 14px; margin: 0; border-radius: 2px; background: #151018; border: 1px solid #9a8059; box-shadow: none; }
.option-toggle input:checked { background: #715b39; border-color: #b89c69; box-shadow: none; }
.option-toggle input:checked::after { position: static; font-size: 11px; line-height: 1; color: #fff0cc; }
.option-toggle:hover { color: #fff0cd; }
.option-row.excluded { background: #211b24; border-color: #63515b; box-shadow: inset 0 0 0 3px #17111d, 0 3px 6px #0005; }
.option-row.excluded::before { content: '×'; color: #b9919b; font-size: 13px; line-height: 1; }
.option-row.excluded .option-name { opacity: .58; }
.option-row.excluded .option-name strong { text-decoration: none; }
.option-row.excluded .option-toggle { color: #cda9b1; }
.option-row.unavailable .option-name { opacity: .55; }
.option-list.compact-pool { grid-template-columns: repeat(auto-fit, minmax(110px, 153px)); justify-content: center; }
.option-list.compact-pool .option-row { min-height: 186px; }
.pool-panel[data-dimension=race] .option-list:not(.compact-pool) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pool-panel[data-dimension=race] .option-row { min-height: 174px; }
.pool-panel[data-dimension=race] .option-name { min-height: 133px; }
.pool-panel[data-dimension=faction] .option-list { grid-template-columns: repeat(2, minmax(0, 176px)); justify-content: center; gap: 24px; padding: 14px 0 21px; }
.pool-panel[data-dimension=faction] .option-row { min-height: 257px; padding: 10px; }
.pool-panel[data-dimension=faction] .option-name { gap: 17px; padding: 15px 0 18px; }
.pool-panel[data-dimension=faction] .option-icon { width: 89px; height: 119px; padding: 1px; background: none; border: 0; box-shadow: none; }
.pool-panel[data-dimension=faction] .option-name strong { font: 600 19px var(--font-heading); }
.pool-panel[data-dimension=faction] .option-toggle { min-height: 32px; font-size: 10px; }
.pool-footer { display: flex; align-items: center; gap: 6px; margin-top: 17px; padding-top: 10px; color: #c8b8a6; border-color: #bc98662c; font-size: 10px; }
.pool-footer>span:last-child { color: #bba489; font-size: 9px; }
.pool-footer .live-dot { background: #d2b57b; box-shadow: none; }
.pool-empty { grid-column: 1/-1; padding: 55px 22px; color: #d1c0b6; text-align: center; font-size: 13px; border: 1px dashed #95765b; border-radius: 6px; }

/* Your dealt hand is always visible, and each card opens its own deck. */
.adventurer-panel.hand-panel { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 600px); align-items: center; gap: 30px; width: 100%; margin: 0; padding: 19px 0 0; border: 0; border-top: 1px solid #b497654f; background: none; box-shadow: none; }
.hand-heading { display: block; margin: 0; }
#character-identity { min-width: 0; text-align: left; padding: 0; border: 0; margin: 0; }
#character-status { display: block; color: #c4a671; font-size: 8px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; line-height: 1.6; }
#character-name { font: 600 23px/1.35 var(--font-heading); color: var(--character-color, #f4dfb4); margin: 4px 0 3px; overflow-wrap: normal; text-wrap: balance; }
#character-description { font-size: 11px; line-height: 1.6; color: #cab9b0; }
.hand-tip { font-size: 10px; line-height: 1.7; color: #b6a697; max-width: 205px; text-align: left; margin-top: 11px; }
.hand-panel.is-complete #character-status { color: #ffe0a0; }
.hand-panel.is-complete #character-name { text-shadow: 0 0 18px #ffe3a020; }
.pick-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pick-slot { position: relative; display: flex; flex-direction: column; min-width: 0; align-items: stretch; min-height: 166px; padding: 9px 8px 5px; gap: 4px; background: #211923; border: 1px solid #846848; border-radius: 5px; box-shadow: inset 0 0 0 3px #130e17, 0 4px 7px #0006; transition: border-color .18s, background .18s; }
.pick-slot.active { background: #3a2b33; border-color: #d6b576; box-shadow: inset 0 0 0 3px #261c25, 0 4px 7px #0006; }
.pick-slot[data-filled=false] { border-style: dashed; background: #241a2a; }
.slot-main { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-width: 0; min-height: 66px; padding: 4px 5px; gap: 8px; color: #e5d6c0; text-align: center; }
.slot-main:hover .slot-value { filter: brightness(1.2); }
.slot-icon { width: 50px; height: 55px; flex-shrink: 0; display: grid; place-items: center; background: #130e19; border: 1px solid #a48453; padding: 3px; border-radius: 3px; clip-path: none; color: #ad8c5f; }
.slot-icon:has(.faction-crest) { background: none; border-color: transparent; }
.slot-copy { display: block; min-width: 0; }
.slot-label { font-size: 9px; letter-spacing: 1.5px; color: #cfaf7b; }
.slot-value { font: 600 15px/1.28 var(--font-heading); margin: 4px 0; overflow-wrap: normal; word-break: normal; }
.slot-hint { display: block; color: #bcaea5; font-size: 10px; line-height: 1.45; }
.slot-actions { display: flex; flex-direction: row; justify-content: center; gap: 6px; min-height: 30px; }
.slot-actions button { color: #cbb387; padding: 6px; min-width: 30px; min-height: 30px; border-radius: 3px; }
.slot-actions button:hover { background: #69533a45; color: #ffe0a0; }
.slot-actions button[aria-pressed=true] { background: #51412d; color: #ffe0a0; }
.slot-actions svg { width: 14px; height: 14px; }
.slot-actions .clear-pick { font-size: 19px; line-height: 14px; }
.pick-slot.just-dealt { animation: hand-deal .48s cubic-bezier(.16, .75, .26, 1) both; }

.hero-roll-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 64px; min-width: 327px; padding: 12px 21px; border: 1px solid #dfbb75; border-radius: 4px; background: #862b27; color: #ffe3a9; box-shadow: inset 0 0 0 3px #3a1918, inset 0 0 0 4px #b68a52, inset 0 6px 0 4px #d2684440, inset 0 -6px 0 4px #390e0b5c, 0 4px 0 #0f0910, 0 7px 14px #0004; text-shadow: 0 2px 1px #43100d; transition: background .18s, transform .18s, box-shadow .18s; }
.hero-roll-button::before { content: ''; position: absolute; inset: 5px; pointer-events: none; border: 1px solid #f2bd7240; border-radius: 1px; }
.hero-roll-button::after { content: none; }
.hero-roll-button>svg:first-child { width: 30px; height: 30px; stroke-width: 1.2; }
.hero-roll-button>svg:last-child { width: 15px; height: 15px; color: #e6c07e; }
.roll-button-copy { display: flex; flex-direction: column; text-align: left; gap: 4px; }
.roll-button-copy strong { font: 700 16px/1.3 var(--font-heading); letter-spacing: .4px; }
.roll-button-copy small { color: #efc7ad; font-size: 9px; font-weight: 400; text-shadow: none; }
.hero-roll-button:hover:not(:disabled) { background: #a83b30; transform: translateY(-2px); box-shadow: inset 0 0 0 3px #3a1918, inset 0 0 0 4px #efcc89, inset 0 6px 0 4px #d2684455, inset 0 -6px 0 4px #390e0b5c, 0 6px 0 #0f0910, 0 9px 18px #0005; }
.hero-roll-button:active:not(:disabled) { transform: translateY(2px); }
.hero-roll-button:hover:not(:disabled)>svg:first-child { animation: dice-turn .55s ease-in-out; }
.hero-roll-button:disabled { opacity: .58; }
.adventure-actions.is-reading .hero-roll-button { opacity: 1; background: #60231c; }
.adventure-actions.is-reading .hero-roll-button>svg:first-child { animation: dice-turn 1.6s ease-in-out infinite; }
.reset-button { width: auto; justify-self: end; border: 0; background: none; color: #bdab94; font-size: 11px; padding: 10px 4px; min-height: 40px; gap: 7px; }
.reset-button:hover { color: #ffe0a0; }
.reset-button svg { width: 14px; height: 14px; }

.scoreboard { margin-top: 17px; padding: 13px; border-color: #806449; background: #211827; box-shadow: none; }
.scoreboard-heading { gap: 8px; margin-bottom: 12px; }
.scoreboard-heading h2 { font-size: 13px; }
.scoreboard-heading span { color: #c5b095; font-size: 9px; }
#score-list { gap: 7px; }
.score-item { min-width: 90px; padding: 8px; background: #17101e; border-color: #70573f; }
.score-item>div { font-size: 10px; gap: 8px; }
.score-item strong { font-size: 15px; }
.score-track { background: #40302e; }
#score-status { color: #c7b8a4; font-size: 10px; margin-top: 11px; }
.bottom-flavor { display: none; }
footer { border: 0; padding: 20px 8px 24px; color: #9e8c79; font-size: 9px; }
footer strong, footer button { color: #c3ac86; font-size: 9px; }
.fantasy-dialog { background: #261d29; border-color: #b28f59; box-shadow: inset 0 0 0 4px #160f1c, 0 30px 100px #000b; }
.fantasy-dialog::backdrop { background: #08040bd4; }
.fantasy-dialog p, .fantasy-dialog li { color: #d0c0b4; }
.fantasy-dialog .secondary-button { background: #5b412e; border-color: #c4a065; }
.fantasy-dialog .muted { color: #b4a196; }
.toast { background: #34222e; border-color: #c8a568; color: #f8e1bb; box-shadow: 0 5px 20px #000a; }

@keyframes dice-turn { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-18deg); } 75% { transform: rotate(14deg); } }
@keyframes hand-deal { from { opacity: .35; transform: translateY(-12px) rotate(-1deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }

@media (max-width: 1180px) {
  .page-shell { padding: 0 23px; }
  .game-table { padding: 10px 13px 14px; border-width: 28px; border-image-width: 28px; }
  .forge-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 27px; }
  .pool-panel { padding-left: 23px; }
  .option-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 9px; }
  .option-row { min-height: 157px; }
  .option-name { min-height: 115px; gap: 9px; }
  .option-name strong { font-size: 12px; }
  .option-name .option-icon { width: 47px; height: 47px; }
  .option-toggle { font-size: 8px; gap: 5px; }
  .slot-main { gap: 9px; }
  .slot-icon { width: 42px; height: 48px; }
  .slot-value { font-size: 14px; }
  .slot-hint { font-size: 10px; }
  .slot-actions button { padding: 5px; min-width: 30px; }
  .pick-slots { gap: 11px; }
  .hero-roll-button { min-width: 297px; gap: 12px; padding-inline: 17px; }
  .roll-button-copy strong { font-size: 15px; }
}

@media (max-width: 920px) {
  .page-shell { max-width: 900px; padding: 0 18px; }
  .masthead { height: 77px; }
  .brand strong { font-size: 19px; }
  .game-table { padding: 10px 12px 14px; border-width: 25px; border-image-width: 25px; }
  .game-table::before { inset: -9px; }
  .intro { padding-bottom: 18px; }
  .intro h1 { font-size: 26px; }
  .table-rail { gap: 15px; }
  .dimension-tabs { width: 315px; }
  .expansion-setting { gap: 7px; }
  .expansion-icon { display: none; }
  .forge-layout { grid-template-columns: 255px minmax(0, 1fr); gap: 21px; padding-bottom: 23px; }
  .pool-panel { padding: 0 0 0 20px; }
  .panel-heading h2 { font-size: 17px; }
  .panel-intro { font-size: 10px; }
  .option-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .pool-panel[data-dimension=race] .option-list:not(.compact-pool) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .option-list.compact-pool { grid-template-columns: repeat(auto-fit, minmax(92px, 128px)); gap: 10px; }
  .option-list.compact-pool .option-row { min-height: 168px; }
  .option-row { min-height: 148px; padding: 5px; }
  .option-row::before { left: 9px; top: 8px; font-size: 8px; }
  .option-name { min-height: 107px; padding-top: 15px; }
  .option-name strong { font-size: 11px; }
  .option-name .option-icon { width: 42px; height: 42px; }
  .option-toggle { font-size: 8px; gap: 4px; min-height: 29px; }
  .option-toggle input { width: 13px; height: 13px; }
  .pool-panel[data-dimension=faction] .option-list { gap: 15px; padding: 20px 0; }
  .pool-panel[data-dimension=faction] .option-row { min-height: 229px; padding: 7px; }
  .pool-panel[data-dimension=faction] .option-icon { width: 74px; height: 104px; }
  .pool-panel[data-dimension=faction] .option-name strong { font-size: 15px; }
  .pool-panel[data-dimension=faction] .option-toggle { font-size: 9px; }
  .deck-stage { height: 301px; }
  .deck-card { width: 179px; height: 269px; }
  .card-front { padding: 16px 16px 12px; gap: 4px; }
  .card-portrait { width: 70px; height: 70px; }
  .card-portrait:has(.faction-crest) { width: 71px; height: 91px; }
  .card-name { font-size: 21px; }
  .card-flavor { font-size: 11px; }
  .card-footnote { font-size: 7px; }
  .table-heading h2 { font-size: 17px; }
  .table-caption { font-size: 9px; min-height: 36px; }
  .selection-actions { gap: 6px; }
  .draw-button { font-size: 11px; gap: 5px; }
  .draw-button>svg { display: none; }
  #redraw-button { font-size: 10px; padding: 9px; gap: 5px; }
  .draw-helper { font-size: 9px; }
  .draw-helper kbd { display: none; }
  .adventurer-panel.hand-panel { grid-template-columns: minmax(140px, 1fr) minmax(0, 470px); gap: 20px; }
  #character-name { font-size: 21px; }
  .hand-tip { max-width: 160px; font-size: 10px; }
  .pick-slots { gap: 9px; }
  .pick-slot { padding: 7px 5px; min-height: 159px; }
  .slot-main { gap: 7px; padding: 3px; }
  .slot-icon { width: 33px; height: 39px; padding: 2px; }
  .slot-icon svg { width: 20px; height: 20px; }
  .slot-label { font-size: 9px; }
  .slot-value { font-size: 12px; }
  .slot-hint { font-size: 10px; }
  .slot-actions button { padding: 5px; min-width: 30px; min-height: 30px; }
  .slot-actions svg { width: 12px; height: 12px; }
  .hero-roll-button { min-width: 270px; gap: 10px; padding-inline: 15px; }
  .roll-button-copy strong { font-size: 13px; }
  .roll-button-copy small { font-size: 8px; }
  .hero-roll-button>svg:first-child { width: 27px; height: 27px; }
  .hero-roll-button>svg:last-child { width: 12px; height: 12px; }
  .reset-button { font-size: 10px; gap: 5px; }
}

@media (max-width: 700px) {
  .page-shell { padding: 0 12px; max-width: 620px; }
  .masthead { height: 73px; padding: 0 4px; }
  .header-actions { gap: 11px; }
  .header-actions .text-button { font-size: 0; gap: 0; }
  .help-icon { font-size: 12px; width: 21px; height: 21px; }
  .sound-button { font-size: 10px; padding: 7px 8px; gap: 6px; }
  .brand { gap: 7px; }
  .brand-mark { width: 29px; }
  .brand-mark svg { width: 28px; height: 28px; }
  .brand strong { font-size: 18px; letter-spacing: .4px; }
  .brand strong span { display: block; }
  .brand small { font-size: 7px; letter-spacing: 1px; }
  .game-table { display: flex; flex-direction: column; padding: 10px 10px 13px; border-width: 22px; border-image-width: 22px; }
  .game-table>.intro { order: 0; }
  .game-table>.class-filters { order: 1; }
  .game-table>.adventure-actions { order: 2; }
  .game-table>.table-rail { order: 3; }
  .game-table>.forge-layout { order: 4; }
  .game-table>.scoreboard { order: 5; }
  .game-table>.hand-panel { order: 6; }
  .intro { padding-bottom: 15px; }
  .intro .eyebrow { font-size: 8px; letter-spacing: 2px; }
  .intro h1 { font-size: 24px; margin-block: 6px; }
  .intro p { font-size: 11px; }
  .table-rail { flex-direction: column; gap: 12px; padding: 13px 0 20px; }
  .dimension-tabs { width: 100%; max-width: 390px; }
  .dimension-tabs button { padding: 8px; font-size: 12px; }
  .expansion-setting { gap: 9px; justify-content: center; }
  .expansion-setting>div { display: flex; align-items: baseline; gap: 7px; }
  .expansion-setting div>span { display: inline; font-size: 9px; }
  .expansion-setting label { font-size: 10px; }
  .switch { margin-left: 4px; }
  .forge-layout { display: flex; flex-direction: column; gap: 28px; padding: 0 0 21px; }
  .fortune-panel { width: 100%; }
  .table-heading { min-height: 47px; }
  .table-heading h2 { font-size: 19px; }
  .deck-stage { height: 290px; max-width: 330px; }
  .deck-card { width: 178px; height: 267px; }
  .table-sigil { inset: 0 20px; }
  .table-caption { min-height: 31px; font-size: 10px; padding-bottom: 9px; }
  .selection-actions { max-width: 360px; gap: 8px; }
  .draw-button { font-size: 12px; min-height: 47px; }
  .draw-button>svg { display: block; width: 17px; height: 17px; }
  #redraw-button { min-height: 47px; font-size: 11px; padding: 9px 12px; }
  .draw-helper { margin-top: 7px; font-size: 10px; }
  .pool-panel { width: 100%; padding: 19px 0 0; border-left: 0; border-top: 1px solid #bc986640; }
  .panel-heading h2 { font-size: 19px; }
  .panel-intro { font-size: 11px; margin-bottom: 9px; }
  .pool-toolbar { margin-bottom: 12px; padding-bottom: 7px; font-size: 9px; }
  .pool-toolbar button { font-size: 10px; }
  .option-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 10px; }
  .option-list.compact-pool { grid-template-columns: repeat(auto-fit, minmax(115px, 140px)); }
  .option-row { min-height: 163px; padding: 6px; }
  .option-name { min-height: 121px; padding: 14px 3px 10px; gap: 9px; }
  .option-name strong { font-size: 12px; }
  .option-name .option-icon { width: 49px; height: 49px; }
  .option-toggle { min-height: 30px; font-size: 9px; gap: 6px; }
  .option-toggle input { width: 14px; height: 14px; }
  .pool-panel[data-dimension=faction] .option-list { grid-template-columns: repeat(2, minmax(0, 166px)); gap: 22px; padding: 10px 0; }
  .pool-panel[data-dimension=faction] .option-row { min-height: 238px; padding: 9px; }
  .pool-panel[data-dimension=faction] .option-icon { width: 85px; height: 112px; }
  .pool-panel[data-dimension=faction] .option-name strong { font-size: 17px; }
  .pool-footer { margin-top: 15px; font-size: 10px; }
  .pool-footer>span:last-child { font-size: 9px; }
  .adventurer-panel.hand-panel { display: block; }
  .hand-heading { display: block; margin-bottom: 14px; }
  #character-name { font-size: 20px; }
  #character-description { font-size: 10px; }
  .hand-tip { max-width: none; font-size: 10px; margin-top: 7px; }
  .pick-slots { gap: 9px; }
  .pick-slot { flex-direction: column; align-items: stretch; min-height: 174px; padding: 8px 6px 5px; gap: 2px; }
  .slot-main { flex: 1; flex-direction: column; text-align: center; justify-content: flex-start; gap: 7px; padding: 4px 2px; }
  .slot-icon { width: 43px; height: 46px; }
  .slot-copy { width: 100%; }
  .slot-label { font-size: 9px; letter-spacing: 1px; }
  .slot-value { font-size: 12px; margin-block: 4px; text-wrap: balance; }
  .slot-hint { font-size: 10px; }
  .slot-actions { flex-direction: row; justify-content: center; gap: 5px; min-height: 30px; }
  .slot-actions button { min-height: 30px; min-width: 30px; padding: 5px; }
  .slot-actions svg { width: 13px; height: 13px; }
  .hero-roll-button { grid-column: 1/-1; grid-row: 1; width: 100%; min-width: 0; min-height: 65px; }
  .roll-button-copy strong { font-size: 16px; }
  .roll-button-copy small { font-size: 9px; }
  .hero-roll-button>svg:first-child { width: 31px; height: 31px; }
  .reset-button { font-size: 10px; min-height: 30px; padding: 5px 0 5px 5px; }
  .scoreboard { max-width: 360px; margin-inline: auto; padding: 12px; }
  footer { padding: 18px 7px 22px; justify-content: center; text-align: center; gap: 9px 16px; font-size: 9px; }
  footer>span:last-child { display: none; }
}

@media (max-width: 420px) {
  .page-shell { padding: 0 8px; }
  .masthead { height: 69px; padding: 0 3px; }
  .brand-mark { display: none; }
  .brand strong { font-size: 16px; letter-spacing: .3px; }
  .brand small { font-size: 6px; letter-spacing: 1px; }
  .header-actions { gap: 9px; }
  .sound-button { font-size: 9px; gap: 5px; padding: 6px 7px; }
  .sound-controls { min-width: 98px; }
  .volume-control { height: 20px; font-size: 9px; }
  .volume-control input { height: 20px; }
  .sound-button svg { width: 15px; height: 15px; }
  .help-icon { width: 20px; height: 20px; }
  .game-table { padding: 8px 5px 10px; border-width: 15px; border-image-width: 15px; }
  .game-table::before { inset: -5px; }
  .intro h1 { font-size: 22px; line-height: 1.3; }
  .intro p { font-size: 10px; }
  .intro .eyebrow { font-size: 7px; letter-spacing: 1.7px; gap: 8px; }
  .eyebrow span { width: 16px; }
  .dimension-tabs { padding: 3px; gap: 1px; }
  .dimension-tabs button { gap: 6px; padding: 7px 5px; font-size: 11px; }
  .step-number, .step-check { width: 16px; height: 16px; font-size: 9px; }
  .expansion-setting>div { gap: 5px; }
  .expansion-setting div>span { font-size: 8px; }
  .expansion-setting label { font-size: 9px; }
  .expansion-setting { gap: 5px; }
  .table-heading h2 { font-size: 17px; }
  .deck-stage { height: 282px; }
  .deck-card { width: 175px; height: 263px; }
  .card-front { padding: 15px 15px 12px; }
  .card-portrait { width: 66px; height: 66px; }
  .card-portrait:has(.faction-crest) { width: 70px; height: 88px; }
  .card-name { font-size: 20px; }
  .card-flavor { font-size: 10.5px; }
  .table-caption { font-size: 9px; }
  .draw-button { font-size: 11px; gap: 5px; padding: 8px; }
  .draw-button>svg { display: none; }
  #redraw-button { font-size: 10px; gap: 4px; padding: 8px 10px; }
  #redraw-button svg { width: 14px; height: 14px; }
  .draw-helper { font-size: 9px; }
  .panel-heading h2 { font-size: 18px; }
  .panel-intro { font-size: 10px; }
  .option-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .option-list.compact-pool { grid-template-columns: repeat(auto-fit, minmax(106px, 1fr)); }
  .pool-panel[data-dimension=race] .option-list:not(.compact-pool) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option-row { min-height: 163px; padding: 6px; }
  .option-name strong { font-size: 12px; }
  .option-name .option-icon { width: 49px; height: 49px; }
  .option-toggle { font-size: 9px; }
  .pool-panel[data-dimension=faction] .option-list { gap: 15px; padding: 9px 0; }
  .pool-panel[data-dimension=faction] .option-row { min-height: 220px; padding: 7px; }
  .pool-panel[data-dimension=faction] .option-icon { width: 72px; height: 95px; }
  .pool-panel[data-dimension=faction] .option-name { gap: 13px; }
  .pool-panel[data-dimension=faction] .option-name strong { font-size: 15px; }
  .pool-panel[data-dimension=faction] .option-toggle { font-size: 9px; }
  .pool-footer { font-size: 9px; }
  .pool-footer>span:last-child { font-size: 8px; }
  .hand-heading { display: block; margin-bottom: 12px; }
  .hand-tip { margin-top: 7px; max-width: none; text-align: left; font-size: 9px; }
  #character-name { font-size: 19px; }
  #character-description { font-size: 10px; }
  .pick-slots { gap: 7px; }
  .pick-slot { padding: 8px 4px 4px; min-height: 174px; }
  .slot-icon { width: 37px; height: 42px; }
  .slot-main { gap: 7px; padding: 3px 1px; }
  .slot-label { font-size: 9px; letter-spacing: .3px; }
  .slot-value { font-size: 12px; line-height: 1.35; }
  .slot-hint { display: none; }
  .slot-actions { gap: 2px; }
  .slot-actions button { min-width: 30px; min-height: 30px; padding: 4px; }
  .reset-button { font-size: 9px; gap: 4px; }
  .reset-button svg { width: 12px; height: 12px; }
  .hero-roll-button { min-height: 64px; padding: 12px; gap: 10px; }
  .roll-button-copy strong { font-size: 13px; letter-spacing: .1px; }
  .roll-button-copy small { font-size: 8px; }
  .hero-roll-button>svg:first-child { width: 27px; height: 27px; }
  .hero-roll-button>svg:last-child { width: 12px; height: 12px; }
  .table-empty { inset: 24px 9px; padding: 18px; }
  .table-empty strong { font-size: 17px; }
  .table-empty span { font-size: 11px; }

}

@media (prefers-reduced-motion: reduce) {
  .fortune-table.is-shuffling .deck-card, .hero-roll-button>svg:first-child, .pick-slot.just-dealt { animation: none !important; }
  .card-inner, .main-card, .draw-button, .hero-roll-button, .option-row, .pick-slot { transition: none; }
  .fortune-table .particles { display: none; }
}

/* Keep the nine class cards within a compact, readable spread on phones. */
@media (min-width:375px) and (max-width:700px) {
  .pool-panel[data-dimension=class] .option-list { grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
  .pool-panel[data-dimension=class] .option-row { min-height:150px; padding:5px; }
  .pool-panel[data-dimension=class] .option-name { padding-inline:2px; }
  .pool-panel[data-dimension=class] .option-name strong { font-size:12px; }
  .pool-panel[data-dimension=class] .option-name .option-icon { width:46px; height:46px; }
}

/* Prepare the deck before playing: visible filters, then mode beside the deal. */
.class-filters {
  display: grid;
  grid-template-columns: 169px minmax(0, 1fr);
  column-gap: 23px;
  row-gap: 8px;
  padding: 14px 18px 12px;
  border: 1px solid #806145;
  border-radius: 4px;
  background: #201923;
  box-shadow: inset 0 0 0 3px #17111c;
}
.filter-heading { grid-row: 1 / 3; display: flex; flex-wrap: wrap; align-content: center; align-items: center; gap: 9px; }
.filter-heading h2 { display: flex; align-items: center; gap: 7px; width: 100%; color: #e6cda0; font-size: 13px; }
.filter-heading h2 svg { width: 18px; height: 18px; color: #bc975f; }
.class-filters .advanced-badge { display: inline; margin: 0; padding: 3px 5px; border: 1px solid #806444; color: #dfbd7e; font-size: 8px; line-height: 1.3; letter-spacing: .5px; white-space: nowrap; }
.class-filters #clear-filters { min-height: 30px; padding: 5px 0; font-size: 10px; color: #c9b7a3; text-decoration: underline; text-underline-offset: 3px; }
.class-filters #clear-filters:hover { color: #ffe3aa; }
.filter-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.filter-fields label { display: flex; flex-direction: column; min-width: 0; gap: 6px; font-size: 10px; line-height: 1.4; color: #d6bf9f; }
.filter-fields select { width: 100%; min-width: 0; min-height: 37px; padding: 7px 26px 7px 9px; border: 1px solid #806746; border-radius: 3px; background-color: #161019; color: #f0dfc4; font-size: 12px; color-scheme: dark; }
.filter-fields select:hover:not(:disabled) { border-color: #c49e63; }
.filter-fields select:disabled { opacity: .5; cursor: not-allowed; }
.filter-help { grid-column: 2; color: #b9a99d; font-size: 9px; line-height: 1.6; }
.adventure-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 390px); align-items: center; gap: 35px; padding: 20px 0 18px; margin: 0; border: 0; background: none; box-shadow: none; }
.adventure-actions .mode-panel { display: flex; align-items: center; justify-content: flex-start; min-width: 0; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.mode-controls { display: flex; flex-direction: row; flex-wrap: wrap; flex-shrink: 1; align-items: center; gap: 12px 16px; min-width: 0; width: auto; }
.segmented { display: flex; background: #171019; border: 1px solid #7e6144; }
.segmented button { padding: 8px 12px; min-height: 35px; font-size: 11px; white-space: nowrap; color: #cfbbab; }
.segmented button[aria-pressed=true] { background: #654832; border-color: #cca667; color: #ffe3ad; box-shadow: inset 0 1px #efcf932e; }
.target-label { display: flex; align-items: center; gap: 6px; color: #cbb494; font-size: 10px; }
.target-label input { width: 43px; height: 26px; font-size: 12px; color: #f6dca4; background: #161018; border-color: #816543; border-radius: 2px; }
.target-label:has(input:disabled) { opacity: .45; }
.full-deal-action { min-width: 0; }
.full-deal-action .hero-roll-button { width: 100%; min-width: 0; }
#roll-all-note { color: #c9b3a5; text-align: center; margin-top: 9px; font-size: 10px; line-height: 1.5; }
.hand-heading .reset-button { justify-self: start; display: flex; align-items: center; width: auto; padding: 6px 0; margin-top: 6px; min-height: 32px; text-align: left; font-size: 10px; }

@media (max-width: 1080px) {
  .class-filters { grid-template-columns: 146px minmax(0, 1fr); column-gap: 17px; padding: 13px 15px 11px; }
  .filter-heading { gap: 5px 8px; }
  .filter-fields { gap: 10px; }
  .adventure-actions { grid-template-columns: minmax(0, 1fr) minmax(280px, 350px); gap: 25px; }
  .adventure-actions .mode-panel { flex-direction: column; align-items: flex-start; gap: 9px; }
  .mode-controls { flex-direction: row; justify-content: flex-start; gap: 12px; }
  .segmented button { padding: 7px 10px; font-size: 10px; }
  .target-label { flex-wrap: wrap; justify-content: center; gap: 4px; font-size: 9px; }
}

@media (max-width: 820px) {
  .class-filters { grid-template-columns: 1fr; gap: 10px; }
  .filter-heading { grid-row: auto; flex-wrap: nowrap; gap: 10px; }
  .filter-heading h2 { width: auto; margin-right: 2px; font-size: 12px; }
  .class-filters #clear-filters { margin-left: auto; min-height: 24px; padding: 2px 0; }
  .filter-help { grid-column: 1; font-size: 9px; }
  .adventure-actions { gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(270px, 320px); }
  .mode-controls { flex-wrap: wrap; gap: 8px 12px; }
  .segmented button { padding: 7px 10px; }
  .target-label { flex-wrap: nowrap; }
}

@media (max-width: 700px) {
  .class-filters { padding: 11px 12px; gap: 9px; }
  .adventure-actions { grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 16px 0 18px; }
  .adventure-actions .mode-panel { flex-direction: row; align-items: center; justify-content: center; }
  .mode-controls { justify-content: center; gap: 7px 12px; }
  .segmented button { min-height: 33px; font-size: 10px; padding: 7px 9px; }
  .target-label { font-size: 10px; }
  .target-label input { height: 25px; }
  #roll-all-note { font-size: 9px; margin-top: 8px; }
}

@media (max-width: 520px) {
  .class-filters { padding: 10px; }
  .filter-heading { gap: 7px; }
  .filter-heading h2 { gap: 5px; font-size: 11px; }
  .filter-heading h2 svg { width: 15px; height: 15px; }
  .class-filters .advanced-badge { font-size: 7px; padding: 3px 4px; }
  .class-filters #clear-filters { font-size: 9px; }
  .filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 10px; }
  .filter-fields label { font-size: 10px; gap: 4px; }
  .filter-fields label:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; }
  .filter-fields select { font-size: 11px; padding: 6px 20px 6px 7px; min-height: 34px; }
  .filter-help { font-size: 8px; line-height: 1.55; }
}
