/* ============================================================
   UNO 多人联机 · 完整牌桌视觉（UNO v2 / bright play field）
   移植自 230258 单机版 released.css（UNO v2 段落）
   engine.js 仍是单套规则，仅复用牌面/牌桌美术与布局
   ============================================================ */

@font-face {
  font-family: "Fugaz One";
  src: url("/static/img/uno/fugaz-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   1. 牌桌容器 · 奶油底色 + 壁纸 + 卡片三段网格
   ============================================================ */
.uno-game {
  background-color: #eef3f7;
  background-image: linear-gradient(rgb(238 243 247 / 68%), rgb(238 243 247 / 68%)), var(--game-wallpaper, none);
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  color: #20262d;
  padding: 18px max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}

.uno-game .game-toolbar {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  width: min(1180px, 100%);
  min-height: 46px;
  margin: 0 auto 12px;
  gap: 12px;
  align-items: center;
}

.uno-game .game-title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.uno-game .game-title strong {
  font-family: "Fugaz One", Impact, sans-serif;
  font-size: 24px;
  font-weight: 400;
  /* 红黄绿蓝四色拼出的 UNO 字样（与原版一致） */
  background: linear-gradient(90deg, #dc2f38 0 25%, #f0b928 25% 50%, #21a665 50% 75%, #2386d8 75% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
}
.uno-game .game-title .room-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: #146e9f;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgb(255 255 255 / 56%);
  border: 1px solid rgb(20 110 159 / 22%);
}
.uno-game .game-title .room-code:hover { background: rgb(255 255 255 / 84%); }
.uno-game .game-title .game-sub {
  color: #687782;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 11px;
  letter-spacing: .04em;
}

.uno-game .game-tools { display: flex; gap: 7px; }
.uno-game .icon-button {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  place-items: center;
  background: #fff;
  color: #26313a;
  box-shadow: inset 0 0 0 1px #cad5dd, 0 4px 12px rgb(54 76 91 / 7%);
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
  font-size: 18px;
  line-height: 1;
}
.uno-game .icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.uno-game .icon-button:hover { background: #e3ebf1; }
.uno-game .icon-button:active { transform: scale(.96); }

.uno-game .game-table {
  position: relative;
  display: grid;
  grid-template-rows: 250px minmax(300px, 1fr) 235px;
  width: min(1180px, 100%);
  min-height: 785px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #c8d5de;
  border-radius: 8px;
  background-color: #dce6ed;
  background-image: linear-gradient(rgb(220 230 237 / 62%), rgb(220 230 237 / 62%)), var(--game-wallpaper, none);
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 42px rgb(54 76 91 / 13%);
}

/* ============================================================
   2. 椭圆轨道 · 中央装饰 + 回合标记
   ============================================================ */
.uno-game .turn-orbit {
  position: absolute;
  z-index: 0;
  top: 202px;
  left: 50%;
  width: min(66%, 720px);
  height: 360px;
  border: 2px solid rgb(69 91 106 / 13%);
  border-radius: 50%;
  transform: translateX(-50%);
}
.uno-game .turn-orbit::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: inherit;
}
.uno-game .turn-orbit i {
  position: absolute;
  width: 19px;
  height: 7px;
  left: var(--marker-x, 50%);
  top: var(--marker-y, 50%);
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 0 2px 7px rgb(36 52 62 / 24%);
  transform: translate(-50%, -50%);
  transition: left 220ms cubic-bezier(.16, 1, .3, 1), top 220ms cubic-bezier(.16, 1, .3, 1), background-color 160ms ease-out;
}
.uno-game .turn-orbit .marker-red    { background: #dc2f38; }
.uno-game .turn-orbit .marker-yellow { background: #f0b928; }
.uno-game .turn-orbit .marker-green  { background: #21a665; }
.uno-game .turn-orbit .marker-blue   { background: #2386d8; }
.uno-game .turn-orbit .marker-wild   { background: #20262d; }
.uno-game .marker-home { --marker-x: 50%; --marker-y: 89%; }
.uno-game .marker-layout-1.marker-pos-0 { --marker-x: 50%; --marker-y: 11%; }
.uno-game .marker-layout-2.marker-pos-0 { --marker-x: 17%; --marker-y: 17.8%; }
.uno-game .marker-layout-2.marker-pos-1 { --marker-x: 83%; --marker-y: 17.8%; }
.uno-game .marker-layout-3.marker-pos-0 { --marker-x: 12%; --marker-y: 19%; }
.uno-game .marker-layout-3.marker-pos-1 { --marker-x: 50%; --marker-y: 11%; }
.uno-game .marker-layout-3.marker-pos-2 { --marker-x: 88%; --marker-y: 19%; }
.uno-game .marker-layout-4.marker-pos-0 { --marker-x: 9%; --marker-y: 20.2%; }
.uno-game .marker-layout-4.marker-pos-1 { --marker-x: 34%; --marker-y: 12%; }
.uno-game .marker-layout-4.marker-pos-2 { --marker-x: 66%; --marker-y: 12%; }
.uno-game .marker-layout-4.marker-pos-3 { --marker-x: 91%; --marker-y: 20.2%; }
.uno-game .marker-layout-5.marker-pos-0 { --marker-x: 7%; --marker-y: 21%; }
.uno-game .marker-layout-5.marker-pos-1 { --marker-x: 22%; --marker-y: 15.6%; }
.uno-game .marker-layout-5.marker-pos-2 { --marker-x: 50%; --marker-y: 10.6%; }
.uno-game .marker-layout-5.marker-pos-3 { --marker-x: 78%; --marker-y: 15.6%; }
.uno-game .marker-layout-5.marker-pos-4 { --marker-x: 93%; --marker-y: 21%; }
.uno-game .marker-layout-6.marker-pos-0 { --marker-x: 7%; --marker-y: 21%; }
.uno-game .marker-layout-6.marker-pos-1 { --marker-x: 22%; --marker-y: 15.6%; }
.uno-game .marker-layout-6.marker-pos-2 { --marker-x: 39%; --marker-y: 11.2%; }
.uno-game .marker-layout-6.marker-pos-3 { --marker-x: 61%; --marker-y: 11.2%; }
.uno-game .marker-layout-6.marker-pos-4 { --marker-x: 78%; --marker-y: 15.6%; }
.uno-game .marker-layout-6.marker-pos-5 { --marker-x: 93%; --marker-y: 21%; }

/* ============================================================
   3. 对手区 · 顶部四周，按 --seat-x / --seat-y 定位
   ============================================================ */
.uno-game .opponents {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  display: block;
  height: 252px;
  padding: 0;
}
.uno-game .player-seat {
  position: absolute;
  top: var(--seat-y, 0);
  left: var(--seat-x, 50%);
  width: 196px;
  display: grid;
  align-content: start;
  justify-items: center;
  transform: translateX(-50%);
}
.uno-game .seat-layout-1.seat-pos-0 { left: 50%; top: 10px; }
.uno-game .seat-layout-2.seat-pos-0 { left: 17%; top: 44px; }
.uno-game .seat-layout-2.seat-pos-1 { left: 83%; top: 44px; }
.uno-game .seat-layout-3.seat-pos-0 { left: 12%; top: 50px; }
.uno-game .seat-layout-3.seat-pos-1 { left: 50%; top: 10px; }
.uno-game .seat-layout-3.seat-pos-2 { left: 88%; top: 50px; }
.uno-game .seat-layout-4.seat-pos-0 { left: 9%; top: 56px; }
.uno-game .seat-layout-4.seat-pos-1 { left: 34%; top: 15px; }
.uno-game .seat-layout-4.seat-pos-2 { left: 66%; top: 15px; }
.uno-game .seat-layout-4.seat-pos-3 { left: 91%; top: 56px; }
.uno-game .seat-layout-5.seat-pos-0 { left: 7%; top: 60px; }
.uno-game .seat-layout-5.seat-pos-1 { left: 22%; top: 33px; }
.uno-game .seat-layout-5.seat-pos-2 { left: 50%; top: 8px; }
.uno-game .seat-layout-5.seat-pos-3 { left: 78%; top: 33px; }
.uno-game .seat-layout-5.seat-pos-4 { left: 93%; top: 60px; }
.uno-game .seat-layout-6.seat-pos-0 { left: 7%; top: 60px; }
.uno-game .seat-layout-6.seat-pos-1 { left: 22%; top: 33px; }
.uno-game .seat-layout-6.seat-pos-2 { left: 39%; top: 11px; }
.uno-game .seat-layout-6.seat-pos-3 { left: 61%; top: 11px; }
.uno-game .seat-layout-6.seat-pos-4 { left: 78%; top: 33px; }
.uno-game .seat-layout-6.seat-pos-5 { left: 93%; top: 60px; }
.uno-game .player-label {
  display: flex;
  min-height: 38px;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #64737e;
  font-size: 13px;
  transition: color 140ms ease-out;
}
.uno-game .player-label strong {
  color: #26313a;
  font-size: 14px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uno-game .player-label span {
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-variant-numeric: tabular-nums;
}
.uno-game .player-label .host-badge,
.uno-game .human-label .host-badge,
.uno-game .player-label .rank-badge,
.uno-game .human-label .rank-badge {
  display: inline-flex;
  min-height: 20px;
  padding: 2px 7px;
  align-items: center;
  border: 1px solid rgb(20 110 159 / 30%);
  border-radius: 999px;
  background: rgb(226 244 255 / 92%);
  color: #146e9f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
}
.uno-game .player-label .rank-badge,
.uno-game .human-label .rank-badge {
  border-color: rgb(155 113 18 / 28%);
  background: rgb(255 246 206 / 94%);
  color: #8b650b;
}
.uno-game .player-seat.eliminated,
.uno-game .human-seat.eliminated {
  opacity: .54;
  filter: saturate(.55);
}
.uno-game .player-seat.is-active .player-label,
.uno-game .human-seat.is-active .human-label {
  color: #146e9f;
}
.uno-game .player-seat.is-active .player-label strong,
.uno-game .human-seat.is-active .human-label strong {
  color: #146e9f;
}
.uno-game .player-seat.is-active::before,
.uno-game .human-seat.is-active::before {
  position: absolute;
  z-index: -1;
  width: 112px;
  height: 54px;
  border: 1px solid rgb(35 134 216 / 42%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(35 134 216 / 14%), transparent 68%);
  box-shadow: 0 0 0 6px rgb(35 134 216 / 7%);
  content: "";
  animation: turn-seat-pulse 1.8s ease-in-out infinite;
}
@keyframes turn-seat-pulse {
  0%, 100% { opacity: .58; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.04); }
}
.uno-game .player-seat.is-active .opponent-hand { transform: translateY(4px); }

.uno-game .opponent-hand {
  display: flex;
  min-height: 82px;
  align-items: flex-start;
  justify-content: center;
  transition: transform 160ms ease-out;
}
.uno-game .opponent-card {
  width: 50px;
  flex: 0 0 50px;
  margin-left: -31px;
  transform: rotate(calc((var(--card-index, 0) - 5) * .6deg));
}
.uno-game .card-index-0 { --card-index: 0; }
.uno-game .card-index-1 { --card-index: 1; }
.uno-game .card-index-2 { --card-index: 2; }
.uno-game .card-index-3 { --card-index: 3; }
.uno-game .card-index-4 { --card-index: 4; }
.uno-game .card-index-5 { --card-index: 5; }
.uno-game .card-index-6 { --card-index: 6; }
.uno-game .card-index-7 { --card-index: 7; }
.uno-game .card-index-8 { --card-index: 8; }
.uno-game .opponent-card:first-child { margin-left: 0; }
.uno-game .opponent-card b { font-size: 5px; }

.uno-game .game-table[data-player-count="6"] .player-seat,
.uno-game .game-table[data-player-count="7"] .player-seat {
  width: 154px;
}
.uno-game .game-table[data-player-count="6"] .opponent-card,
.uno-game .game-table[data-player-count="7"] .opponent-card {
  width: 42px;
  flex-basis: 42px;
  margin-left: -27px;
}
.uno-game .game-table[data-player-count="6"] .opponent-card b,
.uno-game .game-table[data-player-count="7"] .opponent-card b {
  font-size: 4px;
}

/* 离线 / UNO / 漏喊 状态徽章（沿用刘.site 联机版既有约定） */
.uno-game .player-seat.off { opacity: .55; }
.uno-game .seat-badges {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.uno-game .uno-badge {
  display: inline-block;
  background: var(--red, #dc2f38);
  color: #fff;
  font: 700 10px/1 Consolas, monospace;
  padding: 3px 6px;
  border-radius: 5px;
  letter-spacing: 1px;
}
.uno-game .off-badge {
  background: #b1bcc5;
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 5px;
  font-weight: 700;
}
.uno-game .catch-badge {
  background: #d6323e;
  color: #fff;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 5px;
  font-weight: 700;
  animation: catch-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes catch-pulse { from { opacity: .65; } to { opacity: 1; } }

/* ============================================================
   4. 中央台面 · turn-status / center-piles / active-color / turn-actions
   ============================================================ */
.uno-game .table-center {
  z-index: 2;
  grid-row: 2;
  display: grid;
  align-content: center;
  justify-items: center;
}
.uno-game .turn-status {
  min-height: 32px;
  margin-bottom: 12px;
  padding: 5px 11px;
  border: 1px solid rgb(99 119 132 / 16%);
  border-radius: 4px;
  background: rgb(255 255 255 / 72%);
  color: #26313a;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 5px 15px rgb(54 76 91 / 7%);
}

.uno-game .center-piles {
  display: flex;
  gap: 24px;
  align-items: start;
}
.uno-game .pile-button {
  display: grid;
  padding: 0;
  border: 0;
  justify-items: center;
  background: transparent;
  color: #5e6e79;
  font: inherit;
  cursor: pointer;
}
.uno-game .pile-button:disabled { cursor: default; opacity: .58; }
.uno-game .pile-button .uno-card { width: 94px; }
.uno-game .pile-button small {
  margin-top: 7px;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.uno-game .discard-area { display: grid; justify-items: center; }
.uno-game .discard-area .uno-card { width: 94px; }

.uno-game .active-color {
  display: flex;
  min-height: 26px;
  margin-top: 7px;
  gap: 7px;
  align-items: center;
  color: #5e6e79;
  font-size: 12px;
}
.uno-game .active-color i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #9eacb6;
}
.uno-game .swatch-red    { background: #dc2f38; }
.uno-game .swatch-yellow { background: #f0b928; }
.uno-game .swatch-green  { background: #21a665; }
.uno-game .swatch-blue   { background: #2386d8; }
.uno-game .swatch-wild   { background: conic-gradient(#f0b928 0 25%, #2386d8 25% 50%, #21a665 50% 75%, #dc2f38 75%); }

.uno-game .turn-actions {
  display: flex;
  min-height: 48px;
  margin-top: 13px;
  gap: 8px;
  align-items: center;
}
.uno-game .table-action {
  min-width: 92px;
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  border-radius: 4px;
  background: #20262d;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.uno-game .table-action:hover { background: #2c343c; }
.uno-game .table-action:active { transform: scale(.96); }
.uno-game .table-action:disabled { cursor: default; opacity: .48; }
.uno-game .table-action.secondary {
  background: #fff;
  color: #26313a;
  box-shadow: inset 0 0 0 1px #bac8d1;
}

.uno-game .uno-call,
.catch-uno {
  min-width: 118px;
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  border-radius: 4px;
  font-family: "Fugaz One", Impact, sans-serif;
  font-weight: 400;
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.uno-game .uno-call {
  background: #f0b928;
  color: #171a1d;
  box-shadow: 0 0 0 4px rgb(240 185 40 / 18%);
}
.uno-game .uno-call:hover { background: #f5c638; }
.uno-game .uno-call:disabled { cursor: default; opacity: .55; box-shadow: none; }
.catch-uno {
  background: #d6323e;
  color: #fff;
  box-shadow: 0 0 0 4px rgb(214 50 62 / 15%);
}
.catch-uno:hover { background: #e34450; }
.catch-uno:active { transform: scale(.96); }
.catch-uno:disabled { cursor: default; opacity: .55; box-shadow: none; }
.catch-uno span {
  margin-left: 7px;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* 选色弹层（不再用 <dialog>，直接 inline 到台面下方） */
.uno-game .color-pick {
  display: inline-flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 5px 15px rgb(54 76 91 / 10%);
}
.uno-game .color-btn {
  width: 46px;
  height: 46px;
  border: 3px solid #111315;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0;
}
.uno-game .color-btn.uno-red    { background: #dc2f38; }
.uno-game .color-btn.uno-yellow { background: #f0b928; }
.uno-game .color-btn.uno-green  { background: #21a665; }
.uno-game .color-btn.uno-blue   { background: #2386d8; }

/* ============================================================
   5. 方向指示器 · 绝对定位在牌桌左侧
   ============================================================ */
.uno-game .direction-indicator {
  position: absolute;
  z-index: 2;
  top: 49%;
  left: clamp(14px, 7vw, 84px);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 132px;
  padding: 9px 12px;
  border: 1px solid rgb(35 134 216 / 28%);
  border-radius: 8px;
  background: rgb(255 255 255 / 82%);
  color: #26313a;
  box-shadow: 0 8px 22px rgb(35 71 91 / 12%);
  transform: translateY(-50%);
}
.uno-game .direction-indicator .direction-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #2386d8;
  border-radius: 50%;
  background: #eaf6ff;
  color: #2386d8;
  font-size: 20px;
  line-height: 1;
}
.uno-game .direction-indicator b,
.uno-game .direction-indicator em { display: block; }
.uno-game .direction-indicator b { font-size: 11px; font-weight: 800; }
.uno-game .direction-indicator em { margin-top: 2px; color: #146e9f; font-size: 12px; font-style: normal; font-weight: 800; }
.uno-game .mode-indicator {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  padding: 5px 9px;
  border: 1px solid rgb(91 113 128 / 20%);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  color: #596a75;
  font-size: 11px;
  font-weight: 700;
}
.uno-game .direction-indicator.is-changing {
  animation: direction-change 650ms ease-out;
}
@keyframes direction-change {
  0%, 100% { transform: translateY(-50%) scale(1); }
  35% {
    border-color: rgb(35 134 216 / 58%);
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 0 0 5px rgb(35 134 216 / 12%);
    transform: translateY(-50%) scale(1.35);
  }
  65% { transform: translateY(-50%) scale(1.12); }
}

/* ============================================================
   5b. 出牌特效 · 中央弹出大字动画
   ============================================================ */
.uno-game .action-effect {
  position: absolute;
  z-index: 18;
  top: 46%;
  left: 50%;
  min-width: 174px;
  padding: 13px 24px;
  border: 2px solid #20262d;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff 0%, #f4f8fa 100%);
  color: #20262d;
  font-family: "Fugaz One", Impact, sans-serif;
  font-size: 38px;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 0 rgb(32 38 45 / 14%), 0 18px 30px rgb(32 38 45 / 20%);
  transform: translate(-50%, -50%) scale(.72) rotate(-3deg);
}
.uno-game .action-effect.is-visible {
  animation: action-pop 980ms cubic-bezier(.16, 1, .3, 1);
}
.uno-game .action-effect.effect-draw2,
.uno-game .action-effect.effect-draw4,
.uno-game .action-effect.effect-catch { border-color: #d6323e; color: #b5212d; background: linear-gradient(145deg, #fff 0%, #fff0f1 100%); }
.uno-game .action-effect.effect-reverse { border-color: #2386d8; color: #146e9f; background: linear-gradient(145deg, #fff 0%, #ebf6ff 100%); }
.uno-game .action-effect.effect-skip { border-color: #d59c06; color: #8e6600; background: linear-gradient(145deg, #fff 0%, #fff8df 100%); }
.uno-game .action-effect.effect-wild,
.uno-game .action-effect.effect-uno { border-color: #21a665; color: #167a49; background: linear-gradient(145deg, #fff 0%, #e9faef 100%); }
@keyframes action-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.72) rotate(-3deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.06) rotate(1deg); }
  34%, 76% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1.03); }
}

/* ============================================================
   6. 玩家区 · 底部全尺寸扇形手牌
   ============================================================ */
.uno-game .human-seat {
  z-index: 4;
  grid-row: 3;
  display: grid;
  align-content: end;
  padding: 0 20px 18px;
}
.uno-game .human-label {
  width: min(920px, 100%);
  margin: 0 auto 3px;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  color: #64737e;
  font-size: 13px;
}
.uno-game .human-label strong {
  color: #26313a;
  font-size: 14px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uno-game .human-label span {
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-variant-numeric: tabular-nums;
}

.uno-game .my-hand {
  display: flex;
  flex-wrap: nowrap;
  width: min(1020px, 100%);
  min-height: 198px;
  margin: 0 auto;
  padding: 26px 20px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: flex-start;
  justify-content: center;
  scrollbar-color: rgb(50 70 84 / 25%) transparent;
  scrollbar-width: thin;
}
.uno-game .my-hand::-webkit-scrollbar { height: 5px; }
.uno-game .my-hand::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgb(50 70 84 / 24%);
}
.uno-game .my-hand .uno-card {
  width: 104px;
  flex: 0 0 104px;
  margin-left: -50px;
  transform: translateY(var(--fan-drop, 0)) rotate(var(--fan-rotation, 0deg));
  transition: transform 180ms cubic-bezier(.16, 1, .3, 1), filter 140ms ease-out, opacity 140ms ease-out;
  cursor: default;
  touch-action: manipulation;
}
.uno-game .my-hand .fan-slot-0  { --fan-rotation: -10deg; --fan-drop: 8px; }
.uno-game .my-hand .fan-slot-1  { --fan-rotation: -8.3deg; --fan-drop: 5.6px; }
.uno-game .my-hand .fan-slot-2  { --fan-rotation: -6.7deg; --fan-drop: 3.9px; }
.uno-game .my-hand .fan-slot-3  { --fan-rotation: -5deg; --fan-drop: 2.2px; }
.uno-game .my-hand .fan-slot-4  { --fan-rotation: -3.3deg; --fan-drop: 1px; }
.uno-game .my-hand .fan-slot-5  { --fan-rotation: -1.7deg; --fan-drop: .3px; }
.uno-game .my-hand .fan-slot-6  { --fan-rotation: 0deg; --fan-drop: 0; }
.uno-game .my-hand .fan-slot-7  { --fan-rotation: 1.7deg; --fan-drop: .3px; }
.uno-game .my-hand .fan-slot-8  { --fan-rotation: 3.3deg; --fan-drop: 1px; }
.uno-game .my-hand .fan-slot-9  { --fan-rotation: 5deg; --fan-drop: 2.2px; }
.uno-game .my-hand .fan-slot-10 { --fan-rotation: 6.7deg; --fan-drop: 3.9px; }
.uno-game .my-hand .fan-slot-11 { --fan-rotation: 8.3deg; --fan-drop: 5.6px; }
.uno-game .my-hand .fan-slot-12 { --fan-rotation: 10deg; --fan-drop: 8px; }
.uno-game .my-hand .uno-card:first-child { margin-left: 0; }
.uno-game .my-hand .uno-card:not(.is-playable) {
  filter: saturate(.55) brightness(.73);
  opacity: .76;
}
.uno-game .my-hand .uno-card.is-playable {
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgb(35 134 216 / 28%));
}
.uno-game .my-hand .uno-card.is-card-selected {
  z-index: 5;
  filter: drop-shadow(0 8px 10px rgb(35 48 58 / 28%));
  transform: translateY(calc(var(--fan-drop, 0) - 26px)) rotate(var(--fan-rotation, 0deg)) scale(1.02);
  animation: arm-card 160ms cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes arm-card {
  from { transform: translateY(calc(var(--fan-drop, 0) - 8px)) rotate(var(--fan-rotation, 0deg)) scale(1); }
  to { transform: translateY(calc(var(--fan-drop, 0) - 26px)) rotate(var(--fan-rotation, 0deg)) scale(1.02); }
}
.uno-game .my-hand .uno-card.is-drawn { outline: 2px solid #2386d8; outline-offset: 2px; }

/* 离线 / 等待提示 */
.uno-game .wait-hint {
  font-size: 12px;
  color: #596a75;
  text-align: center;
  margin-top: 8px;
}

/* ============================================================
   7. 右下角免责声明
   ============================================================ */
.uno-game .unofficial-note {
  position: absolute;
  right: 12px;
  bottom: 8px;
  margin: 0;
  color: rgb(48 66 78 / 42%);
  font-size: 9px;
}

/* ============================================================
   8. 卡面本身 · 颜色、纹理、角标、中央符号、万能椭圆
   ============================================================ */
.uno-card {
  position: relative;
  isolation: isolate;
  display: grid;
  height: auto;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  padding: 7px;
  border: 3px solid #111315;
  border-radius: 12px 5px 10px 7px;
  place-items: center;
  color: #fff7df;
  box-shadow: 3px 5px 0 rgb(8 14 11 / 24%);
  font-family: "Fugaz One", Impact, sans-serif;
}
.uno-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}
.uno-game .color-red { background: #dc2f38; }
.uno-game .color-red::before {
  background: radial-gradient(circle, rgb(255 247 223 / 28%) 0 2px, transparent 2.5px);
  background-size: 13px 13px;
}
.uno-game .color-yellow { background: #f0b928; color: #101113; }
.uno-game .color-yellow::before {
  background: conic-gradient(from 45deg, rgb(255 247 223 / 24%) 25%, transparent 0 50%, rgb(255 247 223 / 24%) 0 75%, transparent 0);
  background-size: 18px 18px;
}
.uno-game .color-green { background: #21a665; }
.uno-game .color-green::before {
  inset: 12%;
  border: 5px solid rgb(255 247 223 / 20%);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgb(255 247 223 / 8%), inset 0 0 0 8px rgb(255 247 223 / 8%);
  transform: rotate(12deg);
}
.uno-game .color-blue { background: #2386d8; }
.uno-game .color-blue::before {
  background: repeating-conic-gradient(from 6deg at 50% 50%, rgb(255 247 223 / 21%) 0 5deg, transparent 5deg 23deg);
}
.uno-game .color-wild { background: #101113; }

.uno-game .card-corner {
  position: absolute;
  z-index: 4;
  top: 6px;
  left: 7px;
  font-family: "Fugaz One", Impact, sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-shadow: 0 1px 0 rgb(0 0 0 / 55%);
}
.uno-game .color-yellow .card-corner { text-shadow: 0 1px 0 rgb(255 247 223 / 45%); }
.uno-game .card-corner-bottom { inset: auto 7px 6px auto; transform: rotate(180deg); }

.uno-game .card-symbol {
  position: relative;
  z-index: 3;
  font-family: "Fugaz One", Impact, sans-serif;
  font-size: 62px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: .9;
  text-shadow: 5px 6px 0 rgb(16 17 19 / 42%);
  transform: rotate(-7deg);
}
.uno-game .value-draw2 .card-symbol,
.uno-game .value-draw4 .card-symbol { font-size: 50px; }
.uno-game .color-yellow .card-symbol { text-shadow: 5px 6px 0 rgb(255 247 223 / 42%); }

.uno-game .wild-oval {
  position: absolute;
  z-index: 1;
  inset: 17% 12%;
  border: 4px solid #fff7df;
  border-radius: 50%;
  background: conic-gradient(from -7deg, #f0b928 0 25%, #2386d8 25% 50%, #21a665 50% 75%, #dc2f38 75% 100%);
  transform: rotate(-10deg);
}
.uno-game .wild-symbol {
  color: #fff7df;
  -webkit-text-stroke: 2px #101113;
  text-shadow: 4px 5px 0 #101113;
}
.uno-game .wild-index { color: #fff7df; }

.uno-game .card-back {
  padding: 5px;
  background-color: #20242a;
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgb(104 212 202 / 10%) 8px 10px);
  color: #f8f1dc;
  border-color: #20242a;
  box-shadow: 2px 4px 0 rgb(46 62 73 / 16%);
}
.uno-game .card-back::before {
  z-index: 0;
  inset: 8px;
  border: 1px solid rgb(248 241 220 / 66%);
  border-radius: 5px;
  background: none;
}
.uno-game .card-back::after {
  z-index: 0;
  inset: 4px;
  border: 2px solid #f8f1dc;
  border-radius: 6px;
  transform: none;
}
.uno-game .card-back .back-mark {
  position: absolute;
  z-index: 1;
  inset: 23% 20%;
  display: grid;
  place-items: center;
  transform: rotate(-9deg);
}
.uno-game .card-back .back-mark i {
  position: absolute;
  width: 72%;
  height: 22%;
  border-radius: 999px;
  transform-origin: center;
}
.uno-game .card-back .back-mark i:nth-child(1) { background: #dc2f38; transform: translateY(-72%) rotate(20deg); }
.uno-game .card-back .back-mark i:nth-child(2) { background: #f0b928; transform: translateX(28%) rotate(70deg); }
.uno-game .card-back .back-mark i:nth-child(3) { background: #21a665; transform: translateY(72%) rotate(20deg); }
.uno-game .card-back .back-mark i:nth-child(4) { background: #2386d8; transform: translateX(-28%) rotate(70deg); }
.uno-game .card-back b {
  position: relative;
  z-index: 2;
  font-family: "Fugaz One", Impact, sans-serif;
  font-size: 9px;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 1px 2px #20242a;
  transform: rotate(-9deg);
}
.uno-game .pile-button .card-back b { font-size: 16px; }

/* 发牌动画 */
.uno-game .is-new-card { animation: place-card 260ms cubic-bezier(.16, 1, .3, 1); }
@keyframes place-card {
  from { opacity: 0; transform: translateY(-18px) rotate(7deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0); }
}
.uno-game .uno-discard .uno-card.is-card-played {
  animation: card-play-feedback 420ms cubic-bezier(.16, 1, .3, 1);
}
@keyframes card-play-feedback {
  0% { opacity: .45; transform: translateY(-24px) scale(.86) rotate(-5deg); }
  58% { opacity: 1; transform: translateY(2px) scale(1.05) rotate(1deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

/* ============================================================
   9. 响应式
   ============================================================ */
@media (max-width: 780px) {
  .uno-game .game-table {
    grid-template-rows: 238px minmax(275px, 1fr) 218px;
    min-height: 735px;
  }
  .uno-game .turn-orbit { top: 194px; width: 84%; height: 326px; }
  .uno-game .opponents { height: 238px; }
  .uno-game .player-seat { width: 47%; }
  .uno-game .opponent-card {
    width: 33px;
    flex-basis: 33px;
    margin-left: -22px;
  }
  .uno-game .opponent-card b { font-size: 4px; }
  .uno-game .opponent-card:nth-child(n+5) { display: none; }
  .uno-game .human-seat { padding-bottom: 14px; }
  .uno-game .my-hand {
    justify-content: flex-start;
    padding-inline: 24px;
  }
  .uno-game .discard-area .uno-card,
  .uno-game .pile-button .uno-card { width: 82px; }
}

@media (max-width: 440px) {
  .uno-game .game-table {
    grid-template-rows: 226px minmax(260px, 1fr) 205px;
    min-height: 700px;
  }
  .uno-game .turn-orbit { top: 188px; height: 300px; }
  .uno-game .player-seat { width: 82px; }
  .uno-game .opponent-card {
    width: 29px;
    flex-basis: 29px;
    margin-left: -20px;
  }
  .uno-game .center-piles { gap: 14px; }
  .uno-game .table-center { transform: translateY(-22px); }
  .uno-game .direction-indicator {
    top: 48%;
    left: 8px;
    min-width: 112px;
    gap: 5px;
    padding: 7px 8px;
  }
  .uno-game .direction-indicator .direction-arrow { width: 24px; height: 24px; font-size: 17px; }
  .uno-game .direction-indicator b { font-size: 9px; }
  .uno-game .direction-indicator em { font-size: 10px; }
  .uno-game .mode-indicator { top: 10px; right: 10px; }
  .uno-game .discard-area .uno-card,
  .uno-game .pile-button .uno-card { width: 72px; }
  .uno-game .pile-button .card-back b { font-size: 12px; }
  .uno-game .human-seat { padding-inline: 6px; }
  .uno-game .my-hand {
    width: 100%;
    padding: 22px 10px 6px;
    overflow: hidden;
    justify-content: center;
  }
  .uno-game .my-hand .uno-card { width: 78px; flex-basis: 78px; }
  .uno-game .my-hand.hand-count-5 .uno-card { margin-left: -19px; }
  .uno-game .my-hand.hand-count-6 .uno-card { margin-left: -31px; }
  .uno-game .my-hand.hand-count-7 .uno-card { margin-left: -38px; }
  .uno-game .my-hand.hand-count-8 .uno-card { margin-left: -44px; }
  .uno-game .my-hand.hand-count-9 .uno-card { margin-left: -48px; }
  .uno-game .my-hand.hand-count-10 .uno-card { margin-left: -51px; }
  .uno-game .my-hand.hand-count-11 .uno-card { margin-left: -54px; }
  .uno-game .my-hand.hand-count-12 .uno-card { margin-left: -56px; }
  .uno-game .my-hand.hand-count-13 .uno-card { margin-left: -58px; }
  .uno-game .my-hand.hand-count-14 .uno-card { margin-left: -60px; }
  .uno-game .my-hand.hand-count-15 .uno-card { margin-left: -61px; }
  .uno-game .my-hand.hand-count-16 .uno-card { margin-left: -62px; }
  .uno-game .my-hand.hand-count-17 .uno-card { margin-left: -63px; }
  .uno-game .my-hand.hand-count-18 .uno-card { margin-left: -64px; }
  .uno-game .my-hand.hand-count-19 .uno-card,
  .uno-game .my-hand.hand-count-20 .uno-card { margin-left: -65px; }
  .uno-game .my-hand .uno-card:first-child { margin-left: 0; }
  .uno-game .card-symbol { font-size: 52px; }
  .uno-game .value-draw2 .card-symbol,
  .uno-game .value-draw4 .card-symbol { font-size: 42px; }
  .uno-game .unofficial-note { font-size: 8px; right: 7px; bottom: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .uno-game .player-seat.is-active::before,
  .uno-game .human-seat.is-active::before { animation: none; }
  .uno-game .turn-orbit i,
  .uno-game .direction-indicator.is-changing,
  .uno-game .is-new-card,
  .uno-game .my-hand .uno-card { animation: none; transition: none; }
  .uno-game .catch-badge { animation: none; }
}

/* 独立联机页：沿用原单机牌桌，不受博客站容器约束。 */
body.uno-standalone {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: #eef3f7;
  color: #20262d;
}

.uno-standalone .uno-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.uno-standalone .uno-game { min-height: 100svh; }
.uno-standalone .uno-game .game-toolbar { position: sticky; top: 0; z-index: 30; }
.uno-standalone .uno-entry-screen,
.uno-standalone .uno-lobby,
.uno-standalone .uno-ended {
  width: min(520px, calc(100% - 32px));
  margin: 38px auto;
  padding: 28px;
  border: 1px solid #cfdae2;
  border-radius: 8px;
  background: rgb(248 250 252 / 94%);
  box-shadow: 0 16px 44px rgb(54 72 84 / 14%);
}

.uno-standalone .uno-entry-screen .eyebrow { margin: 0 0 8px; }
.uno-standalone .entry-title { margin: 0 0 10px; font-family: var(--display, sans-serif); font-size: clamp(38px, 8vw, 62px); }
.uno-standalone .uno-sub { color: #60717c; line-height: 1.65; }
.uno-standalone .uno-field { margin: 18px 0; text-align: left; }
.uno-standalone .uno-field label { display: block; margin-bottom: 7px; color: #526571; font-size: 13px; font-weight: 700; }
.uno-standalone .uno-field input,
.uno-standalone .uno-select {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #bac8d1;
  border-radius: 6px;
  background: #fff;
  color: #20262d;
  font: inherit;
}
.uno-standalone .uno-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid #c7d4dc;
  border-radius: 7px;
  background: #e7eef3;
}
.uno-standalone .uno-mode-switch .btn {
  flex: 1;
  min-height: 40px;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  font-size: 14px;
  box-shadow: none;
}
.uno-standalone .uno-mode-switch .btn.btn-solid {
  background: #2386d8;
  color: #fff;
  box-shadow: 0 2px 5px rgb(35 134 216 / 24%);
}
.uno-standalone .uno-mode-switch .btn.btn-ghost {
  background: transparent;
  color: #526571;
}
.uno-standalone .uno-mode-switch .btn.btn-ghost:hover { background: rgb(255 255 255 / 70%); }
.uno-standalone .uno-segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.uno-standalone .uno-segmented button {
  min-width: 52px;
  flex: 1;
  padding: 9px 7px;
  border: 1px solid #bac8d1;
  border-radius: 5px;
  background: #fff;
  color: #20262d;
}
.uno-standalone .uno-segmented button.active { border-color: #20262d; background: #20262d; color: #fff; }
.uno-standalone .btn-block { width: 100%; justify-content: center; }
.uno-standalone .uno-field-hint, .uno-standalone .uno-hint { color: #687983; font-size: 12px; }
.uno-standalone .uno-conn-log { max-height: 120px; overflow: auto; white-space: pre-wrap; color: #60717c; font: 11px/1.5 ui-monospace, monospace; }
.uno-standalone .invite-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid #c6d5de;
  border-left: 4px solid #2386d8;
  background: #fff;
}
.uno-standalone .invite-panel > div { display: grid; gap: 3px; }
.uno-standalone .invite-panel span { color: #687983; font-size: 11px; }
.uno-standalone .invite-panel strong { color: #20262d; font: 700 18px/1.2 var(--mono, ui-monospace, monospace); }
.uno-standalone .lobby-list, .uno-standalone .ended-scores { display: grid; gap: 8px; margin: 20px 0; }
.uno-standalone .lobby-chip, .uno-standalone .ended-score { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #d5e0e7; background: #fff; }
.uno-standalone .lobby-chip .tag { margin-left: 8px; }
.uno-standalone .lobby-chip .host-badge {
  display: inline-flex;
  min-height: 20px;
  margin-left: auto;
  padding: 2px 8px;
  align-items: center;
  border: 1px solid rgb(20 110 159 / 30%);
  border-radius: 999px;
  background: #e2f4ff;
  color: #146e9f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.uno-standalone .score-board { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.uno-standalone .score-title, .uno-standalone .score-chip { padding: 6px 9px; border: 1px solid #d5e0e7; background: #fff; font-size: 12px; }
.uno-standalone .lobby-actions, .uno-standalone .ended-actions { display: flex; gap: 9px; margin-top: 20px; }
.uno-standalone .lobby-actions > *, .uno-standalone .ended-actions > * { flex: 1; }
.uno-standalone .game-tools .icon-button:disabled { cursor: not-allowed; opacity: .42; }
.uno-standalone .pause-overlay {
  position: absolute;
  z-index: 24;
  inset: 76px 18px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #d3a927;
  border-radius: 6px;
  background: rgb(255 249 220 / 96%);
  box-shadow: 0 8px 24px rgb(56 49 20 / 18%);
}
.uno-standalone .pause-overlay span { color: #665b31; }
.uno-standalone .icon-button[hidden], .uno-standalone .table-tool[hidden] { display: none !important; }
.uno-toast {
  position: fixed;
  z-index: 100;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  max-width: min(460px, calc(100% - 28px));
  padding: 10px 14px;
  border: 1px solid #26313a;
  border-radius: 5px;
  background: #20262d;
  color: #fff;
  box-shadow: 0 10px 28px rgb(24 31 36 / 28%);
  font-size: 13px;
  text-align: center;
  transform: translateX(-50%);
}
.uno-toast[hidden] { display: none; }

.game-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: min(82vh, 720px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f5f7f4;
  color: #151719;
  box-shadow: 0 24px 80px rgb(0 0 0 / 42%);
}
.game-dialog::backdrop { background: rgb(5 9 7 / 76%); }
.game-dialog form { display: flex; max-height: min(82vh, 720px); padding: 28px; flex-direction: column; }
.game-dialog h2 { margin: 4px 0 0; font-size: 30px; }
.dialog-heading, .stats-section-heading, .sound-control label, .sound-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading { flex: 0 0 auto; align-items: start; margin-bottom: 18px; }
.dialog-body { min-height: 0; overflow: auto; }
.game-dialog .icon-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #e4eaee; color: #20262d; font-size: 24px; }
.rules-dialog ul { margin: 0; padding-left: 22px; line-height: 1.65; }
.rules-dialog li + li { margin-top: 9px; }
.dialog-actions { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.dialog-actions .btn { min-width: 92px; justify-content: center; }
.sound-dialog { width: min(420px, calc(100% - 28px)); }
.sound-dialog .dialog-body, .stats-dialog .dialog-body { display: grid; gap: 18px; }
.sound-toggle { min-height: 58px; padding: 10px 12px; border: 1px solid #d5e0e7; background: #fff; }
.sound-toggle span { display: grid; gap: 2px; }
.sound-toggle small { color: #687983; }
.sound-toggle input { position: relative; width: 42px; height: 24px; margin: 0; appearance: none; border: 1px solid #aebbc4; border-radius: 12px; background: #dfe7ec; }
.sound-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(32 38 45 / 25%); transition: transform 120ms ease-out; }
.sound-toggle input:checked { border-color: #2386d8; background: #2386d8; }
.sound-toggle input:checked::after { transform: translateX(18px); }
.sound-control { display: grid; gap: 9px; }
.sound-control output { color: #526571; font-family: ui-monospace, monospace; }
.sound-control input[type="range"] { width: 100%; accent-color: #2386d8; }
.stats-dialog h2, .stats-dialog h3 { margin: 0; }
.stats-dialog h3 { color: #526571; font-size: 13px; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats-grid span { display: grid; min-height: 66px; align-content: center; gap: 4px; padding: 10px; border: 1px solid #d5e0e7; background: #f8fafc; }
.stats-grid b { font-family: var(--display, sans-serif); font-size: 24px; }
.stats-grid small { color: #6b7b85; font-size: 11px; }
.text-button { border: 0; background: none; color: #b52d39; text-decoration: underline; }

/* 局间结算：牌桌冻结，最终弃牌保留为唯一视觉焦点。 */
.uno-game .game-table.result-reveal,
.uno-game .game-table.result-settled { isolation: isolate; }
.uno-game .game-table.result-reveal::after,
.uno-game .game-table.result-settled::after {
  position: absolute;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  content: "";
  background: rgb(20 27 31 / 26%);
  filter: saturate(.72);
}
.uno-game .result-final-card {
  position: relative;
  z-index: 25;
  transform-origin: center;
  box-shadow: 0 0 0 14px rgb(255 247 223 / 8%), 0 14px 34px rgb(15 21 25 / 34%);
}
.uno-game .result-final-card::after { position: absolute; z-index: 0; inset: -18%; pointer-events: none; content: ""; border-radius: 50%; background: radial-gradient(circle, rgb(255 247 223 / 22%), transparent 68%); mix-blend-mode: screen; }
.uno-game .result-color-red .result-final-card { box-shadow: 0 0 0 14px rgb(220 47 56 / 28%), 0 14px 34px rgb(15 21 25 / 34%); }
.uno-game .result-color-red .result-final-card::after { background: radial-gradient(circle, rgb(255 111 117 / 34%), transparent 68%); }
.uno-game .result-color-yellow .result-final-card { box-shadow: 0 0 0 14px rgb(240 185 40 / 28%), 0 14px 34px rgb(15 21 25 / 34%); }
.uno-game .result-color-yellow .result-final-card::after { background: radial-gradient(circle, rgb(255 229 125 / 36%), transparent 68%); }
.uno-game .result-color-green .result-final-card { box-shadow: 0 0 0 14px rgb(33 166 101 / 28%), 0 14px 34px rgb(15 21 25 / 34%); }
.uno-game .result-color-green .result-final-card::after { background: radial-gradient(circle, rgb(108 235 163 / 32%), transparent 68%); }
.uno-game .result-color-blue .result-final-card { box-shadow: 0 0 0 14px rgb(35 134 216 / 28%), 0 14px 34px rgb(15 21 25 / 34%); }
.uno-game .result-color-blue .result-final-card::after { background: radial-gradient(circle, rgb(121 202 255 / 34%), transparent 68%); }
.uno-game .result-color-wild .result-final-card { box-shadow: 0 0 0 14px rgb(255 247 223 / 20%), 0 14px 34px rgb(15 21 25 / 34%); }
.uno-game .result-reveal .opponents,
.uno-game .result-reveal .turn-orbit,
.uno-game .result-reveal .direction-indicator,
.uno-game .result-reveal .human-seat,
.uno-game .result-reveal .pile-button,
.uno-game .result-reveal .active-color,
.uno-game .result-reveal .turn-status { filter: saturate(.62) brightness(.78); }
.uno-game .result-reveal .result-final-card { animation: result-card-focus 650ms cubic-bezier(.16, 1.15, .3, 1) both; }
@keyframes result-card-focus {
  0% { transform: scale(.92) rotate(-2deg); }
  68% { transform: scale(1.2) rotate(.5deg); }
  100% { transform: scale(1.18) rotate(0); }
}
.uno-game .result-modal {
  position: absolute;
  z-index: 40;
  top: 50%;
  left: 50%;
  width: min(370px, calc(100% - 28px));
  padding: 26px 24px 22px;
  border: 1px solid rgb(25 34 39 / 14%);
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 24px 70px rgb(7 13 16 / 32%);
  text-align: center;
  transform: translate(-50%, -50%);
  animation: result-modal-in 260ms ease-out both;
}
@keyframes result-modal-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.uno-game .result-modal h2 { margin: 4px 0 6px; font-family: var(--display, sans-serif); font-size: clamp(30px, 6vw, 44px); }
.uno-game .result-winner,
.uno-game .result-ready-count { margin: 0; color: #62727c; font-size: 13px; }
.uno-game .result-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 18px 0; }
.uno-game .battle-ranking { margin: 14px 0 16px; padding: 10px 12px; border: 1px solid #e3d39b; background: #fff9e8; text-align: left; }
.uno-game .battle-ranking > span { color: #8b650b; font-size: 11px; font-weight: 800; }
.uno-game .battle-ranking ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin: 7px 0 0; padding-left: 22px; color: #39464e; font-size: 12px; }
.uno-game .battle-ranking li::marker { color: #b58716; font-weight: 800; }
.uno-game .result-score { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid #d6e0e5; background: #f7fafb; text-align: left; }
.uno-game .result-score strong { font: 700 20px/1 var(--mono, ui-monospace, monospace); }
.uno-game .result-actions { display: flex; justify-content: center; margin: 16px 0 8px; }
.uno-game .result-ready { min-width: 190px; justify-content: center; }
.uno-game .result-gear { position: absolute; top: 14px; right: 14px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #d5e0e7; background: #fff; color: #526571; }
.uno-game .result-gear svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.uno-game .result-settings { position: absolute; z-index: 55; top: 54px; left: calc(100% + 14px); display: grid; width: 176px; gap: 9px; margin: 0; padding: 11px; border: 1px solid #d5e0e7; background: rgb(255 255 255 / 98%); box-shadow: 0 14px 30px rgb(7 13 16 / 22%); text-align: left; }
.uno-game .result-settings[hidden] { display: none !important; }
.uno-game .result-settings > span { color: #526571; font-size: 12px; font-weight: 700; }
.uno-game .result-counts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.uno-game .result-counts button { min-height: 32px; border: 1px solid #bac8d1; background: #fff; color: #20262d; }
.uno-game .result-counts button.active { border-color: #20262d; background: #20262d; color: #fff; }
.uno-game .result-settings .btn { justify-content: center; padding: 7px 12px; }

@media (prefers-reduced-motion: reduce) {
  .uno-game .result-reveal .result-final-card,
  .uno-game .result-modal { animation: none; }
  .uno-game .result-final-card { transform: scale(1.18); }
}

@media (max-width: 620px) {
  .uno-standalone .uno-game .game-toolbar { grid-template-columns: 40px minmax(0, 1fr) auto; padding-inline: 8px; }
  .uno-standalone .game-title .game-sub, .uno-standalone .uno-status span:last-child { display: none; }
  .uno-standalone .uno-game .game-tools { gap: 3px; }
  .uno-standalone .uno-game .icon-button { width: 38px; height: 38px; }
  .uno-standalone .uno-entry-screen, .uno-standalone .uno-lobby, .uno-standalone .uno-ended { width: calc(100% - 20px); margin: 12px auto; padding: 18px; }
  .uno-standalone .uno-segmented button { min-width: 46px; }
  .uno-standalone .invite-panel { align-items: stretch; flex-direction: column; }
  .uno-standalone .invite-panel .btn { width: 100%; justify-content: center; }
  .game-dialog {
    width: 100%;
    max-width: none;
    max-height: min(86svh, 720px);
    margin: 0;
    border-radius: 8px 8px 0 0;
    inset: auto 0 0;
  }
  .game-dialog form { max-height: min(86svh, 720px); padding: 20px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
  .game-dialog h2 { font-size: 26px; }
  .dialog-actions .btn { flex: 1; }
  .stats-grid { gap: 5px; }
  .stats-grid span { min-height: 58px; padding: 7px; }
  .stats-grid b { font-size: 20px; }
  .uno-game .result-modal { width: calc(100% - 20px); padding: 22px 16px 18px; }
  .uno-game .result-scores { gap: 5px; }
  .uno-game .result-settings { top: calc(100% + 10px); left: 50%; width: min(240px, calc(100vw - 34px)); transform: translateX(-50%); }
}
