/* 大锤三国杀 · 典雅墨绿朱漆鎏金国风牌桌 */
.sgs-page {
  --sgs-bg: #101715;
  --sgs-table-a: #162a23;
  --sgs-table-b: #0d1814;
  --sgs-lacquer: #1d1411;
  --sgs-gold: #e7c26e;
  --sgs-gold-bright: #ffe294;
  --sgs-gold-dim: rgba(231, 194, 110, 0.28);
  --sgs-crimson: #e04747;
  --sgs-jade: #32c48d;
  --sgs-chui-a: #a855f7;
  --sgs-chui-b: #f5b841;
  --sgs-ink: #f6efe0;
  --sgs-muted: rgba(246, 239, 224, 0.68);
  background: radial-gradient(120% 90% at 50% 0%, #1d2e27 0%, #0d1412 68%, #090d0c 100%);
  color: var(--sgs-ink);
}

.sgs-layout {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 6px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sgs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sgs-title-block h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff6e0;
}
.sgs-title-block h1 span {
  color: var(--sgs-gold);
}
.sgs-title-block p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--sgs-muted);
}
.sgs-modes {
  display: flex;
  gap: 6px;
}
.sgs-modes button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--sgs-gold-dim);
  background: rgba(20, 32, 27, 0.78);
  color: var(--sgs-ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.sgs-modes button[aria-pressed="true"] {
  background: linear-gradient(135deg, #d8a441, #b47720);
  color: #1a1106;
  border-color: var(--sgs-gold-bright);
}

/* 锁定单屏牌桌 */
.sgs-table {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100dvh - 124px);
  min-height: 520px;
  max-height: 780px;
  border-radius: 20px;
  border: 1.5px solid rgba(231, 194, 110, 0.34);
  background:
    radial-gradient(66% 52% at 50% 42%, rgba(36, 78, 61, 0.56) 0%, rgba(16, 32, 26, 0.92) 64%, rgba(11, 20, 17, 0.98) 100%),
    repeating-linear-gradient(45deg, rgba(231, 194, 110, 0.018) 0 2px, transparent 2px 14px);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.56),
    inset 0 0 0 1px rgba(255, 226, 148, 0.1),
    inset 0 0 80px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.sgs-table.is-shaking {
  animation: sgsShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes sgsShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  18% { transform: translate3d(-6px, 3px, 0); }
  36% { transform: translate3d(6px, -4px, 0); }
  54% { transform: translate3d(-4px, 2px, 0); }
  72% { transform: translate3d(4px, -2px, 0); }
}

/* 顶条 */
.sgs-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(19, 14, 11, 0.92) 0%, rgba(19, 14, 11, 0.55) 100%);
  border-bottom: 1px solid rgba(231, 194, 110, 0.18);
  z-index: 6;
  flex-shrink: 0;
}
.sgs-meta-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sgs-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(246, 239, 224, 0.9);
  white-space: nowrap;
}
.sgs-pill[hidden],
.sgs-mini-btn[hidden],
.sgs-spotlight-banner[hidden] {
  display: none !important;
}
.sgs-pill-gold {
  background: linear-gradient(135deg, rgba(231, 194, 110, 0.24), rgba(180, 119, 32, 0.2));
  border-color: rgba(231, 194, 110, 0.45);
  color: var(--sgs-gold-bright);
}
.sgs-pill-phase {
  background: rgba(50, 196, 141, 0.16);
  border-color: rgba(50, 196, 141, 0.36);
  color: #8bf5ca;
}
.sgs-phase-track {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(231, 194, 110, 0.2);
}
.sgs-phase-track span {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(246, 239, 224, 0.44);
  transition: background 0.18s ease, color 0.18s ease;
}
.sgs-phase-track span.is-cur {
  background: linear-gradient(135deg, #e7c26e, #b47720);
  color: #1a1106;
}
.sgs-phase-track span.is-done {
  color: rgba(139, 245, 202, 0.72);
}
.sgs-top-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sgs-mini-btn {
  padding: 4px 10px !important;
  min-height: 28px !important;
  font-size: 0.76rem !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(231, 194, 110, 0.26) !important;
  color: var(--sgs-ink) !important;
}
.sgs-mini-btn:hover {
  background: rgba(231, 194, 110, 0.2) !important;
}
.sgs-rot-btn {
  display: none;
}

/* 悬浮战报小弹窗 */
.sgs-log-popover {
  position: absolute;
  top: 46px;
  right: 12px;
  width: min(330px, calc(100% - 24px));
  max-height: 52%;
  display: flex;
  flex-direction: column;
  background: rgba(15, 20, 18, 0.95);
  border: 1px solid rgba(231, 194, 110, 0.4);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  z-index: 30;
  overflow: hidden;
}
.sgs-log-popover[hidden] { display: none; }
.sgs-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(231, 194, 110, 0.2);
  font-size: 0.84rem;
  color: var(--sgs-gold-bright);
}
.sgs-popover-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--sgs-ink);
  cursor: pointer;
  line-height: 1;
}
.sgs-log-list {
  margin: 0;
  padding: 8px 12px 10px 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.77rem;
  line-height: 1.45;
  color: rgba(246, 239, 224, 0.86);
}
.sgs-log-list li.is-chui { color: #fcd34d; font-weight: 600; }
.sgs-log-list li.is-dmg { color: #fda4af; }
.sgs-log-list li.is-heal { color: #86efac; }

/* 主战场 */
.sgs-arena {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 14px 4px;
  gap: 8px;
}

/* 敌方武将弧形排布 */
.sgs-opponents {
  display: grid;
  gap: 10px;
  justify-content: center;
  align-items: start;
  width: 100%;
  z-index: 4;
}
.sgs-opponents[data-count="1"] {
  grid-template-columns: minmax(210px, 270px);
}
.sgs-opponents[data-count="2"] {
  grid-template-columns: repeat(2, minmax(190px, 260px));
  justify-content: space-between;
  padding: 0 4%;
}
.sgs-opponents[data-count="4"] {
  grid-template-columns: repeat(4, minmax(145px, 1fr));
}

/* 武将席位卡 */
.sgs-seat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(28, 22, 18, 0.94) 0%, rgba(16, 24, 21, 0.92) 100%);
  border: 1.5px solid rgba(231, 194, 110, 0.25);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
  cursor: pointer;
}
.sgs-seat:hover {
  border-color: rgba(231, 194, 110, 0.54);
}
.sgs-seat.is-active-turn {
  border-color: var(--sgs-gold-bright);
  box-shadow: 0 0 0 2px rgba(231, 194, 110, 0.28), 0 0 26px rgba(231, 194, 110, 0.34);
}
.sgs-seat.is-targetable {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.45), 0 0 24px rgba(255, 86, 86, 0.45);
  transform: translateY(-3px) scale(1.02);
  animation: sgsTargetPulse 1.1s ease-in-out infinite;
}
.sgs-seat.is-targetable.is-chui-target {
  border-color: #f5b841;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.55), 0 0 26px rgba(245, 184, 65, 0.58);
}
@keyframes sgsTargetPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.16); }
}
.sgs-seat.is-dead {
  opacity: 0.52;
  filter: grayscale(0.85);
}
.sgs-seat.is-hit {
  animation: sgsSeatHit 0.38s ease;
}
@keyframes sgsSeatHit {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); box-shadow: 0 0 24px rgba(239, 68, 68, 0.78); }
  65% { transform: translateX(6px); }
}

.sgs-seat-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sgs-portrait-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(231, 194, 110, 0.62);
  background: #0d1110;
  flex-shrink: 0;
}
.sgs-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sgs-faction-seal {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.64rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}
.sgs-faction-seal[data-faction="chui"] { background: linear-gradient(135deg, #3b82f6, #a855f7); }
.sgs-faction-seal[data-faction="shu"] { background: #15803d; }
.sgs-faction-seal[data-faction="wei"] { background: #1d4ed8; }
.sgs-faction-seal[data-faction="wu"] { background: #b91c1c; }
.sgs-faction-seal[data-faction="qun"] { background: #b45309; }

.sgs-role-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(12, 16, 15, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}
.sgs-role-badge[data-role="lord"] { background: #b45309; border-color: #fde68a; color: #fffbeb; }
.sgs-role-badge[data-role="loyal"] { background: #0369a1; border-color: #7dd3fc; }
.sgs-role-badge[data-role="rebel"] { background: #be123c; border-color: #fda4af; }
.sgs-role-badge[data-role="spy"] { background: #6b21a8; border-color: #d8b4fe; }
.sgs-role-badge[data-role="hidden"] { background: rgba(30, 41, 37, 0.92); color: rgba(246, 239, 224, 0.84); }
.sgs-role-badge.is-guess {
  cursor: pointer;
  border-style: dashed;
}
.sgs-role-badge.is-guess:hover {
  transform: scale(1.12);
  border-color: var(--sgs-gold-bright);
}
.sgs-role-badge.is-guess[data-guess="loyal"] { background: rgba(3, 105, 161, 0.85); border-color: #7dd3fc; color: #e0f2fe; }
.sgs-role-badge.is-guess[data-guess="rebel"] { background: rgba(190, 18, 60, 0.85); border-color: #fda4af; color: #ffe4e6; }
.sgs-role-badge.is-guess[data-guess="spy"] { background: rgba(107, 33, 168, 0.85); border-color: #d8b4fe; color: #f3e8ff; }

.sgs-seat-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sgs-seat-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.sgs-seat-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fff7e5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sgs-dist-tag {
  font-size: 0.66rem;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(246, 239, 224, 0.72);
  white-space: nowrap;
}
.sgs-dist-tag.in-range {
  background: rgba(231, 194, 110, 0.22);
  color: var(--sgs-gold-bright);
}

/* 玉勾玉血量 */
.sgs-hp-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.sgs-hp-pip {
  width: 11px;
  height: 11px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #4ade80, #15803d);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.45);
}
.sgs-hp-pip.is-warn {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}
.sgs-hp-pip.is-low {
  background: linear-gradient(135deg, #fb7185, #be123c);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.7);
}
.sgs-hp-pip.is-empty {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.sgs-seat-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.71rem;
  color: var(--sgs-muted);
}
.sgs-hand-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(231, 194, 110, 0.15);
  color: #fde68a;
  font-weight: 700;
}
.sgs-judge-badge {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.28);
  border: 1px solid rgba(216, 180, 254, 0.45);
  color: #f3e8ff;
  font-weight: 700;
}
.sgs-judge-badge.is-bingliang {
  background: rgba(234, 88, 12, 0.32);
  border-color: rgba(253, 186, 116, 0.55);
  color: #ffedd5;
}
.sgs-judge-badge.is-shandian {
  background: rgba(234, 179, 8, 0.34);
  border-color: rgba(254, 240, 138, 0.7);
  color: #fef08a;
}
.sgs-drunk-badge {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.3);
  color: #fecaca;
  font-weight: 700;
}

.sgs-seat-equips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 18px;
}
.sgs-eq-chip {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(231, 194, 110, 0.26);
  color: #f8e8c1;
  white-space: nowrap;
}
.sgs-eq-chip.is-dachui {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(245, 184, 65, 0.26));
  border-color: var(--sgs-gold-bright);
  color: #fef08a;
}
.sgs-eq-chip.is-selectable {
  cursor: pointer;
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.5), 0 0 10px rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.22);
  color: #fffbeb;
}
.sgs-eq-chip.is-selected {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-color: #fef08a;
  color: #1c1004;
  font-weight: 800;
}

.sgs-target-hint {
  position: absolute;
  inset: auto 8px -10px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
  pointer-events: none;
  z-index: 8;
}
.sgs-seat.is-chui-target .sgs-target-hint {
  background: linear-gradient(135deg, #9333ea, #d97706);
}

.sgs-dead-stamp {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 10, 10, 0.52);
  border-radius: 13px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: #fca5a5;
  text-shadow: 0 2px 10px #000;
  pointer-events: none;
}

.sgs-quote-bubble {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(22, 16, 12, 0.94);
  border: 1px solid var(--sgs-gold);
  color: var(--sgs-gold-bright);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  z-index: 18;
  pointer-events: none;
  animation: sgsQuotePop 0.22s ease;
}
@keyframes sgsQuotePop {
  from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.92); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.sgs-float-delta {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 1.12rem;
  font-weight: 900;
  z-index: 20;
  pointer-events: none;
  animation: sgsFloatUp 0.95s ease forwards;
}
.sgs-float-delta.is-dmg { color: #ff5c5c; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9); }
.sgs-float-delta.is-heal { color: #4ade80; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9); }
.sgs-float-delta.is-chui { color: #fde047; text-shadow: 0 0 12px rgba(168, 85, 247, 0.95); }
@keyframes sgsFloatUp {
  0% { opacity: 0; transform: translateY(8px) scale(0.8); }
  22% { opacity: 1; transform: translateY(-4px) scale(1.12); }
  100% { opacity: 0; transform: translateY(-28px) scale(0.96); }
}

/* 中央出牌台 */
.sgs-center {
  flex: 1 1 auto;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}
.sgs-play-pile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 112px;
  flex-wrap: wrap;
}
.sgs-pile-placeholder {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px dashed rgba(231, 194, 110, 0.25);
  color: rgba(231, 194, 110, 0.56);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}
.sgs-pile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: sgsCardSlam 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.sgs-pile-label {
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(14, 18, 16, 0.85);
  border: 1px solid rgba(231, 194, 110, 0.28);
  color: var(--sgs-gold-bright);
  white-space: nowrap;
}
@keyframes sgsCardSlam {
  from { opacity: 0; transform: translateY(18px) scale(0.84) rotate(-4deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.sgs-ticker {
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(12, 16, 14, 0.72);
  border: 1px solid rgba(231, 194, 110, 0.2);
  font-size: 0.8rem;
  color: #f6ead0;
  text-align: center;
  max-width: min(680px, 94%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 全屏特效层 */
.sgs-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  display: grid;
  place-items: center;
  overflow: hidden;
}
/* 攻击与锦囊轨迹飞线 SVG 层 */
.sgs-beam-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 22;
  overflow: visible;
}
.sgs-beam-path {
  fill: none;
  stroke-width: 4.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px currentColor);
  animation: sgsBeamDraw 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.sgs-beam-path.is-attack { color: #ff4d4f; stroke: #ff5c5c; }
.sgs-beam-path.is-chui { color: #f59e0b; stroke: #fde047; stroke-width: 5.5; }
.sgs-beam-path.is-scroll { color: #38bdf8; stroke: #7dd3fc; }
.sgs-beam-path.is-heal { color: #4ade80; stroke: #4ade80; }
@keyframes sgsBeamDraw {
  0% { stroke-dashoffset: 1000; opacity: 0.95; }
  38% { stroke-dashoffset: 0; opacity: 1; }
  80% { stroke-dashoffset: 0; opacity: 0.92; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.sgs-beam-ring {
  fill: none;
  stroke-width: 3;
  animation: sgsBeamRing 0.95s ease-out forwards;
}
@keyframes sgsBeamRing {
  0% { r: 8; opacity: 1; }
  100% { r: 34; opacity: 0; }
}

/* 中央大字动作播报横幅与最新出牌放大高亮 */
.sgs-spotlight-banner {
  padding: 5px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(168, 28, 28, 0.86), rgba(146, 64, 14, 0.88));
  border: 1.5px solid rgba(253, 224, 71, 0.65);
  color: #fffbeb;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.52);
  max-width: 94%;
  text-align: center;
  animation: sgsSpotPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.sgs-spotlight-banner.is-chui {
  background: linear-gradient(90deg, rgba(126, 34, 206, 0.92), rgba(217, 119, 6, 0.92));
}
.sgs-spotlight-banner.is-heal {
  background: linear-gradient(90deg, rgba(21, 128, 61, 0.9), rgba(13, 148, 136, 0.9));
}
.sgs-spotlight-banner[hidden] { display: none; }
@keyframes sgsSpotPop {
  from { opacity: 0; transform: scale(0.88) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.sgs-pile-item.is-latest .sgs-card.is-pile {
  transform: scale(1.1);
  border-color: #fde047;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 22px rgba(251, 191, 36, 0.55);
}
.sgs-ticker-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 96%;
}
.sgs-ticker-prev {
  font-size: 0.72rem;
  color: rgba(246, 234, 208, 0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(640px, 92vw);
}
.sgs-ticker-prev[hidden] { display: none; }

/* 房号胶囊与联机快捷喊话 */
.sgs-pill-room {
  background: rgba(59, 130, 246, 0.24);
  border-color: rgba(147, 197, 253, 0.55);
  color: #dbeafe;
  cursor: pointer;
}
.sgs-chat-popover {
  position: absolute;
  top: 46px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(340px, calc(100% - 24px));
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 20, 18, 0.96);
  border: 1px solid rgba(231, 194, 110, 0.42);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.62);
  z-index: 32;
}
.sgs-chat-popover[hidden] { display: none; }
.sgs-chat-popover button {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(231, 194, 110, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #fff6e0;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.sgs-chat-popover button:hover { background: rgba(231, 194, 110, 0.24); }

/* 好友房建房/等待大厅面板 */
.sgs-lobby-panel {
  width: min(520px, 100%);
  max-height: 92%;
  overflow-y: auto;
  padding: 20px 22px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(28, 22, 18, 0.98) 0%, rgba(15, 24, 21, 0.98) 100%);
  border: 1.5px solid rgba(231, 194, 110, 0.48);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  text-align: center;
}
.sgs-lobby-title { margin: 4px 0 6px; font-size: 1.32rem; color: #fff6e0; }
.sgs-lobby-sub { margin: 0 0 14px; font-size: 0.82rem; color: var(--sgs-muted); }
.sgs-lobby-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.sgs-lobby-modes button {
  padding: 9px 6px;
  border-radius: 12px;
  border: 1px solid rgba(231, 194, 110, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: var(--sgs-ink);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.sgs-lobby-modes button small { font-size: 0.66rem; font-weight: 500; opacity: 0.74; }
.sgs-lobby-modes button[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(216, 164, 65, 0.34), rgba(180, 119, 32, 0.28));
  border-color: var(--sgs-gold-bright);
  color: #fffbeb;
}
.sgs-lobby-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.sgs-lobby-divider { margin: 12px 0; font-size: 0.76rem; color: var(--sgs-muted); }
.sgs-join-form { display: flex; gap: 8px; }
.sgs-join-form input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(231, 194, 110, 0.36);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-align: center;
}
.sgs-code-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(180, 83, 9, 0.2);
  border: 1px dashed rgba(253, 224, 71, 0.52);
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: #fef3c7;
}
.sgs-code-hero strong { font-size: 1.85rem; letter-spacing: 0.22em; color: #fde68a; }
.sgs-roster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-bottom: 12px;
}
.sgs-roster-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(231, 194, 110, 0.28);
  font-size: 0.78rem;
  font-weight: 700;
}
.sgs-roster-chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.sgs-roster-chip.is-empty { opacity: 0.45; border-style: dashed; }
.sgs-lobby-msg { margin: 8px 0 0; min-height: 18px; font-size: 0.78rem; color: #fca5a5; }

/* 开局「点兵抽身份」3D 翻牌动画舞台 */
.sgs-role-stage {
  width: min(700px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
}
.sgs-role-kicker {
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(216, 164, 65, 0.3), rgba(180, 83, 9, 0.26));
  border: 1px solid rgba(253, 224, 71, 0.55);
  color: #fde68a;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.sgs-role-heading {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  color: #fff8e1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.sgs-role-caption {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(246, 239, 224, 0.86);
  max-width: 520px;
}
.sgs-role-deck {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  perspective: 1100px;
  min-height: 190px;
  padding: 10px 0;
}
.sgs-id-card {
  position: relative;
  width: 104px;
  height: 156px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, filter 0.35s ease;
}
.sgs-id-card.is-shuffling {
  animation: sgsShuffleDance 0.55s ease-in-out infinite alternate;
  animation-delay: var(--sd, 0s);
}
@keyframes sgsShuffleDance {
  0% { transform: translateX(var(--sx, 0px)) translateY(0px) rotate(var(--sr, 0deg)); }
  100% { transform: translateX(calc(var(--sx, 0px) * -1)) translateY(-14px) rotate(calc(var(--sr, 0deg) * -1)); }
}
.sgs-id-card.is-pickable:hover {
  transform: translateY(-14px) scale(1.07);
}
.sgs-id-card.is-faded {
  opacity: 0.22;
  transform: scale(0.84);
  pointer-events: none;
}
.sgs-id-card.is-flipped {
  transform: scale(1.22) rotateY(180deg);
  z-index: 6;
}
.sgs-id-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.62);
}
.sgs-id-back {
  background:
    radial-gradient(circle at 50% 44%, rgba(245, 184, 65, 0.22), transparent 62%),
    linear-gradient(155deg, #4b1414 0%, #240b0b 65%, #160707 100%);
  border: 2px solid #d4a64a;
  color: #fde68a;
}
.sgs-id-back::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 9px;
  border: 1px solid rgba(231, 194, 110, 0.45);
}
.sgs-id-back-seal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #f5b841;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 900;
  background: rgba(180, 83, 9, 0.28);
  box-shadow: 0 0 18px rgba(245, 184, 65, 0.4);
}
.sgs-id-back small { font-size: 0.7rem; letter-spacing: 0.14em; opacity: 0.82; }
.sgs-id-front {
  transform: rotateY(180deg);
  border: 2.5px solid #ffe294;
  color: #fff;
}
.sgs-id-front[data-role="lord"] { background: linear-gradient(155deg, #b45309 0%, #78350f 65%, #451a03 100%); box-shadow: 0 0 42px rgba(245, 184, 65, 0.72); }
.sgs-id-front[data-role="loyal"] { background: linear-gradient(155deg, #0369a1 0%, #0c4a6e 70%, #082f49 100%); box-shadow: 0 0 42px rgba(56, 189, 248, 0.65); }
.sgs-id-front[data-role="rebel"] { background: linear-gradient(155deg, #be123c 0%, #881337 70%, #4c0519 100%); box-shadow: 0 0 42px rgba(244, 63, 94, 0.68); }
.sgs-id-front[data-role="spy"] { background: linear-gradient(155deg, #7e22ce 0%, #4c1d95 70%, #2e1065 100%); box-shadow: 0 0 42px rgba(168, 85, 247, 0.68); }
.sgs-id-front[data-role="hero"] { background: linear-gradient(155deg, #d97706 0%, #92400e 70%, #451a03 100%); box-shadow: 0 0 42px rgba(245, 158, 11, 0.68); }
.sgs-id-front-icon { font-size: 1.9rem; line-height: 1; }
.sgs-id-front strong { font-size: 1.45rem; letter-spacing: 0.12em; }
.sgs-id-front small { font-size: 0.68rem; opacity: 0.9; line-height: 1.3; }
@media (max-width: 780px) {
  .sgs-id-card { width: 78px; height: 118px; }
  .sgs-id-front strong { font-size: 1.12rem; }
  .sgs-lobby-modes { grid-template-columns: 1fr; }
  .sgs-spotlight-banner { font-size: 0.76rem; padding: 3px 10px; }
}
.sgs-fx-stamp {
  padding: 10px 26px;
  border-radius: 16px;
  font-size: clamp(1.35rem, 3.2vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #fff8e1;
  background: linear-gradient(135deg, rgba(168, 28, 28, 0.92), rgba(92, 14, 14, 0.94));
  border: 2px solid var(--sgs-gold-bright);
  box-shadow: 0 0 42px rgba(231, 194, 110, 0.55), 0 12px 32px rgba(0, 0, 0, 0.65);
  animation: sgsStampBurst 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.sgs-fx-stamp.is-chui {
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.94), rgba(180, 83, 9, 0.94));
  box-shadow: 0 0 56px rgba(245, 184, 65, 0.8), 0 0 90px rgba(168, 85, 247, 0.55);
}
.sgs-fx-stamp.is-heal {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.92), rgba(15, 118, 110, 0.94));
}
@keyframes sgsStampBurst {
  0% { opacity: 0; transform: scale(1.65); }
  18% { opacity: 1; transform: scale(0.96); }
  72% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.12) translateY(-10px); }
}

/* 底部玩家控制台 */
.sgs-player-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 12px 10px;
  background: linear-gradient(180deg, rgba(16, 14, 12, 0.4) 0%, rgba(15, 12, 10, 0.94) 24%, rgba(12, 10, 9, 0.98) 100%);
  border-top: 1px solid rgba(231, 194, 110, 0.24);
  z-index: 8;
}

.sgs-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(231, 194, 110, 0.2);
}
.sgs-action-bar.is-urgent {
  background: linear-gradient(90deg, rgba(185, 28, 28, 0.34), rgba(180, 83, 9, 0.26));
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.24);
}
.sgs-prompt-copy {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff3d6;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sgs-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sgs-act-btn {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(231, 194, 110, 0.38);
  background: rgba(255, 255, 255, 0.09);
  color: #fff6e0;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.sgs-act-btn:hover:not(:disabled) {
  filter: brightness(1.14);
  transform: translateY(-1px);
}
.sgs-act-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.sgs-act-btn.is-primary {
  background: linear-gradient(135deg, #f3c45f, #c88321);
  color: #1f1305;
  border-color: #ffeaad;
}
.sgs-act-btn.is-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border-color: #fca5a5;
}
.sgs-act-btn.is-chui {
  background: linear-gradient(135deg, #9333ea, #f59e0b);
  color: #fff;
  border-color: #fde68a;
}

.sgs-card-tip {
  padding: 4px 10px;
  border-radius: 9px;
  background: rgba(231, 194, 110, 0.14);
  border: 1px solid rgba(231, 194, 110, 0.32);
  font-size: 0.76rem;
  color: #fef3c7;
  line-height: 1.4;
}
.sgs-card-tip[hidden] { display: none; }

.sgs-my-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 128px;
}

/* 玩家左侧主将框 */
.sgs-my-hero-box {
  position: relative;
  width: 176px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(38, 27, 19, 0.96), rgba(18, 25, 22, 0.96));
  border: 1.5px solid rgba(231, 194, 110, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.sgs-my-hero-box.is-active-turn {
  border-color: var(--sgs-gold-bright);
  box-shadow: 0 0 0 2px rgba(231, 194, 110, 0.28), 0 0 22px rgba(231, 194, 110, 0.35);
}
.sgs-my-hero-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sgs-my-hero-box .sgs-portrait-wrap {
  width: 60px;
  height: 60px;
}
.sgs-user-mini-av {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #ffe294;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.sgs-my-hand-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}
.sgs-my-equip-skills {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.sgs-equip-row,
.sgs-skill-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.sgs-skill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  border: 1px solid rgba(231, 194, 110, 0.48);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.32), rgba(231, 194, 110, 0.22));
  color: #fef08a;
  cursor: pointer;
}
.sgs-skill-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.6);
}
.sgs-skill-btn.is-active {
  background: linear-gradient(135deg, #9333ea, #f59e0b);
  color: #fff;
  box-shadow: 0 0 14px rgba(245, 184, 65, 0.55);
}

/* 精致古风羊皮纸卡牌 */
.sgs-hand-wrap {
  overflow-x: auto;
  overflow-y: visible;
  padding: 14px 4px 2px;
  scrollbar-width: thin;
}
.sgs-hand {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 108px;
}
.sgs-hand.is-dense {
  gap: 0;
}
.sgs-hand.is-dense .sgs-card + .sgs-card {
  margin-left: -14px;
}
.sgs-hand.is-dense .sgs-card:hover,
.sgs-hand.is-dense .sgs-card.is-selected {
  z-index: 8;
}

.sgs-card {
  position: relative;
  width: 78px;
  height: 108px;
  flex: 0 0 auto;
  border-radius: 10px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(165deg, #fbf3df 0%, #ead8b2 68%, #dbc18c 100%);
  border: 2px solid #b68c46;
  color: #24190e;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s ease, filter 0.16s ease;
  text-align: left;
}
.sgs-card:hover:not(:disabled) {
  transform: translateY(-8px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.52), 0 0 0 2px rgba(231, 194, 110, 0.65);
  z-index: 3;
}
.sgs-card.is-selected {
  transform: translateY(-16px) scale(1.04);
  border-color: #ffde7a;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.6), 0 0 0 2.5px #f5b841, 0 0 18px rgba(245, 184, 65, 0.65);
  z-index: 5;
}
.sgs-card.is-playable {
  border-color: #d99b2c;
}
.sgs-card.is-dimmed {
  filter: brightness(0.68) saturate(0.75);
}
.sgs-card.is-pile {
  width: 76px;
  height: 104px;
  cursor: default;
  pointer-events: none;
}

/* 大锤特色神牌【锤】/【锤子天降】/【大锤雷神斧】紫金流光卡片 */
.sgs-card.is-dachui {
  background: linear-gradient(155deg, #2d144a 0%, #4a1c64 46%, #7d4515 100%);
  border: 2px solid #ffd56b;
  color: #fff6db;
  box-shadow: 0 8px 20px rgba(147, 51, 234, 0.44), inset 0 0 16px rgba(255, 213, 107, 0.28);
}
.sgs-card.is-dachui .sgs-card-name {
  color: #ffe58f;
  text-shadow: 0 1px 8px rgba(245, 158, 11, 0.72);
}
.sgs-card.is-dachui .sgs-card-kind {
  background: linear-gradient(135deg, #f59e0b, #a855f7);
  color: #fff;
}

.sgs-card[data-kind="scroll"]:not(.is-dachui) {
  background: linear-gradient(165deg, #eef6f7 0%, #cfe1e4 72%, #b5ccd1 100%);
  border-color: #4f7b87;
}
.sgs-card[data-kind="delay"] {
  background: linear-gradient(165deg, #f4eefb 0%, #d8c6ee 75%, #c4ace3 100%);
  border-color: #7c4db8;
}
.sgs-card[data-kind="equip"]:not(.is-dachui) {
  background: linear-gradient(165deg, #f7efe8 0%, #e4cdb8 72%, #cfb092 100%);
  border-color: #9b5c2e;
}

.sgs-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  line-height: 1;
}
.sgs-card-pip {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.05;
}
.sgs-card-pip.is-red { color: #c81e1e; }
.sgs-card-pip.is-black { color: #1f2937; }
.sgs-card.is-dachui .sgs-card-pip.is-red { color: #ff8b94; }
.sgs-card.is-dachui .sgs-card-pip.is-black { color: #fde68a; }

.sgs-card-kind {
  font-size: 0.56rem;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(36, 25, 14, 0.14);
  color: #3f2b14;
}
.sgs-card-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: auto 0;
}
.sgs-card-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.sgs-card-name {
  font-size: 0.88rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: #1f140a;
}
.sgs-card-name.is-long {
  font-size: 0.72rem;
  letter-spacing: 0;
}
.sgs-card-foot {
  font-size: 0.58rem;
  text-align: center;
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 选将 / 选择 / 结算浮层 */
.sgs-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 11, 0.82);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 14px;
  z-index: 40;
}
.sgs-overlay[hidden] { display: none; }

.sgs-pick-panel,
.sgs-choice-panel,
.sgs-result-panel {
  width: min(760px, 100%);
  max-height: 92%;
  overflow-y: auto;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(28, 22, 18, 0.98) 0%, rgba(15, 24, 21, 0.98) 100%);
  border: 1.5px solid rgba(231, 194, 110, 0.45);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72);
}
.sgs-pick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.sgs-pick-role-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  background: linear-gradient(135deg, #d8a441, #b45309);
  color: #1c1004;
  margin-bottom: 4px;
}
.sgs-pick-head h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #fff6e0;
}
.sgs-pick-head p {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--sgs-muted);
}

.sgs-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
}
.sgs-hero-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 15px;
  border: 1.5px solid rgba(231, 194, 110, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sgs-ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.sgs-hero-option:hover {
  transform: translateY(-4px);
  border-color: var(--sgs-gold-bright);
  background: rgba(231, 194, 110, 0.12);
}
.sgs-hero-opt-img {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(231, 194, 110, 0.4);
}
.sgs-hero-opt-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sgs-hero-opt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.sgs-hero-opt-head strong {
  font-size: 0.98rem;
  color: var(--sgs-gold-bright);
}
.sgs-hero-opt-head span {
  font-size: 0.74rem;
  color: #86efac;
  font-weight: 700;
}
.sgs-hero-opt-skills {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.73rem;
  line-height: 1.38;
  color: rgba(246, 239, 224, 0.84);
}
.sgs-hero-opt-skills b {
  color: #fde68a;
}

/* 交互选择面板（拆桥 / 顺羊 / 观星 / 详情） */
.sgs-choice-panel {
  width: min(520px, 100%);
}
.sgs-choice-title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  color: var(--sgs-gold-bright);
}
.sgs-choice-sub {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--sgs-muted);
}
.sgs-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.sgs-choice-item {
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid rgba(231, 194, 110, 0.38);
  background: rgba(255, 255, 255, 0.06);
  color: var(--sgs-ink);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.sgs-choice-item:hover {
  background: rgba(231, 194, 110, 0.2);
  border-color: var(--sgs-gold-bright);
}
.sgs-guanxing-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.sgs-gx-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.sgs-gx-pos {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(50, 196, 141, 0.22);
  color: #86efac;
}
.sgs-gx-pos.is-bottom {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}
.sgs-gx-arrows {
  display: flex;
  gap: 4px;
}
.sgs-gx-arrows button {
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(231, 194, 110, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--sgs-ink);
  font-size: 0.7rem;
  cursor: pointer;
}
.sgs-gx-arrows button:disabled { opacity: 0.3; cursor: not-allowed; }
.sgs-wugu-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sgs-wugu-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.sgs-wugu-slot.is-taken {
  opacity: 0.42;
  filter: grayscale(0.6);
}
.sgs-wugu-tag {
  font-size: 0.68rem;
  color: #fde68a;
  font-weight: 700;
}
.sgs-lord-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(180, 83, 9, 0.24);
  border: 1px solid rgba(251, 191, 36, 0.5);
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: #fef3c7;
}
.sgs-lord-preview img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
}
@media (max-width: 780px) {
  .sgs-phase-track { display: none; }
}

/* 结算 */
.sgs-result-panel {
  width: min(560px, 100%);
  text-align: center;
}
.sgs-result-crest {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 6px;
}
.sgs-result-panel h2 {
  margin: 0;
  font-size: 1.45rem;
  color: var(--sgs-gold-bright);
}
.sgs-result-sub {
  margin: 6px 0 12px;
  font-size: 0.86rem;
  color: rgba(246, 239, 224, 0.86);
}
.sgs-result-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.sgs-result-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}
.sgs-result-list li.is-win {
  border-color: rgba(231, 194, 110, 0.5);
  background: rgba(231, 194, 110, 0.12);
}
.sgs-result-who {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sgs-result-who img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}
.sgs-result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* 移动端自适应 & 横屏支持 */
@media (max-width: 780px) {
  .sgs-layout { padding: 2px 6px 4px; gap: 4px; }
  .sgs-table {
    height: calc(100dvh - 116px);
    min-height: 500px;
    border-radius: 14px;
  }
  .sgs-rot-btn { display: inline-flex; }
  .sgs-top-strip { padding: 5px 8px; gap: 5px; }
  .sgs-pill { font-size: 0.66rem; padding: 2px 6px; }
  .sgs-mini-btn { padding: 3px 7px !important; min-height: 24px !important; font-size: 0.7rem !important; }
  .sgs-arena { padding: 4px 7px 2px; gap: 4px; }
  .sgs-opponents[data-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .sgs-seat { padding: 4px 6px; border-radius: 10px; gap: 3px; }
  .sgs-portrait-wrap { width: 38px; height: 38px; border-radius: 8px; }
  .sgs-seat-name { font-size: 0.74rem; }
  .sgs-hp-pip { width: 8px; height: 8px; }
  .sgs-seat-equips { min-height: 14px; }
  .sgs-center { min-height: 60px; gap: 4px; }
  .sgs-play-pile { min-height: 66px; }
  .sgs-pile-placeholder { padding: 6px 14px; font-size: 0.74rem; }
  .sgs-ticker { font-size: 0.72rem; padding: 3px 10px; }
  .sgs-card.is-pile { width: 58px; height: 80px; }
  .sgs-player-dock { padding: 4px 7px 6px; gap: 4px; }
  .sgs-action-bar { min-height: 30px; padding: 3px 8px; }
  .sgs-prompt-copy { font-size: 0.74rem; }
  .sgs-act-btn { padding: 4px 10px; font-size: 0.74rem; }
  .sgs-my-row { flex-direction: column; gap: 4px; min-height: 0; }
  .sgs-my-hero-box {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 5px 8px;
  }
  .sgs-my-hero-box .sgs-portrait-wrap { width: 40px; height: 40px; }
  .sgs-hand-wrap { padding: 10px 2px 2px; }
  .sgs-hand { min-height: 84px; gap: 5px; }
  .sgs-card { width: 64px; height: 84px; padding: 4px 5px; }
  .sgs-card-name { font-size: 0.78rem; }
  .sgs-card-icon { font-size: 0.98rem; }
  .sgs-card-foot { font-size: 0.54rem; }
  .sgs-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 手机一键强制横屏全屏模式 */
body.sgs-force-landscape {
  overflow: hidden !important;
}
body.sgs-force-landscape .merge-nav,
body.sgs-force-landscape .sgs-header {
  display: none !important;
}
body.sgs-force-landscape .sgs-table {
  position: fixed !important;
  top: 50%;
  left: 50%;
  width: 100dvh !important;
  height: 100dvw !important;
  max-height: none !important;
  min-height: 0 !important;
  transform: translate(-50%, -50%) rotate(90deg);
  border-radius: 0 !important;
  z-index: 9999;
}
body.sgs-force-landscape .sgs-opponents[data-count="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.sgs-force-landscape .sgs-my-row {
  flex-direction: row;
}
body.sgs-force-landscape .sgs-my-hero-box {
  width: 164px;
  flex-direction: column;
}
