/* =====================================================================
   LOADOUT screen (lobby tab) — layout after models/loadout.png + models/cases.png
   Stage is the lobby's fluid 1080-high stage (LobbyScreen.fit): columns
   side menu 322 | portraits 104 | character preview | right panel 858.
   Tokens and fonts: see :root block below.
   ===================================================================== */
.lb-root, .lo-modal {
  --font-display: "Anton", "Impact", sans-serif;
  --font-ui: "Rajdhani", "Bahnschrift", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-crypto: "Orbitron", "Bahnschrift", sans-serif;
  --bg-panel: rgba(12, 18, 42, 0.92);
  --bg-panel-soft: rgba(22, 29, 58, 0.88);
  --dog-orange: #ff8c24; --dog-gold: #ffbe28;
  --cat-blue: #3498ff; --cat-cyan: #25d5ff;
  --rare: #35a8ff; --epic: #a64cff; --legendary: #ffc928; --common: #9aa6bf; --standard: #4f7fd6;
  --text-primary: #ffffff; --text-secondary: #b9c4dc;
  --lo-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.06);
  --lo-line: rgba(140, 160, 255, 0.18);
}

.lo-root { grid-column: 1 / -1; grid-row: 2 / 4; position: relative; z-index: 3; display: grid; gap: 16px; min-height: 0;
  grid-template-columns: 322px 104px minmax(0, 1fr) 858px; grid-template-rows: minmax(0, 1fr) 214px;
  grid-template-areas: "side ports hero right" "profile profile presets right"; }
.lo-side { grid-area: side; } .lo-right { grid-area: right; }
.lo-profile { grid-area: profile; } .lo-presets { grid-area: presets; }

.lo-panel { background: var(--bg-panel); border: 1.5px solid var(--lo-line); border-radius: 20px; box-shadow: var(--lo-shadow); min-height: 0; box-sizing: border-box; }
.lo-icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1.5px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.08); color: #fff; display: grid; place-items: center; padding: 0; flex: none; transition: background 0.15s, transform 0.15s; }
.lo-icon-btn svg { width: 22px; height: 22px; }
.lo-icon-btn:hover { background: rgba(255,255,255,0.18); transform: scale(1.06); }
.lo-icon-btn.ghost { background: none; border-color: transparent; color: #8f9abd; }
.lo-icon-btn.ghost:hover { color: #fff; }

/* ---------- left: category menu ---------- */
.lo-side { display: flex; flex-direction: column; padding: 18px 12px 14px; }
.lo-side-head { display: flex; align-items: center; gap: 12px; padding: 0 12px 14px; }
.lo-side-head i { width: 34px; height: 34px; color: #fff; display: inline-flex; } .lo-side-head i svg { width: 100%; height: 100%; }
.lo-side-head h2 { margin: 0; font: 400 32px/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.8px; }
.lo-side-list { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.lo-side-item { position: relative; display: flex; align-items: center; gap: 18px; flex: 1; min-height: 52px; max-height: 88px; padding: 0 20px; border: none; border-radius: 14px; background: none;
  color: #e9edf8; font: 700 24px/1 var(--font-ui); letter-spacing: 0.6px; text-transform: uppercase; text-align: left; transition: background 0.15s, color 0.15s; }
.lo-side-item + .lo-side-item::before { content: ''; position: absolute; left: 76px; right: 14px; top: 0; height: 1px; background: rgba(255,255,255,0.08); }
.lo-side-item i { width: 34px; height: 34px; display: inline-flex; flex: none; } .lo-side-item i svg { width: 100%; height: 100%; }
.lo-side-item:hover { background: rgba(255,255,255,0.06); }
.lo-side-item.on { background: linear-gradient(180deg, #ffcf3a, #ffa418); color: #241200; box-shadow: 0 0 18px rgba(255, 176, 40, 0.45), inset 0 2px 0 rgba(255,255,255,0.45), inset 0 -3px 0 rgba(0,0,0,0.12); }
.lo-side-item.on::before, .lo-side-item.on + .lo-side-item::before { display: none; }

/* ---------- character quick select ---------- */

/* ---------- character preview + platform ---------- */
.lo-platform { position: absolute; left: 50%; bottom: 26px; width: 440px; height: 104px; transform: translateX(-50%); }
.lo-platform i { position: absolute; inset: 0; border-radius: 50%; }
.lo-platform .ring1 { background: radial-gradient(ellipse at 50% 45%, #33406e 0%, #1a2244 55%, #0e1430 70%); border: 4px solid #2b3c78; box-shadow: inset 0 -8px 0 rgba(0,0,0,0.35), 0 12px 30px rgba(0,0,0,0.5); }
.lo-platform .ring2 { inset: 14px 30px; border: 3px solid rgba(37, 213, 255, 0.75); box-shadow: 0 0 16px rgba(37, 213, 255, 0.7), inset 0 0 14px rgba(37, 213, 255, 0.45); }
.lo-platform .glow { inset: -30px -20px 30px; background: radial-gradient(ellipse at 50% 70%, rgba(37, 213, 255, 0.28), transparent 65%); }

/* rarity text label (never colour only) */
.lo-rar { display: inline-block; padding: 2px 9px; border-radius: 8px; font: 700 13px/1.3 var(--font-ui); letter-spacing: 1px; text-transform: uppercase; border: 1.5px solid currentColor; }
.lo-rar.r-common { color: var(--common); } .lo-rar.r-rare { color: var(--rare); } .lo-rar.r-epic { color: #c78bff; } .lo-rar.r-legendary { color: var(--legendary); } .lo-rar.r-standard { color: #8fb4ff; }

/* ---------- profile card ---------- */
.lo-profile { padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.lo-profile-top { display: flex; align-items: center; gap: 16px; }
.lo-profile-avatar { width: 108px; height: 108px; flex: none; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 14px rgba(0,0,0,0.4), 0 0 0 2px rgba(255,255,255,0.14); background: linear-gradient(180deg, #4b9bff, #2559c9); }
.lo-profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lo-profile-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lo-profile-name { font: 700 30px/1.05 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lo-profile-name.sm { font-size: 25px; } .lo-profile-name.xs { font-size: 20px; }
.lo-nick-input { font: 700 24px var(--font-ui); background: #0d1330; color: #fff; border: 1.5px solid var(--dog-gold); border-radius: 10px; padding: 4px 10px; width: 100%; box-sizing: border-box; }
.lo-profile-level { display: flex; align-items: center; gap: 12px; }
.lo-lvl { width: 50px; height: 56px; flex: none; display: grid; place-items: center; font: 400 25px var(--font-display); color: var(--legendary);
  background: #1e1d3a; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); box-shadow: inset 0 0 0 4px #ffb020; }
.lo-xp { flex: 1; } .lo-xp small { font: 600 15px var(--font-body); color: var(--legendary); }
.lo-bar { height: 13px; border-radius: 8px; background: rgba(255,255,255,0.1); overflow: hidden; margin: 4px 0; box-shadow: inset 0 1px 2px rgba(0,0,0,0.4); }
.lo-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #2f7dff, #5fc4ff); box-shadow: 0 0 10px rgba(80, 170, 255, 0.6); }
.lo-wallet { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lo-cur { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 10px; padding: 7px 10px; border-radius: 16px; border: 2px solid; }
.lo-cur.cur-doge { border-color: #f5a623; background: linear-gradient(180deg, rgba(80, 45, 10, 0.55), rgba(30, 18, 8, 0.6)); box-shadow: 0 0 14px rgba(255, 160, 30, 0.3); }
.lo-cur.cur-cat { border-color: #3d9bff; background: linear-gradient(180deg, rgba(15, 45, 100, 0.55), rgba(8, 18, 45, 0.6)); box-shadow: 0 0 14px rgba(61, 155, 255, 0.3); }
.lo-cur-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.lo-cur-text small { font: 700 15px var(--font-ui); letter-spacing: 0.8px; }
.cur-doge .lo-cur-text small { color: #ffc44d; } .cur-cat .lo-cur-text small { color: #7cc8ff; }
.lo-cur-text b { font: 800 27px/1.15 var(--font-body); font-variant-numeric: tabular-nums; }
.lo-cur-add { width: 36px; height: 36px; border-radius: 9px; border: none; color: #fff; display: grid; place-items: center; padding: 0; box-shadow: inset 0 2px 0 rgba(255,255,255,0.35); transition: transform 0.12s; }
.lo-cur-add:hover { transform: scale(1.1); }
.cur-doge .lo-cur-add { background: linear-gradient(180deg, #ffa53a, #e0700f); } .cur-cat .lo-cur-add { background: linear-gradient(180deg, #4ba3ff, #2457c9); }
.lo-cur-add svg { width: 22px; height: 22px; }
.lo-coin { width: 32px; height: 32px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45)); }
.lo-coin.big { width: 50px; height: 50px; }

/* ---------- loadout presets ---------- */
.lo-presets { align-self: end; width: min(100%, 490px); justify-self: center; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.lo-preset-row { display: flex; gap: 10px; }
.lo-preset { width: 52px; height: 52px; border-radius: 12px; border: 1.5px solid var(--lo-line); background: var(--bg-panel-soft); color: #fff; font: 700 24px var(--font-ui); transition: background 0.15s, transform 0.12s; }
.lo-preset:hover { transform: translateY(-2px); background: rgba(40, 52, 96, 0.95); }
.lo-preset.on { background: linear-gradient(180deg, #ffcf3a, #ffa418); color: #241200; border-color: transparent; box-shadow: 0 0 16px rgba(255, 176, 40, 0.45); }
.lo-preset-save { flex: 1; height: 52px; border-radius: 12px; border: 1.5px solid rgba(110, 140, 255, 0.4); background: linear-gradient(180deg, #2b3a74, #1d2858); color: #fff; font: 700 22px var(--font-ui); text-transform: uppercase; letter-spacing: 1px; transition: filter 0.15s; }
.lo-preset-save:hover { filter: brightness(1.2); }
.lo-preset-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lo-preset-name span { font: 700 25px var(--font-ui); text-transform: uppercase; letter-spacing: 0.6px; }
.lo-preset-name input { flex: 1; font: 700 22px var(--font-ui); background: #0d1330; color: #fff; border: 1.5px solid var(--dog-gold); border-radius: 10px; padding: 4px 10px; }

/* ---------- equipped-loadout preview (replaces the character portraits + hero) ---------- */
.lo-preview { grid-column: 2 / span 2; grid-row: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.lo-preview-stage { position: relative; flex: 1; min-height: 0; }
.lo-preview-stage .lo-platform { pointer-events: none; }
.lo-preview-art { position: absolute; left: 6%; right: 6%; top: 6%; bottom: 30%; display: grid; place-items: center; animation: loFloat 3.2s ease-in-out infinite; }
.lo-preview-art img { width: 100%; height: 100%; }
.lo-preview-art img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 20px 22px rgba(0,0,0,0.5)); }
.lo-preview-art .lo-card-icon { width: 160px; height: 160px; color: #fff; }
.lo-preview-art.spray img { width: auto; height: 86%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,0.08), 0 20px 40px rgba(0,0,0,0.5); }
.lo-preview-name { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.lo-preview-name b { font: 400 34px/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.6px; text-shadow: 0 3px 10px rgba(0,0,0,0.6); }
.lo-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; flex: none; }
.lo-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 14px; border: 1.5px solid var(--lo-line); background: var(--bg-panel); color: #fff; box-shadow: var(--lo-shadow); transition: transform 0.15s, border-color 0.15s; min-width: 0; }
.lo-slot:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(255,255,255,0.35); }
.lo-slot.on { border-color: var(--legendary); box-shadow: 0 0 16px rgba(255, 190, 40, 0.45); }
.lo-slot-key { position: absolute; left: 8px; top: 6px; font: 800 13px var(--font-ui); color: #ffd23f; }
.lo-slot-art { width: 100%; height: 58px; display: grid; place-items: center; }
.lo-slot-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lo-slot.spray .lo-slot-art img { height: 58px; width: 58px; object-fit: cover; border-radius: 50%; }
.lo-slot-art .lo-card-icon { width: 40px; height: 40px; }
.lo-slot-text { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
.lo-slot-text b { font: 700 13px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lo-slot-text small { font: 600 11px var(--font-body); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* sprays: round art like the painted spray */
.lo-card.spray .lo-card-art img { width: 78%; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 50%; }
@keyframes loFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
