/* =========================================================
   梗王大乱斗 · MEME KING BRAWL
   街机 / 热梗 / 霓虹 / 大字报
   ========================================================= */

:root {
  --bg: #09070d;
  --bg-2: #121019;
  --panel: #17131d;
  --panel-2: #201a29;
  --ink: #0c0910;
  --yellow: #ffd23f;
  --yellow-2: #ffb01f;
  --orange: #ff741f;
  --red: #ff3b4e;
  --mint: #9ef7c8;
  --blue: #5ad9ff;
  --cream: #fff4d1;
  --white: #fffaf0;
  --muted: #a69cab;
  --line: rgba(255, 246, 220, .14);
  --line-strong: rgba(255, 246, 220, .26);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-display: Impact, "Arial Black", "DIN Condensed", "PingFang SC", sans-serif;
  --shadow: 0 24px 70px rgba(0, 0, 0, .48);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--white); }
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
kbd {
  display: inline-grid; place-items: center;
  min-width: 24px; height: 23px; padding: 0 6px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.32);
  border-bottom-width: 2px;
  background: rgba(255,255,255,.1);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 800; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
::selection { background: var(--yellow); color: var(--ink); }

#app { position: fixed; inset: 0; overflow: hidden; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .32s var(--ease), visibility .32s;
  overflow: hidden;
}
.screen.active { visibility: visible; opacity: 1; pointer-events: auto; }
.screen::after {
  content: ""; pointer-events: none; position: absolute; inset: 0; z-index: 60;
  opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   通用组件
   ========================================================= */
.panel-kicker, .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--yellow);
  font-size: 11px; line-height: 1; letter-spacing: .22em; font-weight: 900;
  text-transform: uppercase;
}
.panel-kicker::before, .eyebrow::before {
  content: ""; width: 22px; height: 2px; background: currentColor;
}

.cta-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900; font-size: 16px;
  box-shadow: 0 5px 0 #a86b00, 0 15px 34px rgba(255, 180, 24, .2);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
}
.cta-btn:hover { transform: translateY(-2px); background: #ffe065; box-shadow: 0 7px 0 #a86b00, 0 18px 40px rgba(255, 180, 24, .25); }
.cta-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a86b00; }
.cta-btn:disabled { background: #403a44; color: #79727d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transform: none; }
.cta-btn.big { width: 100%; min-height: 66px; justify-content: flex-start; padding: 0 22px; font-size: 19px; }
.cta-btn.big i { margin-left: auto; font-style: normal; transition: transform .2s var(--ease); }
.cta-btn.big:hover i { transform: translateX(5px); }
.cta-btn.big small { display: block; font-size: 11px; font-weight: 600; color: rgba(12,9,16,.58); margin-top: 2px; letter-spacing: .02em; }
.cta-btn.big:not(:has(span)) { flex-direction: column; align-items: flex-start; }
.cta-btn.danger-cta { background: var(--red); color: #fff; box-shadow: 0 5px 0 #8d1422, 0 15px 34px rgba(255,59,78,.2); }

.ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255,255,255,.035);
  color: var(--cream);
  font-size: 13px; font-weight: 800;
  transition: background .18s, border-color .18s, transform .18s;
}
.ghost-btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255, 210, 63, .6); transform: translateY(-1px); }
.ghost-btn.danger { color: #ff9ba5; border-color: rgba(255, 91, 106, .28); }
.ghost-btn.danger:hover { background: rgba(255, 59, 78, .1); border-color: rgba(255, 91, 106, .65); }
.text-link { color: var(--yellow); font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 0; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: rgba(10,8,14,.4);
  color: var(--cream);
  backdrop-filter: blur(10px);
  transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.icon-btn svg { width: 19px; height: 19px; }
.sound-btn .ico-off, .icon-btn.muted .ico-on, #battle-sound .ico-off, #battle-sound.muted .ico-on { display: none; }
.sound-btn.muted .ico-off, #battle-sound.muted .ico-off { display: block; }

.net-pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 100px;
  background: rgba(10,8,14,.35);
  color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap;
  backdrop-filter: blur(10px);
}
.net-pill i, .live-dot, .dot, .wait-head .spinner {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 4px rgba(158,247,200,.09), 0 0 12px rgba(158,247,200,.5);
}
.net-pill.offline i { background: var(--red); box-shadow: 0 0 0 4px rgba(255,59,78,.08); }
.net-pill.offline { color: #ff9aa5; }
.spinner {
  width: 13px !important; height: 13px !important; border-radius: 50% !important;
  border: 2px solid rgba(255, 210, 63, .25) !important; border-top-color: var(--yellow) !important;
  background: transparent !important; box-shadow: none !important;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%,100% { transform: translateY(0) rotate(var(--r, 0)); } 50% { transform: translateY(-12px) rotate(var(--r, 0)); } }
@keyframes pop { 0% { transform: scale(.82); opacity: 0; } 70% { transform: scale(1.03); opacity: 1; } 100% { transform: scale(1); } }

.topbar, .subbar {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  flex: 0 0 auto;
}
.topbar { padding: 23px 38px; }
.subbar {
  min-height: 72px; padding: 0 28px;
  background: rgba(10,8,14,.55);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.subbar-right { display: flex; align-items: center; gap: 10px; }
.brand-mini { display: flex; align-items: center; gap: 11px; font-size: 11px; letter-spacing: .05em; }
.brand-mini b { font-size: 13px; letter-spacing: .05em; color: var(--cream); }
.brand-mini span:last-child { color: var(--muted); padding-left: 11px; border-left: 1px solid var(--line); }
.brand-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); box-shadow: inset 0 -3px 0 #dd8e00; position: relative; }
.brand-dot::before, .brand-dot::after {
  content: ""; position: absolute; top: 3px; width: 4px; height: 5px; border-radius: 50%;
  background: var(--ink);
}
.brand-dot::before { left: 4px; } .brand-dot::after { right: 4px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.back-btn {
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px; color: var(--cream);
  font-size: 12px; font-weight: 800;
  transition: .2s;
}
.back-btn:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.subbar-title { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: baseline; gap: 11px; }
.subbar-title span { font-family: var(--font-display); font-size: 12px; letter-spacing: .13em; color: var(--yellow); }
.subbar-title b { font-size: 15px; letter-spacing: .06em; }

/* =========================================================
   加载页
   ========================================================= */
.loading-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 195, 31, .13), transparent 35%),
    radial-gradient(circle at 12% 80%, rgba(255, 80, 40, .08), transparent 30%),
    #09070d;
  transition: opacity .55s var(--ease), visibility .55s;
}
.loading-screen.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-card { display: flex; flex-direction: column; align-items: center; width: min(360px, 80vw); }
.loading-frog {
  position: relative; width: 132px; height: 132px; margin-bottom: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ffe782, var(--yellow) 58%, #f5a400);
  box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 0 70px rgba(255, 195, 31, .22), inset 0 -12px 26px rgba(160, 92, 0, .32);
  display: grid; place-items: center;
  animation: loading-bob 2.4s ease-in-out infinite;
}
.loading-frog img { width: 93%; height: 93%; object-fit: cover; border-radius: 50%; mix-blend-mode: multiply; filter: saturate(1.08); }
@keyframes loading-bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
.loading-spark { position: absolute; color: var(--cream); font-size: 16px; opacity: .8; animation: spark 1.8s ease-in-out infinite; }
.loading-spark.s1 { top: -12px; right: 3px; }
.loading-spark.s2 { bottom: 3px; left: -15px; animation-delay: .6s; font-size: 10px; }
@keyframes spark { 0%,100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
.loading-title { font-size: 30px; font-weight: 1000; letter-spacing: .14em; }
.loading-sub { color: var(--muted); font-size: 11px; margin-top: 10px; letter-spacing: .05em; }
.loading-bar { width: 100%; height: 4px; background: rgba(255,255,255,.11); border-radius: 10px; margin-top: 25px; overflow: hidden; }
.loading-bar i { display: block; width: 0%; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); border-radius: inherit; transition: width .2s; box-shadow: 0 0 16px var(--yellow); }
.loading-pct { font-family: var(--font-display); font-size: 12px; letter-spacing: .16em; color: var(--yellow); margin-top: 8px; align-self: flex-end; }
.loading-foot { position: absolute; bottom: 32px; font-size: 9px; letter-spacing: .32em; color: #5e5763; }

/* =========================================================
   标题页
   ========================================================= */
.title-screen {
  background:
    radial-gradient(ellipse at 21% 86%, rgba(255, 183, 31, .16), transparent 44%),
    radial-gradient(ellipse at 85% 32%, rgba(255, 77, 35, .12), transparent 36%),
    linear-gradient(150deg, #17101a 0%, #0b0810 60%, #08060b 100%);
}
.title-bg { position: absolute; inset: 0; overflow: hidden; }
.title-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) .65px, transparent .65px);
  background-size: 7px 7px;
  opacity: .16;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
.title-sun {
  position: absolute; width: 560px; height: 560px; right: -10%; top: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,195,31,.15), rgba(255,110,30,.04) 45%, transparent 68%);
  filter: blur(3px);
}
.title-grid {
  position: absolute; left: -10%; right: -10%; bottom: -26%; height: 62%;
  background-image: linear-gradient(rgba(255, 210, 63, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,210,63,.1) 1px, transparent 1px);
  background-size: 58px 44px;
  transform: perspective(600px) rotateX(64deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 10%, transparent 82%);
  opacity: .72;
}
.big-word {
  position: absolute;
  font-size: clamp(180px, 29vw, 430px);
  font-weight: 1000;
  line-height: .8;
  -webkit-text-stroke: 1px rgba(255, 244, 209, .055);
  color: transparent;
  letter-spacing: -.1em;
  font-family: var(--font-sans);
  pointer-events: none;
}
.big-word.w1 { left: -3%; top: 13%; transform: rotate(-9deg); }
.big-word.w2 { right: 1%; top: 35%; transform: rotate(7deg); }
.big-word.w3 { left: 27%; bottom: -14%; transform: rotate(-3deg); font-size: clamp(160px, 24vw, 350px); }
.big-word.w4 { right: 13%; top: -14%; transform: rotate(10deg); font-size: clamp(120px, 18vw, 260px); }
.speedline { position: absolute; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 210, 63, .34), transparent); transform: rotate(-24deg); }
.speedline.sp1 { width: 45vw; left: -10vw; top: 37%; }
.speedline.sp2 { width: 30vw; right: -7vw; top: 75%; }

.title-stage {
  position: relative; z-index: 4;
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(20px, 5vw, 90px);
  padding: clamp(64px, 9vh, 110px) clamp(24px, 6vw, 96px) clamp(40px, 10vh, 100px);
  min-height: 0;
}
.title-copy { width: min(620px, 54vw); position: relative; z-index: 3; animation: rise .8s var(--ease) both; text-shadow: 0 2px 14px rgba(0,0,0,.72); }
.title-copy::before { content: ""; position: absolute; z-index: -1; inset: -30px -70px -34px -45px; pointer-events: none; background: radial-gradient(125% 82% at 0% 50%, rgba(9,6,12,.92) 0%, rgba(9,6,12,.64) 55%, transparent 82%); filter: blur(2px); }
.sticker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px 7px;
  font-size: 10px; font-weight: 900; letter-spacing: .15em;
  transform: rotate(-3deg);
  border-radius: 5px;
  box-shadow: 0 3px 0 rgba(0,0,0,.3);
}
.sticker-yellow { background: var(--yellow); color: var(--ink); }
.title-kicker {
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: clamp(12px, 1.2vw, 18px);
  letter-spacing: .44em;
  margin: 24px 0 12px;
  display: flex; align-items: center; gap: 15px;
}
.title-kicker::after { content: ""; height: 1px; flex: 0 0 70px; background: linear-gradient(90deg, var(--yellow), transparent); }
.game-logo {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(58px, 7.4vw, 108px);
  font-weight: 1000;
  line-height: .8;
  letter-spacing: -.1em;
  transform: rotate(-3.2deg);
  transform-origin: left bottom;
  filter: drop-shadow(9px 12px 0 rgba(0,0,0,.38));
}
.game-logo span:first-child {
  color: var(--cream);
  -webkit-text-stroke: 2px rgba(12,9,16,.72);
  paint-order: stroke fill;
}
.game-logo span:last-child {
  color: transparent;
  margin-top: .03em;
  background: linear-gradient(180deg, #fff09f 3%, var(--yellow) 45%, #ff8a19 96%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 2px rgba(12,9,16,.72);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 rgba(255, 59, 78, .38);
  margin-left: .022em;
}
.game-logo::after { display: none; }
.title-ribbon {
  display: flex; align-items: center; gap: 12px;
  margin: 36px 0 16px;
  width: fit-content;
  padding: 6px 13px 6px 8px;
  border-left: 3px solid var(--yellow);
  background: linear-gradient(90deg, rgba(255, 210, 63, .12), transparent);
  font-size: 11px; font-weight: 800;
  letter-spacing: .03em;
}
.title-ribbon b:nth-of-type(1) { color: var(--yellow); }
.title-ribbon b:nth-of-type(2) { color: #ff9b86; }
.title-ribbon span { color: #615a65; font-family: var(--font-display); font-size: 12px; }
.title-desc { margin: 0; color: #aca3b2; font-size: clamp(12px, 1.25vw, 14px); line-height: 1.9; max-width: 460px; }
.title-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.title-tags span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; font-size: 9px; color: #8f8798; letter-spacing: .05em; }

.menu-card {
  position: relative; z-index: 6;
  flex: 0 0 clamp(320px, 25vw, 382px);
  background: rgba(18, 14, 23, .77);
  border: 1px solid rgba(255, 246, 209, .16);
  border-radius: 5px;
  padding: 24px 24px 15px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(22px);
  animation: rise .85s .13s var(--ease) both;
}
.menu-card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 38px; height: 3px; background: var(--yellow);
}
.menu-card::after {
  content: ""; position: absolute; right: 14px; top: 14px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); box-shadow: 17px 0 0 var(--yellow), 34px 0 0 var(--mint);
  opacity: .65;
}
.menu-head { display: flex; align-items: baseline; gap: 10px; padding-bottom: 17px; border-bottom: 1px solid var(--line); margin-bottom: 7px; }
.menu-head span { font-family: var(--font-display); font-size: 9px; letter-spacing: .2em; color: var(--yellow); }
.menu-head b { font-size: 13px; color: var(--cream); letter-spacing: .08em; }
.menu-btn {
  position: relative;
  width: 100%;
  display: flex; align-items: center; gap: 15px;
  padding: 13px 4px;
  text-align: left;
  color: var(--cream);
  border-bottom: 1px solid rgba(255,255,255,.055);
  transition: padding .23s var(--ease), color .2s, background .2s;
  isolation: isolate;
}
.menu-btn::before {
  content: ""; position: absolute; inset: 3px -10px; z-index: -1;
  background: var(--yellow); border-radius: 4px;
  transform: scaleX(.9); opacity: 0;
  transition: transform .28s var(--ease), opacity .2s;
  transform-origin: left;
}
.menu-btn:hover::before, .menu-btn:focus-visible::before { opacity: 1; transform: scaleX(1); }
.menu-btn:hover, .menu-btn:focus-visible { color: var(--ink); padding-left: 10px; padding-right: 10px; outline: none; }
.menu-btn.primary .menu-index { color: var(--yellow); }
.menu-btn:hover .menu-index, .menu-btn:focus-visible .menu-index { color: rgba(12,9,16,.5); }
.menu-index { flex: 0 0 24px; font-family: var(--font-display); font-size: 10px; color: #6e6674; letter-spacing: .08em; }
.menu-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.menu-label b { font-size: 20px; line-height: 1.15; font-weight: 900; letter-spacing: .015em; }
.menu-label small { font-size: 10px; color: #918899; letter-spacing: .02em; }
.menu-btn:hover .menu-label small, .menu-btn:focus-visible .menu-label small { color: rgba(12,9,16,.65); }
.menu-arrow { margin-left: auto; font-size: 16px; color: #68616d; transition: transform .25s var(--ease); }
.menu-btn:hover .menu-arrow, .menu-btn:focus-visible .menu-arrow { color: var(--ink); transform: translate(2px, -2px); }
.menu-btn.primary .menu-arrow { color: var(--yellow); }
.menu-foot { display: flex; align-items: center; gap: 8px; padding-top: 15px; color: #81788a; font-size: 9px; letter-spacing: .03em; }
.menu-foot span:last-child { margin-left: auto; font-family: var(--font-display); letter-spacing: .1em; color: #5b545f; }

.hero-fighters { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero { position: absolute; bottom: clamp(66px, 9vh, 100px); transform-origin: bottom center; filter: drop-shadow(0 22px 22px rgba(0,0,0,.4)); }
.hero img { width: 100%; height: auto; filter: saturate(.98) contrast(1.03); }
.hero-shadow { position: absolute; left: 50%; bottom: -9px; width: 76%; height: 23px; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(0,0,0,.55), transparent 67%); filter: blur(4px); }
.h-frog { left: 31%; bottom: clamp(58px, 8vh, 84px); width: clamp(172px, 15vw, 238px); z-index: 6; animation: hero-frog 4.6s ease-in-out infinite; }
.h-frog img { mix-blend-mode: normal; }
.h-bull { right: -4%; bottom: clamp(48px, 6vh, 68px); width: clamp(168px, 16vw, 258px); z-index: 2; animation: hero-bull 5.7s .7s ease-in-out infinite; opacity: .56; }
.h-roo { left: 56%; bottom: clamp(52px, 7vh, 76px); width: clamp(178px, 16vw, 255px); z-index: 5; animation: hero-bob 5.2s .3s ease-in-out infinite; opacity: .92; }
@keyframes hero-frog { 0%,100% { transform: translateY(0) rotate(-1deg) scale(1); } 50% { transform: translateY(-9px) rotate(1deg) scale(1.01); } }
@keyframes hero-bob { 0%,100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-12px) rotate(0); } }
@keyframes hero-bull { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes hero-roo { 0%,100% { transform: translateY(0) rotate(1deg); } 50% { transform: translateY(-15px) rotate(-2deg); } }

.title-foot { position: relative; z-index: 5; flex: 0 0 auto; padding: 0 38px 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.ticker { width: min(640px, 58vw); overflow: hidden; border-top: 1px solid var(--line); padding-top: 12px; mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.ticker-track { display: flex; gap: 0; white-space: nowrap; animation: ticker 34s linear infinite; width: max-content; }
.ticker-track span { color: #81798a; font-size: 10px; letter-spacing: .09em; padding-right: 38px; }
.ticker-track span::before { content: "✦"; color: var(--yellow); margin-right: 10px; opacity: .7; }
@keyframes ticker { to { transform: translateX(-50%); } }
.title-credit { color: #544d5b; font-size: 8px; letter-spacing: .08em; text-align: right; line-height: 1.7; text-transform: uppercase; }

/* =========================================================
   联机页
   ========================================================= */
.online-screen {
  background:
    radial-gradient(ellipse at 8% 60%, rgba(255, 185, 27, .14), transparent 40%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 80, 50, .09), transparent 30%),
    linear-gradient(125deg, #100c15 0%, #0a080e 66%, #060509 100%);
}
.online-screen::before {
  content: "ONLINE";
  position: absolute; right: -2vw; bottom: -8vh;
  font-family: var(--font-display); font-size: clamp(180px, 28vw, 410px); line-height: 1;
  letter-spacing: -.02em; color: transparent;
  -webkit-text-stroke: 1px rgba(255, 246, 209, .06);
  pointer-events: none;
}
.online-layout {
  position: relative; z-index: 2;
  flex: 1;
  display: grid; grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr);
  gap: clamp(24px, 5vw, 88px); align-items: center;
  width: min(1180px, calc(100% - 76px));
  margin: 0 auto; padding: 30px 0 20px;
}
.online-art {
  position: relative; height: min(640px, 66vh);
  display: flex; align-items: flex-end; justify-content: center;
  isolation: isolate;
}
.online-art::before {
  content: ""; position: absolute; width: 390px; height: 390px; bottom: 18%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 193, 30, .23), rgba(255, 118, 20, .05) 53%, transparent 69%);
  filter: blur(3px);
}
.online-art::after {
  content: ""; position: absolute; width: 72%; height: 26px; bottom: 8%; border-radius: 50%;
  background: rgba(0,0,0,.58); filter: blur(12px); z-index: -1;
}
.online-art img {
  position: relative; z-index: 2;
  height: min(550px, 56vh); width: auto; object-fit: contain;
  filter: drop-shadow(18px 22px 18px rgba(0,0,0,.35)) saturate(1.04);
  animation: online-float 5s ease-in-out infinite;
}
@keyframes online-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
.online-art-badge {
  position: absolute; top: 11%; left: 8%;
  font-size: 10px; font-weight: 900; letter-spacing: .15em;
  color: var(--ink); background: var(--mint); padding: 7px 10px;
  transform: rotate(-5deg);
}
.bubble {
  position: absolute; z-index: 3;
  background: var(--cream); color: var(--ink);
  border-radius: 50% 50% 50% 8px;
  padding: 10px 15px;
  font-size: 12px; font-weight: 900;
  box-shadow: 0 6px 0 rgba(0,0,0,.22);
  animation: bubble-float 4s ease-in-out infinite;
}
.bubble::after { content: ""; position: absolute; left: 12px; bottom: -6px; border-width: 7px 7px 0 0; border-style: solid; border-color: var(--cream) transparent transparent transparent; }
.bubble.b1 { left: 4%; top: 29%; transform: rotate(-6deg); animation-delay: .3s; }
.bubble.b2 { right: 0; top: 21%; border-radius: 50% 50% 8px 50%; transform: rotate(4deg); animation-delay: 1.2s; }
.bubble.b2::after { left: auto; right: 12px; border-width: 0 7px 7px 0; border-color: transparent var(--cream) transparent transparent; bottom: -6px; }
.bubble.b3 { left: 10%; top: 51%; font-size: 10px; border-radius: 50% 8px 50% 50%; transform: rotate(3deg); animation-delay: 2.1s; }
@keyframes bubble-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -9px; } }
.online-art-caption { position: absolute; bottom: 5%; left: 2%; z-index: 4; display: flex; flex-direction: column; gap: 5px; }
.online-art-caption span { font-family: var(--font-display); letter-spacing: .19em; color: var(--yellow); font-size: 10px; }
.online-art-caption b { font-size: 14px; font-weight: 900; color: var(--cream); }
.online-panel {
  position: relative;
  background: rgba(24, 19, 30, .74);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: clamp(26px, 4vw, 44px);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  animation: rise .55s var(--ease) both;
}
.online-panel::before, .online-panel::after { content: ""; position: absolute; width: 22px; height: 22px; border-color: var(--yellow); opacity: .8; }
.online-panel::before { left: -1px; top: -1px; border-left: 2px solid; border-top: 2px solid; }
.online-panel::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }
.online-panel h2 { margin: 18px 0 10px; font-size: clamp(26px, 3.3vw, 42px); line-height: 1.2; letter-spacing: -.05em; font-weight: 1000; }
.online-panel h2 em { font-style: normal; color: var(--yellow); position: relative; white-space: nowrap; }
.online-panel h2 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 6px; background: rgba(255,210,63,.2); z-index: -1; }
.panel-desc { margin: 0 0 25px; color: #a69cab; font-size: 12px; line-height: 1.75; max-width: 520px; }
.field-label { display: block; font-size: 10px; font-weight: 900; color: #c0b6c7; letter-spacing: .08em; margin: 0 0 8px; }
.nick-row { display: flex; gap: 8px; margin-bottom: 20px; }
.text-input {
  flex: 1; min-width: 0; height: 48px; padding: 0 15px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
  border-radius: 5px; outline: none; color: var(--cream);
  font-size: 13px; letter-spacing: .04em;
  transition: border-color .2s, background .2s;
}
.text-input:focus, .code-input:focus { border-color: var(--yellow); background: rgba(255,255,255,.075); }
.text-input::placeholder { color: #6e6478; }
.dice-btn {
  flex: 0 0 48px; height: 48px; border: 1px solid var(--line);
  border-radius: 5px; background: rgba(255,255,255,.04); color: var(--yellow);
  font-size: 17px;
  transition: .2s;
}
.dice-btn:hover { border-color: var(--yellow); background: var(--yellow); color: var(--ink); }
.mode-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 5px; background: rgba(0,0,0,.24); border: 1px solid var(--line); margin-bottom: 18px; }
.mode-tab {
  flex: 1; min-height: 37px; border-radius: 3px;
  color: #8e8497; font-size: 12px; font-weight: 800;
  transition: background .2s, color .2s;
}
.mode-tab.active { background: var(--cream); color: var(--ink); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.mini-steps { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 16px; color: #706879; font-size: 9px; }
.mini-steps span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.mini-steps b { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,210,63,.13); color: var(--yellow); font-size: 8px; }
.mini-steps i { font-style: normal; color: #4c4554; }
.join-row { display: flex; gap: 8px; }
.code-input {
  flex: 1; min-width: 0; height: 58px; padding: 0 17px;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 5px;
  color: var(--cream); font-family: var(--font-display); font-size: 24px; letter-spacing: .23em;
  text-transform: uppercase; outline: none;
}
.code-input::placeholder { color: #5b5362; }
.join-row .cta-btn { min-height: 58px; flex: 0 0 86px; }
.field-hint { color: #756d7e; font-size: 10px; margin: 12px 0 0; line-height: 1.6; }
.private-error { margin-top: 14px; padding: 11px 13px; border-left: 2px solid var(--red); background: rgba(255,59,78,.08); color: #ffb1b7; font-size: 11px; line-height: 1.5; }
.online-waiting { animation: fade .3s both; }
.wait-head { display: flex; align-items: center; gap: 9px; color: var(--cream); font-size: 12px; margin-bottom: 14px; }
.room-code-xl {
  font-family: var(--font-display); font-size: clamp(42px, 6vw, 64px); letter-spacing: .19em;
  color: var(--yellow); line-height: 1;
  text-shadow: 3px 3px 0 rgba(255, 100, 30, .22);
  margin: 0 0 15px;
}
.room-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 23px; }
.room-actions .ghost-btn { min-height: 35px; padding: 0 12px; font-size: 10px; }
.waiting-players { display: flex; align-items: center; gap: 9px; }
.wait-player {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px;
  min-height: 85px; padding: 12px;
  border: 1px dashed rgba(255,255,255,.16); border-radius: 5px;
  position: relative;
}
.wait-player.filled { border-style: solid; border-color: rgba(255,210,63,.32); background: rgba(255,210,63,.045); }
.wait-avatar { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 11px; color: var(--muted); }
.wait-player.filled .wait-avatar { background: var(--yellow); color: var(--ink); font-weight: 900; }
.wait-player b { font-size: 13px; color: var(--cream); }
.wait-player small { font-size: 9px; color: #746b7d; }
.wait-vs { font-family: var(--font-display); color: #6d6474; font-size: 12px; }
.online-bottom { position: relative; z-index: 3; flex: 0 0 auto; display: flex; justify-content: space-between; gap: 20px; width: min(1180px, calc(100% - 76px)); margin: 0 auto; padding: 12px 0 23px; border-top: 1px solid var(--line); color: #706778; font-size: 9px; letter-spacing: .04em; }
.online-bottom div { display: flex; align-items: center; gap: 7px; }
.online-bottom .dot { width: 5px; height: 5px; }
.online-bottom .text-link { font-size: 9px; }

/* =========================================================
   选人页
   ========================================================= */
.select-screen {
  background:
    radial-gradient(ellipse at 25% 64%, rgba(255, 177, 23, .13), transparent 42%),
    radial-gradient(ellipse at 82% 18%, rgba(255, 91, 38, .08), transparent 32%),
    linear-gradient(120deg, #100c15 0%, #0a080e 68%);
}
.select-bg-word {
  position: absolute; z-index: 0; left: 50%; bottom: -13%;
  transform: translateX(-50%) rotate(-4deg);
  font-family: var(--font-display); font-size: clamp(200px, 31vw, 470px); line-height: 1; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(255,246,209,.05);
  pointer-events: none; white-space: nowrap;
}
.select-meta { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #a59ba9; }
.select-meta .slash { color: #4e4754; }
.room-chip { display: flex; align-items: center; gap: 5px; margin-left: 7px; padding: 5px 9px; background: rgba(255,210,63,.1); border: 1px solid rgba(255,210,63,.2); border-radius: 3px; color: #cabf9b; }
.room-chip b { color: var(--yellow); font-family: var(--font-display); letter-spacing: .12em; font-size: 11px; }
.select-layout {
  position: relative; z-index: 2;
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) minmax(190px, 240px);
  align-items: stretch; gap: clamp(12px, 2vw, 25px);
  width: min(1420px, calc(100% - 40px)); margin: 0 auto;
  padding: 18px 0 12px;
}
.fighter-panel {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 0;
  padding: 16px 15px 14px;
  background: rgba(25, 20, 31, .66);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.fighter-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #4e4658; transition: background .25s; }
.p1-panel { --pc: var(--yellow); }
.p2-panel { --pc: var(--red); }
.fighter-panel.active { border-color: color-mix(in srgb, var(--pc), transparent 35%); background: rgba(34, 27, 37, .76); box-shadow: 0 0 0 1px color-mix(in srgb, var(--pc), transparent 70%), 0 0 32px color-mix(in srgb, var(--pc), transparent 88%); }
.fighter-panel.active::before { background: var(--pc); }
.panel-tag { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.panel-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 8px var(--pc); }
.panel-tag span { font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; color: var(--pc); }
.panel-tag small { font-size: 9px; color: #897f91; margin-left: auto; }
.fighter-panel-face {
  position: relative; width: 100%; aspect-ratio: 1 / .9; margin-bottom: 13px;
  background:
    radial-gradient(circle at 50% 43%, color-mix(in srgb, var(--pc), transparent 76%), transparent 63%),
    linear-gradient(150deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  display: grid; place-items: center;
}
.fighter-panel-face::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(255,255,255,.07); pointer-events: none; }
.fighter-panel-face img { width: 95%; height: 95%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.28)); transform: scale(1.05); transition: transform .35s var(--ease); }
.fighter-panel:hover .fighter-panel-face img { transform: scale(1.1) rotate(-1deg); }
.select-stamp {
  position: absolute; z-index: 2; right: 7px; bottom: 7px;
  font-size: 8px; font-weight: 900; letter-spacing: .1em;
  color: var(--ink); background: var(--pc); padding: 4px 6px;
  transform: rotate(-3deg);
}
.fighter-panel-name { margin: 0; font-size: clamp(22px, 2.1vw, 31px); font-weight: 1000; letter-spacing: -.035em; line-height: 1; color: var(--cream); }
.fighter-panel-bio { margin: 10px 0 0; color: #968c9e; font-size: 10px; line-height: 1.7; min-height: 52px; }
.fighter-panel-face.empty::before {
  content: "?"; position: absolute; z-index: 1;
  font-family: var(--font-display); font-size: 72px; color: rgba(255,246,209,.13);
  transform: rotate(-6deg);
}
.fighter-panel-title { min-height: 30px; margin: 6px 0 14px; color: #9b91a2; font-size: 10px; line-height: 1.5; }
.stat-list { display: flex; flex-direction: column; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-list > div { display: flex; align-items: center; gap: 7px; font-size: 9px; color: #8f8597; }
.stat-list span { width: 28px; }
.stat-list i { flex: 1; height: 4px; background: rgba(255,255,255,.09); border-radius: 7px; overflow: hidden; }
.stat-list i b { display: block; height: 100%; background: linear-gradient(90deg, var(--pc), color-mix(in srgb, var(--pc), #fff 36%)); border-radius: inherit; transition: width .4s var(--ease); }
.stat-list em { width: 10px; font-style: normal; font-family: var(--font-display); color: var(--pc); font-size: 10px; text-align: right; }
.panel-moves { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.panel-moves div { display: flex; gap: 8px; align-items: baseline; }
.panel-moves small { flex: 0 0 40px; color: #6c6374; font-size: 8px; letter-spacing: .05em; }
.panel-moves b { color: #c9bfce; font-size: 10px; font-weight: 700; line-height: 1.4; }

.select-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-top: 8px; }
.select-head { position: relative; margin-bottom: 16px; padding-left: 6px; }
.select-head::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 2px; width: 2px; background: var(--yellow); opacity: .7; }
.select-head h2 { margin: 7px 0 4px; font-size: clamp(24px, 2.7vw, 36px); line-height: 1.2; font-weight: 1000; letter-spacing: -.045em; }
.select-head p { margin: 0; color: #847b8c; font-size: 10px; }
.roster { flex: 0 1 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: clamp(10px, 1.4vw, 18px); align-items: stretch; min-height: 0; }
.char-card {
  position: relative;
  min-width: 0; min-height: 285px; height: min(39vh, 420px);
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 40%),
    linear-gradient(160deg, color-mix(in srgb, var(--cc, var(--yellow)), #1b1420 77%), #120e18 80%);
  transition: transform .28s var(--ease), border-color .25s, box-shadow .28s;
  isolation: isolate;
}
.char-card::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  border: 2px solid transparent; transition: border-color .2s;
}
.char-card:hover { transform: translateY(-4px); border-color: rgba(255, 246, 209, .29); box-shadow: 0 22px 40px rgba(0,0,0,.3); }
.char-card[data-char="naiwa"] { --cc: var(--yellow); }
.char-card[data-char="kangaroo"] { --cc: #ffdc48; }
.char-card::before {
  content: ""; position: absolute; z-index: -1; width: 180px; height: 180px; left: 50%; top: 30%; transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cc), transparent 65%), transparent 68%);
  filter: blur(7px);
  opacity: .6;
  transition: opacity .25s, transform .3s;
}
.char-card:hover::before { opacity: 1; transform: translate(-50%,-50%) scale(1.18); }
.card-index { position: absolute; left: 11px; top: 9px; z-index: 2; font-family: var(--font-display); font-size: 10px; letter-spacing: .1em; color: rgba(255,255,255,.35); }
.card-glow { position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: linear-gradient(to top, rgba(7,5,10,.92), transparent); z-index: 2; }
.card-art {
  position: absolute; z-index: 1; inset: 8% -11% 14% -11%;
  display: flex; align-items: flex-end; justify-content: center;
  transition: transform .34s var(--ease);
}
.card-art img { width: 100%; height: 96%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 14px 15px rgba(0,0,0,.38)) saturate(1.03); transform-origin: bottom center; }
.char-card:hover .card-art { transform: translateY(-5px) scale(1.035); }
.card-info { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 37px; display: flex; flex-direction: column; gap: 2px; }
.card-info b { font-size: clamp(17px, 1.6vw, 23px); line-height: 1.1; font-weight: 1000; letter-spacing: -.025em; color: var(--cream); white-space: nowrap; }
.card-info small { font-family: var(--font-display); color: var(--cc); font-size: 8px; letter-spacing: .16em; }
.card-info em { color: #a99fae; font-style: normal; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.card-stats { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 4px; }
.card-stats i { font-style: normal; font-size: 7px; color: #a49aaa; border: 1px solid rgba(255,255,255,.12); border-radius: 3px; padding: 3px 4px; letter-spacing: .02em; }
.card-pick-card {
  position: absolute; right: 9px; top: 9px; z-index: 6;
  display: none; place-items: center;
  min-width: 27px; height: 21px; padding: 0 6px;
  background: var(--yellow); color: var(--ink);
  font-family: var(--font-display); font-size: 9px; letter-spacing: .04em;
  border-radius: 2px; transform: rotate(2deg);
}
.char-card.picked-p1 .card-pick-card, .char-card.picked-p2 .card-pick-card { display: grid; }
.char-card.picked-p1 { border-color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow), 0 0 26px rgba(255,210,63,.15); }
.char-card.picked-p1 .card-pick-card { background: var(--yellow); }
.char-card.picked-p2 { border-color: var(--red); box-shadow: inset 0 0 0 2px var(--red), 0 0 26px rgba(255,59,78,.13); }
.char-card.picked-p2 .card-pick-card { background: var(--red); color: #fff; }
.char-card.picked-p1.picked-p2 .card-pick-card { background: linear-gradient(90deg, var(--yellow) 50%, var(--red) 50%); color: var(--ink); }
.char-card.denied { animation: shake .3s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.select-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 17px; flex-wrap: wrap; }
.select-status { display: flex; align-items: center; gap: 8px; color: #978d9f; font-size: 10px; min-width: 0; }
.select-status .dot { width: 5px; height: 5px; flex: 0 0 auto; }
.select-actions { display: flex; gap: 7px; align-items: center; }
.select-actions .ghost-btn { min-height: 37px; padding: 0 12px; font-size: 10px; }
.ready-btn { min-height: 43px; min-width: 132px; font-size: 13px; }
.select-controls-strip { display: flex; flex-wrap: wrap; gap: 11px; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line); color: #786f81; font-size: 8px; }
.select-controls-strip span { display: flex; align-items: center; gap: 4px; }
.select-controls-strip kbd { min-width: 18px; height: 18px; font-size: 8px; padding: 0 3px; border-radius: 3px; }

/* =========================================================
   战斗页
   ========================================================= */
.battle-screen { background: #050407; overflow: hidden; }
.battle-shell {
  position: relative;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  overflow: hidden;
  background: #050407;
}
#game {
  display: block;
  width: min(100vw, 177.7778vh);
  height: min(56.25vw, 100vh);
  max-width: 100vw; max-height: 100vh;
  background: #08070a;
  outline: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 0 120px rgba(255, 170, 30, .04);
  touch-action: none;
}
.battle-ui { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.battle-top-actions { position: absolute; top: max(13px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); display: flex; gap: 7px; pointer-events: auto; z-index: 7; }
.battle-icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%; background: rgba(8,6,10,.46); color: rgba(255,255,255,.8);
  backdrop-filter: blur(9px);
  transition: .2s;
}
.battle-icon-btn:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.battle-icon-btn svg { width: 15px; height: 15px; }
.net-status {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 100px;
  background: rgba(7,5,10,.48); border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.6); font-size: 8px; letter-spacing: .04em;
  backdrop-filter: blur(8px); z-index: 6;
}
.net-status i { width: 4px; height: 4px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 6px var(--mint); }
.net-status b { color: var(--mint); font-family: var(--font-display); letter-spacing: .06em; font-weight: 400; }
.battle-hint {
  position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  padding: 7px 14px;
  background: rgba(7,5,10,.4);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 100px;
  color: rgba(255,255,255,.54); font-size: 8px;
  backdrop-filter: blur(10px);
  transition: opacity .6s;
  white-space: nowrap;
}
.battle-hint span { display: flex; align-items: center; gap: 3px; }
.battle-hint kbd { min-width: 17px; height: 16px; font-size: 7px; padding: 0 3px; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); border-radius: 3px; }
.battle-hint .hint-tip { color: var(--yellow); border-left: 1px solid rgba(255,255,255,.13); padding-left: 12px; }
.battle-hint.fade { opacity: 0; pointer-events: none; }

.touch-controls { display: none; position: absolute; inset: auto 0 max(10px, env(safe-area-inset-bottom)) 0; height: 180px; pointer-events: none; z-index: 8; }
.touch-dpad {
  position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: 0;
  width: 148px; height: 148px; pointer-events: none;
}
.touch-actions {
  position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: 2px;
  width: 220px; height: 152px; pointer-events: none;
}
.tbtn {
  pointer-events: auto;
  position: absolute;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(10,8,14,.46);
  color: rgba(255,255,255,.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .08s, background .08s, border-color .08s;
  touch-action: none;
}
.tbtn.is-down { transform: scale(.92); background: rgba(255,210,63,.8); border-color: var(--yellow); color: var(--ink); }
.touch-dpad .tbtn { width: 47px; height: 47px; border-radius: 50%; font-size: 12px; }
.touch-dpad .up { left: 50px; top: 0; }
.touch-dpad .left { left: 0; top: 50px; }
.touch-dpad .right { left: 100px; top: 50px; }
.touch-dpad .down { left: 50px; top: 100px; }
.touch-actions .attack { width: 57px; height: 57px; border-radius: 50%; font-size: 15px; font-weight: 900; flex-direction: column; }
.touch-actions .attack small { font-family: var(--font-display); font-size: 7px; opacity: .48; font-weight: 400; }
.touch-actions .guard { left: 0; top: 0; width: 50px; height: 50px; border-color: rgba(140,255,220,.5); background: rgba(15,55,45,.55); color:#d9fff2; font-size:13px; }
.touch-actions .guard small{font-size:6px}
.touch-actions .light { left: 12px; top: 74px; }
.touch-actions .heavy { left: 76px; top: 25px; }
.touch-actions .kick { left: 143px; top: 79px; }
.touch-actions .special { left: 80px; top: 98px; border-color: rgba(255,210,63,.4); }
.touch-actions .super { right: 0; top: 0; width: 50px; height: 50px; border-color: rgba(255,59,78,.63); background: rgba(88,15,23,.58); color: #ffd9d9; }
.rotate-tip { display: none; position: absolute; left: 50%; top: 58px; transform: translateX(-50%); font-size: 8px; color: rgba(255,255,255,.35); white-space: nowrap; }

.battle-overlay {
  position: absolute; inset: 0; z-index: 20;
  display: grid; place-items: center;
  background: rgba(4,3,6,.7);
  backdrop-filter: blur(12px);
  animation: fade .22s both;
}
.battle-overlay[hidden] { display: none; }
.pause-card, .confirm-card, .thanks-card {
  position: relative; width: min(370px, calc(100% - 40px));
  padding: 30px;
  background: linear-gradient(150deg, #1d1723, #100d15);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  box-shadow: var(--shadow);
  text-align: left;
}
.pause-card::before { content: ""; position: absolute; left: 0; top: 0; width: 44px; height: 3px; background: var(--yellow); }
.pause-card h2, .thanks-card h3, .confirm-card h3 { margin: 15px 0 7px; font-size: 31px; letter-spacing: -.04em; }
.pause-card p, .confirm-card p, .thanks-card p { color: #988e9f; font-size: 11px; line-height: 1.8; margin: 0 0 23px; }
.pause-card .cta-btn { width: 100%; margin-bottom: 8px; }
.pause-card .ghost-btn { width: 100%; margin-bottom: 7px; }
.pause-online-note { margin-top: 15px !important; margin-bottom: 0 !important; color: #ba9c62 !important; font-size: 9px !important; text-align: center; }
.confirm-card, .thanks-card { width: min(390px, calc(100% - 40px)); padding: 27px; }
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.thanks-card { text-align: center; border-color: rgba(255,210,63,.3); }
.thanks-card p { margin-bottom: 20px; }

/* =========================================================
   结算页
   ========================================================= */
.result-screen {
  background:
    radial-gradient(ellipse at 21% 50%, rgba(255, 184, 25, .16), transparent 40%),
    radial-gradient(ellipse at 86% 15%, rgba(255, 72, 45, .09), transparent 30%),
    linear-gradient(125deg, #100c15, #08060b);
}
.result-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.result-bg span { position: absolute; font-family: var(--font-display); font-size: 30vw; line-height: .8; color: transparent; -webkit-text-stroke: 1px rgba(255,210,63,.055); }
.result-bg span:first-child { left: -3%; bottom: 5%; }
.result-bg span:last-child { right: 1%; top: 4%; transform: rotate(4deg); }
.result-layout {
  position: relative; z-index: 2; flex: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 7vw, 110px); align-items: center;
  width: min(1120px, calc(100% - 76px)); margin: 0 auto;
  padding: 25px 0 35px;
}
.winner-side { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.winner-crown { font-family: var(--font-display); font-size: 13px; letter-spacing: .27em; color: var(--yellow); margin-bottom: 8px; }
.winner-img-wrap { position: relative; width: min(470px, 82%); height: min(540px, 58vh); display: grid; place-items: center; }
.winner-img-wrap::before { content: ""; position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, rgba(255,198,37,.22), transparent 66%); filter: blur(3px); }
.winner-img-wrap::after { content: ""; position: absolute; width: 70%; height: 22px; bottom: 2%; background: rgba(0,0,0,.55); border-radius: 50%; filter: blur(9px); }
.winner-img-wrap img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: contain; object-position: bottom center; filter: drop-shadow(10px 15px 15px rgba(0,0,0,.38)); animation: winner-in .65s .1s var(--ease) both, float 4.5s 1s ease-in-out infinite; }
@keyframes winner-in { from { opacity: 0; transform: scale(.83) translateY(20px) rotate(-3deg); } to { opacity: 1; transform: scale(1) translateY(0) rotate(0); } }
.winner-meta { margin-top: 2px; }
.winner-meta > span { font-family: var(--font-display); font-size: 11px; letter-spacing: .16em; color: var(--pc, var(--yellow)); }
.winner-meta h2 { margin: 6px 0 4px; font-size: clamp(36px, 4vw, 58px); line-height: 1; font-weight: 1000; letter-spacing: -.055em; }
.winner-meta p { margin: 0; font-size: 12px; color: #a79cae; }
.win-pips { display: flex; gap: 5px; justify-content: center; margin-top: 14px; }
.win-pips i { width: 28px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.13); }
.win-pips i.on { background: var(--yellow); box-shadow: 0 0 12px rgba(255,210,63,.35); }
.result-panel {
  position: relative;
  padding: clamp(26px, 4vw, 40px);
  background: rgba(26,20,32,.68);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  animation: rise .5s .15s var(--ease) both;
}
.result-panel::before { content: ""; position: absolute; left: 0; top: 0; width: 48px; height: 3px; background: var(--yellow); }
.result-panel h2 { margin: 16px 0 24px; font-size: clamp(30px, 3.5vw, 48px); line-height: 1.1; font-weight: 1000; letter-spacing: -.045em; }
.result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.result-stats > div { min-height: 85px; padding: 14px; background: #15111b; display: flex; flex-direction: column; gap: 10px; }
.result-stats small { font-size: 9px; color: #7d7385; letter-spacing: .04em; }
.result-stats b { font-family: var(--font-display); color: var(--cream); font-size: 27px; font-weight: 400; letter-spacing: .02em; line-height: 1; }
.result-stats b em { font-family: var(--font-sans); font-style: normal; font-size: 8px; color: #8d8395; letter-spacing: .06em; }
.result-vs { margin: 20px 0; padding: 12px; text-align: center; background: rgba(255,210,63,.055); border: 1px solid rgba(255,210,63,.12); color: #a99d88; font-size: 10px; letter-spacing: .04em; }
.result-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.result-actions .cta-btn { flex: 1 1 130px; min-height: 47px; font-size: 13px; }
.result-actions .ghost-btn { flex: 1 1 100px; min-height: 47px; font-size: 11px; }
.rematch-status { display: flex; align-items: center; gap: 9px; color: var(--yellow); font-size: 10px; margin-top: 13px; }
.result-foot { position: relative; z-index: 2; flex: 0 0 auto; text-align: center; color: #655d6b; font-size: 8px; letter-spacing: .05em; padding: 0 20px 23px; }

/* =========================================================
   弹窗 / toast
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 300; display: none; place-items: center; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,3,6,.72); backdrop-filter: blur(10px); }
.modal-card {
  position: relative; z-index: 1;
  width: min(1040px, calc(100% - 36px));
  max-height: min(86vh, 740px); overflow: auto;
  padding: clamp(24px, 3.4vw, 40px);
  background: linear-gradient(145deg, #201927, #100d16);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  box-shadow: var(--shadow);
  animation: pop .25s var(--ease) both;
}
.modal-card::before { content: ""; position: absolute; left: 0; top: 0; width: 58px; height: 3px; background: var(--yellow); }
.modal-close { position: absolute; right: 16px; top: 13px; width: 30px; height: 30px; border-radius: 50%; color: #978c9f; font-size: 23px; line-height: 1; transition: .2s; }
.modal-close:hover { color: var(--ink); background: var(--yellow); }
.guide-head h2 { margin: 13px 0 7px; font-size: clamp(24px, 3vw, 36px); font-weight: 1000; letter-spacing: -.04em; }
.guide-head p { margin: 0 0 23px; color: #a096a8; font-size: 11px; line-height: 1.7; }
.guide-head p kbd { margin: 0 2px; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 22px; padding: 20px 0 23px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.guide-col h3 { margin: 0 0 13px; font-size: 12px; color: var(--cream); font-weight: 800; display: flex; align-items: center; gap: 7px; }
.guide-col h3 span { font-family: var(--font-display); font-size: 9px; color: var(--ink); background: var(--yellow); padding: 3px 5px; border-radius: 2px; letter-spacing: .04em; }
.key-row { display: flex; align-items: center; gap: 4px; min-height: 34px; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 10px; color: #a69cab; }
.key-row kbd { color: var(--cream); background: rgba(255,255,255,.08); }
.key-row span { margin-left: auto; }
.tips-col { padding-left: 20px; border-left: 1px solid var(--line); }
.tip-line { display: flex; gap: 10px; margin-bottom: 12px; }
.tip-line i { font-style: normal; flex: 0 0 18px; font-family: var(--font-display); font-size: 10px; color: var(--yellow); padding-top: 2px; }
.tip-line p { margin: 0; color: #8e8496; font-size: 10px; line-height: 1.65; }
.tip-line b { color: #d4cad9; }
.guide-move-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 20px 0; }
.guide-move { padding: 12px; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 3px; }
.guide-move .gm-name { font-size: 11px; color: var(--cream); font-weight: 800; display: flex; gap: 6px; align-items: center; }
.guide-move .gm-name i { width: 5px; height: 5px; border-radius: 50%; background: var(--gc, var(--yellow)); }
.guide-move small { display: block; color: #797081; font-size: 8px; margin-top: 5px; line-height: 1.55; }
.guide-move b { display: block; color: var(--gc, var(--yellow)); font-size: 9px; margin-top: 8px; font-weight: 700; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #6f6677; font-size: 9px; }
.modal-foot .cta-btn { min-height: 43px; font-size: 12px; }
.small-modal { width: min(380px, calc(100% - 36px)); }
.small-modal h3 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.04em; }
.small-modal p { color: #968c9e; font-size: 11px; line-height: 1.7; margin: 0 0 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions .cta-btn { min-height: 42px; font-size: 12px; }
.modal-actions .ghost-btn { min-height: 42px; font-size: 11px; }

.toast-stack { position: fixed; z-index: 500; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 5px;
  background: rgba(25,20,30,.94); border: 1px solid var(--line-strong);
  color: var(--cream); font-size: 11px; box-shadow: 0 10px 28px rgba(0,0,0,.3);
  animation: toast-in .25s var(--ease) both;
  backdrop-filter: blur(12px);
}
.toast::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 9px var(--yellow); }
.toast.out { animation: toast-out .22s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* =========================================================
   响应式
   ========================================================= */
@media (max-height: 760px) and (min-width: 900px) {
  .topbar { padding-top: 16px; padding-bottom: 12px; }
  .title-stage { padding-top: 68px; padding-bottom: 82px; }
  .title-kicker { margin-top: 14px; }
  .title-ribbon { margin-top: 27px; }
  .title-desc { line-height: 1.65; }
  .hero { bottom: 55px; }
  .title-foot { padding-bottom: 14px; }
  .menu-card { padding-top: 18px; padding-bottom: 11px; }
  .menu-btn { padding-top: 9px; padding-bottom: 9px; }
  .menu-label b { font-size: 18px; }
  .online-art { height: min(540px, 63vh); }
  .online-art img { height: min(460px, 54vh); }
  .online-panel { padding: 28px; }
  .char-card { min-height: 245px; height: min(34vh, 330px); }
  .select-head { margin-bottom: 12px; }
  .select-head h2 { font-size: 28px; }
  .select-layout { padding-top: 13px; }
  .fighter-panel { padding: 12px; }
  .fighter-panel-face { margin-bottom: 9px; }
  .fighter-panel-title { margin-bottom: 9px; }
  .stat-list { padding-top: 9px; padding-bottom: 9px; gap: 5px; }
  .panel-moves { padding-top: 8px; gap: 5px; }
  .select-bottom { margin-top: 10px; }
  .select-controls-strip { padding-top: 9px; }
  .result-layout { padding-top: 5px; padding-bottom: 10px; }
  .winner-img-wrap { width: min(340px, 70%); height: min(430px, 54vh); }
  .result-panel h2 { margin-bottom: 18px; }
  .result-stats > div { min-height: 73px; padding: 11px; gap: 7px; }
  .result-vs { margin: 13px 0; }
}

@media (max-width: 1060px) {
  .title-stage { gap: 22px; padding-left: 34px; padding-right: 34px; }
  .title-copy { width: min(560px, 51vw); }
  .menu-card { flex-basis: 322px; }
  .hero-fighters { opacity: .76; }
  .h-frog { left: 39%; width: 210px; }
  .h-roo { left: 21%; width: 200px; }
  .h-bull { width: 250px; }
  .select-layout { grid-template-columns: 180px minmax(0,1fr) 180px; width: calc(100% - 26px); gap: 10px; }
  .panel-moves b { font-size: 9px; }
  .online-layout { width: calc(100% - 44px); gap: 35px; }
}


@media (min-width: 821px) and (max-width: 1320px) {
  .h-frog { left: 53%; width: clamp(155px, 15vw, 196px); bottom: clamp(54px, 7vh, 72px); }
  .h-bull { right: -8%; width: clamp(160px, 17vw, 215px); opacity: .38; }
  .h-roo { left: 52%; width: 200px; }
  .title-copy { width: min(540px, 53vw); }
  .menu-card { flex-basis: clamp(300px, 29vw, 322px); }
}

@media (max-width: 820px) {
  html, body { overflow: hidden; }
  .topbar { padding: 15px 18px; }
  .brand-mini span:last-child { display: none; }
  .brand-mini b { font-size: 11px; }
  .icon-btn { width: 37px; height: 37px; }
  .title-screen { overflow-y: auto; }
  .title-stage { flex: 1 0 auto; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 75px 19px 100px; gap: 18px; }
  .title-copy { width: 100%; }
  .title-kicker { margin: 19px 0 9px; }
  .game-logo { font-size: clamp(54px, 12vw, 92px); }
  .game-logo::after { bottom: -22px; font-size: 8px; }
  .title-ribbon { margin-top: 30px; font-size: 9px; }
  .title-desc { max-width: 100%; font-size: 11px; line-height: 1.75; }
  .title-tags { margin-top: 12px; }
  .menu-card { flex: 0 0 auto; width: 100%; padding: 22px 20px 14px; background: rgba(18,14,23,.91); }
  .hero-fighters { position: absolute; bottom: 120px; opacity: .25; }
  .h-frog { left: 36%; width: 135px; bottom: 110px; }
  .h-bull { right: -8%; width: 155px; bottom: 95px; }
  .h-roo { left: 2%; width: 90px; bottom: 100px; }
  .title-foot { padding: 0 18px 15px; flex: 0 0 auto; }
  .ticker { width: calc(100% - 0px); }
  .title-credit { display: none; }
  .subbar { min-height: 58px; padding: 0 13px; }
  .subbar-title { position: static; transform: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-left: 8px; }
  .subbar-title span { font-size: 8px; }
  .subbar-title b { font-size: 12px; }
  .subbar-right .net-pill { display: none; }
  .select-meta { display: none; }
  .online-layout { display: flex; flex-direction: column; width: calc(100% - 30px); gap: 12px; padding: 18px 0; justify-content: flex-start; overflow-y: auto; }
  .online-art { width: 100%; height: 150px; flex: 0 0 150px; justify-content: flex-end; align-items: flex-end; }
  .online-art img { height: 175px; margin-right: 8%; }
  .online-art::before { width: 250px; height: 250px; bottom: -30px; }
  .online-art-badge, .bubble.b3, .online-art-caption { display: none; }
  .bubble { font-size: 9px; padding: 7px 10px; }
  .bubble.b1 { left: 12%; top: 47%; }
  .bubble.b2 { right: 5%; top: 30%; }
  .online-panel { width: 100%; padding: 22px 19px; }
  .online-panel h2 { font-size: 28px; margin-top: 14px; }
  .panel-desc { font-size: 10px; margin-bottom: 18px; }
  .cta-btn.big { min-height: 58px; font-size: 16px; }
  .online-bottom { display: none; }
  .select-layout { grid-template-columns: 1fr; gap: 9px; width: calc(100% - 24px); padding-top: 10px; overflow-y: auto; }
  .fighter-panel { display: none; }
  .select-center { padding-top: 0; }
  .select-head { margin-bottom: 10px; }
  .select-head h2 { font-size: 24px; }
  .roster { flex: 0 0 auto; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .char-card { height: 225px; min-height: 0; }
  .card-info b { font-size: 17px; }
  .card-info em { font-size: 8px; }
  .card-art { inset: 6% -6% 18% -6%; }
  .select-bottom { margin-top: 12px; gap: 8px; }
  .select-status { flex-basis: 100%; }
  .select-actions { width: 100%; }
  .select-actions .ghost-btn { flex: 1; min-height: 38px; padding: 0 8px; font-size: 9px; }
  .ready-btn { flex: 1.4; min-width: 0; min-height: 40px; font-size: 12px; }
  .select-controls-strip { display: none; }
  .select-screen { overflow: hidden; }
  .result-layout { grid-template-columns: 1fr; gap: 12px; width: calc(100% - 28px); overflow-y: auto; padding-top: 9px; justify-content: flex-start; }
  .winner-side { flex-direction: row; text-align: left; align-items: center; gap: 13px; }
  .winner-crown { position: absolute; left: 6px; top: 0; font-size: 8px; }
  .winner-img-wrap { flex: 0 0 130px; width: 130px; height: 168px; margin-top: 12px; }
  .winner-meta h2 { font-size: 28px; }
  .winner-meta p { font-size: 9px; }
  .win-pips { justify-content: flex-start; margin-top: 8px; }
  .win-pips i { width: 18px; height: 4px; }
  .result-panel { padding: 20px 17px; }
  .result-panel h2 { font-size: 28px; margin: 12px 0 14px; }
  .result-stats > div { min-height: 60px; padding: 9px; gap: 6px; }
  .result-stats b { font-size: 21px; }
  .result-vs { margin: 11px 0; padding: 9px; }
  .result-actions .cta-btn, .result-actions .ghost-btn { min-height: 41px; font-size: 11px; }
  .result-foot { display: none; }
  .modal-card { padding: 23px 18px; width: calc(100% - 24px); max-height: 88vh; }
  .guide-head h2 { font-size: 23px; }
  .guide-grid { grid-template-columns: 1fr 1fr; gap: 17px; }
  .tips-col { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .guide-move-grid { grid-template-columns: 1fr 1fr; }
  .guide-move { padding: 9px; }
  .modal-foot { flex-direction: column; align-items: stretch; gap: 11px; }
  .modal-foot .cta-btn { width: 100%; }
  .pause-card, .confirm-card { padding: 22px; }
  .battle-hint { display: none; }
  .touch-controls { display: block; }
  .rotate-tip { display: block; }
}

@media (pointer: coarse) {
  .touch-controls { display: block; }
  .battle-hint { display: none; }
}
@media (pointer: coarse) and (orientation: portrait) {
  .rotate-tip { display: block; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .battle-top-actions { top: 7px; right: 8px; }
  .battle-icon-btn { width: 28px; height: 28px; }
  .touch-controls { height: 135px; bottom: 5px; transform: scale(.82); transform-origin: bottom center; }
  .rotate-tip { display: none; }
  .net-status { top: 7px; }
}

/* 触屏强制显示 / 状态补充 */
body.force-touch .touch-controls { display: block; }
body.force-touch .battle-hint { display: none; }
.net-status.offline i { background: #ff5b68; box-shadow: 0 0 6px #ff5b68; }
.net-status.offline b { color: #ff9aa5; }
.toast.err::before { background: #ff5b68; box-shadow: 0 0 9px #ff5b68; }
.ready-btn.is-ready { background: #9ef7c8; box-shadow: 0 5px 0 #1f8965, 0 15px 34px rgba(158,247,200,.18); }
.char-card.dim-med { opacity: .4; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ticker-track { animation: none !important; }
}

/* 联机大厅：快速匹配 / 房间列表 */
.lobby-rooms-wrap{margin-top:14px;border-top:1px solid rgba(255,255,255,.09);padding-top:12px}
.lobby-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.lobby-head span{display:block;font-family:var(--mono);font-size:8px;letter-spacing:.16em;color:#8d98ab}
.lobby-head b{display:block;font-size:13px;color:#fff2d8;margin-top:1px}
.lobby-rooms{display:grid;gap:5px;max-height:180px;overflow:auto;padding-right:2px}
.lobby-room{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:9px;padding:7px 9px;border:1px solid rgba(255,255,255,.1);border-radius:9px;background:rgba(255,255,255,.035)}
.lobby-room b{font-size:12px;color:#fff3d6;display:block}
.lobby-room small{font-size:10px;color:#95a0b2;display:block;margin-top:1px}
.lobby-room .lobby-code{font-family:var(--mono);font-size:11px;color:#ffd75e}
.lobby-room button{height:28px;padding:0 10px;font-size:11px}
.lobby-room.is-full{opacity:.48}
.lobby-empty{margin:0;padding:12px;text-align:center;color:#8d98ab;font-size:11px;border:1px dashed rgba(255,255,255,.12);border-radius:9px}
.quick-status{display:flex;align-items:center;gap:9px;margin-top:10px;padding:9px 11px;border:1px solid rgba(255,214,94,.28);border-radius:10px;background:rgba(255,214,94,.06)}
.quick-status b{font-size:12px;color:#ffe6a0;flex:1}
.quick-status .spinner{width:13px;height:13px;border-width:2px}


/* 主页网络延迟 */
.latency-pill { min-width: 64px; justify-content: center; }
.latency-pill.good i { background: #57e6a4; box-shadow: 0 0 0 4px rgba(87,230,164,.08); }
.latency-pill.mid i { background: #ffd23f; box-shadow: 0 0 0 4px rgba(255,210,63,.08); }
.latency-pill.high i { background: #ff5c62; box-shadow: 0 0 0 4px rgba(255,92,98,.1); }
.latency-pill.offline span { color: #ff9aa5; }

/* 战报 · 对手账号与互动 */
.result-opponent{display:flex;align-items:center;gap:10px;margin:10px 0 8px;padding:10px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(255,255,255,.035)}
.result-opponent[hidden]{display:none}
.result-opponent img{width:38px;height:38px;border-radius:50%;object-fit:cover;border:1px solid rgba(255,214,94,.35);background:#17121f;flex:0 0 auto}
.result-opponent-meta{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.result-opponent-meta small{font-size:8px;letter-spacing:.12em;color:var(--muted)}
.result-opponent-meta b{font-size:13px;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.result-opponent-meta span{font-size:9px;color:var(--muted);line-height:1.4}
.result-opponent .ghost-btn{flex:0 0 auto;font-size:10px;padding:7px 10px}
.result-opponent .ghost-btn:disabled{opacity:.45;cursor:default}
.result-social{margin:0 0 10px;padding:10px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(0,0,0,.14)}
.result-social[hidden]{display:none}
.result-taunts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.result-taunts button{border:1px solid rgba(255,214,94,.22);background:rgba(255,214,94,.06);color:#ffe6a0;border-radius:999px;padding:5px 9px;font-size:10px;cursor:pointer}
.result-taunts button:active{transform:scale(.96)}
.result-chat-row{display:flex;gap:6px}
.result-chat-row input{flex:1;min-width:0;background:#0e0a13;border:1px solid rgba(255,255,255,.13);border-radius:8px;color:#fff;padding:8px 10px;font-size:11px;outline:none}
.result-chat-row input:focus{border-color:rgba(255,214,94,.5)}
.small-cta{padding:7px 12px;font-size:10px}
.result-social-note{margin:7px 0 0;font-size:9px;color:var(--muted)}

/* 匹配方式 */
.match-mode{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:8px}
.match-mode button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:9px 10px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(255,255,255,.035);color:#b9b0c3;cursor:pointer;text-align:left}
.match-mode button b{font-size:11px;color:#fff}
.match-mode button small{font-size:9px;color:var(--muted);line-height:1.35}
.match-mode button.active{border-color:rgba(255,214,94,.55);background:rgba(255,214,94,.1);box-shadow:0 0 0 1px rgba(255,214,94,.12) inset}
.match-mode button.active b{color:#ffe6a0}
.match-mode-hint{margin:0 0 10px;font-size:9px;line-height:1.5;color:var(--muted)}

/* 可选 P2P 加速 */
.p2p-option{display:flex;align-items:center;gap:9px;margin:0 0 12px;padding:9px 10px;border:1px solid rgba(87,230,164,.18);border-radius:10px;background:rgba(87,230,164,.045);cursor:pointer}
.p2p-option input{position:absolute;opacity:0;pointer-events:none}
.p2p-switch{width:30px;height:17px;border-radius:999px;background:rgba(255,255,255,.14);position:relative;flex:0 0 auto;transition:background .15s}
.p2p-switch i{position:absolute;left:2px;top:2px;width:13px;height:13px;border-radius:50%;background:#8e8498;transition:transform .15s,background .15s}
.p2p-option input:checked + .p2p-switch{background:rgba(87,230,164,.32)}
.p2p-option input:checked + .p2p-switch i{transform:translateX(13px);background:#57e6a4}
.p2p-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.p2p-copy b{font-size:11px;color:#dff7ea}
.p2p-copy b em{font-style:normal;font-size:8px;color:#57e6a4;border:1px solid rgba(87,230,164,.3);border-radius:999px;padding:1px 4px;margin-left:3px}
.p2p-copy small{font-size:9px;color:var(--muted);line-height:1.35}

/* 在线人数 / 角色胜率 */
.online-pill{min-width:70px;justify-content:center}
.online-pill span{font-variant-numeric:tabular-nums}
.count-option{margin-top:-2px}
.char-winrates{margin:0 0 10px;padding:9px 10px;border:1px solid rgba(255,255,255,.09);border-radius:10px;background:rgba(255,255,255,.03)}
.char-winrates[hidden]{display:none}
.char-winrates-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.char-winrates-head b{font-size:10px;color:#fff}
.char-winrates-head small{font-size:9px;color:var(--muted)}
.char-winrates-list{display:flex;flex-direction:column;gap:6px}
.char-winrate{display:flex;align-items:center;gap:7px;font-size:9px;color:#c9c0d3}
.char-winrate span:first-child{width:42px;flex:0 0 auto}
.char-winrate-bar{flex:1;height:5px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden}
.char-winrate-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffd23f,#ff8a3d)}
.char-winrate b{width:34px;text-align:right;color:#ffe6a0;font-variant-numeric:tabular-nums}

.quick-timer{font-size:9px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}

/* 排位 */
.rank-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px;margin:0 0 12px;padding:9px 10px;border:1px solid rgba(255,210,63,.22);border-radius:11px;background:linear-gradient(135deg,rgba(255,210,63,.08),rgba(255,138,61,.03))}
.rank-card[hidden]{display:none}
.rank-emblem{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:rgba(255,210,63,.14);border:1px solid rgba(255,210,63,.35);color:#ffe6a0;font-size:17px;font-weight:800}
.rank-info{display:flex;flex-direction:column;gap:1px;min-width:0}
.rank-info small{font-size:8px;letter-spacing:.12em;color:var(--muted)}
.rank-info b{font-size:13px;color:#ffe6a0;white-space:nowrap}
.rank-info span{font-size:9px;color:var(--muted)}
.rank-score{text-align:right;line-height:1}
.rank-score b{font-size:18px;color:#fff;font-variant-numeric:tabular-nums}
.rank-score small{font-size:8px;color:var(--muted);margin-left:2px}
.rank-bar{grid-column:1/-1;height:4px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden}
.rank-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffd23f,#ff8a3d);transition:width .3s}
.result-rank{margin:8px 0 10px;padding:8px 10px;border-radius:9px;border:1px solid rgba(255,210,63,.22);background:rgba(255,210,63,.06);font-size:11px;color:#ffe6a0;text-align:center}
.result-rank[hidden]{display:none}
.sp-rank{display:flex;align-items:center;gap:8px;margin:8px 0 0;padding:8px 10px;border-radius:9px;background:rgba(255,210,63,.07);border:1px solid rgba(255,210,63,.2)}
.sp-rank b{font-size:12px;color:#8a5a00}
.sp-rank span{font-size:10px;color:#9a7a35}

/* 强制直连 */
.p2p-forced{cursor:default}
.p2p-bolt{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:rgba(87,230,164,.12);border:1px solid rgba(87,230,164,.3);color:#57e6a4;font-size:15px;flex:0 0 auto}
.p2p-forced .p2p-copy b em{color:#57e6a4;border-color:rgba(87,230,164,.35)}

/* 未开放角色 */
.char-card.is-locked{cursor:not-allowed;filter:grayscale(.85);opacity:.62}
.char-card.is-locked:hover{transform:none}
.card-soon{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-6deg);padding:7px 12px;border-radius:6px;background:rgba(12,9,16,.86);border:1px solid rgba(255,210,63,.55);color:#ffe6a0;font-size:12px;font-weight:800;letter-spacing:.08em;white-space:nowrap;z-index:5;box-shadow:0 8px 24px rgba(0,0,0,.4)}


/* 管理员测试角色 */
.card-soon.admin{top:10px;left:auto;right:10px;transform:none;padding:4px 7px;font-size:9px;letter-spacing:.05em;background:rgba(20,16,28,.9);border-color:rgba(87,230,164,.55);color:#8ff0bf}

/* 选人页：角色卡改为三列单行，避免第三张卡向下溢出压住键位表 */
@media (min-width: 821px) {
  .roster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .char-card { height: min(38vh, 380px); min-height: 255px; }
}

/* 选人页：键位表默认收起，点击展开 */
.select-controls-details{margin-top:auto;padding-top:12px;border-top:1px solid var(--line)}
.select-controls-details summary{display:flex;align-items:center;gap:8px;min-height:32px;cursor:pointer;list-style:none;color:#a79daf;font-size:10px;font-weight:800;letter-spacing:.04em}
.select-controls-details summary::-webkit-details-marker{display:none}
.select-controls-details summary small{color:#6f6677;font-size:9px;font-weight:500}
.select-controls-details summary i{margin-left:auto;font-style:normal;transition:transform .2s}
.select-controls-details[open] summary i{transform:rotate(180deg)}
.select-controls-details .select-controls-strip{margin-top:8px;padding-top:11px;border-top:1px solid rgba(255,255,255,.07)}

/* 联机页：常见窗口高度下压缩面板，确保所有信息可见 */
.online-screen{overflow-y:auto}
@media (min-width:821px) and (max-height:900px){
  .online-screen{overflow:hidden}
  .online-layout{align-items:start;padding:8px 0 6px;min-height:0}
  .online-panel{padding:18px 25px;max-height:calc(100vh - 132px);overflow-y:auto;scrollbar-width:thin}
  .online-panel h2{margin:8px 0 5px;font-size:30px}
  .panel-desc{font-size:10px;line-height:1.55;margin-bottom:13px}
  .field-label{margin-bottom:5px}
  .nick-row{margin-bottom:11px}
  .text-input{height:40px;font-size:12px}
  .dice-btn{flex-basis:40px;height:40px}
  .mode-tabs{margin-bottom:11px}
  .mode-tab{min-height:31px;font-size:11px}
  .cta-btn.big{min-height:50px}
  .field-hint{font-size:8px;margin-top:6px}
  .lobby-rooms-wrap{margin-top:9px;padding-top:8px}
  .lobby-rooms{max-height:92px}
  .online-art img{height:min(460px,48vh)}
  .online-art{height:min(540px,56vh)}
  .online-bottom{padding:8px 0 11px}
}
@media (max-width:820px){
  .select-controls-details{display:none}
}

/* 选人页键位展开后允许中间列内部滚动，避免内容被截断 */
.select-center{overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}

/* 联机页：隐藏说明开关，只保留功能；短窗口隐藏装饰块后压缩 */
.online-panel .p2p-option[hidden], .online-panel .count-option[hidden]{display:none!important}
@media (min-width:821px) and (max-height:760px){
  .online-layout{height:calc(100vh - 72px);padding:4px 0 3px;align-items:stretch}
  .online-panel{padding:14px 22px;max-height:calc(100vh - 118px);overflow-y:auto}
  .online-panel .panel-kicker{display:none}
  .online-panel h2{font-size:25px;margin:0 0 4px}
  .panel-desc{font-size:9px;line-height:1.45;margin-bottom:8px}
  .field-label{margin-bottom:3px;font-size:9px}
  .nick-row{margin-bottom:7px}
  .text-input{height:34px;padding:0 10px;font-size:11px}
  .dice-btn{height:34px;flex-basis:34px}
  .mode-tabs{margin-bottom:7px}
  .mode-tab{min-height:28px;font-size:10px}
  .cta-btn.big{min-height:43px}
  .field-hint{display:none}
  .lobby-rooms-wrap{margin-top:6px;padding-top:6px}
  .lobby-rooms{max-height:58px}
  .lobby-head{margin-bottom:4px}
  .online-art img{height:min(390px,45vh)}
  .online-art{height:min(460px,52vh)}
  .online-bottom{padding:4px 0 5px;font-size:8px}
}

/* 首页今日推荐：细长淡入词条 */
.daily-pick{
  display:flex;align-items:center;gap:11px;
  width:min(460px,100%);margin-top:16px;padding:9px 12px;
  border:1px solid rgba(255,210,63,.24);border-radius:5px;
  background:linear-gradient(90deg,rgba(255,210,63,.13),rgba(255,255,255,.028));
  color:var(--cream);text-align:left;
  animation:daily-in .9s .45s var(--ease) both;
  transition:border-color .2s,background .2s,transform .2s;
}
.daily-pick:hover{border-color:rgba(255,210,63,.62);background:linear-gradient(90deg,rgba(255,210,63,.22),rgba(255,255,255,.04));transform:translateY(-2px)}
.daily-label{flex:0 0 auto;padding:4px 7px;border-radius:3px;background:var(--yellow);color:var(--ink);font-size:8px;font-weight:900;letter-spacing:.08em}
.daily-main{display:flex;flex-direction:column;gap:1px;min-width:0}
.daily-main b{font-size:12px;font-weight:900;letter-spacing:.02em}
.daily-main small{color:#918899;font-size:8px;letter-spacing:.03em}
.daily-arrow{margin-left:auto;color:var(--yellow);font-size:16px}
@keyframes daily-in{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}

/* 手柄设置与手柄焦点 */
.gamepad-config-btn{font-size:17px;line-height:1}
.pad-focus{outline:2px solid var(--yellow)!important;outline-offset:3px;box-shadow:0 0 0 4px rgba(255,210,63,.16)!important}
.pad-bind-list{display:flex;flex-direction:column;gap:7px;margin:14px 0 18px;max-height:min(46vh,360px);overflow:auto;padding-right:3px}
.pad-bind-row{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:rgba(255,255,255,.035);color:var(--cream);text-align:left;font:inherit;cursor:pointer;transition:border-color .2s,background .2s}
.pad-bind-row:hover,.pad-bind-row.pad-focus{border-color:rgba(255,210,63,.55);background:rgba(255,210,63,.075)}
.pad-bind-row.is-listening{border-color:var(--yellow);background:rgba(255,210,63,.13)}
.pad-bind-row span{flex:1;font-size:12px;font-weight:800}
.pad-bind-row b{min-width:70px;text-align:center;padding:3px 8px;border-radius:4px;background:rgba(255,210,63,.14);color:var(--yellow);font-size:11px}
.pad-bind-row i{width:74px;text-align:right;font-style:normal;color:#807588;font-size:9px}
.pad-bind-row.is-listening i{color:var(--yellow)}

.pad-move-sheet{display:flex;flex-direction:column;gap:5px;margin:0 0 14px;padding:11px 13px;border:1px solid rgba(255,210,63,.15);border-radius:6px;background:rgba(255,210,63,.045)}
.pad-move-sheet>b{font-size:11px;color:var(--yellow);letter-spacing:.08em;margin-bottom:3px}
.pad-move-sheet>div{display:flex;justify-content:space-between;gap:12px;font-size:10px;color:#a79daf}
.pad-move-sheet>div em{font-style:normal;color:#fff5dd;white-space:nowrap}
.pad-move-sheet p{margin:5px 0 0;color:#807588;font-size:9px;line-height:1.5}

.pad-rumble-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:2px 0 14px;padding:10px 12px;border:1px solid rgba(255,210,63,.15);border-radius:6px;background:rgba(255,255,255,.035);cursor:pointer}
.pad-rumble-row span{display:flex;flex-direction:column;gap:2px}
.pad-rumble-row b{font-size:11px;color:var(--cream)}
.pad-rumble-row small{font-size:9px;color:#807588}
.pad-rumble-row input{width:18px;height:18px;accent-color:var(--yellow)}

.battle-device{position:absolute;left:50%;top:78px;transform:translateX(-50%);z-index:7;padding:4px 10px;border:1px solid rgba(255,246,209,.18);border-radius:999px;background:rgba(15,11,20,.72);color:#d8cfdb;font-size:10px;font-weight:600;letter-spacing:.02em;backdrop-filter:blur(10px);pointer-events:none}
.battle-device[hidden]{display:none}
