* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #1b2236; display: grid; place-items: center;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #fff; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none;
}
button { font-family: inherit; cursor: pointer; border: 0; color: inherit; }
input { font-family: inherit; }
.hidden { display: none !important; }

/* 画面固定 9:16，在窗口里居中；里面的尺寸用 cqw/cqh（相对画面）而不是 vw/vh（相对窗口） */
#app {
  position: relative; width: min(100vw, 100vh * 9 / 16); height: min(100vh, 100vw * 16 / 9); overflow: hidden; container-type: size;
  --ink: #1d2340; --safe-top: env(safe-area-inset-top, 0px); --safe-bot: env(safe-area-inset-bottom, 0px);
  --lift: clamp(56px, 13cqh, 150px);
}
#menuBg { position: absolute; inset: 0; background: url(/assets/lobby_bg.jpg) center / cover no-repeat; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; }

/* ---------- 通用组件 ---------- */
.btn {
  position: relative; min-height: 52px; padding: 8px 18px; border-radius: 16px; font-weight: 900; font-size: 19px;
  letter-spacing: 1px; color: #fff; border: 3px solid var(--ink);
  text-shadow: -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink), 0 3px 0 var(--ink);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), inset 0 3px 0 rgba(255, 255, 255, .45), 0 5px 0 var(--ink);
  transition: transform .08s, box-shadow .08s; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.btn:active { transform: translateY(4px); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), inset 0 3px 0 rgba(255, 255, 255, .45), 0 1px 0 var(--ink); }
.btn small { font-size: 12px; font-weight: 700; letter-spacing: 0; opacity: .95; text-shadow: 0 1px 0 var(--ink); }
.btn.big { width: 100%; min-height: 66px; font-size: 26px; }
.btn-yellow { background: linear-gradient(#ffe45c, #ffbf1f); color: #fff; }
.btn-blue { background: linear-gradient(#5fb4ff, #2f7cf0); }
.btn-green { background: linear-gradient(#7de85a, #2fbf46); }
.btn-gray { background: linear-gradient(#b7c0d0, #8792a8); }
.btn:disabled { filter: grayscale(.8) brightness(.9); }
.btn-row { display: flex; gap: 12px; width: 100%; }
.btn-row .btn { flex: 1; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 20px; font-weight: 800; font-size: 14px;
  background: rgba(29, 35, 64, .72); border: 2px solid rgba(255, 255, 255, .25);
}
.chip b { color: #ffd23a; font-size: 17px; }
.star { width: 22px; height: 22px; background: radial-gradient(circle at 40% 35%, #fff59a, #ffc21f 60%, #f08c00); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 78%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.coin {
  display: inline-block; width: 20px; height: 20px; border-radius: 50%; flex: none; vertical-align: middle;
  background: radial-gradient(circle at 38% 32%, #fff6b0, #ffd23a 45%, #f0a000 75%); border: 2px solid #b86e00; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}
.chips { display: flex; gap: 8px; }
.coin-chip { padding-left: 6px; }
.coin-chip b { min-width: 2ch; }
.coin-chip.bump { animation: bump .5s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes bump { 40% { transform: scale(1.25); } }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; background: rgba(29, 35, 64, .72) center / 26px no-repeat;
  border: 2px solid rgba(255, 255, 255, .25);
}
.icon-btn.back { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.4 4.6 8 12l7.4 7.4-2 2L4 12l9.4-9.4z'/%3E%3C/svg%3E"); }

/* ---------- 首页 ---------- */
#screenHome { padding: calc(12px + var(--safe-top)) 18px calc(18px + var(--safe-bot)); }
/* 桌面客户端是无边框窗口，顶栏用来拖动窗口；上面的按钮照常可点 */
.top-row { width: 100%; display: flex; justify-content: space-between; align-items: center; -webkit-app-region: drag; }
.top-row button, .top-row .chip { -webkit-app-region: no-drag; }
.logo { width: 86%; max-width: 380px; margin-top: 2cqh; filter: drop-shadow(0 6px 0 rgba(29, 35, 64, .35)); animation: logoIn .7s cubic-bezier(.2, 1.6, .4, 1) both, float 3s ease-in-out .7s infinite; }
@keyframes logoIn { from { transform: scale(.4) rotate(-6deg); opacity: 0; } }
@keyframes float { 50% { transform: translateY(-6px); } }
.menu-sub {
  margin-top: 6px; padding: 4px 16px; border-radius: 14px; background: rgba(29, 35, 64, .7); font-size: 13px; font-weight: 900; letter-spacing: 1px;
}
.menu-sub b { color: #ffd23a; }
.home-cards {
  position: absolute; left: 14px; top: calc(31% + 44px); z-index: 6;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none;
}
.home-cards:empty { display: none; }
.hc {
  display: flex; align-items: center; gap: 4px; padding: 2px 9px 2px 2px; border-radius: 12px;
  background: rgba(0, 0, 0, .55); font-size: 12px; font-weight: 700; white-space: nowrap;
}
.hc-tag { padding: 1px 5px; border-radius: 9px; background: #fe2c55; font-size: 10px; font-weight: 800; }
.hc em { font-style: normal; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.showroom-space { position: relative; flex: 1; width: 100%; min-height: 120px; }
#stageLabels { position: absolute; inset: 0; pointer-events: none; isolation: isolate; }
.slabel {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap;
  animation: slotIn .35s cubic-bezier(.2, 1.5, .4, 1) both;
}
.slabel .nm {
  padding: 2px 9px; border-radius: 10px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 13px; font-weight: 900;
  border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink);
}
.slabel.me .nm { background: #ffd23a; }
.slabel.me::after { content: "▼"; order: -1; color: #ffd23a; font-size: 14px; line-height: 1; text-shadow: 0 2px 0 var(--ink); animation: float 1s ease-in-out infinite; }
.slabel.compact .nm { padding: 1px 6px; font-size: 11px; border-radius: 8px; }
.slabel.compact .nm.ok { background: #a8f08a; }
.slabel.compact .nm i { font-style: normal; margin-right: 2px; }
.slabel.compact.me .nm { background: #ffd23a; }
.slabel .tags { gap: 3px; }
.slabel .tag { border: 1.5px solid var(--ink); color: var(--ink); }
.stage-hint {
  position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-weight: 900; font-size: 15px; text-shadow: 0 2px 0 var(--ink);
  animation: pulse 1.6s ease-in-out infinite;
}
.home-panel {
  width: 100%; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 22px;
  background: rgba(255, 255, 255, .82); border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); color: var(--ink);
  backdrop-filter: blur(4px);
  margin-bottom: calc(var(--lift) - 4px);
}
.home-panel .btn-row .btn { flex: 1; }
.home-panel .btn-row #btnMain { flex: 2; }
.home-panel .btn-row #btnLeave { flex: none; min-width: 76px; min-height: 66px; padding: 8px 12px; }
.lap-pick {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: 18px;
  background: linear-gradient(#2f7cf0, #1f5fd0); border: 3px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25);
}
.lap-pick.hidden { display: none; }
.lap-label {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 44px;
  color: #fff; font-size: 15px; font-weight: 900; text-shadow: 0 2px 0 var(--ink);
}
.lap-label::before {
  content: ''; width: 22px; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3v18' stroke='%23fff' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M6 4h13l-2.6 4.5L19 13H6z' fill='%23fff' stroke='%231d2340' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M9.5 4v9M13 4v9M6 8.5h12.4' stroke='%231d2340' stroke-width='1.4' opacity='.55'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lap-opts button:not(.on):active { transform: scale(.94); }
.lap-opts { flex: 1; display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: rgba(13, 30, 80, .35); }
.lap-opts button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  height: 50px; border-radius: 11px; border: 2.5px solid transparent; background: transparent; color: #fff;
  transition: transform .12s, background .15s;
}
.lap-opts button b { font-size: 22px; line-height: 1; font-weight: 900; text-shadow: 0 2px 0 var(--ink); }
.lap-opts button b em { font-style: normal; font-size: 12px; margin-left: 1px; }
.lap-opts button small { font-size: 10px; font-weight: 800; opacity: .8; }
.lap-opts button.on {
  background: linear-gradient(#fff07a, #ffc21a); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); color: var(--ink);
  transform: translateY(-2px);
}
.lap-opts button.on b { text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.lap-opts button.on small { opacity: 1; }

/* 右侧悬浮车库入口 */
.side-btn {
  position: absolute; right: 6px; top: 31%; z-index: 6; width: 72px; padding: 8px 0 5px; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  background: linear-gradient(#5fb4ff, #2f7cf0); border: 3px solid var(--ink);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18), inset 0 3px 0 rgba(255, 255, 255, .45), 0 5px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.side-btn svg { width: 42px; height: 42px; filter: drop-shadow(0 2px 0 rgba(29, 35, 64, .35)); }
.side-btn span { font-size: 12px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 2px 0 var(--ink); }
.side-btn:active { transform: translateY(4px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), inset 0 3px 0 rgba(255, 255, 255, .45), 0 1px 0 var(--ink); }

/* ---------- 车库 ---------- */
#screenGarage { padding: calc(12px + var(--safe-top)) 14px calc(var(--lift) + var(--safe-bot) + 10px); background: linear-gradient(rgba(20, 40, 90, .35), rgba(20, 40, 90, 0) 40%); }
.garage-title { margin: 0; font-size: 28px; font-weight: 900; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); letter-spacing: 2px; }
.garage-preview { position: relative; flex: 1; width: 100%; min-height: 150px; }
.garage-name {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 4px 16px; border-radius: 14px; white-space: nowrap;
  background: rgba(29, 35, 64, .78); font-weight: 900; font-size: 15px; border: 2px solid rgba(255, 255, 255, .3);
}
.garage-panel {
  width: 100%; height: clamp(340px, 46cqh, 460px); display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 22px; color: var(--ink);
  background: rgba(255, 255, 255, .92); border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
}
.garage-tabs { display: flex; gap: 6px; padding: 3px; border-radius: 14px; background: #e3e8f4; flex: none; }
.garage-tabs button {
  flex: 1; padding: 6px 12px; border-radius: 10px; font-weight: 900; font-size: 13px; color: #7a839c; background: transparent;
}
.garage-tabs button.on { color: #fff; background: linear-gradient(#5fb4ff, #2f7cf0); border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); text-shadow: 0 1px 0 var(--ink); }
.garage-grid {
  flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, 1fr); align-content: start;
  gap: 10px 8px; padding: 6px 4px 8px; overflow-x: hidden; overflow-y: auto;
  touch-action: pan-y; scrollbar-width: none; overscroll-behavior: contain;
}
.garage-grid::-webkit-scrollbar { display: none; }
.g-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-width: 0; height: 104px; padding: 8px 2px 6px; border-radius: 14px;
  background: #fff; color: var(--ink); border: 2.5px solid #cfd6e4; box-shadow: 0 3px 0 #cfd6e4;
}
.g-item.sel { border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); background: #fff8d6; transform: translateY(-2px); }
.g-item .sw { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--c); border: 2.5px solid var(--ink); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18), inset 0 4px 0 rgba(255, 255, 255, .4); }
.g-item .sw.auto { background: conic-gradient(#ff4b3e, #ffc12e, #38c95a, #22c9d6, #3d8bff, #a35cff, #ff6fb5, #ff4b3e); }
.g-item .sw.flame { background: radial-gradient(circle at 50% 60%, var(--c2) 0 25%, var(--c) 70%); }
.g-item .nm { font-size: 12px; font-weight: 900; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.g-item .pr { display: flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: #8792a8; }
.g-item .pr .coin { width: 13px; height: 13px; border-width: 1.5px; }
.g-item.locked .pr { color: #c07a00; }
.g-item .eq {
  position: absolute; top: -6px; right: -4px; padding: 1px 5px; border-radius: 8px; font-size: 10px; font-weight: 900; color: #fff;
  background: #2fbf46; border: 2px solid var(--ink);
}
#btnGarageAction small { display: flex; align-items: center; gap: 4px; }
.garage-actions { display: flex; gap: 8px; }
.garage-actions #btnGarageAction { flex: 1; min-height: 58px; font-size: 22px; }
.btn-gray-solid { background: linear-gradient(#c9d0dc, #a3adbf); }

.result-coins {
  display: flex; align-items: center; gap: 6px; margin: -6px 0 12px; padding: 4px 14px; border-radius: 14px; font-weight: 900; font-size: 18px;
  background: rgba(29, 35, 64, .7); animation: logoIn .5s .4s cubic-bezier(.2, 1.6, .4, 1) both;
}
.result-coins b { color: #ffd23a; }
.btn.pulse { animation: btnPulse 1.2s ease-in-out infinite; }
@keyframes btnPulse { 50% { transform: scale(1.035); } }
.btn.pulse:active { animation: none; }
/* ---------- 赛道标签 ---------- */
@keyframes slotIn { from { transform: scale(.6); opacity: 0; } }
.tags { display: flex; gap: 4px; }
.tag { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 8px; background: #e3e8f4; }
.tag.host { background: #ffd23a; }
.tag.ready { background: #7de85a; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; }
#touchLayer { position: absolute; inset: 0; touch-action: none; }
.hud-top {
  position: absolute; left: 10px; right: 62px; top: calc(8px + var(--safe-top)); display: flex; align-items: center; gap: 6px; pointer-events: none;
}
#btnSettings {
  position: absolute; right: 10px; top: calc(8px + var(--safe-top)); z-index: 6;
}
.icon-btn.gear {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.49.49 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.48.48 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 0 0-.59.22L2.74 8.87a.48.48 0 0 0 .12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32a.49.49 0 0 0-.12-.61l-2.01-1.58zM12 15.6a3.6 3.6 0 1 1 0-7.2 3.6 3.6 0 0 1 0 7.2z'/%3E%3C/svg%3E");
}
.set-row {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px;
  background: #f2f5fb; border: 2px solid #dde3ef; font-size: 16px; font-weight: 900; color: var(--ink);
}
.switch { position: relative; width: 50px; height: 28px; border-radius: 14px; background: #c4ccdb; border: 2px solid var(--ink); transition: background .2s; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: transform .2s; }
.set-row.on .switch { background: #45c93f; }
.set-row.on .switch::after { transform: translateX(22px); }
.lvl {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: 26px; flex: none;
  border: 3px solid var(--ink); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18), inset 0 3px 0 rgba(255, 255, 255, .5);
  text-shadow: -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink);
}
.lvl.cur { background: linear-gradient(#8cf05c, #36c247); }
.lvl.next { background: linear-gradient(#ffffff, #d5dbe6); color: #fff; }
.bar { position: relative; flex: 1; height: 44px; }
.bar-inner { position: absolute; left: 0; right: 0; top: 10px; height: 20px; border-radius: 10px; background: rgba(29, 35, 64, .55); border: 3px solid var(--ink); overflow: hidden; }
.fill { height: 100%; width: 0; background: linear-gradient(#a6f56b, #45c93f); border-radius: 6px; transition: width .12s linear; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45); }
.markers { position: absolute; left: 6px; right: 6px; top: 0; height: 100%; }
.marker { position: absolute; top: 30px; transform: translateX(-50%); transition: left .12s linear; }
.marker i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); }
.marker.me span {
  display: block; padding: 3px 7px 6px; font-size: 13px; font-weight: 900; background: #6fd84a; border: 2px solid var(--ink); color: #fff;
  clip-path: polygon(50% 0, 100% 30%, 100% 100%, 0 100%, 0 30%); text-shadow: 0 1px 0 var(--ink); margin-top: 2px;
}
.marker.lead::before { content: "👑"; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-size: 12px; }
.hud-rank {
  position: absolute; left: 12px; top: calc(78px + var(--safe-top)); display: flex; align-items: baseline; gap: 2px; pointer-events: none;
  font-weight: 900; text-shadow: 0 3px 0 var(--ink); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill;
}
.hud-rank small { font-size: 14px; margin-right: 4px; -webkit-text-stroke: 1px var(--ink); }
.hud-rank b { font-size: 46px; color: #ffd23a; line-height: 1; }
.hud-rank em { font-style: normal; font-size: 20px; }
#speedLines {
  position: absolute; inset: -10%; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(255, 255, 255, .55) 0deg 0.6deg, transparent 0.6deg 7deg);
  -webkit-mask: radial-gradient(ellipse at 50% 55%, transparent 38%, #000 72%); mask: radial-gradient(ellipse at 50% 55%, transparent 38%, #000 72%);
  animation: lines .25s steps(3) infinite;
}
@keyframes lines { 50% { transform: rotate(2deg) scale(1.02); } }
#countdown {
  position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: 120px; font-weight: 900; pointer-events: none; opacity: 0;
  color: #ffd23a; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 0 8px 0 var(--ink);
}
#countdown.pop { opacity: 1; }
#countdown.go { color: #7df05a; }
#countdown.go-anim { animation: cd .9s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes cd { 0% { transform: scale(2.4); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 80% { opacity: 1; } 100% { transform: scale(.9); opacity: 0; } }
#hudToast {
  position: absolute; left: 0; right: 0; top: 24%; text-align: center; font-size: 30px; font-weight: 900; pointer-events: none; opacity: 0;
  -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); color: #fff;
}
#hudToast.show { animation: toast 1.2s ease-out both; }
#hudToast.orange { color: #ffa33a; } #hudToast.blue { color: #6fc6ff; } #hudToast.green { color: #8df06a; } #hudToast.red { color: #ff6a5a; }
@keyframes toast { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.1); } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }
#finishBanner {
  position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: 64px; font-weight: 900; opacity: 0; pointer-events: none;
  color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 0 7px 0 var(--ink);
}
#finishBanner.show { animation: finish 2.6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes finish { 0% { opacity: 0; transform: scale(3) rotate(-8deg); } 20% { opacity: 1; transform: scale(1) rotate(-4deg); } 85% { opacity: 1; } 100% { opacity: 0; } }

#steerUI { position: absolute; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .15s; }
#steerUI.active, #steerUI.hint { opacity: 1; }
#steerUI .rail { position: absolute; left: -100px; width: 200px; top: -3px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .65); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
#steerUI .knob { position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .85); border: 3px solid rgba(29, 35, 64, .35); transform: translate(-50%, -50%); }
#steerUI .hand { display: none; position: absolute; left: -6px; top: 4px; width: 56px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 6c3 0 5 2 5 5v17l2-1c2-1 5 0 6 2l1 1c2-1 5 0 6 2 2-1 5 0 6 3l3 12c1 6-3 13-10 14H30c-4 0-7-2-9-5L10 40c-2-3 0-6 3-6 2 0 3 1 4 2l1 2V11c0-3 2-5 4-5z' fill='white' stroke='%231d2340' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
#steerUI.hint .hand { display: block; animation: handSwipe 1.6s ease-in-out infinite; }
#steerUI.hint .knob { animation: knobSwipe 1.6s ease-in-out infinite; }
@keyframes handSwipe { 0%, 100% { transform: translateX(-60px); } 50% { transform: translateX(60px); } }
@keyframes knobSwipe { 0%, 100% { transform: translate(calc(-50% - 60px), -50%); } 50% { transform: translate(calc(-50% + 60px), -50%); } }

/* ---------- 结算 ---------- */
#screenResult { padding: calc(40px + var(--safe-top)) 20px calc(var(--lift) + var(--safe-bot) + 8px); background: linear-gradient(rgba(10, 20, 50, .2), rgba(10, 20, 50, .65)); animation: fadeIn .4s both; }
@keyframes fadeIn { from { opacity: 0; } }
#resultTitle { margin: 0; font-size: 58px; font-weight: 900; color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 0 7px 0 var(--ink); animation: logoIn .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.result-level { margin: 6px 0 14px; font-weight: 900; font-size: 16px; text-shadow: 0 2px 0 var(--ink); }
.result-level b { color: #ffd23a; }
.result-list { list-style: none; padding: 0; margin: 0 0 18px; width: 100%; display: flex; flex-direction: column; gap: 8px; flex: 1; overflow: auto; }
.result-list li {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 900;
  border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); transform-origin: left; animation: rowIn .4s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes rowIn { from { opacity: 0; transform: translateX(-40px) scaleX(.8); } }
.result-list li:nth-child(even) { margin-left: 10px; }
.result-list li.me { background: linear-gradient(#ff6a55, #e9392b); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.result-list .pl { width: 40px; font-size: 18px; }
.result-list .pl sup { font-size: 11px; }
.result-list .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); flex: none; }
.result-list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.result-list .nm .ttl { margin-left: 6px; font-size: 11px; font-weight: 800; opacity: .7; }
.result-list .tm { font-size: 14px; opacity: .85; }
.result-list .gap { display: block; font-size: 11px; font-weight: 800; opacity: .6; }

/* ---------- 弹窗 / 提示 ---------- */
#toast {
  position: absolute; left: 50%; bottom: calc(30% + var(--safe-bot)); transform: translate(-50%, 20px); padding: 10px 18px; border-radius: 14px; z-index: 40;
  background: rgba(20, 26, 50, .9); font-weight: 800; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#loading { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(20, 40, 80, .55); font-weight: 900; text-shadow: 0 2px 0 var(--ink); }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 7px solid rgba(255, 255, 255, .3); border-top-color: #ffd23a; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chips.right { align-items: center; }

/* 登录前的启动画面 */
#boot { position: absolute; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: url(/assets/lobby_bg.jpg) center / cover no-repeat; }
#boot img { width: 82%; max-width: 360px; filter: drop-shadow(0 6px 0 rgba(29, 35, 64, .35)); }
#bootMsg { padding: 6px 16px; border-radius: 14px; background: rgba(29, 35, 64, .75); font-size: 15px; font-weight: 900; text-align: center; max-width: 86%; }
#bootMsg.error { background: rgba(200, 40, 40, .85); }

/* ---------- 弹窗 ---------- */
.modal {
  position: absolute; inset: 0; z-index: 35; display: flex; align-items: center; justify-content: center;
  padding: 20px 20px calc(var(--lift) + 28px);
  background: rgba(12, 18, 36, .55); backdrop-filter: blur(3px);
}
.modal-card {
  width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 22px;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 8px 0 var(--ink);
  animation: logoIn .22s cubic-bezier(.2, 1.5, .4, 1) both;
}
.modal-card h3 { margin: 0; font-size: 22px; font-weight: 900; text-align: center; }
.modal-card .btn.small { min-height: 44px; font-size: 16px; }
.btn.small { min-height: 42px; font-size: 15px; padding: 6px 12px; }

/* ---------- 直播间礼物说明栏 ---------- */
/* 观众在抖音直播间送礼，游戏里只说明每个礼物的效果；收起时轮流显示一个，点第一行展开全部，可以拖动 */
.gift-bar {
  position: absolute; left: 8px; top: 31%; z-index: 40; display: none; flex-direction: column; gap: 3px;
  touch-action: none; -webkit-app-region: no-drag; cursor: grab;
}
#app[data-scr="home"] .gift-bar, #app[data-scr="none"] .gift-bar { display: flex; }
#app[data-scr="none"] .gift-bar { top: calc(var(--safe-top) + 206px); }
.gb-row {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 3px; border-radius: 7px;
  background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  font-size: 13px; font-weight: 800; color: #fff4d6; white-space: nowrap; text-shadow: 0 1px 2px #000;
}
.gb-row img { flex: none; width: 26px; height: 26px; object-fit: contain; }
.gb-row span { display: inline-block; }
.gb-head { box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .45); }
.gift-bar:not(.open) .gb-head span { animation: gbIn .3s ease-out; }
@keyframes gbIn { from { opacity: 0; transform: translateY(6px); } }
.gb-arr { margin-left: 4px; border: 5px solid transparent; border-bottom: 6px solid #ffd23f; border-top: 0; transition: transform .2s; }
.gift-bar.open .gb-arr { transform: rotate(180deg); }

/* 调试模式下房主添加机器人 */
.dev-bots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 900; }
.dev-bots span { padding: 2px 8px; border-radius: 8px; background: rgba(29, 35, 64, .7); }
.dev-bots button { padding: 6px 12px; border-radius: 12px; background: rgba(29, 35, 64, .78); border: 2px solid rgba(255, 255, 255, .35); font-size: 13px; font-weight: 900; }

/* ---------- 观战 ---------- */
.watch-bar {
  position: absolute; left: 50%; bottom: calc(var(--safe-bot) + 26px); transform: translateX(-50%); z-index: 7;
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 22px; white-space: nowrap;
  background: rgba(29, 35, 64, .82); border: 2px solid rgba(255, 255, 255, .35); font-size: 14px; font-weight: 900;
}
.watch-bar em { font-style: normal; padding: 1px 7px; border-radius: 8px; background: #fe2c55; font-size: 12px; }
.watch-bar b { color: #ffd23a; max-width: 8em; overflow: hidden; text-overflow: ellipsis; }
.watch-bar button { padding: 6px 12px; border-radius: 16px; background: #2f7cf0; font-size: 13px; font-weight: 900; }
#hud.watching .item-slot, #hud.watching .card-slots, #hud.watching .horn-btn, #hud.watching #steerUI { display: none !important; }
.marker.view span {
  display: block; padding: 3px 7px 6px; font-size: 12px; font-weight: 900; background: #ffb21e; border: 2px solid var(--ink); color: #fff;
  clip-path: polygon(50% 0, 100% 30%, 100% 100%, 0 100%, 0 30%); text-shadow: 0 1px 0 var(--ink); margin-top: 2px;
}

.gift-fx {
  position: absolute; left: 8px; top: 23%; z-index: 60; max-width: 78%; display: flex; align-items: center; gap: 8px;
  padding: 4px 14px 4px 4px; border-radius: 26px; background: rgba(0, 0, 0, .6); pointer-events: none;
  animation: giftSlide 2.6s ease-out both;
}
.gf-ico { flex: none; width: 44px; height: 44px; object-fit: contain; }
.gf-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gf-t { font-size: 13px; font-weight: 800; white-space: nowrap; }
.gf-r { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 900; color: #ffd23f; }
.gf-r .coin { width: 15px; height: 15px; border-width: 1.5px; }
.gf-item { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 900; }
.gf-item .sw { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--c); border: 2px solid #fff; }
.gf-item .sw.paint { border-radius: 6px; display: grid; place-items: center; overflow: hidden; }
.gf-item .sw.paint b { width: 46%; height: 46%; border-radius: 50%; }
.gf-item .sw.rim { background: radial-gradient(circle, #fff 0 18%, var(--c) 20% 52%, #3a3f4a 54% 100%); }
.gf-item .sw.trail { background: radial-gradient(circle at 50% 60%, var(--c2) 0 28%, var(--c) 72%); }
.gf-item .sw.helmet { background: radial-gradient(circle at 50% 34%, var(--c) 0 62%, #1c1f26 64%); }
.gf-note { font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, .6); white-space: nowrap; }
@keyframes giftSlide { 0% { opacity: 0; transform: translateX(-110%); } 12% { opacity: 1; transform: none; } 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(-20px); } }

/* ---------- HUD 新增 ---------- */
.race-time {
  position: absolute; left: 14px; top: calc(132px + var(--safe-top)); font-size: 17px; font-weight: 900; pointer-events: none;
  text-shadow: 0 2px 0 var(--ink); letter-spacing: 1px; color: #eaf4ff;
}
.lap-badge {
  position: absolute; left: 13px; top: calc(166px + var(--safe-top)); display: flex; align-items: baseline; gap: 3px; pointer-events: none;
  font-weight: 900; text-shadow: 0 2px 0 var(--ink); -webkit-text-stroke: 1.2px var(--ink); paint-order: stroke fill;
}
.lap-badge small { font-size: 12px; }
.lap-badge b { font-size: 21px; color: #ffd23a; line-height: 1; }
.lap-badge em { font-style: normal; font-size: 15px; color: #eaf4ff; margin-left: 4px; }
.item-slot {
  position: absolute; right: 12px; top: calc(70px + var(--safe-top)); width: 64px; height: 64px; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: rgba(255, 255, 255, .18); border: 3px solid rgba(255, 255, 255, .5); box-shadow: 0 4px 0 rgba(29, 35, 64, .45);
  transition: background .2s, transform .12s;
}
.item-slot .ico {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 32px; overflow: visible;
  font-size: 25px; line-height: 32px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35));
}
.item-slot .ico:empty { display: none; }
.item-slot small { display: block; margin-top: 2px; font-size: 11px; line-height: 13px; font-weight: 900; white-space: nowrap; text-shadow: 0 1px 0 var(--ink); opacity: .9; }
.item-slot.has { background: linear-gradient(#ffe45c, #ffb81f); border-color: var(--ink); animation: itemGlow 1.4s ease-in-out infinite; }
.item-slot.has small { color: var(--ink); text-shadow: none; }
@keyframes itemGlow { 50% { box-shadow: 0 4px 0 rgba(29, 35, 64, .45), 0 0 18px rgba(255, 210, 58, .85); } }
#splitPop {
  position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 26px; font-weight: 900; opacity: 0; pointer-events: none;
  color: #9ff08a; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink);
}
#splitPop.show { animation: toast 1.6s ease-out both; }
#splitPop.lap { color: #ffd23a; font-size: 30px; }

/* ---------- 车库新品类 ---------- */
.garage-tabs { overflow-x: auto; scrollbar-width: none; }
.garage-tabs::-webkit-scrollbar { display: none; }
.garage-tabs button { flex: 1 0 auto; padding: 6px 12px; font-size: 13px; }
.g-item .sw.paint { border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.g-item .sw.paint b { width: 46%; height: 46%; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .25); }
.g-item .sw.rim { background: radial-gradient(circle, #fff 0 18%, var(--c) 20% 52%, #3a3f4a 54% 100%); }
.g-item .sw.trail { background: radial-gradient(circle at 50% 60%, var(--c2) 0 28%, var(--c) 72%); }
.g-item .sw.helmet { background: radial-gradient(circle at 50% 34%, var(--c) 0 62%, #1c1f26 64%); position: relative; }
.g-item .sw.helmet::after { content: ""; position: absolute; left: 14%; right: 14%; top: 40%; height: 18%; border-radius: 4px; background: var(--c2); }
.g-item.bundle {
  grid-column: 1 / -1; height: auto; min-height: 58px; flex-direction: row; align-items: center; gap: 8px; padding: 6px 12px;
}
.g-item.bundle .bundle-sws { display: flex; gap: 0; flex: none; }
.g-item.bundle .bundle-sws .sw { width: 26px; height: 26px; margin-right: -6px; }
.g-item.bundle .nm { flex: 1; text-align: left; font-size: 14px; }
.g-item.bundle .pr { font-size: 12px; }
.g-item.owned { opacity: .75; }

.result-splits { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: -4px 0 12px; }
.result-splits span { padding: 3px 10px; border-radius: 10px; background: rgba(29, 35, 64, .7); font-size: 12px; font-weight: 800; white-space: nowrap; }
.result-splits b { color: #ffd23a; }
.result-splits .total { background: rgba(47, 124, 240, .85); }
.result-splits .fastlap { background: rgba(255, 60, 60, .8); flex-basis: 100%; }
.result-list .fast { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 6px; background: #ff3b2b; color: #fff; font-size: 10px; vertical-align: 1px; }
.result-list li.bot .nm { opacity: .75; }

/* ---------- 稀有度 ---------- */
.g-item.r-rare { border-color: #8fb9ff; box-shadow: 0 3px 0 #8fb9ff; background: linear-gradient(#fff 55%, #e6f0ff); }
.g-item.r-epic { border-color: #c39bff; box-shadow: 0 3px 0 #c39bff; background: linear-gradient(#fff 50%, #f1e6ff); }
.g-item.r-legend { border-color: #ffc14d; box-shadow: 0 3px 0 #ffc14d, 0 0 12px rgba(255, 170, 30, .45); background: linear-gradient(#fffaf0 45%, #ffe9b8); overflow: hidden; }
.g-item.r-legend::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .5) 50%, transparent 60%); background-size: 250% 100%;
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 0% { background-position: 120% 0; } 35%, 100% { background-position: -120% 0; } }
.g-item > * { flex-shrink: 0; }
.g-item { height: 108px; }
.g-item.sel.r-rare, .g-item.sel.r-epic, .g-item.sel.r-legend { border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.g-item .feat {
  position: absolute; top: 8px; right: -20px; transform: rotate(40deg); width: 70px; text-align: center;
  font-size: 9px; font-weight: 900; line-height: 13px; color: #fff; background: #ff3b5c;
}
.g-item .pr s { margin-left: 3px; font-size: 9px; color: #aab2c2; }
.g-item .stars { font-size: 9px; letter-spacing: -1px; color: #ffae00; line-height: 9px; margin: -3px 0 -2px; }
.g-item .stars s, .garage-name .stars s { text-decoration: none; color: #d4d9e3; }
.g-item .eq.cnt { background: #ff8a1a; }
.g-item .sw.emo { display: grid; place-items: center; font-size: 24px; background: #fff3d6; }
.g-item .sw.plate { width: 52px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; font-weight: 900; color: #fff; background: linear-gradient(var(--c2), #000); border: 3px solid var(--c); }
.g-item .sw.paint.holo { background: linear-gradient(135deg, #ff9ad5, #ffe48a, #9cffc8, #8ad8ff, #c4a2ff); }
.g-item .sw.trail.rainbow { background: conic-gradient(#ff4b3e, #ff9a2a, #ffe45c, #5ee86a, #3dc8ff, #7a6bff, #ff6fb5, #ff4b3e); }
.garage-tabs button.hot { position: relative; }
.garage-tabs button.hot::after { content: ""; position: absolute; top: 3px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #ff3b5c; border: 1.5px solid #fff; }
.garage-name { display: flex; align-items: center; gap: 6px; }
.garage-name small { font-size: 12px; opacity: .8; }
.garage-name .stars { font-size: 13px; color: #ffc21a; letter-spacing: -1px; }
.garage-name .stars s { color: rgba(255, 255, 255, .25); }
.btn-star { flex: none; width: 112px; min-height: 58px; font-size: 18px; background: linear-gradient(#c78bff, #8a3dff); }
.btn-star small { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.btn-star:disabled { filter: grayscale(.6); opacity: .7; }

/* 大厅名牌框 */
.slabel.framed .nm { color: #fff; background: linear-gradient(var(--pb), #000); border: 2.5px solid var(--pf); box-shadow: 0 2px 0 var(--ink), 0 0 10px var(--pf); }
.slabel.framed.me .nm { color: #fff; }
.slabel .nm em { font-style: normal; margin-right: 2px; }
/* 结算 */
.result-list .nm .ttl.rar { opacity: 1; color: var(--rc); font-weight: 900; }
.result-list .n.framed { padding: 0 6px; border-radius: 8px; color: #fff; background: linear-gradient(var(--pb), #000); border: 2px solid var(--pf); }

/* ---------- 无限卡 & 喇叭 ---------- */
.card-slots { position: absolute; right: 12px; top: calc(146px + var(--safe-top)); display: flex; flex-direction: column; gap: 12px; }
.item-slot.card-slot { --p: 1; position: relative; right: auto; top: auto; overflow: hidden; }
.card-slot small { font-size: 10px; letter-spacing: -.5px; }
.card-slot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: conic-gradient(transparent calc(var(--p) * 360deg), rgba(20, 24, 40, .6) 0);
}
.card-slot em {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; pointer-events: none;
  font-style: normal; font-size: 24px; font-weight: 900; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
}
.card-slot em:empty { display: none; }
.horn-btn {
  position: absolute; right: 12px; top: calc(146px + var(--safe-top)); width: 64px; height: 64px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(#ffe45c, #ff9a1f); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); animation: hornPulse .8s ease-in-out infinite;
}
.horn-btn i { font-style: normal; font-size: 26px; line-height: 30px; }
.horn-btn small { font-size: 11px; font-weight: 900; color: var(--ink); }
@keyframes hornPulse { 50% { transform: scale(1.1); } }
.horn-banner {
  position: absolute; left: 50%; top: 24%; transform: translate(-50%, 0) scale(.6); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 22px; white-space: nowrap;
  background: rgba(29, 35, 64, .85); border: 3px solid #fff;
}
.horn-banner.r-rare { border-color: #3d8bff; box-shadow: 0 0 22px #3d8bff; }
.horn-banner.r-legend { border-color: #ffc21a; box-shadow: 0 0 30px #ffb21e; background: linear-gradient(#5a3500, #1d1340); }
.horn-banner i { font-style: normal; font-size: 40px; }
.horn-banner b { display: block; font-size: 14px; color: #ffd23a; }
.horn-banner span { display: block; font-size: 22px; font-weight: 900; }
.horn-banner.show { animation: hornIn 2.6s ease-out both; }
@keyframes hornIn {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.5); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1.12); }
  20%, 82% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -20px) scale(1); }
}

.gf-card { font-style: normal; font-size: 18px; }

/* ---------- 直播间飘屏 ---------- */
.marquee { position: absolute; left: 0; right: 0; top: calc(56px + var(--safe-top)); height: 34px; overflow: hidden; pointer-events: none; z-index: 60; }
.marquee .mq-in {
  position: absolute; left: 100%; top: 0; white-space: nowrap; padding: 5px 16px; border-radius: 17px; font-size: 14px; font-weight: 900;
  background: linear-gradient(90deg, rgba(90, 40, 0, .9), rgba(40, 20, 80, .9)); border: 2px solid var(--rc); box-shadow: 0 0 14px var(--rc);
}
.marquee .mq-in b { color: #ffd23a; }
.marquee.run .mq-in { animation: mq 7s linear both; }
@keyframes mq { from { left: 100%; transform: translateX(0); } to { left: 0; transform: translateX(-100%); } }
