:root {
  color-scheme: dark;
  --bg: #080a10;
  --surface: rgba(17, 21, 32, .94);
  --surface-2: #151a27;
  --surface-3: #1b2130;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.17);
  --text: #f5f7fb;
  --muted: #929caf;
  --gold: #f3c96b;
  --gold-2: #ffdf91;
  --red: #ff6d7a;
  --green: #66d99a;
  --blue: #75a9ff;
  --radius: 20px;
  --shadow: 0 25px 70px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; color: var(--text); background: radial-gradient(circle at 15% 0%,rgba(243,201,107,.08),transparent 35%), radial-gradient(circle at 100% 70%,rgba(117,169,255,.07),transparent 35%), var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.surface { min-width: 0; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.ambient { position: fixed; z-index: -1; width: 36vw; height: 36vw; border-radius: 50%; filter: blur(110px); opacity: .14; pointer-events: none; }
.ambient-a { top: -18vw; left: -10vw; background: var(--gold); }
.ambient-b { right: -18vw; bottom: -20vw; background: var(--blue); }

.topbar { width: min(1480px,100%); min-height: 62px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { min-width: 0; display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: .82rem; font-weight: 900; letter-spacing: -.015em; }
.brand > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.brand-glyph { flex: 0 0 auto; min-width: 42px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(243,201,107,.35); border-radius: 10px; color: var(--gold); background: linear-gradient(145deg,rgba(243,201,107,.12),rgba(255,255,255,.02)); font-size: .62rem; letter-spacing: .04em; }
.brand-button { border: 0; padding: 0; background: transparent; }
.top-actions, .game-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }

.button { min-height: 42px; border: 1px solid transparent; border-radius: 11px; padding: 0 15px; color: var(--text); background: var(--surface-3); font-size: .72rem; font-weight: 850; transition: transform .15s, border-color .15s, background .15s; }
.button:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-primary { color: #0c1018; background: var(--gold); }
.button-secondary, .button-quiet { border-color: var(--line); color: #c9d0dc; background: rgba(255,255,255,.035); }
.button-gold { color: #171008; background: linear-gradient(135deg,var(--gold-2),var(--gold)); }
.button-danger { color: white; background: #7f2430; }
.kicker { margin: 0 0 8px; color: var(--gold); font-size: .6rem; font-weight: 950; letter-spacing: .13em; }
.subtle { color: var(--muted); }
.fine-print { margin: 12px 0 0; color: var(--muted); font-size: .67rem; line-height: 1.45; }

.home-screen { min-height: 100vh; padding: 10px clamp(14px,3vw,44px) 34px; }
.home-grid { width: min(1480px,100%); margin: clamp(35px,7vh,86px) auto 0; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(430px,.78fr); gap: clamp(30px,5vw,84px); align-items: center; }
.hero { min-width: 0; }
.hero h1 { margin: 0; max-width: 100%; font-size: clamp(3.1rem,7.7vw,8.4rem); line-height: .82; letter-spacing: -.075em; text-wrap: balance; overflow-wrap: normal; word-break: normal; }
.hero h1 span, .hero h1 strong { display: block; max-width: 100%; }
.hero h1 span { color: #fff; font-weight: 950; }
.hero h1 strong { color: var(--gold); font-weight: 950; }
.hero-copy { max-width: 760px; margin: 30px 0 0; color: #c2cad7; font-size: clamp(.93rem,1.25vw,1.15rem); line-height: 1.72; }
.hero-points { margin-top: 25px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-points span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; color: #c4ccda; background: rgba(255,255,255,.025); font-size: .65rem; font-weight: 750; }

.setup-card { min-width: 0; border-radius: 25px; padding: clamp(20px,3vw,32px); }
.setup-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.setup-heading h2 { margin: 0; font-size: clamp(1.7rem,3vw,2.4rem); line-height: 1; letter-spacing: -.045em; }
.ai-badge { border: 1px solid rgba(102,217,154,.24); border-radius: 999px; padding: 7px 9px; color: var(--green); background: rgba(102,217,154,.06); font-size: .57rem; font-weight: 900; white-space: nowrap; }
.field { min-width: 0; display: grid; gap: 7px; margin: 12px 0; }
.field > span { color: #cbd2dd; font-size: .66rem; font-weight: 800; }
.field input, .field textarea, .field select, .modal-search { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; color: var(--text); background: #0d111b; outline: none; }
.field textarea { resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .field select:focus, .modal-search:focus { border-color: rgba(243,201,107,.55); box-shadow: 0 0 0 3px rgba(243,201,107,.08); }

.selected-preset { width: 100%; min-width: 0; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid rgba(243,201,107,.22); border-radius: 15px; padding: 12px; color: var(--text); background: linear-gradient(135deg,rgba(243,201,107,.08),rgba(255,255,255,.02)); text-align: left; }
.selected-preset:hover { border-color: rgba(243,201,107,.48); }
.selected-preset > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.selected-preset small { color: var(--gold); font-size: .53rem; font-weight: 950; letter-spacing: .1em; }
.selected-preset strong { overflow-wrap: anywhere; font-size: .86rem; }
.selected-preset em { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); font-size: .64rem; font-style: normal; line-height: 1.4; }
.selected-preset b { color: var(--gold); font-size: .65rem; }
.preset-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; color: var(--gold); background: rgba(243,201,107,.12); font-size: 1.15rem; font-weight: 950; }

.mode-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 18px; }
.three-modes { grid-template-columns: repeat(3,minmax(0,1fr)); }
.mode-button { min-width: 0; min-height: 75px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; color: var(--text); background: rgba(255,255,255,.025); text-align: left; }
.mode-button:hover { border-color: rgba(243,201,107,.36); background: rgba(243,201,107,.055); }
.primary-mode { border-color: rgba(243,201,107,.3); }
.mode-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--gold); background: rgba(243,201,107,.09); font-size: 1rem; }
.mode-button > span:last-child { min-width: 0; }
.mode-button strong, .mode-button small { display: block; overflow-wrap: anywhere; }
.mode-button strong { font-size: .73rem; }
.mode-button small { margin-top: 3px; color: var(--muted); font-size: .57rem; line-height: 1.3; }
.gamemaster-names { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: rgba(117,169,255,.04); }
.gamemaster-names p { margin: 0; color: #bfc8d6; font-size: .68rem; line-height: 1.45; }
.join-divider { margin: 18px 0 10px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .59rem; }
.join-divider::before, .join-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.join-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.join-row input { min-width: 0; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; color: var(--text); background: #0d111b; text-transform: uppercase; letter-spacing: .18em; }
.custom-config { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.level-range { display: grid; grid-template-columns: minmax(0,1fr) 100px 100px; gap: 9px; align-items: end; margin-top: 8px; }
.level-range > div span, .level-range > div small { display: block; }
.level-range > div span { color: #cbd2dd; font-size: .66rem; font-weight: 800; }
.level-range > div small { color: var(--muted); font-size: .58rem; }
.level-range label { display: grid; gap: 5px; color: var(--muted); font-size: .58rem; }
.level-range input { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px; color: var(--text); background: #0d111b; }

.game-screen { min-height: 100vh; padding: 6px clamp(7px,1.7vw,24px) 28px; }
.game-topbar { position: sticky; z-index: 20; top: 0; min-height: 58px; background: linear-gradient(to bottom,rgba(8,10,16,.96),rgba(8,10,16,.78),transparent); backdrop-filter: blur(12px); }
.preset-chip, .room-chip { min-height: 38px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: #c7cfdb; background: rgba(255,255,255,.025); font-size: .62rem; }
.room-chip span { color: var(--muted); }.room-chip strong { color: var(--gold); letter-spacing: .12em; }
.status-banner { width: min(1480px,100%); min-height: 38px; margin: 2px auto 7px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; padding: 8px 12px; color: #c8d0dc; background: rgba(255,255,255,.025); font-size: .7rem; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.scoreboard { width: min(1480px,100%); margin: 0 auto 7px; display: grid; grid-template-columns: minmax(0,1fr) 66px minmax(0,1fr); gap: 7px; align-items: stretch; }
.player-card { min-width: 0; border: 1px solid var(--line); border-radius: 15px; padding: 10px; background: linear-gradient(140deg,rgba(255,255,255,.045),rgba(255,255,255,.015)); }
.player-card.active { border-color: rgba(243,201,107,.45); box-shadow: inset 0 0 0 1px rgba(243,201,107,.08); }
.player-head { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; }
.player-name { min-width: 0; display: flex; align-items: center; gap: 8px; }
.player-avatar { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--gold); background: rgba(243,201,107,.1); font-size: .65rem; font-weight: 950; }
.player-name div { min-width: 0; }.player-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }.player-name small { color: var(--muted); font-size: .54rem; }
.resources { display: flex; gap: 5px; }.resource { min-width: 45px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; text-align: center; }.resource span { display: block; color: var(--muted); font-size: .47rem; }.resource strong { display: block; margin-top: 2px; color: #edf1f7; font-size: .72rem; }
.team-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-top: 8px; }
.team-slot { min-width: 0; height: 54px; display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 5px; background: rgba(0,0,0,.15); }
.team-slot.empty { display: grid; place-items: center; color: #586174; font-size: .58rem; }
.team-thumb, .team-thumb-fallback { width: 40px; height: 42px; border-radius: 7px; object-fit: cover; background: #232a39; }.team-thumb-fallback { display: grid; place-items: center; color: var(--gold); font-size: .72rem; font-weight: 900; }
.team-copy { min-width: 0; }.team-copy strong, .team-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.team-copy strong { font-size: .6rem; }.team-copy small { margin-top: 2px; color: var(--muted); font-size: .48rem; }
.versus { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); }.versus span { font-size: .47rem; font-weight: 900; letter-spacing: .1em; }.versus strong { color: var(--gold); font-size: 1rem; }.versus em { color: #596174; font-size: .7rem; font-style: normal; font-weight: 950; }

.waiting-card { width: min(720px,100%); margin: 9vh auto 0; border-radius: var(--radius); padding: clamp(28px,5vw,50px); text-align: center; }
.waiting-card h2 { margin: 0; font-size: clamp(2rem,5vw,4rem); letter-spacing: -.055em; }.waiting-card p:not(.kicker) { max-width: 560px; margin: 14px auto 22px; color: #bfc8d6; line-height: 1.6; }.waiting-pulse { width: 18px; height: 18px; margin: 0 auto 20px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(243,201,107,.45); animation: pulse 1.8s infinite; }

.match-stage { width: min(1480px,100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0,1.65fr) minmax(300px,.65fr); gap: 7px; align-items: start; }
.character-card { min-width: 0; display: grid; grid-template-columns: minmax(270px,.85fr) minmax(0,1.15fr); border-radius: var(--radius); overflow: hidden; }
.character-media { position: relative; min-width: 0; min-height: 520px; overflow: hidden; background: linear-gradient(145deg,#1e2534,#0e121b); }
.character-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.character-fallback { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--gold); background: radial-gradient(circle,rgba(243,201,107,.08),transparent 60%); }.character-fallback span { font-size: clamp(5rem,12vw,10rem); font-weight: 950; opacity: .65; }.character-fallback small { color: var(--muted); font-size: .63rem; }
.media-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top,rgba(4,6,10,.78),transparent 38%); }
.floating-chip { position: absolute; z-index: 2; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 7px 10px; background: rgba(8,10,16,.82); backdrop-filter: blur(8px); font-size: .55rem; font-weight: 950; letter-spacing: .09em; }.round-floating { left: 12px; top: 12px; color: #d9dfea; }.level-floating { right: 12px; top: 12px; color: var(--gold); }
.character-info { min-width: 0; padding: clamp(17px,2.4vw,30px); }
.character-title-row { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: start; }.character-title-row > div:first-child { min-width: 0; }.character-title-row h2 { margin: 0; max-width: 100%; font-size: clamp(2.2rem,4.8vw,5.5rem); line-height: .88; letter-spacing: -.065em; overflow-wrap: anywhere; }.character-title-row .subtle { margin: 8px 0 0; font-size: .68rem; overflow-wrap: anywhere; }
.level-total { min-width: 78px; border: 1px solid rgba(243,201,107,.2); border-radius: 12px; padding: 9px 7px; text-align: center; background: rgba(243,201,107,.06); }.level-total span, .level-total small { display: block; color: var(--gold); font-size: .49rem; font-weight: 900; }.level-total strong { display: block; margin: 2px 0; color: white; font-size: 1.65rem; line-height: 1; }
.character-description { color: #c4ccda; font-size: .78rem; line-height: 1.6; overflow-wrap: anywhere; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 14px; }.stat-row { min-width: 0; display: grid; grid-template-columns: 82px minmax(0,1fr) 26px; gap: 7px; align-items: center; }.stat-row span { min-width: 0; color: #aeb8c8; font-size: .55rem; overflow: hidden; text-overflow: ellipsis; }.stat-bar { min-width: 0; height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }.stat-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--gold),var(--gold-2)); }.stat-row strong { color: #e9edf4; font-size: .58rem; text-align: right; }
.info-details { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 12px; }.info-details summary { color: #cbd2dc; font-size: .64rem; font-weight: 850; cursor: pointer; }.detail-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }.detail-label { color: var(--gold); font-size: .5rem; font-weight: 950; letter-spacing: .09em; }.danger-text { color: var(--red); }.tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }.tag-list span { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; color: #bfc8d6; background: rgba(255,255,255,.025); font-size: .52rem; line-height: 1.3; overflow-wrap: anywhere; }.weakness-tags span { border-color: rgba(255,109,122,.15); }.image-credit { display: block; margin-top: 12px; color: #7f8ba0; font-size: .51rem; line-height: 1.35; overflow-wrap: anywhere; }

.decision-column { min-width: 0; display: grid; gap: 7px; }.auction-card, .decision-card, .quick-rules, .gm-turn { min-width: 0; border-radius: 15px; padding: 15px; }.auction-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.auction-card div { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }.auction-card span { display: block; color: var(--muted); font-size: .52rem; }.auction-card strong { display: block; margin-top: 4px; color: var(--gold); font-size: 1rem; overflow-wrap: anywhere; }
.decision-card h3 { margin: 0; font-size: 1.25rem; letter-spacing: -.03em; }.decision-card > p:not(.kicker,.action-instruction) { color: var(--muted); font-size: .66rem; line-height: 1.45; }.action-instruction { margin: 0 0 10px; color: #d4dae4; font-size: .72rem; line-height: 1.45; overflow-wrap: anywhere; }.action-buttons { display: grid; gap: 7px; }.action-buttons .button { width: 100%; min-height: 47px; }
.shop-targets { display: grid; gap: 6px; }.shop-target { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 9px; color: var(--text); background: rgba(255,255,255,.025); text-align: left; }.shop-target span { min-width: 0; overflow-wrap: anywhere; font-size: .65rem; }.shop-target b { color: var(--gold); font-size: .58rem; }
.quick-rules strong { display: block; margin-bottom: 8px; font-size: .66rem; }.quick-rules { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; }.quick-rules > strong { grid-column: 1 / -1; }.quick-rules div { border: 1px solid var(--line); border-radius: 8px; padding: 7px 3px; text-align: center; }.quick-rules span, .quick-rules b { display: block; }.quick-rules span { color: var(--muted); font-size: .48rem; }.quick-rules b { margin-top: 2px; color: var(--gold); font-size: .6rem; }.gm-turn { border-color: rgba(117,169,255,.28); color: #cfe0ff; background: rgba(117,169,255,.055); font-size: .68rem; line-height: 1.45; }

.item-choice-panel { width: min(1480px,100%); margin: 7px auto 0; border-radius: var(--radius); padding: clamp(18px,2.5vw,30px); }.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; }.section-heading h2 { margin: 0; font-size: clamp(1.8rem,3.4vw,3.2rem); letter-spacing: -.05em; }.section-heading > p { max-width: 520px; margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.45; text-align: right; }.item-choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 16px; }.item-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 15px; padding: 14px; background: rgba(255,255,255,.025); }.item-card h3 { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }.item-card .source { margin: 4px 0 0; color: var(--gold); font-size: .58rem; }.item-card > p { color: #bfc8d6; font-size: .65rem; line-height: 1.5; overflow-wrap: anywhere; }.item-usefulness { display: flex; align-items: baseline; gap: 5px; margin: 9px 0; }.item-usefulness strong { font-size: 1.5rem; }.item-usefulness span { color: var(--muted); font-size: .55rem; }.item-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }.item-notes { margin: 10px 0; display: grid; gap: 5px; }.item-notes div { border: 1px solid var(--line); border-radius: 8px; padding: 7px; color: #aeb8c8; font-size: .55rem; line-height: 1.4; overflow-wrap: anywhere; }.compatibility-note { margin-top: auto; border-radius: 9px; padding: 8px; color: #bcd5c7; background: rgba(102,217,154,.055); font-size: .58rem; line-height: 1.4; overflow-wrap: anywhere; }.item-card .button { width: 100%; margin-top: 10px; }

.battle-panel { width: min(1480px,100%); margin: 7px auto 0; display: grid; grid-template-columns: minmax(320px,.72fr) minmax(0,1.28fr); gap: 7px; align-items: start; }.arena-card, .battle-story { min-width: 0; border-radius: var(--radius); padding: clamp(20px,3vw,38px); }.arena-card { position: sticky; top: 66px; background: radial-gradient(circle at 10% 0%,rgba(255,109,122,.12),transparent 35%),linear-gradient(145deg,#18131e,#0d111a); }.arena-card h2 { margin: 0; font-size: clamp(2.4rem,5.2vw,5rem); line-height: .9; letter-spacing: -.07em; overflow-wrap: anywhere; }.arena-description { color: #c4ccda; line-height: 1.65; }.arena-facts, .arena-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }.arena-facts > div, .arena-lists > div { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 11px; background: rgba(255,255,255,.025); }.arena-facts span, .arena-lists > div > span { color: var(--gold); font-size: .51rem; font-weight: 950; letter-spacing: .09em; }.arena-facts p { margin: 5px 0 0; color: #bfc8d6; font-size: .65rem; line-height: 1.45; overflow-wrap: anywhere; }
.winner-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }.winner-line span { border-radius: 999px; padding: 7px 10px; color: #171006; background: var(--gold); font-size: .57rem; font-weight: 950; letter-spacing: .08em; }.winner-line strong { color: #e7ecf4; font-size: .8rem; }.battle-story h2 { margin: 16px 0 0; font-size: clamp(2.2rem,4.8vw,4.6rem); line-height: .96; letter-spacing: -.06em; overflow-wrap: anywhere; }.difficulty-row { margin: 18px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; color: var(--muted); font-size: .7rem; }.difficulty-row strong { color: var(--red); }.battle-opening, .battle-beats p, .story-callout p { color: #c7cfdb; font-size: .84rem; line-height: 1.76; overflow-wrap: anywhere; }.battle-opening { font-size: .96rem; }.battle-beats { display: grid; gap: 12px; counter-reset: beat; }.battle-beats p { position: relative; margin: 0; border-left: 1px solid var(--line); padding: 0 0 0 38px; }.battle-beats p::before { counter-increment: beat; content: counter(beat); position: absolute; left: -13px; top: 0; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--gold); background: #171c29; border: 1px solid rgba(243,201,107,.18); font-size: .58rem; font-weight: 950; }.story-callout { margin-top: 17px; border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: rgba(255,255,255,.025); }.story-callout span { color: var(--gold); font-size: .55rem; font-weight: 950; letter-spacing: .1em; }.story-callout p { margin-bottom: 0; }

.overview-panel { width: min(1480px,100%); margin: 7px auto 0; border-radius: var(--radius); padding: clamp(19px,3vw,34px); }.overview-content { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 17px 0; }.overview-team { min-width: 0; border: 1px solid var(--line); border-radius: 15px; padding: 14px; background: rgba(255,255,255,.025); }.overview-team.winner { border-color: rgba(243,201,107,.45); background: rgba(243,201,107,.05); }.overview-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }.overview-head h3 { margin: 0; overflow-wrap: anywhere; }.overview-head span { color: var(--gold); font-size: .65rem; font-weight: 900; }.overview-resources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }.overview-resources span { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: #bfc8d6; font-size: .57rem; }.overview-roster { display: grid; gap: 6px; margin-top: 10px; }.overview-fighter { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 7px; }.overview-fighter b { color: var(--gold); font-size: .63rem; }.overview-fighter div { min-width: 0; }.overview-fighter strong, .overview-fighter small { display: block; overflow-wrap: anywhere; }.overview-fighter strong { font-size: .65rem; }.overview-fighter small { color: var(--muted); font-size: .53rem; }.overview-fighter em { color: #cbd2dd; font-size: .58rem; font-style: normal; }

.history { width: min(1480px,100%); margin: 7px auto 0; border-radius: 14px; overflow: hidden; box-shadow: none; }.history-toggle { width: 100%; min-height: 43px; display: flex; align-items: center; justify-content: space-between; border: 0; padding: 0 14px; color: #cbd2de; background: transparent; font-size: .69rem; font-weight: 850; }.event-list { max-height: 190px; overflow-y: auto; border-top: 1px solid var(--line); }.history.collapsed .event-list { display: none; }.event-row { min-width: 0; display: grid; grid-template-columns: 7px minmax(0,1fr); gap: 9px; padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,.05); color: #aeb8c8; font-size: .65rem; line-height: 1.4; overflow-wrap: anywhere; }.event-dot { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #69758a; }.event-row.good .event-dot { background: var(--green); }.event-row.danger .event-dot { background: var(--red); }.event-row.gold .event-dot { background: var(--gold); }

.modal-dialog { width: min(900px,calc(100% - 22px)); max-height: calc(100vh - 24px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 23px; padding: clamp(22px,4vw,38px); color: var(--text); background: #101522; box-shadow: 0 45px 110px rgba(0,0,0,.72); }.modal-dialog::backdrop { background: rgba(3,5,10,.82); backdrop-filter: blur(8px); }.dialog-close { position: sticky; z-index: 3; float: right; top: 0; width: 38px; height: 38px; border: 0; border-radius: 10px; color: #d0d6e0; background: #202637; font-size: 1.35rem; }.dialog-head h2 { margin: 0; font-size: clamp(2rem,5vw,3.7rem); line-height: 1; letter-spacing: -.055em; }.dialog-head > p:last-child { color: var(--muted); line-height: 1.5; }.preset-gallery { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 14px; }.preset-option { min-width: 0; min-height: 135px; display: flex; flex-direction: column; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--text); background: rgba(255,255,255,.025); text-align: left; }.preset-option:hover, .preset-option.selected { border-color: rgba(243,201,107,.45); background: rgba(243,201,107,.055); }.preset-option i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--gold); background: rgba(243,201,107,.09); font-style: normal; font-weight: 900; }.preset-option strong { margin-top: 9px; overflow-wrap: anywhere; font-size: .72rem; }.preset-option small { margin-top: 4px; color: var(--muted); font-size: .56rem; line-height: 1.38; overflow-wrap: anywhere; }.modal-search { margin-top: 12px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 11px; padding: 3px; margin: 18px 0; }.auth-tabs button { min-height: 38px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: .68rem; font-weight: 850; }.auth-tabs button.active { color: #161008; background: var(--gold); }.auth-form { max-width: 480px; }.profile-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin: 16px 0; }.profile-stat { border: 1px solid var(--line); border-radius: 11px; padding: 11px; text-align: center; }.profile-stat strong, .profile-stat span { display: block; }.profile-stat strong { color: var(--gold); font-size: 1.25rem; }.profile-stat span { margin-top: 3px; color: var(--muted); font-size: .53rem; }.profile-history { display: grid; gap: 6px; margin-bottom: 18px; }.history-game { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }.history-game strong, .history-game small { display: block; overflow-wrap: anywhere; }.history-game strong { font-size: .67rem; }.history-game small { margin-top: 3px; color: var(--muted); font-size: .55rem; }.history-game b { color: var(--gold); font-size: .61rem; }
.leaderboard-list { display: grid; gap: 5px; margin-top: 17px; }.leader-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr) repeat(4,80px); gap: 7px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 9px; }.leader-row.header { color: var(--muted); font-size: .53rem; font-weight: 900; }.leader-row > * { min-width: 0; }.leader-rank { color: var(--gold); font-weight: 950; text-align: center; }.leader-name strong, .leader-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.leader-name strong { font-size: .67rem; }.leader-name small { color: var(--muted); font-size: .52rem; }.leader-number { color: #cbd2dd; font-size: .62rem; text-align: center; }
.rules-dialog ol { padding-left: 22px; color: #c7cfdb; line-height: 1.62; }.rules-dialog li { margin: 9px 0; padding-left: 4px; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 20px; max-width: min(520px,calc(100% - 24px)); transform: translate(-50%,25px); opacity: 0; pointer-events: none; border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 15px; color: #e8edf5; background: #151b29; box-shadow: var(--shadow); font-size: .73rem; line-height: 1.4; text-align: center; transition: opacity .18s, transform .18s; }.toast.show { opacity: 1; transform: translate(-50%,0); }.toast.error { border-color: rgba(255,109,122,.45); color: #ffc5cb; }
.loading-overlay { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; align-content: center; gap: 15px; background: rgba(5,7,12,.76); backdrop-filter: blur(7px); }.loader { width: 45px; height: 45px; margin: 0 auto; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--gold); border-radius: 50%; animation: spin .75s linear infinite; }.loading-overlay span { max-width: calc(100% - 32px); color: #dbe1ea; font-size: .76rem; font-weight: 850; text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 28px rgba(243,201,107,0); } 100% { box-shadow: 0 0 0 0 rgba(243,201,107,0); } }

@media (max-width: 1120px) {
  .home-grid { grid-template-columns: 1fr; margin-top: 40px; }.hero { max-width: 980px; }.setup-card { max-width: 820px; }.match-stage { grid-template-columns: 1fr; }.decision-column { grid-template-columns: repeat(2,minmax(0,1fr)); }.quick-rules { grid-column: 1 / -1; }.battle-panel { grid-template-columns: 1fr; }.arena-card { position: static; }
}
@media (max-width: 840px) {
  .topbar .brand > span:last-child { display: none; }.hero h1 { font-size: clamp(3.4rem,14vw,7rem); line-height: .84; }.three-modes { grid-template-columns: 1fr; }.scoreboard { grid-template-columns: 1fr 48px 1fr; gap: 5px; }.player-card { padding: 8px; }.player-head { grid-template-columns: 1fr; gap: 6px; }.resources { justify-content: stretch; }.resource { flex: 1; min-width: 0; padding-inline: 3px; }.team-slot { height: 47px; grid-template-columns: 35px minmax(0,1fr); padding: 4px; }.team-thumb, .team-thumb-fallback { width: 35px; height: 37px; }.team-copy small { display: none; }.character-card { grid-template-columns: 1fr; }.character-media { min-height: min(52vh,480px); }.item-choice-grid { grid-template-columns: 1fr; }.section-heading { align-items: start; flex-direction: column; gap: 7px; }.section-heading > p { text-align: left; }.preset-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }.leader-row { grid-template-columns: 34px minmax(0,1fr) repeat(2,62px); }.leader-row > :nth-child(5), .leader-row > :nth-child(6) { display: none; }.overview-content { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .home-screen { padding: 7px 10px 25px; }.top-actions { gap: 4px; }.top-actions .button { min-height: 36px; padding: 0 8px; font-size: .6rem; }.home-grid { margin-top: 24px; gap: 24px; }.hero h1 { font-size: clamp(3.1rem,17vw,5.7rem); letter-spacing: -.07em; }.hero-copy { margin-top: 19px; }.setup-card { padding: 16px; border-radius: 18px; }.setup-heading h2 { font-size: 1.5rem; }.ai-badge { display: none; }.selected-preset { grid-template-columns: 42px minmax(0,1fr); }.selected-preset b { display: none; }.preset-icon { width: 42px; height: 42px; }.custom-grid { grid-template-columns: 1fr; }.level-range { grid-template-columns: 1fr 1fr; }.level-range > div { grid-column: 1 / -1; }.join-row { grid-template-columns: 1fr; }.game-screen { padding-inline: 5px; }.game-topbar { min-height: 52px; }.preset-chip, .room-chip span { display: none; }.game-meta { gap: 4px; }.game-meta .button { min-height: 36px; padding-inline: 8px; font-size: .61rem; }.room-chip { min-height: 36px; padding-inline: 7px; }.scoreboard { grid-template-columns: 1fr; }.versus { min-height: 31px; display: flex; gap: 7px; }.versus span { display: none; }.player-card { border-radius: 12px; }.player-head { grid-template-columns: minmax(0,1fr) auto; }.team-row { margin-top: 6px; }.team-slot { height: 43px; grid-template-columns: 31px minmax(0,1fr); }.team-thumb, .team-thumb-fallback { width: 31px; height: 33px; }.match-stage { gap: 5px; }.character-card { border-radius: 15px; }.character-media { min-height: 330px; }.character-info { padding: 14px; }.character-title-row h2 { font-size: clamp(2.15rem,12vw,3.8rem); }.level-total { min-width: 64px; padding: 7px 4px; }.level-total strong { font-size: 1.25rem; }.stats-grid { grid-template-columns: 1fr; gap: 5px; }.stat-row { grid-template-columns: 78px minmax(0,1fr) 24px; }.detail-columns { grid-template-columns: 1fr; }.decision-column { grid-template-columns: 1fr; gap: 5px; }.quick-rules { grid-column: auto; }.arena-facts, .arena-lists { grid-template-columns: 1fr; }.arena-card, .battle-story { padding: 17px; border-radius: 15px; }.battle-beats p { padding-left: 30px; }.preset-gallery { grid-template-columns: 1fr; }.profile-stats { grid-template-columns: 1fr 1fr; }.leader-row { grid-template-columns: 30px minmax(0,1fr) 58px; }.leader-row > :nth-child(4), .leader-row > :nth-child(5), .leader-row > :nth-child(6) { display: none; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* v3 refinements */
.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero h1 { font-size: clamp(3rem, 6.9vw, 7.35rem); line-height: .91; letter-spacing: -.062em; overflow: visible; padding: .04em 0 .08em; }
.hero h1 span, .hero h1 strong { overflow-wrap: normal; word-break: normal; }
.player-card.winner { border-color: rgba(243,201,107,.58); box-shadow: 0 0 0 1px rgba(243,201,107,.18), 0 20px 50px rgba(0,0,0,.28); }
.overview-content { align-items: stretch; }
.overview-summary { grid-column: 1 / -1; display: grid; gap: 4px; border: 1px solid rgba(243,201,107,.26); border-radius: 14px; padding: 14px; background: rgba(243,201,107,.055); }
.overview-summary span { color: var(--gold); font-size: .57rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.overview-summary strong { font-size: clamp(1.35rem,3vw,2.1rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
.overview-summary small, .overview-head small { color: var(--muted); font-size: .62rem; }
#auth-form { max-width: 480px; }
.gm-turn { border-radius: 13px; padding: 13px; border-color: rgba(117,169,255,.3); background: rgba(117,169,255,.06); }
.gm-turn span, .gm-turn strong, .gm-turn small { display: block; overflow-wrap: anywhere; }
.gm-turn span { color: var(--blue); font-size: .54rem; font-weight: 950; letter-spacing: .1em; }
.gm-turn strong { margin-top: 5px; font-size: .87rem; }
.gm-turn small { margin-top: 3px; color: var(--muted); font-size: .61rem; }
.battle-beats p::before { content: attr(data-beat); }
.action-button:disabled, .shop-target button:disabled { opacity: .45; cursor: wait; }

@media (max-width: 840px) {
  .hero h1 { font-size: clamp(2.9rem, 10vw, 5.3rem); line-height: .93; }
}
@media (max-width: 620px) {
  .identity-grid { grid-template-columns: 1fr; gap: 0; }
  .hero h1 { font-size: clamp(2.35rem, 11.3vw, 4.05rem); line-height: .95; letter-spacing: -.052em; }
  .hero h1 span, .hero h1 strong { white-space: normal; }
  .overview-summary { grid-column: auto; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 2.35rem; }
  .top-actions .button { padding-inline: 6px; font-size: .55rem; }
}

/* v4: streamlined game, spectator mode and richer stat/item presentation */
.home-screen { position: relative; isolation: isolate; overflow: hidden; }
.home-screen > *:not(.galaxy-backdrop) { position: relative; z-index: 2; }
.galaxy-backdrop { position: absolute; z-index: 0; inset: 0; pointer-events: none; overflow: hidden; opacity: .55; }
.galaxy-backdrop::before,
.galaxy-backdrop::after,
.galaxy-backdrop i { content: ""; position: absolute; inset: -18%; }
.galaxy-backdrop::before { background-image: radial-gradient(circle,rgba(255,255,255,.75) 0 1px,transparent 1.4px), radial-gradient(circle,rgba(153,187,255,.65) 0 1px,transparent 1.5px), radial-gradient(circle,rgba(243,201,107,.55) 0 1px,transparent 1.4px); background-size: 89px 89px,137px 137px,191px 191px; background-position: 0 0,27px 49px,81px 22px; opacity: .34; animation: galaxy-drift 70s linear infinite; }
.galaxy-backdrop::after { inset: 4% 8%; background: radial-gradient(ellipse at 27% 42%,rgba(99,82,180,.13),transparent 43%), radial-gradient(ellipse at 78% 20%,rgba(58,119,190,.12),transparent 40%), radial-gradient(ellipse at 68% 82%,rgba(166,77,135,.09),transparent 42%); filter: blur(32px); animation: nebula-breathe 18s ease-in-out infinite alternate; }
.galaxy-backdrop i:nth-child(1) { inset: 8% auto auto 8%; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle,rgba(117,169,255,.09),transparent 68%); filter: blur(20px); animation: galaxy-float-a 24s ease-in-out infinite alternate; }
.galaxy-backdrop i:nth-child(2) { inset: auto 4% 1% auto; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle,rgba(243,201,107,.07),transparent 70%); filter: blur(28px); animation: galaxy-float-b 30s ease-in-out infinite alternate; }
.galaxy-backdrop i:nth-child(3) { inset: 20% 30% auto auto; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle,rgba(192,109,255,.06),transparent 70%); filter: blur(22px); animation: galaxy-float-a 34s ease-in-out infinite alternate-reverse; }
@keyframes galaxy-drift { to { transform: translate3d(90px,55px,0); } }
@keyframes nebula-breathe { from { transform: scale(.98) translate3d(-1%,0,0); opacity: .6; } to { transform: scale(1.04) translate3d(1%,-1%,0); opacity: .9; } }
@keyframes galaxy-float-a { to { transform: translate3d(38px,-22px,0) scale(1.06); } }
@keyframes galaxy-float-b { to { transform: translate3d(-42px,20px,0) scale(.96); } }

.spectator-chip { min-height: 36px; display: inline-flex; align-items: center; border: 1px solid rgba(117,169,255,.42); border-radius: 999px; padding: 0 10px; color: #bcd5ff; background: rgba(117,169,255,.09); font-size: .55rem; font-weight: 950; letter-spacing: .1em; }

.team-slot:is(button) { width: 100%; color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.team-slot:is(button):hover { border-color: rgba(243,201,107,.35); background: rgba(243,201,107,.045); transform: translateY(-1px); }
.team-copy span { display: block; margin-top: 1px; color: var(--gold); font-size: .49rem; }

.stat-track { min-width: 0; height: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,.045); border-radius: 999px; background: rgba(255,255,255,.075); box-shadow: inset 0 1px 2px rgba(0,0,0,.36); }
.stat-track i { display: block; width: var(--stat-value,0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg,color-mix(in srgb,var(--stat-colour) 65%,#fff 4%),var(--stat-colour)); box-shadow: 0 0 8px color-mix(in srgb,var(--stat-colour) 36%,transparent); transition: width .32s ease; }
.stat-row strong { color: var(--stat-colour,#e9edf4); font-size: .64rem; font-weight: 950; text-shadow: 0 0 10px color-mix(in srgb,var(--stat-colour) 25%,transparent); }
.stat-row span { font-weight: 750; }

.item-choice-panel { padding: clamp(22px,3vw,38px); }
.item-choice-grid { gap: 13px; }
.item-card { padding: clamp(17px,2vw,24px); border-radius: 18px; }
.item-card-head { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: start; }
.item-card-head h3 { font-size: clamp(1.35rem,2vw,1.8rem); line-height: 1.08; }
.item-source { margin: 6px 0 0; color: var(--gold); font-size: .66rem; font-weight: 750; overflow-wrap: anywhere; }
.usefulness { min-width: 126px; border: 1px solid rgba(243,201,107,.22); border-radius: 12px; padding: 9px 11px; background: rgba(243,201,107,.055); text-align: right; }
.usefulness span,.usefulness strong { display: block; }
.usefulness span { color: var(--gold); font-size: .51rem; font-weight: 950; letter-spacing: .09em; }
.usefulness strong { margin-top: 4px; color: #fff; font-size: .88rem; white-space: nowrap; }
.item-description { color: #ced5df !important; font-size: .76rem !important; line-height: 1.62 !important; }
.item-notes { grid-template-columns: 1fr 1fr; gap: 8px; }
.item-notes div { padding: 10px; }
.item-notes span { color: var(--gold); font-size: .5rem; font-weight: 950; letter-spacing: .08em; }
.item-notes p { margin: 5px 0 0; color: #b8c1cf; font-size: .62rem; line-height: 1.45; }
.item-card .stats-grid { margin-top: 13px; }
.item-card .button { min-height: 49px; margin-top: 16px; }

.fighter-dialog { width: min(1040px,calc(100% - 20px)); }
.fighter-detail-head { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 20px; align-items: center; }
.fighter-detail-image { width: 180px; height: 210px; border-radius: 15px; object-fit: cover; background: #202738; }
.fighter-detail-fallback { display: grid; place-items: center; color: var(--gold); font-size: 3.4rem; font-weight: 950; }
.fighter-detail-head h2 { margin: 0; font-size: clamp(2.3rem,5.6vw,5rem); line-height: .9; letter-spacing: -.06em; overflow-wrap: anywhere; }
.fighter-level { display: inline-flex; margin-top: 12px; border: 1px solid rgba(243,201,107,.24); border-radius: 999px; padding: 8px 11px; color: var(--gold); background: rgba(243,201,107,.06); font-size: .67rem; font-weight: 950; }
.fighter-detail-description { margin: 20px 0 0; color: #c7cfdb; font-size: .82rem; line-height: 1.65; }
.fighter-detail-stats { margin: 18px 0; }
.owned-item-detail { margin-top: 23px; border: 1px solid rgba(243,201,107,.18); border-radius: 18px; padding: clamp(17px,2.5vw,26px); background: linear-gradient(135deg,rgba(243,201,107,.055),rgba(255,255,255,.02)); }
.owned-item-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 15px; align-items: start; }
.owned-item-heading h3 { margin: 0; font-size: clamp(1.65rem,3.5vw,2.7rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.owned-item-heading small { display: block; margin-top: 4px; color: var(--muted); }
.owned-item-heading > strong { border-radius: 999px; padding: 8px 11px; color: #171006; background: var(--gold); font-size: .66rem; white-space: nowrap; }
.owned-item-detail > p { color: #c6cfdb; font-size: .76rem; line-height: 1.6; }
.empty-item { border-color: var(--line); background: rgba(255,255,255,.02); }

@media (max-width: 840px) {
  .item-choice-grid { grid-template-columns: 1fr; }
  .fighter-detail-head { grid-template-columns: 130px minmax(0,1fr); }
  .fighter-detail-image { width: 130px; height: 160px; }
}
@media (max-width: 620px) {
  .galaxy-backdrop { opacity: .42; }
  .item-card-head,.owned-item-heading { grid-template-columns: 1fr; }
  .usefulness { width: fit-content; min-width: 0; text-align: left; }
  .item-notes { grid-template-columns: 1fr; }
  .fighter-detail-head { grid-template-columns: 1fr; }
  .fighter-detail-image { width: 100%; height: min(48vh,360px); }
}


/* v5: fame selector and stronger cross-match variety controls */
.fame-selector { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; margin: 12px 0; padding: 13px 14px; border: 1px solid rgba(243,201,107,.18); border-radius: 14px; background: rgba(243,201,107,.035); }
.fame-copy { min-width: 0; }
.fame-copy span { display: block; color: var(--gold); font-size: .58rem; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.fame-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: .65rem; line-height: 1.42; overflow-wrap: anywhere; }
.fame-stars { display: flex; align-items: center; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.2); }
.fame-stars button { appearance: none; width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 50%; color: rgba(255,255,255,.19); background: transparent; font-size: 1.05rem; line-height: 1; cursor: pointer; transition: color .15s, background .15s, transform .15s, text-shadow .15s; }
.fame-stars button:hover { transform: translateY(-1px) scale(1.06); background: rgba(243,201,107,.08); }
.fame-stars button.active { color: #ffd772; text-shadow: 0 0 12px rgba(255,202,79,.42); }
.custom-grid.single { grid-template-columns: 1fr; }
@media (max-width: 620px) { .fame-selector { grid-template-columns: 1fr; gap: 8px; } .fame-stars { width: fit-content; } .fame-stars button { width: 34px; height: 34px; } }
