/* ============================================================================
   Project: NOVA · 模块 2-81：《🛸 苍穹炮舰 · 星罗连消》(slot:starship)
   游戏页 V2 满屏贴边布局样式 (css/starship-slot.css)
   规范遵循：
   1. 100% 全屏贴边（隐藏 topbar / appNav / 大厅头栏，无顶部下拉条，最多 2 层可见边框）
   2. 左上角圆形半透明玻璃 ‹ 返回键 + 右上角圆形半透明玻璃 ≡ 菜单键（≥44px，转动中 40% 透明度）
   3. 符号严格三级视觉分级：高赔占格 88~95% 重金属金底板、低赔同造型六边形占格 62~65% 哑光无底板、
      特殊符盾形/圆形星门异形轮廓 + 唯一 8 语言底部铭牌（「百搭」「免费」）
   4. WebView 兼容：所有 dvh 前置 vh + var(--app-vh) 三重回退；零 :has / color-mix / 独立变换属性
   ============================================================================ */

body.nova-in-starship-stage header.topbar,
body.nova-in-starship-stage #appNav,
body.nova-in-starship-stage #mhBarArcade,
body.nova-in-starship-stage #ahMainLobbyHeader,
body.nova-in-starship-stage #ahStageTopBar {
  display: none !important;
}

body.nova-in-starship-stage .shell,
body.pg-shell.nova-in-starship-stage .shell {
  width: 100% !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: var(--app-vh, 100vh) !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: var(--app-vh, 100vh) !important;
  max-height: 100dvh !important;
  min-height: 100vh !important;
  min-height: var(--app-vh, 100vh) !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
}

body.nova-in-starship-stage #view-arcade.active {
  flex: 1 1 0% !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
}

body.nova-in-starship-stage #ahShellBox.ah-shell.in-stage-starship,
.ah-shell.in-stage-starship {
  flex: 1 1 0% !important;
  width: 100% !important;
  height: 100vh !important;
  height: var(--app-vh, 100vh) !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: var(--app-vh, 100vh) !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: #070c18 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.ah-shell.in-stage-starship #ahGlCanvas {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.nova-in-starship-stage #view-arcade #ahShellBox.ah-shell.in-stage-starship > .ah-layer,
body.nova-in-starship-stage #view-arcade #ahGameStage,
body.nova-in-starship-stage #view-arcade #ahStarshipStageWrap,
.ah-shell.in-stage-starship .ah-layer,
.ah-shell.in-stage-starship #ahGameStage,
.ah-shell.in-stage-starship #ahStarshipStageWrap {
  flex: 1 1 0% !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  border: none !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: stretch !important;
  overflow: hidden !important;
}

/* ==================== 根舞台容器与配色变量 ==================== */
#ssStageRoot.ss-v2-root {
  --ss-bg-top: #0c1428;
  --ss-bg-btm: #0e1829;
  --ss-gold: #f7cd69;
  --ss-gold-bright: #ffe699;
  --ss-gold-deep: #b88228;
  --ss-cyan: #5ce6f6;
  --ss-teal-dark: #103742;
  --ss-teal-mid: #1a5564;
  --ss-board-outer: #c9ab72;
  --ss-board-bed: #5b4730;
  --ss-tile-top: #f7edd9;
  --ss-tile-mid: #ebd8b5;
  --ss-tile-btm: #dfc69c;
  position: relative;
  flex: 1 1 0%;
  width: 100%;
  max-width: 460px;
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, var(--ss-bg-top) 0%, #101b30 58%, var(--ss-bg-btm) 100%);
  color: #f8fafc;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

@media (min-width: 521px) {
  #ssStageRoot.ss-v2-root {
    box-shadow: 0 0 48px rgba(0, 0, 0, 0.85);
  }
}

/* 4 皮肤基础变量预留（阶段 2 主打默认 obsidian，其余 3 皮肤保持零滚动兼容，阶段 3 深化底图） */
body[data-nova-skin="qianli"] #ssStageRoot.ss-v2-root {
  --ss-bg-top: #072220;
  --ss-bg-btm: #081d1c;
  --ss-teal-dark: #0c3b36;
  --ss-teal-mid: #155e56;
}
body[data-nova-skin="royal"] #ssStageRoot.ss-v2-root {
  --ss-bg-top: #220711;
  --ss-bg-btm: #17060d;
  --ss-teal-dark: #3e1020;
  --ss-teal-mid: #611932;
}
body[data-nova-skin="starry"] #ssStageRoot.ss-v2-root {
  --ss-bg-top: #09183a;
  --ss-bg-btm: #07122b;
  --ss-teal-dark: #102c5c;
  --ss-teal-mid: #1b458a;
}

/* 夺宝模式（Duobao Bonus）星门超频青金氛围光 */
#ssStageRoot.ss-v2-root.is-free-mode {
  background: linear-gradient(180deg, #0b243c 0%, #132c4a 52%, #0c1930 100%);
}

#ssStageRoot.ss-v2-root.is-free-mode .ss-hero-stage {
  box-shadow: inset 0 -18px 28px rgba(56, 224, 248, 0.28);
}

#ssStageRoot.ss-v2-root.is-free-mode .ss-board-wrap {
  border-top-color: #67e8f9;
  border-bottom-color: #fde047;
  box-shadow: 0 0 18px rgba(56, 224, 248, 0.35), inset 0 2px 10px rgba(34, 211, 238, 0.25);
}

/* ==================== 1. 顶部悬浮双玻璃圆键（无横条、无下拉条，≥44px） ==================== */
.ss-float-btn {
  position: absolute;
  top: max(8px, env(safe-area-inset-top, 0px));
  z-index: 40;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, rgba(92, 128, 172, 0.56), rgba(20, 32, 52, 0.72));
  border: 1.5px solid rgba(205, 228, 255, 0.48);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f8fbff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.14s ease, border-color 0.2s ease;
  padding: 0;
}

.ss-float-btn:active {
  transform: scale(0.92);
}

#ssBackBtn {
  left: 10px;
}

#ssMenuBtn {
  right: 10px;
}

.ss-float-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* 转动中两颗悬浮按钮自动降至 40% 透明度 */
#ssStageRoot.is-spinning .ss-float-btn {
  opacity: 0.4;
}

#ssStageRoot.is-spinning #ssMenuBtn {
  cursor: not-allowed;
}

/* 前 2 次进入时的非阻塞左上角返回提示气泡（3 秒自动淡出） */
.ss-back-hint-bubble {
  position: absolute;
  top: calc(max(8px, env(safe-area-inset-top, 0px)) + 5px);
  left: 62px;
  z-index: 39;
  height: 34px;
  padding: 0 13px;
  border-radius: 17px;
  background: linear-gradient(180deg, #f5f8ff 0%, #dce6f7 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
  color: #16243b;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.ss-back-hint-bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  background: #e7eefb;
  transform: translateY(-50%) rotate(45deg);
  border-left: 1px solid rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
}

.ss-back-hint-bubble.show {
  opacity: 1;
  transform: translateX(0);
}

/* 再按一次返回大厅轻提示胶囊 */
.ss-back-confirm-toast {
  position: absolute;
  top: calc(max(8px, env(safe-area-inset-top, 0px)) + 50px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  z-index: 55;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11, 19, 36, 0.94);
  border: 1px solid rgba(247, 205, 105, 0.65);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ss-back-confirm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== 2. 角色舞台（约 22% 高度） ==================== */
.ss-hero-stage {
  position: relative;
  flex: 0 0 21.5%;
  min-height: 118px;
  max-height: 192px;
  width: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at 35% 32%, #2c2463 0%, #101b36 58%, #1d2942 100%);
}

.ss-deck-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  pointer-events: none;
}

.ss-deck-bg[hidden] {
  display: none;
}

.ss-deck-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 11, 24, 0.24) 0%, rgba(10, 18, 34, 0.04) 55%, rgba(12, 20, 36, 0.76) 100%);
  pointer-events: none;
}

/* 右侧舰长/玩家动态角色站位 */
.ss-hero-actor {
  position: absolute;
  right: 4px;
  bottom: 24px;
  width: 48%;
  height: calc(100% - 14px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 4;
}

.ss-hero-default-img {
  max-width: 100%;
  height: 104%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
  transform-origin: center bottom;
  animation: ssHeroBreath 3.6s ease-in-out infinite;
}

.ss-hero-default-img[hidden] {
  display: none;
}

@keyframes ssHeroBreath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.012); }
}

.ss-hero-fallback-crest {
  width: 84px;
  height: 84px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #334e7b, #0f1b33);
  border: 2px solid #f7cd69;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  color: #ffe699;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.ss-hero-fallback-crest[hidden] {
  display: none;
}

/* 玩家已装备动态角色时的 DOM 精灵播放器（零 WebGL 新画布） */
.ss-hero-sprite {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 4px rgba(130, 220, 255, 0.55)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.ss-hero-sprite[hidden] {
  display: none;
}

/* 「我的角色」金色六角铭牌：仅在拥有并展示玩家自己的角色时显示 */
.ss-my-hero-badge {
  position: absolute;
  right: 12px;
  bottom: 30px;
  z-index: 7;
  padding: 2px 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffe79c 0%, #e4ac43 52%, #b67b1d 100%);
  border: 1px solid #fff3c4;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
  color: #2b1803;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
}

.ss-my-hero-badge[hidden] {
  display: none;
}

/* 舞台左侧「🌀 星门充能 Ⅰ / 🔥 星门超频 Ⅱ」三态循环胶囊（0px 不占盘面、不遮挡右侧舰长） */
.ss-boost-capsule {
  position: absolute;
  left: 10px;
  top: calc(max(8px, env(safe-area-inset-top, 0px)) + 50px);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  max-width: 180px;
  padding: 3px 8px 3px 6px;
  border-radius: 19px;
  background: linear-gradient(180deg, rgba(24, 42, 68, 0.92) 0%, rgba(11, 21, 38, 0.95) 100%);
  border: 1.5px solid rgba(125, 211, 252, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.22);
  color: #e0f2fe;
  cursor: pointer;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ss-boost-capsule:active {
  transform: scale(0.95);
}

.ss-boost-capsule.is-on,
.ss-boost-capsule.is-lv1 {
  background: linear-gradient(180deg, #0e4a63 0%, #082b3d 58%, #071f2e 100%);
  border-color: #67e8f9;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.65), 0 4px 12px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(207, 250, 254, 0.55);
}

.ss-boost-capsule.is-lv2 {
  background: linear-gradient(180deg, #5c2809 0%, #391406 58%, #220b04 100%);
  border-color: #fde047;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.76), 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(254, 249, 195, 0.65);
}

.ss-boost-capsule.is-disabled {
  opacity: 0.54;
}

#ssStageRoot.is-spinning .ss-boost-capsule {
  opacity: 0.45;
  pointer-events: none;
}

.ss-boost-orb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #a5f3fc 0%, #0284c7 62%, #0f172a 100%);
  border: 1px solid rgba(224, 242, 254, 0.78);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.55);
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.ss-boost-capsule.is-on .ss-boost-orb {
  animation: ssBoostSpin 2.8s linear infinite;
  box-shadow: 0 0 12px rgba(103, 232, 249, 0.95);
}

.ss-boost-capsule.is-lv2 .ss-boost-orb {
  background: radial-gradient(circle at 38% 32%, #fef08a 0%, #d97706 60%, #270e04 100%);
  border-color: #fef9c3;
  animation: ssBoostSpin 1.5s linear infinite;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.98);
}

@keyframes ssBoostSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ss-boost-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.12;
}

.ss-boost-title {
  font-size: 11px;
  font-weight: 900;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-boost-capsule.is-on .ss-boost-title {
  color: #fef08a;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.ss-boost-capsule.is-lv2 .ss-boost-title {
  color: #fffbeb;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.75), 0 1px 4px rgba(0, 0, 0, 0.85);
}

.ss-boost-sub {
  font-size: 9.2px;
  font-weight: 800;
  color: #7dd3fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-boost-capsule.is-lv1 .ss-boost-sub {
  color: #a5f3fc;
}

.ss-boost-capsule.is-lv2 .ss-boost-sub {
  color: #fde68a;
}

.ss-boost-state {
  flex-shrink: 0;
  padding: 1.5px 5px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #94a3b8;
}

.ss-boost-capsule.is-lv1 .ss-boost-state {
  background: linear-gradient(180deg, #67e8f9 0%, #0ea5e9 100%);
  border-color: #e0f2fe;
  color: #082f49;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.75);
}

.ss-boost-capsule.is-lv2 .ss-boost-state {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
  border-color: #fef9c3;
  color: #1e1b04;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.85);
}

/* 舞台前排：左侧 4 枚连消倍数徽章 + 右侧 1024 路铭牌 */
.ss-deck-hud {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 3px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.ss-mult-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

.ss-mult-badge {
  flex: 1 1 0;
  max-width: 56px;
  height: 27px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(22, 46, 62, 0.95) 0%, rgba(11, 24, 36, 0.96) 100%);
  border: 1.5px solid rgba(92, 230, 246, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 6px rgba(0, 0, 0, 0.45);
  color: rgba(110, 231, 249, 0.72);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
  letter-spacing: -0.02em;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.ss-mult-badge.active {
  background: linear-gradient(180deg, #ffd978 0%, #d48b22 55%, #8f530b 100%);
  border-color: #fff3bd;
  color: #fffdf5;
  text-shadow: 0 1px 3px rgba(68, 32, 0, 0.9), 0 0 10px rgba(255, 224, 120, 0.85);
  box-shadow: 0 0 14px rgba(255, 198, 72, 0.75), inset 0 1px 1px rgba(255, 255, 255, 0.75);
  transform: translateY(-1px) scale(1.05);
}

.ss-ways-plaque {
  flex: 0 0 auto;
  height: 27px;
  padding: 0 10px;
  border-radius: 7px;
  background: linear-gradient(180deg, var(--ss-teal-mid) 0%, var(--ss-teal-dark) 100%);
  border: 1.5px solid rgba(226, 200, 142, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.5);
  color: #fef3c7;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

#ssStageRoot.is-free-mode .ss-ways-plaque {
  background: linear-gradient(180deg, #0e7490 0%, #164e63 100%);
  border-color: #fde047;
  color: #fef08a;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.65);
}

/* ==================== 3. 5×4 满宽盘面（约 52% 高度，暖象牙格底 + 细分割线） ==================== */
.ss-board-wrap {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  padding: 4px 5px;
  background: linear-gradient(180deg, #725d42 0%, var(--ss-board-bed) 50%, #483724 100%);
  border-top: 2px solid var(--ss-board-outer);
  border-bottom: 2px solid var(--ss-board-outer);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.52);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.ss-board-grid {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.ss-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--ss-tile-top) 0%, var(--ss-tile-mid) 68%, var(--ss-tile-btm) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), inset 0 -2px 3px rgba(112, 82, 38, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: filter 0.14s ease, box-shadow 0.16s ease;
}

.ss-cell:active {
  filter: brightness(0.96);
}

.ss-sym-actor {
  position: relative;
  width: 94%;
  height: auto;
  max-height: 94%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
}

.ss-sym-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* 低赔符号（Option B 银钛镶边星舰能量芯）：统一六边形轮廓，留足暖象牙格边呼吸感 */
.ss-cell.tier-low .ss-sym-actor {
  width: 92%;
  max-height: 92%;
}

.ss-cell.tier-low .ss-sym-img {
  filter: drop-shadow(0 2px 3px rgba(20, 30, 48, 0.3));
}

/* 高赔符号轻微环境流光，增强高赔金属/宝石厚重辨识度 */
.ss-cell.tier-high .ss-sym-img {
  filter: drop-shadow(0 2px 3px rgba(58, 34, 6, 0.36));
}

.ss-cell.tier-high::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 36%, rgba(255, 250, 220, 0.32) 50%, transparent 64%);
  transform: translateX(-130%);
  animation: ssHighGleam 5.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ssHighGleam {
  0%, 74%, 100% { transform: translateX(-130%); }
  90% { transform: translateX(130%); }
}

/* 特殊符号（仅百搭 8 与免费 9）专属底部 8 语言小字牌（精准嵌入 3D 金属铭牌槽内） */
.ss-special-plate {
  position: absolute;
  left: 50%;
  bottom: 13.5%;
  transform: translateX(-50%);
  z-index: 4;
  min-width: 48%;
  max-width: 78%;
  padding: 0 3px;
  text-align: center;
  font-size: clamp(8.5px, 2.25vw, 10.5px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #2c1602;
  text-shadow: 0 1px 0 rgba(255, 245, 200, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.ss-cell.sym-id-9 .ss-special-plate {
  bottom: 8.8%;
}

/* 金框符号（仅第 2~4 列）：3D 金框叠层 + 暖金辉光 */
.ss-gold-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(255, 210, 76, 0.85));
}

.ss-cell.is-gold {
  box-shadow: 0 0 0 1.5px #ffe58f, 0 0 12px rgba(255, 206, 68, 0.78), inset 0 0 8px rgba(255, 215, 90, 0.45);
}

/* 图片加载失败兜底几何章（永不白板、永不阻塞） */
.ss-sym-fallback {
  width: 76%;
  height: 76%;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #b45309, #78350f);
  border: 2px solid #fde68a;
  pointer-events: none;
}

.ss-cell.tier-low .ss-sym-fallback {
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: #64748b;
  border-color: #cbd5e1;
  font-size: 11px;
}

/* 分级中奖与掉落动画 */
/* 低赔中奖：简洁快闪 */
.ss-cell.is-win-low {
  box-shadow: 0 0 0 2px #fbbf24, inset 0 0 12px rgba(251, 191, 36, 0.55);
}
.ss-cell.is-win-low .ss-sym-actor {
  animation: ssWinLowFlash 0.34s ease-out;
}
@keyframes ssWinLowFlash {
  0% { transform: scale(1); filter: brightness(1); }
  45% { transform: scale(1.07); filter: brightness(1.38); }
  100% { transform: scale(0.92); opacity: 0.25; }
}

/* 高赔与特殊符号中奖：华丽放大 + 金色圣光脉冲 */
.ss-cell.is-win-high {
  z-index: 6;
  box-shadow: 0 0 0 2.5px #fff3b0, 0 0 16px rgba(255, 196, 54, 0.92), inset 0 0 16px rgba(255, 214, 92, 0.72);
}
.ss-cell.is-win-high .ss-sym-actor {
  animation: ssWinHighPop 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ssWinHighPop {
  0% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.16); filter: brightness(1.45) drop-shadow(0 0 10px rgba(255, 220, 100, 0.95)); }
  75% { transform: scale(1.08); filter: brightness(1.25); }
  100% { transform: scale(0.88); opacity: 0.2; }
}

/* 金框参与中奖 -> 原地化为百搭徽章 */
.ss-cell.is-gold-morph {
  z-index: 7;
  box-shadow: 0 0 0 2.5px #fde047, 0 0 20px rgba(250, 204, 21, 0.98), inset 0 0 20px rgba(254, 240, 138, 0.9);
}
.ss-cell.is-gold-morph .ss-sym-actor {
  animation: ssGoldMorph 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes ssGoldMorph {
  0% { transform: scale(0.86) rotate(-6deg); filter: brightness(1.9); }
  60% { transform: scale(1.16) rotate(3deg); filter: brightness(1.45); }
  100% { transform: scale(1) rotate(0deg); filter: brightness(1); }
}

/* 点击格子原位弹出的 3/4/5 连星币赔率小气泡（非阻塞） */
.ss-cell-tip {
  position: absolute;
  z-index: 28;
  width: 176px;
  padding: 8px 10px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(14, 25, 46, 0.97) 0%, rgba(8, 15, 30, 0.98) 100%);
  border: 1.5px solid rgba(247, 205, 105, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.72);
  color: #f8fafc;
  font-size: 11.5px;
  pointer-events: auto;
}

.ss-cell-tip[hidden] {
  display: none;
}

.ss-cell-tip-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 5px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ss-cell-tip-head img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.ss-cell-tip-name {
  font-size: 12px;
  font-weight: 900;
  color: #fde68a;
  line-height: 1.2;
}

.ss-cell-tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 1.5px 0;
  font-family: var(--mono);
  font-size: 11px;
}

.ss-cell-tip-row .k {
  color: #cbd5e1;
  font-weight: 700;
}

.ss-cell-tip-row .v {
  color: #ffd978;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ss-cell-tip.is-gold-tip {
  border-color: #fde047;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.78), 0 0 14px rgba(250, 204, 21, 0.32);
}

.ss-cell-tip-gold {
  margin-top: 6px;
  padding: 5px 7px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(180, 118, 14, 0.28) 0%, rgba(120, 72, 8, 0.34) 100%);
  border: 1px solid rgba(253, 224, 71, 0.55);
  color: #fef08a;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.35;
}

/* 盘面中央非阻塞赢分飘字 & >=15x 大奖横幅（任意点击 0ms 秒跳过） */
.ss-win-float {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  z-index: 22;
  padding: 6px 16px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(16, 32, 58, 0.92) 0%, rgba(8, 15, 30, 0.88) 100%);
  border: 2px solid #ffe082;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 20px rgba(255, 198, 66, 0.55);
  color: #ffe699;
  font-family: var(--mono);
  font-size: clamp(18px, 5vw, 25px);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.ss-win-float.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.ss-bigwin-banner {
  position: absolute;
  inset: 10px;
  z-index: 30;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 42%, rgba(74, 34, 8, 0.94) 0%, rgba(12, 18, 36, 0.96) 82%);
  border: 2px solid #fde047;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.82), inset 0 0 28px rgba(251, 191, 36, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
}

.ss-bigwin-banner[hidden] {
  display: none;
}

.ss-bigwin-tier {
  font-size: clamp(16px, 4.6vw, 22px);
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.9);
  letter-spacing: 0.06em;
}

.ss-bigwin-amt {
  font-family: var(--mono);
  font-size: clamp(22px, 6.2vw, 32px);
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(251, 191, 36, 0.95);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.ss-bigwin-skip {
  font-size: 11px;
  color: #cbd5e1;
  opacity: 0.85;
}

/* 5 列竖向听牌慢转「星门流光柱」与夺宝已落格激活脉冲环 */
.ss-col-fx-layer {
  position: absolute;
  inset: 4px 5px;
  z-index: 16;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  pointer-events: none;
}

.ss-col-pillar {
  position: relative;
  border-radius: 7px;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.ss-col-pillar.is-active {
  opacity: 1;
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.36) 0%,
    rgba(250, 204, 21, 0.22) 50%,
    rgba(34, 211, 238, 0.42) 100%
  );
  border: 2px solid #67e8f9;
  box-shadow: 0 0 18px rgba(56, 224, 248, 0.85), inset 0 0 18px rgba(253, 224, 71, 0.45);
  animation: ssPillarPulse 0.42s ease-in-out infinite alternate;
}

@keyframes ssPillarPulse {
  from { filter: brightness(0.96); }
  to { filter: brightness(1.22); }
}

.ss-cell.is-col-spinning .ss-sym-actor {
  animation: ssReelStream 0.11s linear infinite;
  filter: blur(0.6px) brightness(1.08);
}

@keyframes ssReelStream {
  0% { transform: translateY(-22%) scaleY(1.05); opacity: 0.72; }
  50% { transform: translateY(0%) scaleY(1.08); opacity: 0.92; }
  100% { transform: translateY(22%) scaleY(1.05); opacity: 0.72; }
}

.ss-cell.is-scatter-armed {
  z-index: 8;
  box-shadow: 0 0 0 2.5px #67e8f9, 0 0 16px rgba(34, 211, 238, 0.95), inset 0 0 14px rgba(253, 224, 71, 0.65);
}

.ss-cell.is-scatter-armed .ss-sym-actor {
  animation: ssScatterArmed 0.52s ease-in-out infinite alternate;
}

@keyframes ssScatterArmed {
  from { transform: scale(1); filter: brightness(1.05); }
  to { transform: scale(1.1); filter: brightness(1.32) drop-shadow(0 0 8px rgba(103, 232, 249, 0.95)); }
}

/* 夺宝入场 / 续送 / 夺宝总结庆典横幅（点击任意位置 0ms 加速关闭，绝不吞后续局） */
.ss-ceremony-banner {
  position: absolute;
  inset: 12px 10px;
  z-index: 32;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 36%, rgba(12, 74, 110, 0.96) 0%, rgba(15, 23, 42, 0.97) 82%);
  border: 2px solid #67e8f9;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.85), 0 0 26px rgba(34, 211, 238, 0.65), inset 0 0 26px rgba(250, 204, 21, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
}

.ss-ceremony-banner[hidden] {
  display: none;
}

.ss-ceremony-badge {
  padding: 2px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fde047 0%, #d97706 100%);
  border: 1px solid #fef9c3;
  color: #1c1202;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.ss-ceremony-title {
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 2px 12px rgba(34, 211, 238, 0.85);
  line-height: 1.2;
}

.ss-ceremony-sub {
  font-size: clamp(12px, 3.3vw, 14px);
  font-weight: 800;
  color: #e0f2fe;
  line-height: 1.35;
}

.ss-ceremony-skip {
  margin-top: 2px;
  font-size: 10.5px;
  color: #94a3b8;
}

/* ==================== 4. 卷轴横幅（约 7% 高度）+ 非阻塞「为什么中奖」浮窗 ==================== */
.ss-ribbon-zone {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-height: 36px;
  padding: 2px 8px 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  z-index: 25;
}

.ss-scroll-plaque {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 33px;
  padding: 3px 14px;
  border-radius: 6px 6px 14px 14px;
  background: linear-gradient(180deg, var(--ss-teal-mid) 0%, var(--ss-teal-dark) 100%);
  border: 1.5px solid #e2be70;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.ss-scroll-text {
  font-size: clamp(11.5px, 3.2vw, 13.5px);
  font-weight: 800;
  color: #e2f1f8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-scroll-plaque.is-win .ss-scroll-text {
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 900;
  color: #ffe284;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  white-space: normal;
  line-height: 1.2;
}

.ss-detail-btn {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe597 0%, #dda139 55%, #ab7016 100%);
  border: 1px solid #fff3c4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  color: #2b1702;
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.ss-detail-btn[hidden] {
  display: none;
}

/* 非阻塞「为什么中奖」轻浮窗：向上浮在盘面下缘，绝不遮挡底部操控按钮 */
.ss-why-float {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% + 3px);
  z-index: 36;
  max-height: 185px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(13, 24, 44, 0.97) 0%, rgba(8, 15, 29, 0.98) 100%);
  border: 1.5px solid rgba(247, 205, 105, 0.78);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ss-why-float[hidden] {
  display: none;
}

.ss-why-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ss-why-title {
  font-size: 11.5px;
  font-weight: 900;
  color: #fde68a;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-why-close {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ss-why-body {
  padding: 7px 10px;
  overflow-y: auto;
  font-size: 11.5px;
  line-height: 1.45;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ss-why-body b {
  color: #ffe082;
}

/* ==================== 5. 状态条（🪙 余额 | 🏆 本局赢分 | ⚡ 单次投入 · 完整数字不缩写） ==================== */
.ss-status-bar {
  flex: 0 0 auto;
  margin: 2px 8px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(14, 24, 42, 0.86);
  border: 1px solid rgba(148, 179, 218, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
}

.ss-stat-cell {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 1px 3px;
}

.ss-stat-cell.is-stake {
  cursor: pointer;
  border-radius: 6px;
}

.ss-stat-cell.is-stake:active {
  background: rgba(255, 255, 255, 0.08);
}

.ss-stat-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.ss-coin-ico {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: -2px;
}

.ss-stat-ico {
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.ss-stat-val {
  font-family: var(--mono);
  font-size: clamp(11px, 3.1vw, 13.5px);
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.01em;
  word-break: break-all;
}

.ss-stat-cell.is-win .ss-stat-val {
  color: #ffd978;
}

/* ==================== 6. 底部 5 键操控区（⚡ 极速 | − | 3D 转动键 | + | ↻ 自动 · 无 ≡） ==================== */
.ss-controls-dock {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  padding: 2px 12px max(7px, env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 8px;
  box-sizing: border-box;
  z-index: 20;
}

.ss-ctrl-btn {
  width: clamp(44px, 11.5vw, 52px);
  height: clamp(44px, 11.5vw, 52px);
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #263b59 0%, #111d31 76%);
  border: 1.5px solid rgba(160, 196, 235, 0.42);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.22);
  color: #f3e5be;
  font-size: 20px;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  padding: 0;
}

.ss-ctrl-btn:active:not([disabled]) {
  transform: scale(0.92);
}

.ss-ctrl-btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

.ss-ctrl-btn.active {
  background: radial-gradient(circle at 35% 28%, #543d14 0%, #261a07 78%);
  border-color: #fbbf24;
  color: #fde68a;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.ss-ctrl-sub {
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
  margin-top: 1px;
  color: #cbd5e1;
}

.ss-ctrl-btn.active .ss-ctrl-sub {
  color: #fde68a;
}

/* 中央大号 3D 转动键 */
.ss-spin-btn {
  position: relative;
  width: clamp(64px, 17vw, 78px);
  height: clamp(64px, 17vw, 78px);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #ffb732 0%, #b8640b 72%, #6e3504 100%);
  border: 2px solid #ffe799;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 178, 46, 0.48);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.ss-spin-btn:active:not([disabled]) {
  transform: scale(0.93);
}

.ss-spin-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.ss-spin-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.3s ease;
}

#ssStageRoot.is-spinning .ss-spin-img {
  animation: ssSpinMedallion 0.9s linear infinite;
}

@keyframes ssSpinMedallion {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ss-spin-fallback {
  font-size: 26px;
  font-weight: 900;
  color: #fff8dc;
  pointer-events: none;
}

.ss-spin-fallback[hidden] {
  display: none;
}

/* 7 局免费试玩期间显示在中央转动键上的「免费 余 N 局」胶囊 */
.ss-trial-spin-badge {
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  z-index: 4;
  padding: 1.5px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  border: 1px solid #a7f3d0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  color: #ecfdf5;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
}

.ss-trial-spin-badge[hidden] {
  display: none;
}

/* 自动旋转局数选择气泡（直接挂载舞台顶层 z-index: 46，彻底高于卷轴横幅与算奖浮窗） */
.ss-auto-pop {
  position: absolute;
  right: 10px;
  bottom: calc(max(7px, env(safe-area-inset-bottom, 0px)) + 58px);
  z-index: 46;
  padding: 6px;
  border-radius: 12px;
  background: rgba(11, 20, 38, 0.98);
  border: 1.5px solid rgba(247, 205, 105, 0.82);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 5px;
}

.ss-auto-pop[hidden] {
  display: none;
}

.ss-auto-opt {
  min-width: 38px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(30, 48, 78, 0.9);
  border: 1px solid rgba(148, 179, 218, 0.35);
  color: #f8fafc;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ss-auto-opt:active {
  background: #d97706;
}

/* ==================== 7. ≡ 菜单抽屉及子面板（对标 starship_drawer_ref.jpg + modal-history） ==================== */
.ss-drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(4, 8, 18, 0.64);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.ss-drawer-backdrop[hidden] {
  display: none;
}

.ss-drawer-sheet {
  position: relative;
  width: 100%;
  max-height: 82%;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #273347 0%, #161f2e 45%, #0f1623 100%);
  border-top: 1.5px solid rgba(226, 202, 148, 0.55);
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.8);
  padding: 18px 16px max(18px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
  color: #f8fafc;
}

.ss-drawer-avatar-ring {
  width: 68px;
  height: 68px;
  margin: -46px auto 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #324b74, #111a2c);
  border: 2.5px solid #f2c96b;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ss-drawer-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.ss-drawer-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 202, 148, 0.42);
  color: #f3e5be;
  font-size: 16px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ss-drawer-wallet-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ss-drawer-wallet-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: #e2d5b5;
}

.ss-drawer-wallet-val {
  font-family: var(--mono);
  font-size: clamp(20px, 5.8vw, 28px);
  font-weight: 900;
  color: #ffd875;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ss-drawer-wallet-val img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.ss-drawer-grid5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding-top: 4px;
}

.ss-drawer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #f1e4c3;
  padding: 4px 0;
}

.ss-drawer-ico {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2c3b52, #182232);
  border: 1.5px solid rgba(226, 202, 148, 0.42);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  color: #f4d58d;
  font-size: 20px;
  transition: transform 0.14s ease, border-color 0.18s ease;
}

.ss-drawer-item:active .ss-drawer-ico {
  transform: scale(0.92);
}

.ss-drawer-item.is-off .ss-drawer-ico {
  opacity: 0.52;
}

.ss-drawer-lbl {
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

/* 抽屉二级内容面板（赔率表 / 规则 / 记录） */
.ss-subpanel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  max-height: 62vh;
}

.ss-subpanel[hidden] {
  display: none;
}

.ss-subpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ss-subpanel-back {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(226, 202, 148, 0.35);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ss-subpanel-title {
  font-size: 14px;
  font-weight: 900;
  color: #ffe699;
}

.ss-subpanel-body {
  overflow-y: auto;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #dbe7f5;
}

.ss-pay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.ss-pay-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 10px;
  background: rgba(15, 24, 42, 0.78);
  border: 1px solid rgba(226, 202, 148, 0.24);
}

.ss-pay-card img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
  background: #ebd8b5;
  padding: 2px;
}

.ss-pay-meta {
  min-width: 0;
  flex: 1;
  font-size: 11px;
  line-height: 1.35;
}

.ss-pay-meta b {
  display: block;
  color: #fde68a;
  font-size: 11.5px;
  margin-bottom: 2px;
}

.ss-rule-box {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(13, 22, 39, 0.78);
  border: 1px solid rgba(148, 179, 218, 0.2);
}

.ss-rule-box h4 {
  margin: 0 0 4px;
  font-size: 12.5px;
  color: #fde68a;
}

.ss-hist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(13, 22, 39, 0.78);
  border: 1px solid rgba(148, 179, 218, 0.18);
  font-size: 11.5px;
}

/* ==================== 8. 小屏紧凑高度微调（360×692 严防任何溢出） ==================== */
@media (max-height: 730px) {
  .ss-hero-stage {
    flex: 0 0 19.5%;
    min-height: 104px;
  }
  .ss-boost-capsule {
    top: calc(max(8px, env(safe-area-inset-top, 0px)) + 45px);
    min-height: 31px;
    padding: 2px 7px 2px 5px;
    max-width: 176px;
  }
  .ss-boost-orb {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  .ss-boost-title {
    font-size: 10px;
  }
  .ss-boost-sub {
    font-size: 8.5px;
  }
  .ss-col-fx-layer {
    inset: 3px 4px;
    gap: 2px;
  }
  .ss-mult-badge,
  .ss-ways-plaque {
    height: 24px;
    font-size: 11px;
  }
  .ss-board-wrap {
    padding: 3px 4px;
  }
  .ss-board-grid {
    gap: 2px;
  }
  .ss-ribbon-zone {
    min-height: 31px;
    padding: 1px 6px;
  }
  .ss-scroll-plaque {
    min-height: 28px;
  }
  .ss-status-bar {
    margin: 1px 6px;
    padding: 2px 6px;
  }
  .ss-controls-dock {
    padding: 1px 10px max(4px, env(safe-area-inset-bottom, 0px));
  }
  .ss-ctrl-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  .ss-spin-btn {
    width: 58px;
    height: 58px;
  }
}
