/* ============================================================
   LL119 吞噬黑洞 2.0 舞台（.ts-*），配套 js/fun-tunshi.js。
   配色取自菜单长图：深空紫黑 + 紫罗兰高光；只作用在工作区舞台和锁定确认弹窗里。
   ============================================================ */

.fw-overlay[data-entry="LL119"] .fw-stage { height: auto; overflow: visible; }
@media (min-width: 761px) {
  .fw-overlay[data-entry="LL119"] .fw-entry { position: sticky; top: 0; }
}
/* 15 个档位：一行一张图（航天城 / 巴克什 / 潮汐监狱），每行 5 档 */
.fw-overlay[data-entry="LL119"] .fw-packs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fw-overlay[data-entry="LL119"] .fw-pack { min-width: 0; justify-content: center; text-align: center; }
.fw-overlay[data-entry="LL119"] .fw-pack strong, .fw-overlay[data-entry="LL119"] .fw-pack span { overflow-wrap: anywhere; }

.ts {
  --ts-ink: #2c2142; --ts-soft: #6f6290; --ts-line: #e3dbf3; --ts-violet: #8b5cf6; --ts-violet-2: #6d3fd8; --ts-lilac: #c9b3ff;
  display: flex; flex-direction: column; gap: 14px; color: var(--ts-ink);
}
.ts svg { flex: none; }

/* ---------- 标题区：深空 + 黑洞 ---------- */
.ts-hero {
  position: relative; display: flex; align-items: center; gap: 18px; min-height: 148px; padding: 18px 20px; overflow: hidden;
  border-radius: 20px; color: #fff;
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff9 50%, transparent 52%),
    radial-gradient(1px 1px at 34% 78%, #fff8 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 58% 16%, #e9dcff 50%, transparent 52%),
    radial-gradient(1px 1px at 76% 64%, #fff7 50%, transparent 52%),
    radial-gradient(1px 1px at 91% 30%, #fff9 50%, transparent 52%),
    radial-gradient(120% 140% at 12% 50%, #3f2670 0%, #1f1535 46%, #110c1d 100%);
  box-shadow: 0 16px 34px rgba(31, 19, 58, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ts-hole { position: relative; flex: none; width: 112px; aspect-ratio: 1; }
.ts-hole i { position: absolute; border-radius: 50%; }
.ts-glow { inset: -14%; background: radial-gradient(circle, rgba(167, 120, 255, 0.45) 0%, rgba(120, 70, 220, 0.12) 46%, transparent 68%); }
.ts-disk {
  inset: 0;
  background: conic-gradient(from 20deg, transparent 0 8%, rgba(226, 196, 255, 0.95) 16%, rgba(150, 100, 245, 0.35) 30%, transparent 42%, rgba(255, 220, 250, 0.9) 58%, rgba(124, 77, 226, 0.35) 72%, transparent 86%);
  -webkit-mask: radial-gradient(circle, transparent 34%, #000 40%, #000 60%, transparent 71%);
  mask: radial-gradient(circle, transparent 34%, #000 40%, #000 60%, transparent 71%);
  filter: blur(2px); animation: ts-spin 16s linear infinite;
}
.ts-core { inset: 29%; background: radial-gradient(circle, #000 60%, #24163d 72%, rgba(206, 170, 255, 0.85) 80%, transparent 88%); box-shadow: 0 0 22px 4px rgba(170, 120, 255, 0.5); }
.ts.sealed .ts-disk { animation-duration: 7s; }
.ts.sealed .ts-glow { background: radial-gradient(circle, rgba(190, 140, 255, 0.6) 0%, rgba(130, 70, 230, 0.18) 48%, transparent 70%); }
.ts.done .ts-disk { animation-duration: 28s; filter: blur(2px) saturate(0.8) brightness(1.1); }
@keyframes ts-spin { to { transform: rotate(360deg); } }

.ts-hero-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ts-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: #b9a6e8; }
.ts-hero h3 { margin: 0; font-family: 'LL Game', "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 30px; font-weight: 900; line-height: 1.15; color: #fff; letter-spacing: 1px; text-shadow: 0 2px 0 #4b2e86, 0 0 18px rgba(180, 140, 255, 0.45); }
.ts-tier { margin: 2px 0 0; font-size: 15px; font-weight: 800; color: #f0e8ff; }
.ts-rule { margin: 0; font-size: 12px; line-height: 1.5; color: #c8b9ec; }
.ts-badge { position: absolute; top: 14px; right: 14px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #f4edff; background: rgba(139, 92, 246, 0.35); border: 1px solid rgba(201, 179, 255, 0.45); backdrop-filter: blur(4px); }
.ts-badge.wait { background: rgba(255, 255, 255, 0.1); color: #e6dcff; }
.ts-badge.ok { background: linear-gradient(135deg, #ffe6a3, #f2c14e); border-color: #ffe6a3; color: #5b3d00; }

/* ---------- 面板 ---------- */
.ts-panel, .ts-spawn { display: flex; flex-direction: column; gap: 10px; }
.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ts-head h4 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; font-weight: 800; color: var(--ts-ink); }
.ts-head h4 svg { color: var(--ts-violet); font-size: 17px; }
.ts-count { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--ts-soft); background: #f3effb; font-variant-numeric: tabular-nums; }
.ts-count.full { color: #fff; background: var(--ts-violet); }
.ts-tip { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 12px; line-height: 1.6; color: var(--ts-soft); }
.ts-tip svg { margin-top: 3px; }
.ts-note { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; font-size: 13px; color: var(--ts-soft); background: #f6f2fd; }
.ts-note.bad { color: #a3263f; background: #fdecef; }

.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.ts-chip {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 46px; padding: 6px 8px;
  border: 1px solid var(--ts-line); border-radius: 12px; background: #fbf9ff; color: var(--ts-ink);
  font: inherit; font-size: 14px; font-weight: 800; line-height: 1.25; text-align: center; overflow-wrap: anywhere;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
button.ts-chip { cursor: pointer; }
button.ts-chip:hover { border-color: var(--ts-lilac); box-shadow: 0 4px 12px rgba(109, 63, 216, 0.12); }
button.ts-chip:active { transform: scale(0.97); }
button.ts-chip:focus-visible { outline: 3px solid rgba(139, 92, 246, 0.35); outline-offset: 2px; }
.ts-chip small { font-size: 11px; font-weight: 700; }
/* 板板选的吞噬点：被黑洞吞掉的深色 */
.ts-chip.pick.on, .ts-chip.eaten {
  color: #f3ecff; border-color: #5b3aa0;
  background: radial-gradient(120% 120% at 30% 20%, #4a2d82 0%, #24163e 60%, #120b20 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 6px 14px rgba(40, 20, 90, 0.28);
}
.ts-chip.pick.on::after { content: ''; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #c9b3ff; box-shadow: 0 0 8px #c9b3ff; }
.ts-chip.eaten small { color: #c9b3ff; }
/* 本局出生点：亮紫 */
.ts-chip.spot.on { color: #fff; border-color: var(--ts-violet-2); background: linear-gradient(135deg, #9b6dff, #6d3fd8); box-shadow: 0 6px 16px rgba(109, 63, 216, 0.32); }
.ts-grid.reveal .ts-chip:not(.eaten) small { color: #2e7d4f; }

.ts-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ts-actions .fw-button { display: inline-flex; align-items: center; gap: 6px; }
.ts-actions .fw-button.primary { background: linear-gradient(135deg, #8b5cf6, #5b2fc4); box-shadow: 0 8px 18px rgba(91, 47, 196, 0.32); border-color: transparent; color: #fff; }
.ts-actions .fw-button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.ts-sealed-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid #ddd0f7; background: linear-gradient(135deg, #f7f2ff, #fdfbff); }
.ts-sealed-card > svg { font-size: 22px; color: var(--ts-violet-2); margin-top: 2px; }
.ts-sealed-card div { display: flex; flex-direction: column; gap: 3px; }
.ts-sealed-card b { font-size: 15px; color: var(--ts-ink); }
.ts-sealed-card span { font-size: 12px; line-height: 1.6; color: var(--ts-soft); }

.ts-spawn { padding-top: 14px; border-top: 1px dashed var(--ts-line); }

/* 结单那一下：公布面板浮现 */
.ts-panel.ts-reveal-in { animation: ts-reveal 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.ts-panel.ts-reveal-in .ts-chip.eaten { animation: ts-eat 1.1s ease both; }
@keyframes ts-reveal { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes ts-eat { 0% { transform: scale(1); filter: brightness(1.8); } 40% { transform: scale(0.92); } 100% { transform: scale(1); filter: none; } }

/* 锁定确认弹窗 */
.ts-confirm p { margin: 0 0 10px; line-height: 1.7; }
.ts-confirm-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-confirm-list span { padding: 4px 10px; border-radius: 999px; font-weight: 800; color: #f3ecff; background: #2b1b4a; }

@media (max-width: 760px) {
  .fw-overlay[data-entry="LL119"] .fw-packs { gap: 6px; }
  .fw-overlay[data-entry="LL119"] .fw-pack { flex: none; padding: 7px 4px; }
  .fw-overlay[data-entry="LL119"] .fw-pack strong { font-size: 12px; }
  .fw-overlay[data-entry="LL119"] .fw-pack span { font-size: 10px; }
  .ts-hero { gap: 12px; min-height: 120px; padding: 16px 14px; }
  .ts-eyebrow { display: none; }
  .ts-hole { width: 78px; }
  .ts-hero h3 { font-size: 24px; }
  .ts-tier { font-size: 13px; }
  .ts-badge { top: 10px; right: 10px; }
  .ts-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
  .ts-chip { min-height: 42px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .ts-disk, .ts-panel.ts-reveal-in, .ts-panel.ts-reveal-in .ts-chip.eaten { animation: none; }
}
