/* Mobile overrides load last so legacy desktop and inline sizing cannot clip dialogs. */
.mobile-menu-button { display: none; }
@media (max-width: 768px), (max-width: 960px) and (max-height: 500px) {
  /* Two aligned HUD rows, with a reserved corner for the floating menu gear. */
  #main-header {
    padding: 6px 8px 8px;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    background: linear-gradient(135deg, #142b36, #101923);
    border-bottom: 1px solid #a98b50;
    box-sizing: border-box;
  }
  #main-header[style*="flex"] { display: grid !important; }
  .header-left-brand { display: contents; }
  .header-act-badge {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
    min-width: 0;
    min-height: 44px;
    padding: 0 6px;
    border: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    white-space: normal;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: .5px;
    color: #ffe6a7;
  }
  .header-status-bar {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1.3fr .7fr 1fr;
    gap: 5px;
    min-width: 0;
  }
  #main-header .status-pill {
    min-width: 0;
    min-height: 40px;
    padding: 4px 6px;
    gap: 4px;
    justify-content: center;
    border-radius: 10px;
    background: rgba(3, 13, 21, .6);
    border: 1px solid rgba(155, 186, 197, .2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    box-sizing: border-box;
    font-size: 12px;
  }
  #main-header .hp-bar-container { width: auto; flex: 1; min-width: 12px; max-width: 42px; height: 6px; }
  #main-header .lvl-bar-container { width: auto; flex: 1; min-width: 12px; max-width: 32px; height: 5px; }
  #main-header .status-value { white-space: nowrap; font-size: 11px; }
  #main-header .status-pill.hp-pill #hp-count { font-size: 10px; }
  .header-inventory-btn {
    grid-column: 2;
    grid-row: 2;
    min-height: 40px;
    width: 44px;
    border: 1px solid rgba(200, 170, 110, .4);
    border-radius: 10px;
    background: rgba(200, 170, 110, .1);
  }
  .header-inv-inner { position: relative; gap: 2px; }
  .header-inv-label, .header-relics-label, .header-actions { display: none; }
  .header-inv-icon { width: 23px; height: 23px; }
  .header-inv-count { min-width: 14px; height: 16px; padding: 0 2px; font-size: 10px; border-width: 1px; }
  .header-relics-bar { grid-column: 1 / -1; grid-row: 3; padding: 2px; gap: 6px; }
  .header-relics-bar:not(:has(.header-relic-badge)) { display: none; }
  #main-header .header-relic-art { width: 28px; height: 28px; }
  .header-peek-tab { padding: 4px 12px; font-size: 10px; background: #102132; border-color: #a98b50; }
  .draft-shop-card.purchased { display: none; }
  .arena-main-row:has(.board-synergies-tracker:hover),
  .arena-main-row:has(.board-synergies-tracker.expanded),
  .arena-main-row:has(.board-synergies-tracker.active-open),
  .arena-main-row:has(.board-synergy-chip:hover),
  .arena-main-row:has(.mobile-tooltip-active),
  .arena-main-row.synergy-elevated {
    z-index: 90000 !important;
    overflow: visible !important;
  }
  .board-synergies-tracker {
    top: 8px;
    left: 6px;
    gap: 5px;
    padding: 0;
    z-index: 90000 !important;
  }
  .board-capacity-tracker {
    top: 8px;
    padding: 3px 8px 3px 6px;
    gap: 5px;
    z-index: 80;
  }
  .board-capacity-icon { font-size: 11px; }
  .board-capacity-text { font-size: 11px; }
  .board-capacity-badge { font-size: 9px; padding: 1px 5px; }
  .board-synergy-chip { gap: 4px; padding: 3px 5px; }
  .board-synergy-icon-frame { width: 24px; height: 24px; }
  .board-synergy-icon-frame img { width: 24px; height: 24px; object-fit: contain; }
  .board-synergy-count { min-width: 16px; height: 16px; font-size: 10px; }
  .board-synergy-chip:hover { transform: none; }
  .synergy-roll-indicator {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fef08a;
    padding: 2px 5px;
    margin-left: 2px;
    margin-right: 1px;
    opacity: 0.95;
    transition: transform 0.2s ease, background 0.15s ease;
    user-select: none;
    cursor: pointer;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
  }
  .synergy-roll-indicator:active {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(0.92);
  }
  .board-synergies-dropdown {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transform: translateY(-6px) scale(0.96);
    transform-origin: top left;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .board-synergies-tracker:hover,
  .board-synergies-tracker.expanded,
  .board-synergies-tracker.active-open {
    z-index: 90000 !important;
  }
  .board-synergies-tracker.expanded .board-synergies-dropdown {
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    transform: translateY(0) scale(1);
  }
  .board-synergy-chip.mobile-tooltip-active {
    z-index: 90002 !important;
  }
  .board-synergy-chip.mobile-tooltip-active .board-synergy-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 90005 !important;
  }
  .board-synergy-tooltip {
    z-index: 99999 !important;
    max-height: calc(100dvh - 20px) !important;
    max-width: calc(100vw - 60px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #btn-pause-menu { display: none; }
  .combat-stats-dock { display: none !important; }
  .top-right-gear-menu {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    z-index: 99999 !important;
    pointer-events: auto !important;
  }
  .top-right-gear-menu.hidden {
    display: none !important;
  }
  .top-right-gear-menu .gear-menu-trigger,
  .top-right-gear-menu .mobile-menu-button {
    display: flex !important;
    position: static;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .board-item-bag-dock { display: none !important; }
  .top-right-gear-menu .combat-stats-panel {
    top: max(54px, env(safe-area-inset-top));
    right: max(58px, env(safe-area-inset-right));
  }
  .route-map-viewport,
  #route-map-viewport,
  .full-stage-view {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .route-map-viewport::-webkit-scrollbar,
  #route-map-viewport::-webkit-scrollbar,
  .full-stage-view::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .map-scroll-canvas {
    width: calc(100% - 10px);
    min-height: clamp(1360px, 350vw, 1800px);
    margin: 6px auto max(4px, env(safe-area-inset-bottom, 4px)) !important;
    background-size: cover;
    background-position: center;
  }
  .map-connection-line {
    stroke-width: 2.5px;
    stroke-dasharray: 5 6;
  }
  .map-connection-line.active-path {
    stroke-width: 3.5px;
    stroke-dasharray: 7 5;
  }
  .map-connection-line.visited-path {
    stroke-width: 2px;
    stroke-dasharray: 4 5;
  }
  .map-node-pin { width: 34px; height: 34px; touch-action: manipulation; }
  .node-pin-medallion { width: 34px; height: 34px; padding: 2px; box-sizing: border-box; }
  .map-node-pin .node-svg-icon { width: 20px; height: 20px; }
  .map-node-pin .node-pin-title {
    max-width: 44px;
    padding: 1px 3px;
    font-size: 8px;
    letter-spacing: 0;
    white-space: normal;
    text-align: center;
    bottom: -14px;
    border-radius: 4px;
  }
  .map-node-pin.boss-pin, .boss-pin .node-pin-medallion { width: 44px; height: 44px; }
  .boss-pin .node-pin-title { font-size: 9px; padding: 2px 6px; bottom: -18px; }
  .modal-overlay {
    height: 100dvh;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    box-sizing: border-box;
    overflow: auto;
  }
  .modal-body {
    width: 100%;
    max-width: 600px;
    min-width: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
  }
  .modal-body > :is(.modal-card, .pause-modal-card, .lore-modal-card, .inventory-modal-card, .audio-settings-modal-card, .confirm-modal-card) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    max-height: calc(100dvh - 24px) !important;
    margin: 0;
    padding: 14px !important;
    border-width: 2px;
    border-radius: 14px !important;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .modal-body h2 { font-size: 21px !important; line-height: 1.2; }
  .modal-body p, .modal-body li { font-size: 14px; line-height: 1.5; }
  .modal-body button:not(.merchant-board-buy) { min-height: 44px; }
  .modal-body :is(.btn-primary, .btn-secondary) { font-size: 14px !important; padding: 10px 12px !important; }

  .augment-coin-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 95000 !important;
    display: none;
    place-items: center;
  }
  .augment-coin-overlay.is-active {
    display: grid !important;
  }

  /* Bottom sheet: fixed to the viewport, not to the selected map node. */
  .node-briefing-popover {
    position: fixed;
    top: auto !important;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px !important;
    right: 8px !important;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 24px);
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transform: none !important;
    animation: none;
    z-index: 9000;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55);
  }
  .node-briefing-popover .node-briefing-header { padding: 12px; flex-shrink: 0; }
  .node-briefing-popover .briefing-header-top { flex-wrap: wrap; gap: 6px; }
  .node-briefing-popover .briefing-title { font-size: 20px; margin: 6px 0 0; }
  .node-briefing-popover .briefing-act-floor,
  .node-briefing-popover .node-briefing-badge { font-size: 11px; }
  .node-briefing-popover .node-briefing-body { overflow-y: auto; min-height: 0; padding: 12px; }
  .node-briefing-popover .briefing-hostile-count { font-size: 13px; }
  .node-briefing-popover .node-briefing-actions { flex-shrink: 0; padding: 10px 12px; gap: 8px; }
  .node-briefing-popover .node-briefing-actions button { min-height: 46px; font-size: 14px; padding: 10px; flex: 1; }

  /* Merchant Modal Mobile View - Seamless immersive shop stall */
  .merchant-modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center !important;
    gap: 8px;
    padding: 8px 12px !important;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border: 2px solid #d69e2e;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }
  .merchant-modal-header h2 {
    font-size: 16px !important;
    line-height: 1.1;
  }
  .merchant-modal-header > div:last-child {
    display: flex;
    align-items: center;
    gap: 8px !important;
  }
  .merchant-gold-pill {
    font-size: 13.5px !important;
    padding: 5px 12px !important;
    white-space: nowrap;
  }
  #btn-leave-shop {
    font-size: 13.5px !important;
    padding: 6px 14px !important;
    white-space: nowrap;
  }
  .merchant-board-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 3px solid #8b5a1f;
    border-radius: 14px;
    background: #0d3652;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    scrollbar-width: thin;
  }
  .merchant-board {
    min-width: 540px;
    aspect-ratio: 3 / 2;
    background-size: 100% 100%;
    position: relative;
    container-type: inline-size;
  }
  .merchant-board .merchant-board-slot {
    width: 15% !important;
    height: 22% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 2px 1px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    z-index: 2 !important;
  }
  .merchant-board-art-container {
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    flex: 0 0 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 1px !important;
  }
  .merchant-board .merchant-board-item-art,
  .merchant-board-item-art {
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.85)) !important;
  }
  .merchant-board .merchant-board-item-name {
    font-size: 8.5px !important;
    line-height: 1.1 !important;
    margin: 1px 0 0 !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: center !important;
    display: block !important;
  }
  .merchant-board-item-rarity {
    font-size: 7.5px !important;
    line-height: 1 !important;
    margin: 0 0 1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  .modal-body button.merchant-board-buy,
  .merchant-board-buy {
    min-height: 0 !important;
    max-height: 20px !important;
    height: 18px !important;
    min-width: 0 !important;
    padding: 1px 6px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    border: 1.5px solid #f6e05e !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #fef08a, #d69e2e) !important;
    background-image: linear-gradient(180deg, #fef08a, #d69e2e) !important;
    color: #3d2607 !important;
    text-shadow: none !important;
    box-shadow: 0 2px 0 #744210, 0 2px 4px rgba(0, 0, 0, 0.35) !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
  }

  /* Keep action labels and XP on one line; let the cards have all available width. */
  .draft-shop-main { flex-direction: column; }
  .draft-actions-col { width: 100%; flex-direction: row; gap: 8px; }
  .draft-action-btn { min-width: 0; min-height: 48px; padding: 6px 8px; }
  .draft-actions-col .btn-reroll {
    flex: 1;
    min-width: 0;
  }
  .draft-actions-col .btn-buy-xp {
    flex: 1.65;
    min-width: 0;
  }
  .draft-actions-col .board-battle-btn {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    z-index: 2 !important;
    flex: 0.8 !important;
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 6px 6px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    justify-content: center !important;
    text-align: center;
    animation: battleBtnPulse 2.4s infinite ease-in-out !important;
  }
  .draft-actions-col .board-battle-btn .draft-action-info {
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    gap: 1px;
  }
  .draft-action-title, .draft-action-cost { font-size: 13px; white-space: nowrap; }
  .draft-action-info { gap: 2px; }
  .draft-xp-level-badge { flex-shrink: 0; }
  .draft-cards-container { width: 100%; flex: auto; }
  .draft-card-beast-name { font-size: 14px; }
  .draft-trait-badge { font-size: 12px; }
  .arena-container {
    --arena-controls-height: 52 !important;
  }

  /* Bench: Always fit all 8 slots across the board without overflow */
  .board-bench-overlay {
    bottom: 6px;
    padding: 0 4px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
  }
  .bench-slots-wrap {
    width: calc(100% - 8px);
    max-width: 440px;
    overflow: visible;
    padding: 3px 4px;
    box-sizing: border-box;
  }
  .bench-slots {
    display: grid !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 3px !important;
  }
  .bench-slot {
    flex: none !important;
    width: 100% !important;
    max-width: 46px;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-width: 0 !important;
  }
  .bench-slot .bench-slot-number {
    font-size: 11px;
  }

  /* Completely remove any sword icon from mobile battle fight button */
  .draft-actions-col .board-battle-btn .battle-btn-icon,
  .draft-actions-col .board-battle-btn .battle-icon-wrap,
  .draft-actions-col .board-battle-btn [class*="battle-icon"],
  .draft-actions-col .board-battle-btn [class*="sword"] {
    display: none !important;
  }

  html, body, #app {
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  .minimal-battle-view.hidden,
  .minimal-battle-view[style*="none"],
  .full-stage-view.hidden,
  .full-stage-view[style*="none"] {
    display: none !important;
  }

  .minimal-battle-view:not(.hidden):not([style*="none"]) {
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
    padding: 2px 4px max(4px, env(safe-area-inset-bottom, 4px)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
  }

  .arena-stage-box {
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }
  .arena-stage-box:has(.drafting-panel.battle-active) {
    min-height: 0 !important;
  }
  .arena-main-row {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    position: relative !important;
  }
  .arena-container {
    flex: 1 1 0 !important;
    min-height: 180px !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
    --arena-controls-height: 52 !important;
  }
  .arena-stage-box:has(.drafting-panel.battle-active) .arena-container {
    min-height: 180px !important;
    overflow: visible !important;
    --arena-controls-height: 52 !important;
  }
  #battle-canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    image-rendering: auto !important;
    image-rendering: -webkit-optimize-contrast !important;
  }
  .drafting-panel.draft-shop-wrapper {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    z-index: 10 !important;
  }

  .event-art-frame {
    height: clamp(230px, 34vh, 300px) !important;
    min-height: 220px !important;
    aspect-ratio: 16 / 11 !important;
  }
  .event-art-frame-outcome {
    height: clamp(180px, 26vh, 240px) !important;
    max-height: 250px !important;
  }
  .event-story-box { padding: 10px; }
  .event-story-para, .event-option-desc { font-size: 14px; line-height: 1.5; }
  .event-option-btn { padding: 12px; }
  .event-option-title { font-size: 15px; }
  .reward-cards-container { max-height: none; overflow: visible; }
  .reward-tier-card { padding: 10px; gap: 10px; }
  .reward-card-title { font-size: 15px; }
  .reward-card-desc { font-size: 13px; }
  .treasure-actions-container { flex-wrap: wrap; }
  .pause-content-grid { overflow: visible; }
  .pause-header { margin: -14px -14px 12px; }
  .lore-header, .inv-modal-header { flex-wrap: wrap; gap: 8px; }
  .lore-title { font-size: 20px; line-height: 1.2; flex-wrap: wrap; gap: 6px; }
  .lore-counter-badge { font-size: 12px; white-space: nowrap; padding: 4px 8px; }
  .lore-main-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .lore-nav-tab { font-size: 13px; padding: 6px; }
  .lore-filter-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .lore-filter-tab { flex-shrink: 0; font-size: 12px; }
  .lore-element-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .lore-element-chip { flex-shrink: 0; font-size: 12px; }
  .lore-body-grid { display: flex; flex-direction: column; height: auto; overflow: visible; flex: none; }
  .lore-list-pane { height: auto; max-height: 35dvh; grid-template-columns: 1fr; padding-right: 4px; }
  .lore-modal-card { height: auto; }
  .lore-dossier-panel { padding: 12px; overflow: visible; }
  .lore-dossier-header { flex-direction: column; gap: 12px; align-items: stretch; }
  .lore-dossier-art-frame { width: 100%; height: 180px; box-sizing: border-box; }
  .lore-dossier-meta { min-width: 0; }
  .unit-tooltip {
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 20px) !important;
    box-sizing: border-box !important;
  }

  /* Mobile Item Picker Bottom Sheet / Focused Modal */
  .tt-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 100004;
    animation: fadeIn 0.15s ease-out;
  }

  .tt-item-picker-tray {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    width: auto !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    max-height: 65dvh !important;
    border-radius: 18px !important;
    border: 2px solid #38bdf8 !important;
    background: linear-gradient(180deg, #1e293b 0%, #0a0f1d 100%) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.9), 0 0 20px rgba(56, 189, 248, 0.35) !important;
    padding: 12px 14px 16px !important;
    z-index: 100005 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    animation: pickerSlideUpMobile 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .tt-item-picker-tray.hidden {
    display: none !important;
  }

  @keyframes pickerSlideUpMobile {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  .tt-picker-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 8px !important;
    margin-bottom: 6px !important;
    border-bottom: 1.5px solid rgba(56, 189, 248, 0.25) !important;
    flex-shrink: 0 !important;
  }

  .tt-picker-title-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .tt-picker-title {
    font-size: 13.5px !important;
    color: #38bdf8 !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .tt-picker-beast-target {
    font-size: 11px !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
  }

  .tt-picker-beast-target strong {
    color: #fef08a !important;
  }

  .tt-picker-close-btn {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-size: 15px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  .tt-picker-items-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 2px !important;
    flex: 1 1 auto !important;
  }

  .tt-picker-item-btn {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 10px !important;
    min-height: 52px !important;
    border-radius: 10px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    background: rgba(15, 23, 42, 0.8) !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    text-align: left !important;
  }

  .tt-picker-item-btn:active {
    background: rgba(56, 189, 248, 0.2) !important;
    border-color: #38bdf8 !important;
    transform: scale(0.98) !important;
  }

  .tt-picker-item-frame {
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  }

  .tt-picker-item-frame img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
  }

  .tt-picker-item-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .tt-picker-item-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }

  .tt-picker-item-name {
    font-size: 12.5px !important;
    font-weight: 800 !important;
    color: #fef08a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tt-picker-item-rarity-badge {
    font-size: 8.5px !important;
    font-weight: 900 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
  }

  .tt-picker-item-desc {
    font-size: 10.5px !important;
    color: #cbd5e1 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .tt-picker-equip-cta {
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #38bdf8 !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    background: rgba(56, 189, 248, 0.15) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .inv-items-scroll-list { max-height: 30dvh; }
  .inv-hold-hint {
    font-size: 9px !important;
    padding: 2px 6px !important;
    white-space: nowrap !important;
  }
  .audio-control-actions { min-width: 0; gap: 8px; }
  .audio-slider { width: 0; min-width: 0; }
  .btn-audio-mute-toggle { min-width: 64px; padding: 6px 8px; }
  /* Mobile Champion Carousel: Horizontal Swipeable Deck */
  .champion-screen-overlay {
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    padding: 6px 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .champion-select-card {
    height: 100% !important;
    max-height: calc(100dvh - 12px) !important;
    width: 100% !important;
    max-width: 440px !important;
    padding: 8px 10px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .champion-select-heading {
    margin-bottom: 2px !important;
    flex-shrink: 0 !important;
    text-align: center !important;
  }
  .champion-select-heading .champion-kicker {
    font-size: 10px !important;
    letter-spacing: 2px !important;
    margin-bottom: 1px !important;
    display: block !important;
  }
  .champion-select-heading h2 {
    font-size: 18px !important;
    line-height: 1.15 !important;
    margin: 1px 0 !important;
  }
  .champion-select-heading p {
    font-size: 11px !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    opacity: 0.88 !important;
  }

  /* Carousel Navigation Bar (Arrows & Tabs) */
  .champion-carousel-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 4px 0 6px !important;
    flex-shrink: 0 !important;
  }
  .champ-nav-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2a1810;
    border: 2px solid #ca9a46;
    color: #ffd88a;
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    touch-action: manipulation;
  }
  .champ-nav-arrow:active {
    transform: scale(0.92);
  }
  .champ-nav-dots {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .champ-nav-dot {
    padding: 4px 10px;
    border-radius: 14px;
    background: rgba(20, 14, 10, 0.7);
    border: 1.5px solid #8e683a;
    color: #d1bba2;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
  }
  .champ-nav-dot.active {
    background: #683e18;
    border-color: #f6c05d;
    color: #fff1cf;
    box-shadow: 0 0 8px rgba(246, 192, 93, 0.4);
    transform: scale(1.04);
  }

  /* Horizontal swipeable cards track */
  .champion-choice-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 12px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 2px 2px 4px !important;
    box-sizing: border-box !important;
  }
  .champion-choice-grid::-webkit-scrollbar {
    display: none !important;
  }

  /* Single full-width swipe card */
  .champion-choice {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    scroll-snap-align: center !important;
    scroll-snap-stop: always !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .champion-choice .champion-portrait {
    height: clamp(170px, 28vh, 235px) !important;
    max-height: 33vh !important;
    flex-shrink: 0 !important;
    border-radius: 14px !important;
    margin-bottom: 5px !important;
  }
  .champion-choice .champion-name {
    font-size: 25px !important;
    line-height: 1.1 !important;
    margin: 3px 0 1px !important;
    letter-spacing: 0.7px !important;
  }
  .champion-choice .champion-style {
    font-size: 12px !important;
    margin: 1px 0 4px !important;
    letter-spacing: 0.8px !important;
  }
  .champion-choice blockquote {
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin-bottom: 6px !important;
    min-height: 0 !important;
  }
  .champion-choice .champion-details-box {
    margin: 3px 0 8px !important;
    padding: 8px 10px !important;
    gap: 4px !important;
    flex: 0 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
  }
  .champion-choice .champion-details-box::-webkit-scrollbar {
    display: none !important;
  }
  .champion-choice .champ-power-section {
    padding: 8px 12px !important;
    gap: 4px !important;
    border-radius: 12px !important;
  }
  .champion-choice .champ-power-title {
    font-size: 14.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.3px !important;
  }
  .champion-choice .champ-power-desc {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }
  .champion-choice .choose-label {
    padding: 11px 18px !important;
    font-size: 14.5px !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
    border-radius: 12px !important;
  }

  /* Compact drafting dock leaves the majority of the screen for positioning. */
  .drafting-panel.draft-shop-wrapper { padding: 4px; gap: 4px; }
  .draft-shop-header { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 4px; padding: 0 3px; }
  .draft-gold-tracker { max-width: 76px; padding: 3px; gap: 2px; }
  .gold-tracker-icon { font-size: 14px; }
  .draft-header-controls { grid-column: 3; grid-row: 1; }
  .draft-btn-lock { padding: 4px 6px; font-size: 10px; }
  .draft-odds-bar { grid-column: 2; grid-row: 1; gap: 2px; }
  .odds-title-label { display: none; }
  .draft-odds-dot { padding: 3px 1px; }
  .odds-pct-val { font-size: 9px; }
  .draft-actions-col { gap: 6px; }
  .draft-action-btn { min-height: 44px; padding: 4px 8px; }
  .shop-cards { padding: 2px 2px 6px; gap: 6px; }
  .draft-shop-card { flex: 0 0 160px; min-width: 160px; max-width: 160px; height: 104px; }
  .draft-card-traits-col { padding: 5px; gap: 3px; }
  .draft-trait-badge { font-size: 10px; padding: 2px 4px; gap: 3px; }
  .draft-trait-badge.rarity-badge { display: none; }
  .draft-card-art-box { bottom: 28px; }
  .draft-card-bar { min-height: 28px; padding: 0 6px; }
  .draft-card-beast-name { font-size: 12px; }
  .draft-card-beast-cost { font-size: 12px; }
}
