/* ============================================================
   css/chat/chat-game-ruota.css — 命运之轮 (Ruota della Fortuna)
   适配：韩系法式花艺 · 暗调私密 · 玫瑰金配色
   原始代码来源: github.com/29-Cu/Ruota-della-Fortuna (MIT)
   ============================================================ */

/* ===== CSS 变量：暗调玫瑰金 ===== */
.game-ruota {
  --ruo-bg-0: #100a0e;
  --ruo-bg-1: #181016;
  --ruo-bg-2: #1f141a;
  --ruo-lacquer: #0f090d;
  --ruo-frame: #22171d;
  /* ★ 玫瑰/强调色调跟随所选主题（禁写死红）：--rose/--rose-dark 已由 theme.js 按主题映射 */
  --ruo-rose-1: color-mix(in srgb, var(--rose, #C8A87C) 55%, #fff);
  --ruo-rose-2: var(--rose);
  --ruo-rose-3: var(--rose-dark);
  --ruo-rose-4: color-mix(in srgb, var(--rose-dark, #B89468) 45%, #4a2a2c);
  --ruo-rose-deep: color-mix(in srgb, var(--rose-dark, #B89468) 28%, #2a1416);
  --ruo-rose-line: color-mix(in srgb, var(--rose, #C8A87C) 60%, #c09090);
  --ruo-ink: #f0e2d8;
  --ruo-ink-dim: #b8988c;
  --ruo-ink-ghost: #5a4845;
  --ruo-bulb: color-mix(in srgb, var(--rose, #C8A87C) 55%, #fff);
  --ruo-bulb-glow: var(--rose);
  --ruo-bulb-off: #4a3830;
  --ruo-accent: var(--rose);
  --ruo-accent-soft: var(--rose-dark);
  --ruo-payline: var(--rose);

  --ruo-font-title: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --ruo-font-deco: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --ruo-font-cn: 'PingFang SC', 'Noto Serif SC', 'STSong', 'Microsoft YaHei', serif;

  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 30px;
  gap: 10px;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(130% 70% at 50% -8%, var(--ruo-bg-2), transparent 55%),
    radial-gradient(140% 120% at 50% 120%, var(--ruo-bg-1), var(--ruo-bg-0) 70%);
  background-attachment: fixed;
  font-family: var(--ruo-font-cn);
  color: var(--ruo-ink);
}

/* ===== GORE 模式配色切换 ===== */
.game-ruota.gore {
  --ruo-bg-0: #0f0708;
  --ruo-bg-1: #19090b;
  --ruo-bg-2: #220b0e;
  --ruo-lacquer: #110608;
  --ruo-frame: #2e0e12;
  --ruo-rose-1: color-mix(in srgb, var(--rose, #D06074) 45%, #fff);
  --ruo-rose-2: var(--rose);
  --ruo-rose-3: var(--rose-dark);
  --ruo-rose-4: color-mix(in srgb, var(--rose-dark, #E07084) 35%, #5a0f14);
  --ruo-rose-deep: color-mix(in srgb, var(--rose-dark, #E07084) 20%, #2a0a10);
  --ruo-rose-line: color-mix(in srgb, var(--rose, #D06074) 55%, #9a3038);
  --ruo-ink: #f0d8d4;
  --ruo-ink-dim: #c08080;
  --ruo-ink-ghost: #6a3030;
  --ruo-bulb: color-mix(in srgb, var(--rose, #D06074) 45%, #fff);
  --ruo-bulb-glow: var(--rose);
  --ruo-bulb-off: #4a1818;
  --ruo-accent: var(--rose);
  --ruo-accent-soft: var(--rose-dark);
  --ruo-payline: var(--rose);
}

/* ===== 顶栏 ===== */
.ruota-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex-shrink: 0;
}
.ruota-back {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 1px solid var(--ruo-rose-line);
  color: var(--ruo-rose-2);
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(0,0,0,0.2));
  font-size: 16px;
  font-family: var(--ruo-font-deco);
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.ruota-back:hover { color: var(--ruo-rose-1); border-color: var(--ruo-rose-2); }

.ruota-help {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 1px solid var(--ruo-rose-line);
  color: var(--ruo-rose-2);
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(0,0,0,0.2));
  font-family: var(--ruo-font-deco);
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.ruota-help:hover { color: var(--ruo-rose-1); border-color: var(--ruo-rose-2); }

/* ---- 标题牌 ---- */
.ruota-title-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}
.ruota-title-sign {
  position: relative;
  width: 260px;
  max-width: 76vw;
  aspect-ratio: 260/84;
}
.ruota-title-sign svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ruota-title-sign .frameline {
  fill: #0f090d;
  stroke: var(--ruo-frame);
  stroke-width: 2;
  transition: fill 0.6s ease;
}
.game-ruota.gore .ruota-title-sign .frameline {
  fill: #150608;
}
.ruota-title-sign .bulbline {
  fill: none;
  stroke: var(--ruo-bulb);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1.5 12;
  filter: drop-shadow(0 0 3px var(--ruo-bulb-glow));
  animation: ruo-bulbrun 7s linear infinite, ruo-bulbpulse 1.6s ease-in-out infinite;
}
.game-ruota.busy .ruota-title-sign .bulbline {
  animation: ruo-bulbrun 1.2s linear infinite, ruo-bulbpulse 0.45s ease-in-out infinite;
}
@keyframes ruo-bulbrun { to { stroke-dashoffset: -28; } }
@keyframes ruo-bulbpulse {
  50% { filter: drop-shadow(0 0 6px var(--ruo-bulb-glow)) brightness(1.2); }
}
.ruota-title-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 6px;
  margin: 0;
  font-family: var(--ruo-font-title);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 1.5px;
  line-height: 0.95;
  white-space: nowrap;
  text-align: center;
  background: linear-gradient(175deg, var(--ruo-rose-1) 8%, var(--ruo-rose-2) 40%, var(--ruo-rose-4) 74%, var(--ruo-rose-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.5)) drop-shadow(0 2px 6px rgba(200,140,140,0.3));
  transition: filter 0.6s ease;
}
.ruota-title-text .l2 {
  font-size: 0.82em;
  letter-spacing: 0.08em;
}
.game-ruota.gore .ruota-title-text {
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.6)) drop-shadow(0 2px 10px rgba(200,60,60,0.55));
}

/* ===== 机器主体 ===== */
.ruota-machine {
  position: relative;
  border-radius: 18px;
  padding: 22px 14px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 18%),
              linear-gradient(180deg, var(--ruo-frame), var(--ruo-lacquer) 60%);
  border: 1px solid rgba(190,140,140,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), inset 0 0 40px rgba(0,0,0,0.6), 0 20px 40px -14px rgba(0,0,0,0.7);
  transition: box-shadow 0.6s ease, border-color 0.6s ease;
  flex-shrink: 0;
}
.game-ruota.gore .ruota-machine {
  border-color: rgba(200,60,60,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), inset 0 0 50px rgba(40,0,0,0.7), 0 20px 40px -14px rgba(0,0,0,0.8), 0 0 36px -8px rgba(200,60,60,0.4);
}
.ruota-machine::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px solid transparent;
  border-image: linear-gradient(160deg, var(--ruo-rose-2), var(--ruo-rose-4) 45%, var(--ruo-rose-1) 60%, var(--ruo-rose-4)) 1;
  border-radius: 11px;
  pointer-events: none;
  opacity: 0.55;
}

/* ---- 灯泡跑马灯 ---- */
.ruota-marquee {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ruota-edge {
  position: absolute;
  display: flex;
}
.ruota-edge.top { top: 5px; left: 18px; right: 18px; justify-content: space-between; }
.ruota-edge.bottom { bottom: 5px; left: 18px; right: 18px; justify-content: space-between; flex-direction: row-reverse; }
.ruota-edge.left { left: 5px; top: 18px; bottom: 18px; flex-direction: column-reverse; justify-content: space-between; }
.ruota-edge.right { right: 5px; top: 18px; bottom: 18px; flex-direction: column; justify-content: space-between; }
.ruota-bulb {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--ruo-bulb), var(--ruo-bulb-off) 75%);
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
  opacity: 0.45;
  transition: opacity 0.2s;
}
.ruota-bulb.lit {
  background: radial-gradient(circle at 35% 30%, #fff, var(--ruo-bulb) 45%, var(--ruo-bulb-glow) 90%);
  box-shadow: 0 0 6px 1px var(--ruo-bulb-glow), 0 0 12px 1px rgba(240,190,160,0.4);
  opacity: 1;
}
.game-ruota.gore .ruota-bulb.lit {
  box-shadow: 0 0 7px 1px var(--ruo-bulb-glow), 0 0 14px 2px rgba(200,70,60,0.5);
}

/* ---- 转轮组 ---- */
.ruota-bank {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 4px;
  justify-content: center;
  padding: 5px 3px;
}
.ruota-reel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  cursor: pointer;
}
.ruota-window {
  position: relative;
  height: 160px;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0608, #140d11 50%, #0a0608);
  border: 1px solid rgba(190,140,140,0.18);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.85);
  transition: border-color 0.3s, box-shadow 0.3s, filter 0.3s;
}
.ruota-reel.ghost .ruota-window {
  filter: grayscale(0.5) brightness(0.45);
  opacity: 0.65;
}
.ruota-reel.active .ruota-window {
  border-color: var(--ruo-rose-2);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.85), 0 0 10px -1px rgba(200,140,140,0.5), 0 0 0 1px rgba(200,140,140,0.2);
}
.game-ruota.gore .ruota-reel.active .ruota-window {
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.85), 0 0 12px -1px rgba(200,60,60,0.6), 0 0 0 1px rgba(200,60,60,0.3);
}
.ruota-reel.locked .ruota-window {
  filter: grayscale(0.7) brightness(0.35);
}
.ruota-strip {
  will-change: transform;
}
.ruota-cell {
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px 3px;
  font-family: var(--ruo-font-cn);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.15;
  color: var(--ruo-ink-dim);
  text-wrap: balance;
  word-break: break-word;
}
.ruota-reel.gore-reel .ruota-cell {
  font-family: var(--ruo-font-deco);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.3px;
}

/* 窗口暗角遮罩 */
.ruota-window::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6,4,5,0.94) 0%, rgba(6,4,5,0.5) 20%, transparent 38%,
    transparent 62%, rgba(6,4,5,0.5) 80%, rgba(6,4,5,0.94) 100%);
}
/* 中奖线 */
.ruota-window::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 53px; height: 53px;
  z-index: 4;
  pointer-events: none;
  border-top: 1px solid var(--ruo-payline);
  border-bottom: 1px solid var(--ruo-payline);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.45);
  background: linear-gradient(180deg, rgba(240,210,200,0.04), transparent 50%, rgba(240,210,200,0.04));
  opacity: 0;
  transition: opacity 0.3s;
}
.ruota-reel.active .ruota-window::after {
  opacity: 0.85;
}
.ruota-reel.spinning .ruota-strip {
  filter: blur(0.5px);
}
.ruota-reel.settled .ruota-cell.paycell {
  color: var(--ruo-payline);
  text-shadow: 0 0 8px var(--ruo-accent);
}

/* 转轮标签 */
.ruota-reel-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 2px 0;
  border-radius: 5px;
  min-height: 32px;
  justify-content: center;
}
.ruota-reel-foot .k {
  font-family: var(--ruo-font-cn);
  font-size: 12px;
  font-weight: 700;
  color: var(--ruo-ink-dim);
  letter-spacing: 1px;
}
.ruota-reel.gore-reel .ruota-reel-foot .k {
  font-family: var(--ruo-font-deco);
  font-size: 10px;
  letter-spacing: 1.5px;
}
.ruota-reel-foot .e {
  font-family: var(--ruo-font-deco);
  font-size: 7px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ruo-ink-ghost);
}
.ruota-reel.gore-reel .ruota-reel-foot .e {
  display: none;
}
.ruota-reel.active .ruota-reel-foot .k {
  color: var(--ruo-rose-1);
  text-shadow: 0 0 6px rgba(200,140,140,0.35);
}
.ruota-reel.active .ruota-reel-foot .e {
  color: var(--ruo-rose-3);
}

/* 重转动效光环 */
.ruota-reel .ruota-ringing {
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: 7px;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--ruo-accent), 0 0 14px var(--ruo-accent);
  opacity: 0;
}
.ruota-reel.rerolling .ruota-ringing {
  opacity: 1;
  animation: ruo-pulsering 0.6s ease infinite;
}
@keyframes ruo-pulsering {
  50% { opacity: 0.3; }
}

/* 提示文字 */
.ruota-hint {
  text-align: center;
  font-family: var(--ruo-font-cn);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ruo-ink-ghost);
  margin: -2px 0;
  flex-shrink: 0;
}

/* ===== 控制区 ===== */
.ruota-deck {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  flex-shrink: 0;
}

/* ---- GORE 保险盖 ---- */
.ruota-gore-mod {
  justify-self: start;
  width: 70px;
}
.ruota-gore-label {
  font-family: var(--ruo-font-deco);
  font-size: 8px;
  letter-spacing: 2px;
  text-align: center;
  color: var(--ruo-ink-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ruota-gore-housing {
  position: relative;
  width: 66px; height: 66px;
  margin: 0 auto;
  border-radius: 11px;
  perspective: 300px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.35) 0 4px, rgba(200,140,120,0.05) 4px 8px),
              linear-gradient(160deg, #2a181d, #0f090c);
  border: 1px solid var(--ruo-rose-line);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.7);
}
.ruota-gore-housing.open .ruota-gore-cover {
  transform: rotateX(-148deg);
  box-shadow: 0 -5px 12px rgba(0,0,0,0.55);
}
.ruota-gore-cover {
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  cursor: pointer;
  transform-origin: top center;
  transition: transform 0.45s cubic-bezier(0.5, 1.4, 0.5, 1);
  transform: rotateX(0deg);
  z-index: 5;
  backface-visibility: hidden;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--rose-dark, #B89468) 80%, #5a0f14) 0 8px, #2a0608 8px 16px);
  border: 2px solid color-mix(in srgb, var(--rose-dark, #B89468) 65%, #4a0e14);
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.15), inset 0 -7px 12px rgba(0,0,0,0.55), 0 4px 8px rgba(0,0,0,0.6);
  display: grid;
  place-items: center;
}
.ruota-gore-cover::before {
  content: "\26A0";
  font-size: 20px;
  color: var(--rose, #D06074);
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.ruota-gore-cover::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 12px; right: 12px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(#c49890, #6a4038);
}
.ruota-gore-btn {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  border: 2px solid #7a151c;
  background: radial-gradient(circle at 38% 30%, #f09090, #b84040 55%, #7a2025 100%);
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.3), inset 0 -3px 6px rgba(0,0,0,0.5), 0 2px 5px rgba(0,0,0,0.5);
}
.ruota-gore-btn svg {
  width: 24px; height: 24px;
  color: #2a0507;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.2));
}
.ruota-gore-btn.armed {
  background: radial-gradient(circle at 38% 30%, #f0a0a0, #d06060 50%, #8a1a20 100%);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.35), 0 0 14px 2px rgba(200,60,60,0.7), 0 0 24px rgba(200,60,60,0.45);
  animation: ruo-armthrob 1.1s ease-in-out infinite;
}
.ruota-gore-btn.armed svg { color: #fff; }
@keyframes ruo-armthrob {
  50% { box-shadow: inset 0 1px 2px rgba(255,255,255,0.35), 0 0 20px 4px rgba(200,60,60,0.9), 0 0 34px rgba(200,60,60,0.6); }
}
.ruota-gore-state {
  text-align: center;
  font-family: var(--ruo-font-deco);
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-top: 4px;
  color: var(--ruo-ink-ghost);
}
.ruota-gore-mod.armed .ruota-gore-state {
  color: var(--ruo-accent);
  text-shadow: 0 0 6px var(--ruo-accent);
}

/* ---- SPIN 按钮 ---- */
.ruota-spin-col {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ruota-spin {
  position: relative;
  width: 110px; height: 110px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  font-family: var(--ruo-font-deco);
  font-size: 22px;
  letter-spacing: 4px;
  text-indent: 4px;
  font-weight: 700;
  background: radial-gradient(circle at 50% 40%, rgba(30,16,20,0.5), rgba(10,6,8,0.85));
  color: var(--ruo-rose-1);
  border: 2px solid var(--ruo-rose-2);
  text-shadow: 0 0 6px var(--ruo-accent), 0 0 14px var(--ruo-accent);
  box-shadow: 0 0 12px 1px var(--ruo-accent), inset 0 0 12px rgba(200,140,140,0.25), 0 0 24px -3px var(--ruo-accent);
  transition: transform 0.08s ease, box-shadow 0.4s ease, background 0.6s ease;
}
.ruota-spin:active {
  transform: scale(0.95);
  box-shadow: 0 0 6px 1px var(--ruo-accent), inset 0 0 10px rgba(200,140,140,0.2);
}
.ruota-spin:disabled {
  filter: grayscale(0.35) brightness(0.65);
  cursor: default;
}
.game-ruota.gore .ruota-spin {
  color: #f0d0d0;
}

/* ---- 拉杆 ---- */
.ruota-lever-col {
  justify-self: end;
  width: 44px;
  height: 120px;
  position: relative;
}
.ruota-lever-rod {
  position: absolute;
  right: 13px; top: 5px;
  width: 5px; height: 68px;
  border-radius: 3px;
  z-index: 2;
  background: linear-gradient(90deg, var(--ruo-rose-deep), var(--ruo-rose-2), var(--ruo-rose-deep));
  box-shadow: 0 0 5px rgba(200,140,140,0.45);
  transition: transform 0.5s cubic-bezier(0.3, 1.3, 0.4, 1);
}
.ruota-lever-track {
  position: absolute;
  right: 11px; top: 28px; bottom: 5px;
  width: 9px;
  border-radius: 5px;
  z-index: 1;
  background: linear-gradient(90deg, #050303, #2a181d, #050303);
  box-shadow: inset 0 0 5px rgba(0,0,0,0.85), 0 0 6px -1px var(--ruo-accent);
}
.ruota-lever-knob {
  position: absolute;
  right: 4px; top: -5px;
  width: 23px; height: 23px;
  border-radius: 50%;
  z-index: 3;
  cursor: grab;
  background: radial-gradient(circle at 42% 34%, #f09090, #d06060 55%, #8a1a20 100%);
  border: 2px solid #b84040;
  box-shadow: 0 0 5px 0 rgba(200,60,60,0.55), inset 0 1px 2px rgba(255,255,255,0.25);
  transition: transform 0.5s cubic-bezier(0.3, 1.3, 0.4, 1);
}
.ruota-lever-col.pulled .ruota-lever-rod,
.ruota-lever-col.pulled .ruota-lever-knob {
  transform: translateY(40px);
}
.ruota-lever-label {
  position: absolute;
  left: -2px; bottom: -2px;
  font-family: var(--ruo-font-deco);
  font-size: 7px;
  letter-spacing: 1.5px;
  color: var(--ruo-ink-ghost);
  writing-mode: vertical-rl;
}

/* ===== 自定义标签区 ===== */
.ruota-addtag-btn {
  width: 100%;
  padding: 10px;
  border-radius: 9px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.25));
  border: 1px dashed var(--ruo-rose-line);
  color: var(--ruo-rose-2);
  font-family: var(--ruo-font-deco);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}
.ruota-addtag-btn .cn {
  font-family: var(--ruo-font-cn);
  letter-spacing: 2px;
}
.ruota-addtag-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  flex-shrink: 0;
}
.ruota-addtag-panel.open {
  max-height: 300px;
}
.ruota-addtag-inner {
  padding: 12px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ruota-addtag-row {
  display: flex;
  gap: 8px;
}
.ruota-field {
  flex: 1;
}
.ruota-field.req label::after {
  content: " *";
  color: var(--ruo-accent);
}
.ruota-field label {
  display: block;
  font-family: var(--ruo-font-deco);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--ruo-ink-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ruota-field select, .ruota-field input {
  width: 100%;
  padding: 8px 9px;
  border-radius: 7px;
  background: var(--ruo-bg-0);
  border: 1px solid var(--ruo-rose-line);
  color: var(--ruo-ink);
  font-family: var(--ruo-font-cn);
  font-size: 13px;
}
.ruota-addtag-add {
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  align-self: flex-end;
  background: linear-gradient(180deg, var(--ruo-rose-2), var(--ruo-rose-4));
  color: #2a1518;
  border: none;
  font-family: var(--ruo-font-deco);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== 搜索 ===== */
.ruota-search-wrap {
  position: relative;
  flex-shrink: 0;
}
.ruota-search-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--ruo-bg-0);
  border: 1px solid var(--ruo-rose-line);
  color: var(--ruo-ink);
  font-family: var(--ruo-font-cn);
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.ruota-search-input::placeholder {
  color: var(--ruo-ink-ghost);
}
.ruota-search-input:focus {
  border-color: var(--ruo-rose-2);
  box-shadow: 0 0 6px rgba(200,140,140,0.25);
}
.ruota-search-results {
  position: absolute;
  left: 0; right: 0; top: 100%;
  z-index: 60;
  max-height: 240px;
  overflow-y: auto;
  background: var(--ruo-bg-0);
  border: 1px solid var(--ruo-rose-line);
  border-top: none;
  border-radius: 0 0 9px 9px;
  display: none;
  -webkit-overflow-scrolling: touch;
}
.ruota-search-results.open {
  display: block;
}
.ruota-search-item {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(190,140,140,0.12);
  cursor: default;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ruota-search-item:last-child { border-bottom: none; }
.ruota-search-item .s-info { flex: 1; min-width: 0; }
.ruota-search-item .s-tag {
  font-family: var(--ruo-font-cn);
  font-size: 12px;
  font-weight: 600;
  color: var(--ruo-ink);
}
.ruota-search-item .s-dim {
  font-family: var(--ruo-font-deco);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--ruo-ink-ghost);
  margin-left: 8px;
  text-transform: uppercase;
}
.ruota-search-item .s-sub {
  display: block;
  font-family: var(--ruo-font-deco);
  font-size: 10px;
  color: var(--ruo-ink-dim);
  margin-top: 2px;
}
.ruota-search-del {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(190,140,140,0.2);
  background: transparent;
  color: var(--ruo-ink-ghost);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.ruota-search-del:hover {
  border-color: var(--ruo-accent);
  color: var(--ruo-accent);
}
.ruota-search-empty {
  padding: 12px;
  font-size: 12px;
  color: var(--ruo-ink-ghost);
  text-align: center;
}

/* ===== 历史记录 ===== */
.ruota-history-toggle {
  width: 100%;
  padding: 10px;
  border-radius: 9px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.25));
  border: 1px solid var(--ruo-rose-line);
  color: var(--ruo-rose-2);
  font-family: var(--ruo-font-deco);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}
.ruota-history-toggle .cn {
  font-family: var(--ruo-font-cn);
  letter-spacing: 2px;
}
.ruota-history-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  flex-shrink: 0;
}
.ruota-history-panel.open {
  max-height: 350px;
}
.ruota-history-inner {
  padding: 8px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ruota-history-list {
  max-height: 260px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ruota-history-entry {
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(190,140,140,0.12);
}
.ruota-history-entry .h-time {
  font-family: var(--ruo-font-deco);
  font-size: 9px;
  color: var(--ruo-ink-ghost);
  letter-spacing: 1px;
}
.ruota-history-entry .h-tags {
  font-family: var(--ruo-font-cn);
  font-size: 11px;
  color: var(--ruo-ink-dim);
  margin-top: 3px;
  line-height: 1.5;
}
.ruota-history-entry .h-tags span {
  color: var(--ruo-rose-3);
  font-size: 10px;
  margin-right: 4px;
}
.ruota-history-clear {
  align-self: flex-end;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(190,140,140,0.2);
  color: var(--ruo-ink-ghost);
  font-family: var(--ruo-font-deco);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.ruota-history-empty {
  text-align: center;
  font-size: 11px;
  color: var(--ruo-ink-ghost);
  padding: 10px;
}

/* ===== 结果卡片 Overlay ===== */
.ruota-result-veil {
  position: fixed;
  inset: 0;
  z-index: 430;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,4,6,0.7);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
}
.ruota-result-veil.show {
  opacity: 1;
  pointer-events: auto;
}
/* 结果卡 — 更像信笺/御札 */
.ruota-omikuji {
  width: min(320px, 90%);
  margin: 0;
  transform: translateY(80px);
  transition: transform 0.55s cubic-bezier(0.2, 1.1, 0.3, 1);
  position: relative;
  border-radius: 6px;
  padding: 0;
  min-height: 180px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ruo-ink);
  background: radial-gradient(120% 60% at 50% 0%, rgba(200,140,140,0.08), transparent 55%),
              linear-gradient(180deg, #1a1016, #0f090d);
  border: 2px solid var(--ruo-rose-2);
  box-shadow: 0 16px 44px rgba(0,0,0,0.8), inset 0 0 0 5px rgba(0,0,0,0.45),
              inset 0 0 0 6px var(--ruo-rose-3), inset 0 0 40px rgba(0,0,0,0.6),
              0 0 24px -6px rgba(200,140,140,0.35);
}
.ruota-result-veil.show .ruota-omikuji {
  transform: translateY(0);
}
.game-ruota.gore .ruota-omikuji {
  background: radial-gradient(120% 60% at 50% 0%, rgba(200,60,60,0.12), transparent 55%),
              linear-gradient(180deg, #19080a, #0f0507);
  border-color: var(--ruo-rose-2);
  box-shadow: 0 16px 44px rgba(0,0,0,0.85), inset 0 0 0 5px rgba(0,0,0,0.45),
              inset 0 0 0 6px var(--ruo-rose-3), inset 0 0 40px rgba(0,0,0,0.6),
              0 0 28px -6px rgba(200,60,60,0.5);
}
.ruota-omi-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding: 24px 24px 20px;
}
.ruota-omi-head {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 4px;
  position: relative;
  flex: 0 0 auto;
}
.ruota-omi-head::after {
  content: "";
  display: block;
  width: 55%;
  height: 1px;
  margin: 10px auto 0;
  background: linear-gradient(90deg, transparent, var(--ruo-rose-3), transparent);
}
.ruota-omi-head .crest {
  font-family: var(--ruo-font-title);
  font-size: 28px;
  letter-spacing: 2px;
  line-height: 1;
  background: linear-gradient(175deg, var(--ruo-rose-1), var(--ruo-rose-2) 50%, var(--ruo-rose-4));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.ruota-omi-head .en {
  font-family: var(--ruo-font-deco);
  font-size: 9px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ruo-rose-3);
  margin-top: 6px;
}
.ruota-omi-list {
  list-style: none;
  margin: 0;
  padding: 0 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ruota-omi-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px dotted rgba(190,140,140,0.22);
}
.ruota-omi-row:last-child { border-bottom: none; }
.ruota-omi-row .dim {
  flex: 0 0 40px;
  font-family: var(--ruo-font-cn);
  font-weight: 700;
  font-size: 12px;
  color: var(--ruo-rose-3);
}
.ruota-omi-row.gore-row .dim {
  font-family: var(--ruo-font-deco);
  font-size: 10px;
}
.ruota-omi-row .val { flex: 1; }
.ruota-omi-row .val .vjp {
  font-family: var(--ruo-font-cn);
  font-weight: 700;
  font-size: 17px;
  color: var(--ruo-ink);
}
.ruota-omi-row.gore-row .val .vjp {
  font-family: var(--ruo-font-deco);
  font-size: 15px;
  letter-spacing: 0.5px;
}
.ruota-omi-row .val .ven {
  display: block;
  font-family: var(--ruo-font-deco);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--ruo-ink-dim);
  margin-top: 2px;
}
.ruota-omi-row .val .ven .ja {
  font-family: var(--ruo-font-cn);
}
.ruota-omi-row.gore-row .dim,
.ruota-omi-row.gore-row .val .vjp {
  color: var(--ruo-accent);
}
.ruota-omi-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex: 0 0 auto;
}
.ruota-omi-actions button {
  flex: 1;
  padding: 10px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-family: var(--ruo-font-deco);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.ruota-omi-again {
  background: transparent;
  color: var(--ruo-rose-1);
  border: 1px solid var(--ruo-rose-2) !important;
  text-shadow: 0 0 5px var(--ruo-accent);
  box-shadow: 0 0 8px var(--ruo-accent), inset 0 0 6px rgba(200,140,140,0.18);
}
.ruota-omi-close {
  background: transparent;
  border: 1px solid var(--ruo-rose-line) !important;
  color: var(--ruo-rose-2);
}
/* 分享按钮 — 突出显示 */
.ruota-omi-share {
  background: linear-gradient(135deg, var(--ruo-rose-2), var(--ruo-rose-4)) !important;
  color: #fff !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 3px 12px rgba(180,100,100,0.4);
  flex: 2 !important;
  font-family: var(--ruo-font-cn) !important;
  letter-spacing: 1px !important;
}
.ruota-omi-share:active {
  transform: scale(0.96);
  opacity: 0.88;
}

/* ===== Help / 帮助弹窗 ===== */
.ruota-help-veil {
  position: fixed;
  inset: 0;
  z-index: 440;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,4,6,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
}
.ruota-help-veil.show {
  opacity: 1;
  pointer-events: auto;
}
.ruota-help-card {
  width: min(350px, 88%);
  max-height: 75vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #1a1016, #0c080b);
  border: 1.5px solid var(--ruo-rose-line);
  border-radius: 9px;
  padding: 24px 22px 20px;
  color: var(--ruo-ink);
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.2, 1.1, 0.3, 1);
}
.ruota-help-veil.show .ruota-help-card {
  transform: translateY(0);
}
.ruota-help-card h2 {
  font-family: var(--ruo-font-title);
  font-size: 19px;
  text-align: center;
  margin: 0 0 4px;
  background: linear-gradient(175deg, var(--ruo-rose-1), var(--ruo-rose-2) 50%, var(--ruo-rose-4));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ruota-help-card .sub {
  text-align: center;
  font-family: var(--ruo-font-deco);
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--ruo-rose-3);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.ruota-help-card dl { margin: 0; }
.ruota-help-card dt {
  font-family: var(--ruo-font-deco);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--ruo-rose-2);
  margin: 12px 0 3px;
  text-transform: uppercase;
}
.ruota-help-card dt:first-child { margin-top: 0; }
.ruota-help-card dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ruo-ink-dim);
}
.ruota-help-card .close-help {
  display: block;
  margin: 18px auto 0;
  padding: 8px 24px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--ruo-rose-line);
  color: var(--ruo-rose-2);
  font-family: var(--ruo-font-deco);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.ruota-help-card .credit {
  text-align: center;
  font-family: var(--ruo-font-deco);
  font-size: 9px;
  color: var(--ruo-ink-ghost);
  margin-top: 14px;
  letter-spacing: 1px;
}
.ruota-help-card .gore-warn { color: #d06060; }
.ruota-help-card .note {
  font-size: 11px;
  color: var(--ruo-ink-ghost);
  margin-top: 8px;
  line-height: 1.5;
}

/* ===== GORE 警告弹窗 ===== */
.ruota-gore-warn-veil {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,4,5,0.88);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
}
.ruota-gore-warn-veil.show {
  opacity: 1;
  pointer-events: auto;
}
.ruota-gore-warn-card {
  width: min(310px, 85%);
  background: linear-gradient(180deg, #1e0609, #0f0305);
  border: 2px solid #d06060;
  border-radius: 10px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 0 36px rgba(200,60,60,0.4);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.2, 1.1, 0.3, 1);
}
.ruota-gore-warn-veil.show .ruota-gore-warn-card {
  transform: scale(1);
}
.ruota-gore-warn-card .warn-icon {
  font-size: 34px;
  margin-bottom: 8px;
}
.ruota-gore-warn-card h3 {
  font-family: var(--ruo-font-deco);
  font-size: 16px;
  letter-spacing: 2px;
  color: #f09090;
  margin: 0 0 12px;
  text-transform: uppercase;
}
.ruota-gore-warn-card p {
  font-size: 13px;
  line-height: 1.7;
  color: #c08080;
  margin: 0 0 18px;
}
.ruota-gore-warn-card .warn-actions {
  display: flex;
  gap: 10px;
}
.ruota-gore-warn-card button {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-family: var(--ruo-font-deco);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.ruota-gore-warn-card .warn-confirm {
  background: #d06060;
  color: #fff;
}
.ruota-gore-warn-card .warn-cancel {
  background: transparent;
  border: 1px solid #7a2025;
  color: #c08080;
}

/* ===== 移动端适配 ===== */
@media (max-width: 360px) {
  .ruota-title-text { font-size: 18px; }
  .ruota-cell { font-size: 11px; }
  .ruota-window { height: 140px; }
  .ruota-cell { height: 46px; }
  .ruota-window::after { top: 46px; height: 46px; }
  .ruota-spin { width: 96px; height: 96px; font-size: 19px; }
}
