/* STARGAZER Card Battle (beta). Loaded only by game.html. Every class starts with gm- so nothing clashes with style.css.
   Wide screens: .gm-stage is drawn at 1440x900 and scaled to fit .gm-fit by game.js.
   Phones (under 700px): .gm-phone is a fluid portrait layout; the same pieces are resized below. */
.page-head .beta-tag { font-size: 14px; padding: 3px 10px; vertical-align: 14px; margin-left: 14px; text-shadow: none; }

.gm-intro { margin-bottom: 18px; }
.gm-intro p { margin: 0; color: var(--muted); max-width: 760px; }
.gm-only-phone { display: none; }
@media (max-width: 699px) { .gm-only-phone { display: inline; } }

.gm-fit { position: relative; width: 100%; aspect-ratio: 1440 / 900; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--ink); }
.gm-stage { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; overflow: hidden; }
.gm-stage, .gm-phone { background: #0d0d14; color: #f4f3f8; font-family: var(--f-body); font-size: 14px; line-height: 1.5; }
.gm-stage *, .gm-phone * { box-sizing: border-box; }
.gm-stage button, .gm-phone button { font: inherit; }

.gm-brand { font-family: var(--f-head); font-weight: 500; font-size: 18px; letter-spacing: .14em; white-space: nowrap; }
.gm-brand i { font-style: normal; color: var(--gold); }
.gm-clock { font-family: var(--f-head); font-weight: 700; font-size: 20px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.gm-topbar { height: 52px; display: flex; align-items: center; gap: 20px; padding: 0 24px; background: #08080e; border-bottom: 1px solid #2c2c3d; position: relative; z-index: 5; }

/* ---------- Arena ---------- */
.gm-arena { position: absolute; left: 0; right: 0; top: 52px; height: 540px; overflow: hidden;
  background: radial-gradient(ellipse 60% 55% at 50% 100%, rgba(29, 91, 255, .10), transparent 70%), linear-gradient(rgba(10, 10, 18, .72), rgba(10, 10, 18, .92)), url("../img/nebula.jpg") center 30% / cover no-repeat; }
.gm-crowd { position: absolute; left: 0; right: 0; height: 60px;
  background: radial-gradient(circle at 50% 100%, #06060b 0 11px, transparent 12px) 0 0 / 26px 22px repeat-x, radial-gradient(circle at 50% 100%, #0b0b14 0 10px, transparent 11px) 13px 0 / 26px 22px repeat-x; }
.gm-spot { position: absolute; top: -60px; width: 300px; height: 640px; transform-origin: 50% 0; background: linear-gradient(rgba(255, 244, 214, .20), rgba(255, 244, 214, 0) 85%); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); mix-blend-mode: screen; pointer-events: none; }
.gm-spot.l { left: 300px; animation: gm-swayL 7s ease-in-out infinite alternate; }
.gm-spot.r { right: 300px; animation: gm-swayR 8s ease-in-out infinite alternate; }
@keyframes gm-swayL { from { transform: rotate(-16deg); } to { transform: rotate(12deg); } }
@keyframes gm-swayR { from { transform: rotate(14deg); } to { transform: rotate(-12deg); } }
.gm-flash { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: 0; animation: gm-flash 3.6s linear infinite; }
@keyframes gm-flash { 0%, 92%, 100% { opacity: 0; transform: scale(1); } 94% { opacity: 1; transform: scale(3); } }
.gm-ring { position: absolute; left: 50%; top: 250px; width: 1060px; margin-left: -530px; height: 300px; perspective: 1100px; }
.gm-mat { position: absolute; left: 0; right: 0; top: 0; height: 360px; transform: rotateX(62deg); transform-origin: 50% 0; background: #1a1a29; border: 2px solid #2f2f45; display: grid; place-items: center; }
.gm-mat span { font-family: var(--f-head); font-weight: 600; font-size: 120px; letter-spacing: .14em; color: rgba(255, 255, 255, .05); }
.gm-rope { position: absolute; left: 0; right: 0; height: 3px; }
.gm-post { position: absolute; top: -80px; width: 14px; height: 96px; }
.gm-apron { position: absolute; left: 50%; bottom: 0; width: 1180px; margin-left: -590px; height: 34px; background: #11111b; border-top: 3px solid #2f2f45; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; font-family: var(--f-head); font-size: 12px; letter-spacing: .3em; color: #6d6c85; }

.gm-fighter { position: absolute; top: 170px; width: 230px; }
.gm-fighter.you { left: 330px; }
.gm-fighter.opp { left: 880px; }
.gm-idle { animation: gm-idle 3.2s ease-in-out infinite; }
.gm-idle.b { animation-delay: -1.6s; }
@keyframes gm-idle { 50% { transform: translateY(-6px); } }
.gm-portrait { width: 100%; aspect-ratio: 230 / 312; border: 3px solid; background: #171722; position: relative; overflow: hidden; }
.gm-portrait img, .gm-ri-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.gm-portrait span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; background: linear-gradient(transparent, rgba(8, 8, 14, .92)); font-family: var(--f-head); font-weight: 700; font-size: 22px; letter-spacing: .06em; }
.gm-shadow { display: block; width: 87%; height: 18px; margin: 4px auto 0; border-radius: 50%; background: rgba(0, 0, 0, .55); }

.gm-lunge-r { animation: gm-lungeR .62s cubic-bezier(.3, .7, .2, 1); }
.gm-lunge-l { animation: gm-lungeL .62s cubic-bezier(.3, .7, .2, 1); }
@keyframes gm-lungeR { 35% { transform: translateX(170px) scale(1.07) rotate(3deg); } }
@keyframes gm-lungeL { 35% { transform: translateX(-170px) scale(1.07) rotate(-3deg); } }
.gm-hit { animation: gm-hit .55s ease-out .18s; }
@keyframes gm-hit { 10% { transform: translateX(16px) rotate(2deg); filter: brightness(2.2) saturate(0); } 25% { transform: translateX(-12px); } 45% { transform: translateX(8px); } 65% { transform: translateX(-4px); } }
.gm-quake { animation: gm-quake .5s ease-out .2s; }
@keyframes gm-quake { 15% { transform: translate(-6px, 4px); } 35% { transform: translate(5px, -3px); } 55% { transform: translate(-3px, 2px); } }

.gm-runin { position: absolute; top: 150px; left: 90px; width: 200px; opacity: 0; pointer-events: none; z-index: 2; }
.gm-runin[data-side="opp"] { left: 1150px; }
.gm-ri-card { width: 100%; aspect-ratio: 200 / 272; border: 3px solid; background: #171722; position: relative; overflow: hidden; }
.gm-ri-unit { position: absolute; left: 0; right: 0; top: 0; padding: 3px 10px; color: #0d0d14; font-family: var(--f-head); font-weight: 800; font-size: 12px; letter-spacing: .16em; }
.gm-ri-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 10px 7px; background: linear-gradient(transparent, rgba(8, 8, 14, .92)); font-family: var(--f-head); font-weight: 700; font-size: 18px; letter-spacing: .06em; }
.gm-ri-l { animation: gm-riL 1.5s cubic-bezier(.2, .8, .2, 1); }
.gm-ri-r { animation: gm-riR 1.5s cubic-bezier(.2, .8, .2, 1); }
@keyframes gm-riL { 0% { opacity: 0; transform: translateX(-420px); } 18% { opacity: 1; transform: none; } 30% { transform: translateX(80px) rotate(3deg); } 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(-420px); } }
@keyframes gm-riR { 0% { opacity: 0; transform: translateX(420px); } 18% { opacity: 1; transform: none; } 30% { transform: translateX(-80px) rotate(-3deg); } 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(420px); } }

/* Hit effects sit over whoever is being hit (data-side) */
.gm-burst { position: absolute; top: 150px; left: 865px; width: 260px; height: 260px; opacity: 0; pointer-events: none; }
.gm-burst[data-side="you"], .gm-dmg[data-side="you"] { left: 315px; }
.gm-burst.go { animation: gm-burst .7s ease-out .18s; }
@keyframes gm-burst { 0% { opacity: 0; transform: scale(.3); } 15% { opacity: 1; transform: scale(1.05) rotate(8deg); } 100% { opacity: 0; transform: scale(1.5) rotate(20deg); } }
.gm-dmg { position: absolute; top: 150px; left: 865px; width: 260px; text-align: center; font-family: var(--f-head); font-style: italic; font-weight: 900; font-size: 76px; color: #fff; -webkit-text-stroke: 2px #0d0d14; paint-order: stroke; opacity: 0; pointer-events: none; }
.gm-dmg.go { animation: gm-dmg 1.1s ease-out .2s; }
@keyframes gm-dmg { 0% { opacity: 0; transform: translateY(20px) scale(.5); } 15% { opacity: 1; transform: scale(1.25); } 70% { opacity: 1; transform: translateY(-46px); } 100% { opacity: 0; transform: translateY(-80px); } }
.gm-banner { position: absolute; left: 0; right: 0; top: 118px; display: flex; justify-content: center; opacity: 0; pointer-events: none; z-index: 3; }
.gm-banner.go { animation: gm-banner 1.3s cubic-bezier(.2, .8, .2, 1); }
@keyframes gm-banner { 0% { opacity: 0; transform: translateX(-60%) skewX(-12deg); } 18% { opacity: 1; transform: none; } 78% { opacity: 1; transform: translateX(2%); } 100% { opacity: 0; transform: translateX(50%) skewX(-12deg); } }
.gm-ban-box { display: flex; align-items: stretch; background: #0d0d14; border: 1px solid #3a3a4f; transform: skewX(-12deg); }
.gm-ban-box > i { width: 14px; }
.gm-ban-box > div { padding: 10px 30px 12px; transform: skewX(12deg); }
.gm-ban-who { font-family: var(--f-head); font-size: 12px; letter-spacing: .3em; color: #a7a6b8; }
.gm-ban-name { font-family: var(--f-head); font-style: italic; font-weight: 900; font-size: 46px; line-height: 1; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }

/* ---------- HUD ---------- */
.gm-hud { position: absolute; top: 16px; width: 440px; background: rgba(13, 13, 20, .9); border: 1px solid #2c2c3d; padding: 14px 16px; display: flex; gap: 14px; }
.gm-hud.you { left: 20px; border-left: 5px solid #e5002d; }
.gm-hud.opp { right: 20px; border-right: 5px solid #1d5bff; flex-direction: row-reverse; }
.gm-hud > img { width: 58px; height: 58px; object-fit: cover; object-position: 50% 12%; display: block; flex: none; }
.gm-hud-main { flex: 1; min-width: 0; }
.gm-hud-name { display: flex; align-items: baseline; gap: 10px; }
.gm-hud-name b { font-family: var(--f-head); font-weight: 700; font-size: 20px; letter-spacing: .04em; white-space: nowrap; }
.gm-jp { font-family: var(--f-jp); font-weight: 700; font-size: 11px; color: #a7a6b8; }
.gm-unit { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.gm-unit i { width: 8px; height: 8px; }
.gm-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.gm-row + .gm-row { margin-top: 4px; }
.gm-k { font-family: var(--f-head); font-size: 10px; letter-spacing: .2em; color: #a7a6b8; width: 58px; }
.gm-hud.opp .gm-k { text-align: right; }
.gm-bar { flex: 1; height: 12px; background: #20202e; position: relative; overflow: hidden; }
.gm-bar.thin { height: 6px; }
.gm-hud.opp .gm-bar { transform: scaleX(-1); }
.gm-bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.gm-hp { transition: width .6s cubic-bezier(.2, .8, .2, 1) .2s; }
.gm-hp-lag { background: #fff; transition: width 1s ease .9s; }
.gm-heat { background: var(--gold); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.gm-n { font-family: var(--f-head); font-weight: 700; font-size: 16px; width: 30px; font-variant-numeric: tabular-nums; }
.gm-hud.you .gm-n { text-align: right; }
.gm-n.small { font-size: 12px; color: var(--gold); }
.gm-backs { display: flex; justify-content: flex-end; gap: 4px; margin-top: 8px; }
.gm-backs i { width: 18px; height: 26px; background: #20202e; border: 1px solid #3a3a4f; border-top: 3px solid #1d5bff; }

.gm-center { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); text-align: center; }
.gm-center .k { font-family: var(--f-head); font-size: 11px; letter-spacing: .3em; color: #a7a6b8; }
.gm-turn { font-family: var(--f-head); font-weight: 700; font-size: 44px; line-height: 1; }
.gm-phase { margin-top: 6px; padding: 3px 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; border-radius: 2px; white-space: nowrap; }
.gm-ref { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-head); font-weight: 700; font-size: 10.5px; letter-spacing: .16em; white-space: nowrap; }
.gm-ref i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.gm-overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; animation: gm-fade .4s ease-out; z-index: 4; }
.gm-overlay[hidden] { display: none; }
@keyframes gm-fade { from { opacity: 0; } }
.gm-count-jp { font-family: var(--f-jp); font-weight: 900; font-size: 16px; letter-spacing: .3em; color: var(--gold); }
.gm-count-k { font-family: var(--f-head); font-size: 13px; letter-spacing: .4em; color: #a7a6b8; margin-top: 4px; }
.gm-count-num { font-family: var(--f-head); font-style: italic; font-weight: 900; font-size: 220px; line-height: 1; white-space: nowrap; }
.gm-count-num.long { font-size: 150px; }
.gm-slam { animation: gm-slam .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes gm-slam { 0% { opacity: 0; transform: scale(3.2); } 60% { opacity: 1; transform: scale(.92); } 100% { transform: scale(1); } }

.gm-win { background: rgba(8, 8, 14, .9); z-index: 20; }
.gm-win-box { width: 760px; max-width: 100%; background: #171722; border: 1px solid #2c2c3d; display: flex; text-align: left; }
.gm-win-box > img { width: 280px; height: 380px; object-fit: cover; object-position: 50% 15%; display: block; flex: none; }
.gm-win-text { padding: 34px 36px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gm-win-jp { font-family: var(--f-jp); font-weight: 900; font-size: 14px; letter-spacing: .2em; color: var(--gold); }
.gm-win-name { font-family: var(--f-head); font-weight: 800; font-size: 60px; line-height: .95; letter-spacing: .02em; }
.gm-rb { display: block; height: 4px; width: 120px; margin: 10px 0; background: linear-gradient(90deg, #e5002d 0 50%, #1d5bff 50% 100%); }
.gm-win-btns { display: flex; gap: 10px; margin: 14px 0 4px; flex-wrap: wrap; }
.gm-win-btns .gm-ctl { padding: 0 18px; font-size: 12.5px; }
.gm-win-btns #gm-rematch { flex: 1 1 100%; min-height: 54px; font-size: 16px; }
.gm-win-btns .gm-ctl:not(#gm-rematch) { flex: 1 1 0; }
.gm-win-btns .gm-ctl:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- Hand and controls (wide) ---------- */
.gm-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 308px; background: #0d0d14; border-top: 1px solid #2c2c3d; display: flex; }
.gm-deckcol { width: 150px; padding: 24px 0 0 24px; display: flex; flex-direction: column; gap: 14px; }
.gm-deckpile { position: relative; width: 92px; height: 128px; }
.gm-deckpile > i, .gm-deckpile > div { position: absolute; width: 84px; height: 120px; background: #20202e; border: 1px solid #3a3a4f; border-radius: 8px; }
.gm-deckpile > i:nth-child(1) { left: 8px; top: 8px; }
.gm-deckpile > i:nth-child(2) { left: 4px; top: 4px; }
.gm-deckpile > div { left: 0; top: 0; background: #171722; display: grid; place-items: center; overflow: hidden; }
.gm-deckpile > div span { font-family: var(--f-head); font-weight: 600; font-size: 11px; letter-spacing: .14em; transform: rotate(-90deg); white-space: nowrap; }
.gm-deckpile > div b { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #e5002d 0 50%, #1d5bff 50% 100%); }
.gm-deckn { font-family: var(--f-head); font-size: 11px; letter-spacing: .2em; color: #a7a6b8; }
.gm-deckn b { color: #fff; font-size: 16px; }
.gm-hand { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding-top: 40px; min-width: 0; }
.gm-slot { margin: 0 -1px; }
.gm-draw { animation: gm-draw .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes gm-draw { from { opacity: 0; transform: translateY(90px) rotate(8deg); } }
.gm-card { transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; cursor: pointer; border: 1px solid #3a3a4f; background: #171722; color: #f4f3f8; padding: 0; text-align: left; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; width: 140px; height: 214px; position: relative; }
.gm-card:hover:not(:disabled), .gm-card:focus-visible { transform: translateY(-28px) scale(1.06); box-shadow: 0 22px 40px rgba(0, 0, 0, .6); outline: none; }
.gm-card:focus-visible { box-shadow: 0 0 0 3px var(--gold), 0 22px 40px rgba(0, 0, 0, .6); }
.gm-card:disabled { cursor: not-allowed; }
.gm-card:disabled .gm-art { filter: grayscale(.85) brightness(.55); }
.gm-ready { animation: gm-ready 1.6s ease-in-out infinite; }
@keyframes gm-ready { 50% { box-shadow: 0 0 0 3px #f2c75c; } }
.gm-cost { position: absolute; top: 7px; left: 7px; width: 28px; height: 28px; display: grid; place-items: center; background: #0d0d14; border: 2px solid #f2c75c; transform: rotate(45deg); z-index: 1; }
.gm-cost b { transform: rotate(-45deg); font-family: var(--f-head); font-weight: 800; font-size: 14px; color: #f2c75c; }
.gm-tier { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 1px 6px; font-family: var(--f-head); font-weight: 700; font-size: 9px; letter-spacing: .14em; border-radius: 2px; }
.gm-art { width: 100%; height: 92px; object-fit: cover; object-position: 50% 18%; display: block; }
.gm-std { position: relative; background: #1d1d2a; overflow: hidden; display: block; }
.gm-std::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, currentColor 0 2px, transparent 2px 14px); opacity: .28; }
.gm-std b { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-family: var(--f-head); font-weight: 800; font-size: 20px; letter-spacing: .12em; }
.gm-stripe { height: 4px; display: block; }
.gm-cbody { padding: 7px 10px 9px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.gm-ctype { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.gm-ctype i { width: 7px; height: 7px; }
.gm-cname { font-family: var(--f-head); font-weight: 700; font-size: 14px; line-height: 1.12; text-transform: uppercase; }
.gm-cnote { font-size: 10.5px; color: #a7a6b8; line-height: 1.35; }
.gm-cnum { margin-top: auto; display: flex; justify-content: space-between; font-family: var(--f-head); font-size: 10.5px; letter-spacing: .1em; color: #a7a6b8; }
.gm-cnum b { color: #fff; font-size: 13px; }
.gm-cnum .h { color: var(--gold); }

.gm-ctlcol { width: 250px; padding: 22px 20px 0; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid #2c2c3d; }
.gm-logcol { width: 300px; padding: 22px 24px 0 20px; border-left: 1px solid #2c2c3d; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gm-k2 { font-family: var(--f-head); font-size: 11px; letter-spacing: .24em; color: #a7a6b8; }
.gm-mom { font-family: var(--f-head); font-weight: 700; font-size: 40px; line-height: 1; color: var(--gold); }
.gm-max { font-family: var(--f-head); font-size: 18px; color: #a7a6b8; }
.gm-hint { font-size: 11.5px; color: #8a89a3; line-height: 1.45; }
.gm-log { display: flex; flex-direction: column; gap: 8px; }
.gm-ctl { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 999px; border: 1px solid #fff; background: transparent; color: #fff; font-family: var(--f-head); font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.gm-ctl:hover:not(:disabled) { background: #fff; color: #0d0d14; }
.gm-ctl:disabled { opacity: .35; cursor: not-allowed; }
.gm-ctl.red { background: var(--cta); border-color: var(--cta); }
.gm-ctl.red:hover:not(:disabled) { background: #fff; color: var(--cta); border-color: #fff; }
.gm-pips { display: flex; gap: 7px; flex-wrap: wrap; }
.gm-pips i { width: 12px; height: 12px; transform: rotate(45deg); border: 1.5px solid #3a3a4f; }
.gm-pips i.max { border-color: var(--gold); }
.gm-pips i.on { background: var(--gold); border-color: var(--gold); }
.gm-log-row { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.45; padding-bottom: 7px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.gm-log-row b { font-family: var(--f-head); font-size: 11px; color: #8a89a3; flex: none; width: 30px; }
.gm-log-row i { width: 3px; flex: none; }

/* ---------- Phone layout ---------- */
.gm-phone { position: relative; max-width: 520px; margin: 0 auto; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.gm-p-top { display: flex; align-items: center; gap: 10px; padding: 0 2px 0 12px; min-height: 44px; background: #08080e; border-bottom: 1px solid #2c2c3d; }
.gm-p-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: #fff; cursor: pointer; border-radius: 50%; }
.gm-p-icon:hover { background: rgba(255, 255, 255, .08); }
/* Compact stat panels: thick bar = stamina, thin gold bar = crowd heat */
.gm-phone .gm-hud { position: static; width: auto; padding: 6px 10px; gap: 10px; align-items: center; border: 0; border-bottom: 1px solid #2c2c3d; background: #12121b; }
.gm-phone .gm-hud.you { border-left: 4px solid #e5002d; border-top: 1px solid #2c2c3d; }
.gm-phone .gm-hud.opp { border-right: 4px solid #1d5bff; }
.gm-phone .gm-hud > img { width: 38px; height: 38px; }
.gm-phone .gm-hud-name { gap: 8px; line-height: 1.2; }
.gm-phone .gm-hud-name b { font-size: 14px; }
.gm-phone .gm-jp { display: none; }
.gm-phone .gm-row { margin-top: 3px; gap: 8px; }
.gm-phone .gm-row + .gm-row { margin-top: 2px; }
.gm-phone .gm-k { display: none; }
.gm-phone .gm-bar { height: 9px; }
.gm-phone .gm-bar.thin { height: 4px; }
.gm-phone .gm-n { font-size: 13px; width: 24px; line-height: 1.1; }
.gm-phone .gm-n.small { font-size: 10px; }
.gm-phone .gm-backs { display: none; }

/* The arena shrinks on short screens so the ring and your hand fit on screen together. */
.gm-phone .gm-arena { position: relative; top: auto; height: clamp(190px, 28vh, 270px); }
.gm-phone .gm-crowd { height: 40px; background-size: 16px 14px, 16px 14px; background-position: 0 0, 8px 0;
  background-image: radial-gradient(circle at 50% 100%, #06060b 0 7px, transparent 8px), radial-gradient(circle at 50% 100%, #0b0b14 0 6px, transparent 7px); }
.gm-phone .gm-spot { left: calc(50% - 75px); top: -30px; width: 150px; height: 330px; animation: gm-swayP 6s ease-in-out infinite alternate; }
@keyframes gm-swayP { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
.gm-phone .gm-ring { left: 14px; right: 14px; top: 50%; width: auto; margin: 0; height: 160px; perspective: 600px; }
.gm-phone .gm-mat { height: 220px; transform: rotateX(60deg); }
.gm-phone .gm-rope { height: 2px; }
.gm-phone .gm-post { top: -44px; width: 8px; height: 52px; }
.gm-phone .gm-fighter { top: auto; bottom: 12px; width: min(31%, calc((28vh - 60px) * .74)); }
.gm-phone .gm-fighter.you { left: 9%; }
.gm-phone .gm-fighter.opp { left: auto; right: 9%; }
.gm-phone .gm-portrait { border-width: 2px; }
.gm-phone .gm-portrait span { font-size: 12px; padding: 14px 6px 5px; letter-spacing: .04em; }
.gm-phone .gm-shadow { height: 10px; }
.gm-phone .gm-lunge-r { animation-name: gm-lungeRp; }
.gm-phone .gm-lunge-l { animation-name: gm-lungeLp; }
@keyframes gm-lungeRp { 35% { transform: translateX(60px) scale(1.06) rotate(3deg); } }
@keyframes gm-lungeLp { 35% { transform: translateX(-60px) scale(1.06) rotate(-3deg); } }
.gm-phone .gm-runin { top: auto; bottom: 20px; left: 1%; width: min(27%, calc((31vh - 50px) * .74)); }
.gm-phone .gm-runin[data-side="opp"] { left: auto; right: 1%; }
.gm-phone .gm-ri-unit { font-size: 8.5px; padding: 2px 5px; letter-spacing: .1em; }
.gm-phone .gm-ri-name { font-size: 11px; padding: 12px 5px 4px; }
.gm-phone .gm-ri-l { animation-name: gm-riLp; }
.gm-phone .gm-ri-r { animation-name: gm-riRp; }
@keyframes gm-riLp { 0% { opacity: 0; transform: translateX(-160px); } 18% { opacity: 1; transform: none; } 30% { transform: translateX(30px) rotate(3deg); } 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(-160px); } }
@keyframes gm-riRp { 0% { opacity: 0; transform: translateX(160px); } 18% { opacity: 1; transform: none; } 30% { transform: translateX(-30px) rotate(-3deg); } 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(160px); } }
.gm-phone .gm-burst { top: auto; bottom: 30px; width: 130px; height: 130px; left: 75.5%; margin-left: -65px; }
.gm-phone .gm-dmg { top: auto; bottom: 60px; width: 140px; left: 75.5%; margin-left: -70px; font-size: 44px; }
.gm-phone .gm-burst[data-side="you"], .gm-phone .gm-dmg[data-side="you"] { left: 24.5%; }
.gm-phone .gm-banner { top: 34px; }
.gm-phone .gm-ban-box > i { width: 9px; }
.gm-phone .gm-ban-box > div { padding: 5px 16px 7px; }
.gm-phone .gm-ban-who { font-size: 9px; }
.gm-phone .gm-ban-name { font-size: 22px; }
.gm-phone .gm-count-jp { font-size: 13px; }
.gm-phone .gm-count-k { font-size: 10px; }
.gm-phone .gm-count-num { font-size: 110px; }
.gm-phone .gm-count-num.long { font-size: 52px; }

.gm-p-strip { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 10px 14px; background: linear-gradient(rgba(8, 8, 14, .92) 55%, transparent); font-family: var(--f-head); font-size: 11px; letter-spacing: .14em; color: #a7a6b8; flex-wrap: wrap; }
.gm-p-strip b { color: #fff; font-size: 15px; }
.gm-p-strip .gm-phase, .gm-p-strip .gm-ref { margin-top: 0; }
.gm-p-strip .gm-phase { padding: 2px 8px; font-size: 10px; letter-spacing: .08em; }
.gm-p-handhead { display: flex; justify-content: space-between; padding: 10px 12px 0; font-family: var(--f-head); font-size: 10.5px; letter-spacing: .2em; color: #a7a6b8; }
.gm-p-handhead b { color: #fff; }
.gm-p-hand { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 8px 10px 4px; }
.gm-pc { position: relative; width: 100%; min-height: 102px; padding: 0; background: #171722; color: #f4f3f8; border: 1px solid #3a3a4f; border-radius: 9px; overflow: hidden; display: flex; flex-direction: column; text-align: left; cursor: pointer; transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.gm-pc.sel { transform: translateY(-6px); box-shadow: 0 0 0 2px var(--gold), 0 10px 20px rgba(0, 0, 0, .5); }
.gm-pc.off .gm-pc-art { filter: grayscale(.85) brightness(.55); }
.gm-pc.off .gm-pc-name { color: #8a89a3; }
.gm-pc-cost { position: absolute; top: 4px; left: 4px; z-index: 1; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 4px; background: #0d0d14; border: 1.5px solid var(--gold); border-radius: 4px; font-family: var(--f-head); font-weight: 800; font-size: 11px; color: var(--gold); }
.gm-pc-art { width: 100%; height: 50px; object-fit: cover; object-position: 50% 15%; display: block; }
.gm-pc-art.gm-std b { font-size: 9px; bottom: 4px; letter-spacing: .06em; }
.gm-pc-name { padding: 5px 3px 6px; font-family: var(--f-head); font-weight: 700; font-size: 9px; line-height: 1.15; letter-spacing: -.01em; text-transform: uppercase; overflow-wrap: break-word; }
.gm-p-detail { display: flex; align-items: center; gap: 12px; min-height: 62px; margin: 6px 10px 0; padding: 10px 12px; background: #171722; border: 1px solid #2c2c3d; border-radius: 10px; }
.gm-p-detail .gm-ctl { flex: none; min-width: 84px; padding: 0 16px; }
.gm-p-tip { margin: 0; font-size: 12.5px; color: #a7a6b8; }
.gm-p-dtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gm-p-dtags { display: flex; gap: 8px; align-items: center; }
.gm-p-dname { font-family: var(--f-head); font-weight: 700; font-size: 16px; line-height: 1.15; text-transform: uppercase; }
.gm-p-dnote { font-size: 12px; color: #d8d7e3; line-height: 1.4; }
.gm-p-ctl { display: flex; align-items: center; gap: 8px; padding: 10px; }
.gm-p-ctl > div { flex: 1; min-width: 0; }
.gm-p-ctl .gm-mom { font-size: 26px; }
.gm-p-ctl .gm-max { font-size: 14px; }
.gm-p-ctl .gm-pips { gap: 4px; margin-top: 4px; }
.gm-p-ctl .gm-pips i { width: 8px; height: 8px; border-width: 1px; }
.gm-p-ctl .gm-ctl { padding: 0 14px; font-size: 12px; letter-spacing: .1em; }
.gm-p-log { border-top: 1px solid #2c2c3d; }
.gm-p-log summary { padding: 12px; min-height: 44px; cursor: pointer; font-family: var(--f-head); font-weight: 600; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.gm-p-log .gm-log { padding: 0 12px 12px; }
.gm-phone .gm-win { align-items: start; padding-top: 40px; }
.gm-phone .gm-win-box { flex-direction: column; width: calc(100% - 24px); }
.gm-phone .gm-win-box > img { width: 100%; height: 220px; }
.gm-phone .gm-win-text { padding: 20px; }
.gm-phone .gm-win-name { font-size: 44px; }
@media (max-width: 360px) {
  .gm-p-ctl .gm-ctl { padding: 0 10px; }
  .gm-p-hand { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .gm-pc-name { font-size: 8px; padding: 4px 2px 5px; }
  .gm-p-strip { gap: 6px; font-size: 9.5px; letter-spacing: .06em; padding-left: 4px; padding-right: 4px; }
  .gm-p-strip .gm-phase { font-size: 9px; padding: 2px 6px; }
  .gm-p-strip .gm-ref { font-size: 9px; letter-spacing: .08em; }
}

/* ---------- Finisher button (always in reach; lights up at full heat) ---------- */
.gm-finbtn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 14px; border-radius: 10px; border: 1px solid #b98a2c; background: #171722; color: #a7a6b8; text-align: left; cursor: not-allowed; }
.gm-finbtn .gm-fin-star { font-size: 18px; color: #b98a2c; }
.gm-fin-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.gm-fin-text b { font-family: var(--f-head); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #d8d7e3; line-height: 1.15; }
.gm-fin-text span { font-family: var(--f-head); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.gm-finbtn.ready { cursor: pointer; background: linear-gradient(180deg, #ffe28f, #c99a35); border-color: #f2c75c; color: #2a1d00; animation: gm-ready 1.6s ease-in-out infinite; }
.gm-finbtn.ready .gm-fin-star, .gm-finbtn.ready .gm-fin-text b { color: #2a1d00; }
.gm-finbtn.ready:hover { filter: brightness(1.08); }
.gm-finbtn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gm-ctlcol { gap: 10px; }
.gm-empty { background: #12121b; border: 1px dashed #2c2c3d; }
.gm-p-handhead { align-items: center; gap: 10px; }
.gm-p-handhead .gm-finbtn { width: auto; max-width: 62%; min-height: 44px; padding: 4px 10px; gap: 8px; }
.gm-p-handhead .gm-fin-text b { font-size: 11.5px; }
.gm-p-handhead .gm-fin-text span { font-size: 9.5px; }

/* ---------- Wrestler select ---------- */
.gm-loading { padding: 40px 0; color: var(--muted); }
.gm-select { display: flex; flex-direction: column; gap: 18px; }
.gm-vs { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; background: var(--slate); border: 1px solid var(--line); border-radius: 16px; }
.gm-vs-slot { flex: 1 1 240px; display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 10px; background: var(--slate-2); border: 2px solid transparent; border-radius: 12px; color: #fff; text-align: left; cursor: pointer; }
.gm-vs-slot[data-step="you"] { border-left: 5px solid #e5002d; }
.gm-vs-slot[data-step="opp"] { border-left: 5px solid #1d5bff; }
.gm-vs-slot.on { border-color: var(--gold); }
.gm-vs-slot img, .gm-vs-empty { width: 64px; height: 64px; object-fit: cover; object-position: 50% 15%; border-radius: 8px; flex: none; background: #12121b; }
.gm-vs-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gm-vs-k { font-family: var(--f-head); font-size: 10.5px; letter-spacing: .2em; color: var(--muted); }
.gm-vs-text b { font-family: var(--f-head); font-weight: 700; font-size: 22px; line-height: 1.1; text-transform: uppercase; }
.gm-vs-x { font-family: var(--f-head); font-style: italic; font-weight: 900; font-size: 30px; color: var(--gold); }
.gm-vs-btns { display: flex; gap: 10px; flex-wrap: wrap; flex: 1 1 100%; justify-content: flex-end; }
.gm-vs-btns .gm-ctl { padding: 0 22px; }
.gm-sel-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.gm-sel-head b { font-family: var(--f-head); font-weight: 700; font-size: 26px; letter-spacing: .03em; text-transform: uppercase; }
.gm-sel-head span { color: var(--muted); font-size: 13px; }
.gm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gm-tile { position: relative; display: flex; flex-direction: column; padding: 0; background: var(--slate-2); border: 2px solid transparent; border-radius: 12px; overflow: hidden; color: #fff; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s; }
.gm-tile:hover:not(:disabled) { transform: translateY(-4px); border-color: var(--line-2); }
.gm-tile.on { border-color: var(--gold); }
.gm-tile.taken img { filter: grayscale(.7) brightness(.7); }
.gm-tile:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gm-tile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; display: block; background: #12121b; }
.gm-tile-body { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px 11px; }
.gm-tile-body b { font-family: var(--f-head); font-weight: 700; font-size: 16px; line-height: 1.15; text-transform: uppercase; }
.gm-tile-fin { font-size: 11.5px; color: var(--gold); line-height: 1.3; }
.gm-tile-taken { position: absolute; top: 8px; right: 8px; padding: 1px 7px; border-radius: 2px; background: #0d0d14; font-family: var(--f-head); font-weight: 700; font-size: 10px; letter-spacing: .14em; }
@media (max-width: 699px) {
  .gm-vs { padding: 10px; gap: 8px; }
  .gm-vs-slot { flex-basis: 100%; min-height: 64px; }
  .gm-vs-slot img, .gm-vs-empty { width: 48px; height: 48px; }
  .gm-vs-text b { font-size: 17px; }
  .gm-vs-x { display: none; }
  .gm-vs-btns .gm-ctl { flex: 1; padding: 0 10px; font-size: 11.5px; letter-spacing: .06em; white-space: nowrap; }
  .gm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .gm-tile-body { padding: 6px 7px 8px; }
  .gm-tile-body b { font-size: 12px; }
  .gm-tile-body .gm-unit { font-size: 9px !important; }
  .gm-tile-fin { font-size: 10px; }
  .gm-sel-head b { font-size: 20px; }
}

/* ---------- Saved progress ---------- */
.gm-prog { background: var(--slate); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.gm-prog-top { display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; padding: 14px 18px; }
.gm-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.gm-stats div { display: flex; flex-direction: column; }
.gm-stats b { font-family: var(--f-head); font-weight: 700; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gm-stats div:first-child b { color: var(--gold); }
.gm-recent { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 0 auto; padding: 0; list-style: none; }
.gm-recent li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; background: var(--slate-2); border-radius: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.gm-recent b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 3px; font-family: var(--f-head); font-size: 11px; color: #fff; background: #3a3a4f; }
.gm-recent li.w b { background: var(--cta); }
.gm-prog-empty { margin: 0 0 0 auto; font-size: 13px; color: var(--muted); }
.gm-prog-more { border-top: 1px solid var(--line); }
.gm-prog-more summary { padding: 12px 18px; min-height: 44px; cursor: pointer; font-family: var(--f-head); font-weight: 600; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.gm-prog-more summary:hover { background: rgba(255, 255, 255, .04); }
.gm-prog-note { margin: 0 18px 10px; font-size: 13px; color: var(--muted); }
.gm-coll { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0 18px 16px; list-style: none; }
.gm-cc { display: flex; align-items: center; gap: 8px; padding: 6px; background: var(--slate-2); border: 1px solid var(--line); border-radius: 8px; font-size: 11.5px; color: var(--dim); }
.gm-cc img { width: 36px; height: 36px; object-fit: cover; object-position: 50% 15%; border-radius: 4px; flex: none; filter: grayscale(1) brightness(.45); }
.gm-cc span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.gm-cc b { font-family: var(--f-head); font-weight: 700; font-size: 12px; text-transform: uppercase; color: var(--muted); }
.gm-cc.got { border-color: #b98a2c; color: #d8d7e3; }
.gm-cc.got img { filter: none; }
.gm-cc.got b { color: var(--gold); }
.gm-acc { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 0; padding: 0 18px 16px; list-style: none; }
.gm-acc li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; background: var(--slate-2); border-radius: 8px; font-size: 12px; color: var(--dim); }
.gm-acc i { width: 10px; height: 10px; margin-top: 4px; border: 1.5px solid #3a3a4f; flex: none; }
.gm-acc span { display: flex; flex-direction: column; line-height: 1.35; }
.gm-acc b { font-family: var(--f-head); font-weight: 700; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.gm-acc li.got { color: #d8d7e3; }
.gm-acc li.got i { background: var(--gold); border-color: var(--gold); }
.gm-acc li.got b { color: #fff; }
.gm-prog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 18px 16px; font-size: 12px; color: var(--dim); }
.gm-reset { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-family: var(--f-head); font-weight: 600; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.gm-reset:hover { border-color: #fff; color: #fff; }
.gm-reset.armed { border-color: var(--red-2); background: var(--red); color: #fff; }
.gm-tile-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 2px; font-size: 11px; color: var(--muted); }
.gm-tile-meta .gm-got { color: var(--gold); }
.gm-win-record { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.gm-unlocks { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.gm-unlocks li { display: flex; flex-direction: column; padding: 8px 12px; background: #20202e; border-left: 3px solid var(--gold); font-size: 12px; color: #d8d7e3; animation: gm-fade .5s ease-out both; }
.gm-unlocks li:nth-child(2) { animation-delay: .15s; }
.gm-unlocks li:nth-child(3) { animation-delay: .3s; }
.gm-unlocks li:nth-child(n+4) { animation-delay: .45s; }
.gm-unlocks b { font-family: var(--f-head); font-weight: 700; font-size: 13px; letter-spacing: .03em; color: var(--gold); text-transform: uppercase; }
.gm-unlocks li.acc { border-left-color: #fff; }
.gm-unlocks li.acc b { color: #fff; }
.gm-win-box > img { height: auto; min-height: 380px; align-self: stretch; }
.gm-win-text { max-height: 820px; overflow-y: auto; }
@media (max-width: 699px) {
  .gm-prog-top { padding: 12px; }
  .gm-stats { gap: 14px; }
  .gm-stats b { font-size: 18px; }
  .gm-recent, .gm-prog-empty { margin-left: 0; }
  .gm-coll { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 12px 12px; }
  .gm-acc { padding: 0 12px 12px; }
  .gm-prog-more summary { padding: 12px; }
  .gm-prog-note, .gm-prog-foot { margin-left: 12px; margin-right: 12px; padding-left: 0; padding-right: 0; }
  .gm-tile-meta { font-size: 9.5px; }
  .gm-phone .gm-win { overflow-y: auto; padding-bottom: 20px; }
  .gm-phone .gm-win-box > img { height: 150px; min-height: 0; }
  .gm-win-text { max-height: none; }
  .gm-win-btns .gm-ctl:not(#gm-rematch) { padding: 0 8px; font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
}

/* ---------- Mode tabs ---------- */
.gm-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.gm-tab { flex: 1 1 220px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 10px 16px; border: 1px solid var(--line); border-bottom: 3px solid transparent; border-radius: 12px; background: var(--slate); color: #fff; text-align: left; cursor: pointer; font-family: var(--f-head); font-weight: 700; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
.gm-tab span { font-family: var(--f-body); font-weight: 400; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.gm-tab:hover { border-color: var(--line-2); }
.gm-tab.on { border-bottom-color: var(--gold); background: var(--slate-2); }
.gm-tab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gm-live { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 3px; background: var(--red); color: #fff; font-style: normal; font-size: 10px; letter-spacing: .14em; vertical-align: 3px; }

/* ---------- Tag League screens ---------- */
.gm-lg-head { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: flex-end; padding: 16px 18px; background: var(--slate-2); border-left: 5px solid #8b5cf6; }
.gm-lg-head > div { display: flex; flex-direction: column; }
.gm-lg-head b { font-family: var(--f-head); font-weight: 700; font-size: 24px; line-height: 1.1; text-transform: uppercase; }
.gm-lg-head span { font-family: var(--f-jp); font-weight: 700; font-size: 12px; letter-spacing: .06em; margin-top: 4px; }
.gm-lg-head p { flex: 1 1 360px; margin: 0; font-size: 13px; color: var(--muted); }
.gm-linkbtn { margin-left: auto; min-height: 44px; padding: 0 14px; border: 0; background: none; color: var(--gold); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.gm-blk h4 { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; font-family: var(--f-head); font-weight: 600; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; }
.gm-blk h4 i { width: 10px; height: 10px; }
.gm-blk h4 i.red { background: #e5002d; }
.gm-blk h4 i.blue { background: #1d5bff; }
.gm-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.gm-team { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px 8px 8px; background: var(--slate-2); border: 2px solid transparent; border-radius: 12px; color: #fff; text-align: left; cursor: pointer; }
.gm-team:hover { border-color: var(--line-2); }
.gm-team.on { border-color: var(--gold); }
.gm-team:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gm-team-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gm-team-t b { font-family: var(--f-head); font-weight: 700; font-size: 15px; line-height: 1.2; text-transform: uppercase; }
.gm-duo { display: inline-flex; flex: none; }
.gm-duo img, .gm-duo i { width: 44px; height: 54px; object-fit: cover; object-position: 50% 15%; border-radius: 6px; border: 2px solid var(--slate-2); background: #1b1b28; }
.gm-duo > * + * { margin-left: -12px; }
.gm-duo.sm img, .gm-duo.sm i { width: 26px; height: 26px; border-radius: 50%; }
.gm-duo.sm > * + * { margin-left: -8px; }
.gm-duo.lg img, .gm-duo.lg i { width: 70px; height: 88px; }
.gm-myteam { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; background: var(--slate); border: 1px solid var(--line); border-radius: 16px; }
.gm-myteam-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.gm-myteam-t > b { font-family: var(--f-head); font-weight: 700; font-size: 24px; line-height: 1.1; text-transform: uppercase; }
.gm-myteam-pts { font-size: 13px; color: var(--muted); }
.gm-myteam-pts b { font-family: var(--f-head); font-size: 22px; color: var(--gold); }
.gm-myteam .gm-ctl { padding: 0 18px; font-size: 12px; }
.gm-lg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.gm-route { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gm-stage-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px 12px 0; background: var(--slate-2); border-left: 5px solid #8b5cf6; }
.gm-stage-row.final, .gm-stage-row.title { border-left-color: var(--gold); background: #1d1b26; }
.gm-stage-row.won { border-left-color: var(--green); }
.gm-stage-row.locked { opacity: .72; }
.gm-sdate { text-align: center; font-family: var(--f-head); line-height: 1; }
.gm-sdate b { display: block; font-weight: 700; font-size: 20px; }
.gm-sdate i { display: block; margin-top: 4px; font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.gm-sdate i.sat { color: var(--blue-2); }
.gm-sdate i.sun { color: var(--red-2); }
.gm-sbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gm-skind { font-family: var(--f-head); font-size: 10.5px; letter-spacing: .16em; color: var(--muted); }
.gm-sbody > b { font-size: 15px; line-height: 1.3; }
.gm-svenue { font-size: 12px; color: var(--muted); }
.gm-svs { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 700; }
.gm-sreal { margin-top: 2px; font-size: 11.5px; color: var(--dim); }
.gm-sact { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.gm-sact .gm-ctl { min-height: 44px; padding: 0 20px; font-size: 12px; }
.gm-st { font-family: var(--f-head); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-align: right; max-width: 190px; }
.gm-st.w { color: var(--green); }
.gm-st.l { color: var(--red-2); }
.gm-st.open { color: var(--gold); }
.gm-st.dim { color: var(--dim); font-weight: 600; letter-spacing: .04em; text-transform: none; font-family: var(--f-body); font-size: 12px; }
.gm-table { padding: 14px 16px; background: var(--slate); border: 1px solid var(--line); border-radius: 16px; }
.gm-table h4 { margin: 0 0 8px; font-family: var(--f-head); font-weight: 600; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.gm-table ol { margin: 0; padding: 0; list-style: none; counter-reset: pos; }
.gm-table li { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 12.5px; counter-increment: pos; }
.gm-table li::before { content: counter(pos); width: 16px; font-family: var(--f-head); color: var(--dim); }
.gm-table li span { flex: 1; min-width: 0; }
.gm-table li b { font-family: var(--f-head); font-size: 15px; }
.gm-table li.you { color: var(--gold); }
@media (max-width: 899px) { .gm-lg-grid { grid-template-columns: 1fr; } }
@media (max-width: 699px) {
  .gm-tab { font-size: 15px; min-height: 52px; padding: 8px 12px; }
  .gm-lg-head b { font-size: 19px; }
  .gm-stage-row { grid-template-columns: 52px minmax(0, 1fr); padding-right: 10px; }
  .gm-sact { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; padding-left: 12px; }
  .gm-st { text-align: left; max-width: none; }
  .gm-myteam-t > b { font-size: 19px; }
  .gm-duo.lg img, .gm-duo.lg i { width: 54px; height: 68px; }
}

/* ---------- Tag matches ---------- */
.gm-prow { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, .08); }
.gm-hud.opp .gm-prow { flex-direction: row-reverse; }
.gm-prow img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; flex: none; }
.gm-prow-name { font-family: var(--f-head); font-weight: 700; font-size: 11.5px; letter-spacing: .08em; white-space: nowrap; color: #d8d7e3; }
.gm-prow .gm-bar { flex: 1; }
.gm-prow .gm-n { width: 26px; }
.gm-tagbtn { flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid #ffd166; background: #ffd166; color: #2a1d00; font-family: var(--f-head); font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.gm-tagbtn:hover:not(:disabled) { background: #fff; border-color: #fff; }
.gm-tagbtn:disabled { background: transparent; color: #8a89a3; border-color: #3a3a4f; cursor: not-allowed; }
.gm-tagbtn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gm-apron-p { position: absolute; top: 262px; width: 108px; opacity: .8; pointer-events: none; }
.gm-apron-p.you { left: 168px; }
.gm-apron-p.opp { left: 1164px; }
.gm-apron-p img { width: 100%; aspect-ratio: 230 / 312; object-fit: cover; object-position: 50% 15%; display: block; border: 2px solid #3a3a4f; filter: saturate(.7); }
.gm-apron-p span { display: block; margin-top: 3px; text-align: center; font-family: var(--f-head); font-weight: 700; font-size: 12px; letter-spacing: .1em; color: #a7a6b8; }
.gm-stage.gm-tagmode .gm-runin { top: 120px; }
.gm-tagin-l { animation: gm-taginL .5s cubic-bezier(.2, .8, .2, 1); }
.gm-tagin-r { animation: gm-taginR .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes gm-taginL { from { opacity: 0; transform: translateX(-140px) scale(.85); } }
@keyframes gm-taginR { from { opacity: 0; transform: translateX(140px) scale(.85); } }
.gm-win-name.team { font-size: 38px; line-height: 1.05; }
.gm-unlocks li.pts { border-left-color: #8b5cf6; }
.gm-unlocks li.pts b { color: #c4b0ff; }
@media (max-width: 699px) {
  .gm-phone.gm-tagmode .gm-arena { height: clamp(150px, 20vh, 220px); }
  .gm-phone.gm-tagmode .gm-fighter { width: min(27%, calc((20vh - 40px) * .74)); }
  .gm-phone .gm-prow { margin-top: 5px; padding-top: 5px; gap: 6px; }
  .gm-phone .gm-prow img { width: 22px; height: 22px; }
  .gm-phone .gm-prow-name { font-size: 10.5px; }
  .gm-phone .gm-tagbtn { min-height: 36px; padding: 0 12px; font-size: 11px; }
  .gm-phone .gm-win-name.team { font-size: 28px; }
  .gm-p-label { overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- How to play ---------- */
.gm-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gm-rule { background: var(--slate-2); border-left: 5px solid var(--rc, var(--red)); padding: 18px 20px; }
.gm-rule h3 { font-family: var(--f-head); font-weight: 700; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; }
.gm-rule .jp { display: block; font-family: var(--f-jp); font-weight: 700; font-size: 11px; color: var(--dim); letter-spacing: .08em; margin-top: 2px; }
.gm-rule p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.gm-next { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gm-next li { padding: 12px 16px; background: var(--slate-2); display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.gm-next b { font-family: var(--f-head); font-weight: 700; font-size: 16px; letter-spacing: .03em; text-transform: uppercase; }
.gm-next span { color: var(--muted); font-size: 14px; }
@media (max-width: 420px) { .gm-rules { grid-template-columns: 1fr; } }
.gm-tagmode .gm-jp { display: none; }
.gm-hud-name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 699px) {
  .gm-p-handhead .gm-fin-text b { display: block; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gm-phone.gm-tagmode .gm-p-detail { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
}

/* ---------- Title Road ---------- */
.gm-road-head { border-left-color: var(--gold); }
.gm-belts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.gm-belt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 44px; padding: 14px 16px; background: var(--slate-2); border: 2px solid transparent; border-top: 4px solid var(--bc); border-radius: 12px; color: #fff; text-align: left; cursor: pointer; }
.gm-belt:hover:not(:disabled) { border-color: var(--line-2); border-top-color: var(--bc); }
.gm-belt.on { border-color: var(--gold); border-top-color: var(--bc); background: #24232f; }
.gm-belt:disabled { opacity: .55; cursor: not-allowed; }
.gm-belt:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gm-belt-k { font-family: var(--f-head); font-size: 10.5px; letter-spacing: .2em; color: var(--muted); }
.gm-belt > b { font-family: var(--f-head); font-weight: 700; font-size: 21px; line-height: 1.1; text-transform: uppercase; }
.gm-belt-ch { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 700; font-size: 13.5px; }
.gm-belt-meta { font-size: 12px; color: var(--muted); }
.gm-belt-st { margin-top: 6px; font-family: var(--f-head); font-weight: 700; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.gm-belt.won .gm-belt-st { color: var(--green); }
.gm-ladder { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gm-rung { display: grid; grid-template-columns: 40px auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--slate-2); border-left: 5px solid #3a3a4f; }
.gm-rung.next { border-left-color: var(--bc); background: #24232f; }
.gm-rung.done { border-left-color: var(--green); }
.gm-rung.champ { border-left-color: var(--gold); background: #1d1b26; }
.gm-rung.champ.next { box-shadow: inset 0 0 0 1px var(--gold); }
.gm-rung:not(.next):not(.done) .gm-duo { filter: grayscale(.6) brightness(.8); }
.gm-rung-n { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #3a3a4f; border-radius: 50%; font-family: var(--f-head); font-weight: 700; font-size: 15px; color: var(--muted); }
.gm-rung.done .gm-rung-n { border-color: var(--green); color: var(--green); }
.gm-rung.next .gm-rung-n { border-color: var(--bc); color: #fff; }
.gm-rung.champ .gm-rung-n { border-color: var(--gold); color: var(--gold); }
.gm-rung .gm-sact .gm-ctl { min-height: 44px; padding: 0 20px; font-size: 12px; }
@media (max-width: 699px) {
  .gm-belt > b { font-size: 18px; }
  .gm-rung { grid-template-columns: 30px auto minmax(0, 1fr); gap: 10px; padding: 10px; }
  .gm-rung .gm-sact { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; padding-left: 0; }
  .gm-rung-n { width: 28px; height: 28px; font-size: 13px; }
  .gm-rung .gm-duo img, .gm-rung .gm-duo i { width: 36px; height: 44px; }
}
