/* Layout and typography for the complete game interface. */
:root { --surface: #141420; --muted: #b7b5c5; --gold: #dfc38a; }
body { font-family: 'Segoe UI', Nunito, sans-serif; font-size: 16px; height: auto; min-height: 100dvh; overflow-y: auto; background-attachment: fixed; }
body:has(#tutorial-panel:not([hidden])) { min-height: 100dvh; }
button, input, select { font-family: inherit; }
button.action-btn { font-family: inherit; text-transform: none; font-size: 16px; letter-spacing: 0; min-height: 48px; border-radius: 9px; text-shadow: none; }
button.action-btn:disabled { color: #a8a5b1; background: #23222d; border-color: #46424f; }
button.action-btn::after { display: none; }
.fullscreen-overlay, .wiki-modal-overlay { background: #070711ec; backdrop-filter: blur(5px); padding: 20px; box-sizing: border-box; }
.menu-box, .wiki-modal { border-radius: 16px; background: linear-gradient(145deg,#23212eee,#100f19fa); }
.menu-box h2, .wiki-modal h2 { font-size: 28px; }
.menu-box p, .wiki-modal p, .wiki-modal li { font-size: 16px; line-height: 1.6; }
#main-menu .home-menu { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; width: min(1000px,100%); padding: 48px; text-align: left; }
.menu-intro { align-self: center; }
.menu-eyebrow { color: var(--muted); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
#main-menu h1 { font-size: clamp(44px,5vw,68px); letter-spacing: 3px; margin: 18px 0 8px; }
.menu-subtitle { font-size: 16px; letter-spacing: 2px; color: var(--gold); }
.menu-intro p { color: #dedbe7; font-size: 20px; max-width: 320px; }
.home-tip { margin-top: 40px; border-left: 3px solid #9270d1; padding-left: 16px; color: var(--muted); line-height: 1.6; }
#main-menu .menu-btn { margin: 6px 0; padding: 16px 18px; text-align: left; background: #24212f; border-color: #62566f; }
#main-menu .primary-menu-btn { background: linear-gradient(120deg,#634296,#392747); border-color: #b99ad8; }
.menu-btn small { display: block; font-weight: 400; color: #d1cbdc; font-size: 14px; margin-top: 5px; }
.menu-multiplayer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#main-menu .menu-multiplayer .menu-btn { font-size: 15px; }
#main-menu label { font-size: 15px; text-align: left; }
.filter-select { font: inherit; font-size: 16px; min-height: 46px; border-radius: 8px; padding: 10px 12px; background: #12111c; border-color: #655d75; }

/* The collection and the selected deck have independent scroll areas. */
.deck-builder-menu-box { width: min(1420px,100%); max-width: none; height: 92dvh; max-height: none; padding: 24px; box-sizing: border-box; }
.deck-builder-title { font-size: 30px; text-align: left; margin-bottom: 16px; }
.deck-manager-bar { flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-bottom: 16px; }
.deck-select { max-width: 320px; min-width: 180px; }
.deck-manager-btn { min-height: 44px !important; font-size: 14px !important; }
.deck-workspace { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 20px; flex: 1; min-height: 0; }
.deck-collection { display: flex; flex-direction: column; min-height: 0; min-width: 0; text-align: left; }
.deck-summary { overflow-y: auto; border: 1px solid #79618470; border-radius: 12px; padding: 16px; background: #14121e; text-align: left; scrollbar-width: thin; }
.deck-summary > details > summary { cursor: pointer; font-size: 20px; color: var(--gold); font-weight: 700; }
#deck-summary-count { float: right; color: #c9b1e8; font-size: 16px; }
.deck-builder-info { font-size: 16px; margin: 14px 0 8px; letter-spacing: 0; }
#deck-analysis { margin: 0 0 20px; padding: 12px; font-size: 14px; }
#deck-analysis p { font-size: 14px; line-height: 1.6; }
.deck-suggestions { flex-direction: column; }
.deck-suggestions button { min-height: 48px; font-size: 14px; }
.deck-suggestions span { font-size: 13px; }
.mana-curve { gap: 7px; }
.mana-curve i { width: 16px; }
.deck-summary h3 { font-size: 16px; color: #d8c4e5; }
.selected-deck-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; padding: 5px 7px; border-radius: 7px; background: #262130; font-size: 14px; }
.selected-deck-row > span { color: #9dc5f6; font-weight: 700; width: 22px; }
.selected-deck-row > strong { flex: 1; font-weight: 500; }
.selected-deck-row button { min-width: 44px; height: 44px; border: 1px solid #8f7399; color: #f2e5fa; background: #3a2c42; border-radius: 6px; cursor: pointer; font-size: 17px; }
.deck-builder-filters { flex-wrap: nowrap; gap: 8px; margin-bottom: 8px; }
#filter-search { min-width: 100px; width: 100%; }
.catalog-toolbar { font-size: 14px; margin-bottom: 0; }
.catalog-toolbar input { width: 20px; height: 20px; accent-color: #9868d2; }
.deck-builder-instructions { font-size: 14px; margin: 4px 0 12px; }
.deck-builder-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 16px; max-height: none; margin: 0; padding: 12px; min-height: 120px; flex: 1; background: #0c0b1280; scrollbar-color: #9979aa #18121f; }
.builder-card-wrapper { padding: 0; min-width: 0; contain-intrinsic-size: 170px 288px; }
.builder-card-wrapper:hover { transform: none; }
.builder-card-wrapper > .card { width: 100%; height: 230px; transform: none !important; margin: 0 !important; box-sizing: border-box; }
.builder-card-wrapper .card-desc-text { font-size: 14px; }
.builder-card-controls { display: grid; grid-template-columns: 44px 1fr 44px 44px; gap: 3px; }
.builder-card-controls button { min-width: 44px; width: 44px; height: 44px; }
.builder-card-controls span { text-align: center; font-size: 14px; }
.card-qty-badge { top: 8px; right: 8px; }
.deck-builder-actions { margin-top: 16px; justify-content: flex-end; flex-shrink: 0; }
.deck-builder-actions .action-btn { width: auto; min-width: 220px; }
.deck-builder-actions #confirm-deck-btn { background: #55406c; }
.deck-builder-actions #confirm-deck-btn:disabled { background: #24212c; }

/* Inspection uses readable text rather than magnifying a tiny card. */
#zoom-card-container { transform: none; pointer-events: auto; filter: none; width: min(540px,100%); }
.card-details { padding: 24px; background: #201b2a; border: 1px solid #c6a45c99; border-radius: 16px; }
.card-details img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; }
.card-details h2 { font: 700 26px 'Segoe UI',sans-serif; color: var(--gold); margin: 16px 0 10px; }
.card-details p { font-size: 18px; line-height: 1.5; }
.card-details .detail-lore { color: #bab0c4; font-size: 15px; font-style: italic; }
.detail-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-stats span { padding: 8px 12px; background: #352a45; border-radius: 8px; font-size: 16px; }
.card-details button { width: 100%; min-height: 48px; font-size: 16px; color: #f5e5c3; border: 1px solid #a38a63; border-radius: 8px; background: #49394d; cursor: pointer; }
.mulligan-grid-custom .card, .discard-grid .card { width: 160px; height: 226px; }
.mulligan-grid-custom .card-desc-text, .discard-grid .card-desc-text { font-size: 14px; }

