.fate-modal-overlay { background: rgba(3, 11, 8, .79); }
.fate-modal { background: linear-gradient(140deg, #183027, #0d1d18 65%); border: 1px solid #a08b5e; border-radius: 12px; box-shadow: 0 24px 80px #000a, inset 0 1px #e5d19924; color: #e8efe6; overflow: hidden; }
.fate-modal-head { flex: 0 0 auto; padding: 12px 18px; background: rgba(13, 29, 24, .55); border-bottom: 1px solid rgba(160, 139, 94, .55); }
.fate-modal-title { font: 600 22px/1.25 Georgia, serif; color: #f0deb3; }
.fate-modal-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 18px; background: rgba(13, 29, 24, .75); border-top: 1px solid rgba(160, 139, 94, .55); }
.fate-modal .fate-battle-btn { background: #10241e; border-color: #78937d; color: #f0deb3; border-radius: 7px; }
.fate-modal .fate-battle-btn:hover { background: #1a3a2f; }
.fate-modal .fate-battle-btn.primary { background: linear-gradient(180deg, #c99a3e, #8c6620); border-color: #f0deb3; color: #1a1205; font-weight: 700; }
.fate-modal .fate-battle-btn.primary:hover { background: linear-gradient(180deg, #dcae52, #9b7226); }
.fate-modal .fate-battle-btn.danger { background: #5d1d1d; border-color: #c2654a; color: #ffe2e2; }
.fate-modal .fate-battle-btn.danger:hover { background: #742525; }
.fate-modal .fate-battle-btn.disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.fate-modal .fate-battle-btn.fate-deck-selected { background: #1f5c3c; border-color: #6fd29a; color: #e6fff0; }
.fate-modal .fate-battle-btn.fate-deck-selected:hover { background: #276d48; }
.fate-modal .fate-battle-field label, .fate-modal .fate-deck-colhead { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #b9c9bc; }
.fate-modal .fate-battle-field input, .fate-modal .fate-battle-field select, .fate-modal .fate-deck-search { background: #0a1712; border: 1px solid #456454; color: #e8efe6; border-radius: 7px; }
.fate-modal .fate-battle-field input:focus, .fate-modal .fate-deck-search:focus { outline: none; border-color: #dfc58d; }
.fate-modal .fate-battle-empty { color: #b9c9bc; }
.fate-modal .fate-battle-count { color: #dfc58d; }
.fate-modal .fate-battle-count.invalid { color: #f0a58f; }
.fate-modal .fate-picker-field { background: rgba(255, 255, 255, .024); border: 1px solid #456454; border-radius: 8px; }
.fate-modal .fate-picker-field:hover { background: rgba(255, 255, 255, .05); border-color: #78937d; }
.fate-modal .fate-picker-field-name { color: #dfc58d; }
.fate-modal .fate-picker-field-sub { color: #b9c9bc; }

.fate-modal .fate-deck-collection { border-right: 1px solid rgba(160, 139, 94, .35); }
.fate-modal .fate-deck-side { background: rgba(0, 0, 0, .14); flex-basis: 360px; }
.fate-modal .fate-deck-chip { min-height: 28px; background: #0a1712; border-color: #456454; color: #c9d3c5; }
.fate-modal .fate-deck-chip:hover { background: #1a3a2f; color: #f0deb3; }
.fate-modal .fate-deck-chip.on { background: #2b2a14; border-color: #dfc58d; color: #f0deb3; }
.fate-modal .fate-deck-grid { background: rgba(0, 0, 0, .18); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.fate-modal .fate-deck-tile { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 10px; row-gap: 4px; align-content: start; padding: 8px; background: rgba(255, 255, 255, .024); border: 1px solid #456454; border-left: 3px solid var(--el, #456454); border-top-width: 1px; border-radius: 8px; }
.fate-modal .fate-deck-tile:hover { border-color: #78937d; border-left-color: var(--el, #456454); box-shadow: none; }
.fate-modal .fate-deck-tile.on { box-shadow: inset 0 0 0 1px #dfc58d; }
.fate-modal .fate-deck-tile > * { grid-column: 2; min-width: 0; }
.fate-modal .fate-deck-tile > .fate-deck-tile-art { grid-column: 1; grid-row: 1 / span 6; width: 76px; height: 106px; background: none; border-radius: 0; align-self: start; }
.fate-modal .fate-deck-tile-art img { image-rendering: pixelated; }
.fate-modal .fate-deck-tile-name { font: 600 14px/1.2 Georgia, serif; }
.fate-modal .fate-deck-tile-check { color: #1a1205; background: #dfc58d; font-size: 11px; }
.fate-modal .fate-deck-owned { font-size: 11px; font-weight: 600; color: #b9c9bc; }
.fate-modal .fate-deck-starchip { padding: 3px 9px; font-size: 13px; color: #f0deb3; background: rgba(223, 197, 141, .12); border-color: rgba(223, 197, 141, .55); }
.fate-modal .fate-deck-starchip:hover { background: rgba(223, 197, 141, .28); border-color: #dfc58d; }
.fate-modal .fate-deck-tile-effect { font-weight: 500; color: #e8efe6; }
.fate-modal .fate-deck-status-eff { color: #b9c9bc; }
.fate-modal .fate-deck-cost, .fate-modal .fate-deck-cast, .fate-modal .fate-deck-el-badge { font-size: 11px; }
.fate-modal .fate-deck-cast { background: #10241e; border-color: #456454; color: #c9d3c5; }
.fate-modal .fate-deck-pager { border-top-color: rgba(160, 139, 94, .35); }
.fate-modal .fate-deck-pager-info { color: #b9c9bc; }
.fate-modal .fate-deck-cards { background: rgba(0, 0, 0, .18); }
.fate-modal .fate-deck-row { background: rgba(255, 255, 255, .024); border-color: #456454; }
.fate-modal .fate-deck-row:hover { background: rgba(255, 255, 255, .05); }
.fate-modal .fate-deck-row-art img { image-rendering: pixelated; }
.fate-deck-tabs { display: none; }

.fate-decks-modal { height: auto; max-height: 86vh; }
.fate-modal .fate-decks-row { background: rgba(255, 255, 255, .024); border-color: #456454; border-radius: 8px; }
.fate-modal .fate-decks-row.selected { border-color: #6fd29a; box-shadow: inset 0 0 0 1px rgba(111, 210, 154, .3); }
.fate-modal .fate-decks-name { font: 600 16px/1.2 Georgia, serif; color: #f0deb3; }
.fate-modal .fate-decks-meta { color: #b9c9bc; }
.fate-modal .fate-decks-thumb { width: 36px; height: 50px; background: none; border: 0; border-radius: 0; overflow: visible; }
.fate-modal .fate-decks-thumb img { image-rendering: pixelated; }
.fate-modal .fate-decks-thumb-n { right: -2px; bottom: -2px; padding: 0 3px; border: 1px solid #456454; border-radius: 4px; background: #0d1d18; color: #f0deb3; font-size: 11px; line-height: 14px; }
.fate-modal .fate-decks-avg { color: #7fd3f2; }
.fate-decks-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 16px; border: 1px dashed #456454; border-radius: 8px; text-align: center; }
.fate-decks-empty-title { font: 600 16px/1.3 Georgia, serif; color: #dfc58d; }
.fate-modal .fate-decks-new { align-self: flex-end; }
.fate-decks-empty .fate-decks-new { align-self: center; }

.fate-tower-modal { max-height: 90vh; }
.fate-modal .fate-tower-body { flex: 1 1 auto; min-height: 0; }
.fate-modal .fate-tower-decks { max-height: none; overflow: visible; padding-right: 0; }
.fate-modal .fate-tower-banner { margin-bottom: 10px; }
.fate-modal .fate-tower-banner-sub { color: #b9c9bc; font-size: 11px; }
.fate-modal .fate-tower-tile { background: rgba(255, 255, 255, .024); border-color: #456454; border-left-color: var(--rarity, #456454); border-radius: 8px; }
.fate-modal .fate-tower-tile.crown { border-radius: 8px; }
.fate-modal .fate-tower-tile.locked { opacity: .68; filter: grayscale(.45); }
.fate-modal .fate-tower-tile.next { border-color: #dfc58d; border-left-color: var(--rarity, #dfc58d); background: rgba(223, 197, 141, .08); animation: none; box-shadow: 0 0 14px rgba(223, 197, 141, .28); }
.fate-modal .fate-tower-tile-tier { font: 600 15px/1.2 Georgia, serif; color: #f0deb3; }
.fate-modal .fate-tower-tile-rarity { font-size: 11px; }
.fate-modal .fate-tower-tile-reward { color: #dfc58d; }
.fate-modal .fate-tower-tile-portrait { background: none; }
.fate-modal .fate-tower-plinth { background: linear-gradient(180deg, #456454, #0d1d18); border-color: #456454; }
.fate-modal .fate-tower-difficulty { font: 600 13px/1.3 Georgia, serif; color: #dfc58d; text-shadow: none; }
.fate-modal .fate-tower-eye { width: 30px; height: 30px; background: #10241e; border-color: #78937d; color: #f0deb3; }
.fate-tower-cta { min-height: 44px; min-width: 220px; justify-content: center; font-size: 15px; }
.fate-tower-cta-deck { font-size: 13px; color: #b9c9bc; }
.fate-tower-cta-deck b { font: 600 14px Georgia, serif; color: #f0deb3; }

.fate-modal .fate-pvp-status-text { color: #f0deb3; }
.fate-modal .fate-pvp-status-sub { color: #b9c9bc; }
.fate-modal .fate-battle-lbrow { padding: 6px 2px; color: #e8efe6; border-bottom: 1px solid rgba(69, 100, 84, .55); }
.fate-modal .fate-pvp-code { border-color: #dfc58d; background: rgba(0, 0, 0, .28); }
.fate-modal .fate-pvp-code-val { color: #f0deb3; }
.fate-pvp-actions .fate-battle-btn { min-height: 38px; justify-content: center; }
.fate-modal.fate-tower-modal { height: min(760px, 90vh); }
.fate-modal .fate-tower-body { display: flex; flex-direction: column; overflow: hidden; }
.fate-modal .fate-tower-banner { flex: 0 0 auto; }
.fate-modal .fate-tower-layout { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
.fate-modal .fate-tower-left, .fate-modal .fate-tower-right { min-height: 0; overflow-y: auto; padding-right: 4px; }
.fate-modal .fate-tower-stage { margin-bottom: 0; }
.fate-modal.fate-handshake-modal { max-width: 760px; }
.fate-modal:not(.fate-handshake-loading).fate-handshake-modal { height: min(720px, 90vh); }
.fate-modal .fate-handshake-body-wrap { flex: 1 1 auto; min-height: 0; padding: 12px 16px 14px; gap: 10px; }
.fate-modal .fate-handshake-grid { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.fate-modal .fate-handshake-vs { font: 700 22px Georgia, serif; color: #dfc58d; }
.fate-modal .fate-handshake-fighter { min-height: 0; overflow: hidden; background: rgba(255, 255, 255, .024); border: 1px solid #456454; border-top: 2px solid var(--fighter, #456454); border-radius: 8px; padding: 8px 10px 10px; gap: 4px; }
.fate-modal .fate-handshake-side { flex: 0 0 auto; font-size: 11px; }
.fate-modal .fate-handshake-body { flex: 0 0 auto; width: 124px; height: 124px; }
.fate-modal .fate-handshake-name { flex: 0 0 auto; font: 600 16px/1.2 Georgia, serif; color: #f0deb3; }
.fate-modal .fate-handshake-sub { flex: 0 0 auto; display: block; font-size: 12px; line-height: 1.25; color: #b9c9bc; }
.fate-modal .fate-handshake-stats { flex: 0 0 auto; }
.fate-modal .fate-handshake-stat { background: #0a1712; border-color: #456454; border-radius: 6px; }
.fate-modal .fate-handshake-stat-k { font-size: 11px; }
.fate-modal .fate-handshake-stat-v { color: #e8efe6; }
.fate-modal .fate-handshake-deck { flex: 1 1 auto; min-height: 0; max-height: none; align-content: flex-start; }
.fate-modal .fate-handshake-card { flex: 0 0 auto; width: 42px; height: 59px; border: 0; border-radius: 0; background: none; overflow: visible; }
.fate-modal .fate-handshake-card-art img { image-rendering: pixelated; }
.fate-modal .fate-handshake-card-star { display: none; }
.fate-modal .fate-handshake-card-n { right: -2px; bottom: -2px; padding: 0 3px; border: 1px solid #456454; border-radius: 4px; background: #0d1d18; color: #f0deb3; font-size: 11px; line-height: 14px; }
.fate-modal .fate-handshake-count { flex: 0 0 auto; background: #0a1712; border-color: #456454; }
.fate-modal .fate-handshake-count-fill { background: linear-gradient(90deg, #8c6620, #dfc58d); }
.fate-modal .fate-handshake-actions { flex: 0 0 auto; }
.fate-enemy-deck { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.fate-enemy-card { background: rgba(255, 255, 255, .024); border-color: #456454; }
.fate-enemy-card-art { background: none; }
.fate-enemy-card-art img { object-fit: contain; image-rendering: pixelated; }
.fate-enemy-name { font-family: Georgia, serif; color: #f0deb3; }
.fate-enemy-card-eff { color: #e8efe6; }
.fate-enemy-deck { max-height: none; overflow: visible; padding-right: 0; }
.fate-enemy-card-art { height: 53px; flex-basis: 38px; border-radius: 0; }
