/* ==========================================================================
   UNO 乌诺俱乐部 — 样式表
   深色牌桌 + 高对比 UNO 四色
   ========================================================================== */

:root {
  --red: #e63946;
  --yellow: #f4c430;
  --green: #2fae62;
  --blue: #2f7ce0;
  --uno-red: #e5352d;
  --ink: #080b14;
  --ink-2: #0e1220;
  --paper: #f7f8ff;
  --text: #f2f4ff;
  --muted: #9aa3be;
  --muted-2: #6f7894;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --panel: rgba(19, 23, 39, 0.78);
  --panel-solid: #14182a;
  --radius: 20px;
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.5);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI", "Arial Black", var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--ink);
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

body.is-table {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  background: rgba(244, 196, 48, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* --------------------------------------------------------------------------
   背景
   -------------------------------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1100px 760px at 8% -12%, rgba(47, 124, 224, 0.22), transparent 62%),
    radial-gradient(900px 680px at 102% 2%, rgba(230, 57, 70, 0.2), transparent 60%),
    radial-gradient(900px 900px at 50% 118%, rgba(47, 174, 98, 0.14), transparent 64%),
    #070a12;
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 22s ease-in-out infinite alternate;
}

.ambient__orb--red {
  width: 420px;
  height: 420px;
  right: -120px;
  top: 10%;
  background: rgba(230, 57, 70, 0.65);
}

.ambient__orb--blue {
  width: 520px;
  height: 520px;
  left: -180px;
  bottom: -120px;
  background: rgba(47, 124, 224, 0.55);
  animation-delay: -8s;
}

.ambient__orb--green {
  width: 300px;
  height: 300px;
  left: 42%;
  top: 46%;
  background: rgba(47, 174, 98, 0.4);
  animation-delay: -14s;
}

.ambient__grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 72%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, -30px, 0) scale(1.12); }
}

/* --------------------------------------------------------------------------
   顶栏
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
  padding: 0 clamp(14px, 3vw, 34px);
  background: rgba(7, 10, 18, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand__mark {
  width: 46px;
  height: 31px;
  border-radius: 50%;
  background: var(--uno-red);
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  box-shadow: 0 7px 18px rgba(229, 53, 45, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.brand__mark span {
  transform: rotate(8deg);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.04em;
}

.brand__text {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(242, 244, 255, 0.92);
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.room-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.room-pill b {
  color: #fff;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-btn--dark {
  width: auto;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
}

.icon-btn .ico {
  width: 19px;
  height: 19px;
}

.ico--sound .sound-off {
  display: none;
}

body.is-muted .ico--sound .sound-wave {
  display: none;
}

body.is-muted .ico--sound .sound-off {
  display: block;
}

/* --------------------------------------------------------------------------
   通用控件
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--primary {
  background: linear-gradient(135deg, #ff6254, #d92c2c 62%, #b81f28);
  box-shadow: 0 12px 28px rgba(217, 44, 44, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  box-shadow: 0 16px 34px rgba(217, 44, 44, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--light {
  background: #f7f8ff;
  color: #151827;
}

.btn--light:hover:not(:disabled) {
  background: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--text);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line-strong);
}

.btn--sm {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 9px;
}

.btn--lg {
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 15px;
}

.btn--danger {
  background: rgba(229, 53, 45, 0.16);
  border-color: rgba(229, 53, 45, 0.45);
  color: #ff9d96;
}

.btn__icon {
  font-size: 12px;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: #a8bcff;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: color 0.16s ease;
}

.link-btn:hover {
  color: #d0dbff;
}

.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.input:focus {
  border-color: rgba(160, 185, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(120, 150, 255, 0.16);
}

.input--share {
  height: 40px;
  font-size: 12px;
  color: var(--muted);
}

.select {
  width: 100%;
  height: 44px;
  padding: 0 36px 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23aab3cc' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.select option {
  background: #171b2d;
  color: #fff;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.hint--tight {
  font-size: 11.5px;
  line-height: 1.5;
}

.muted {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.panel {
  position: relative;
  padding: clamp(18px, 2.6vw, 26px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(26, 31, 51, 0.86), rgba(14, 18, 32, 0.88));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 32%);
}

.panel h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0.01em;
}

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel__head--stack {
  flex-direction: column;
  gap: 10px;
}

.panel__head--stack .tag {
  align-self: flex-start;
}

.panel--accent {
  background:
    radial-gradient(340px 180px at 100% 0%, rgba(244, 196, 48, 0.18), transparent 70%),
    linear-gradient(170deg, rgba(32, 34, 49, 0.9), rgba(16, 19, 32, 0.9));
  border-color: rgba(244, 196, 48, 0.22);
}

.panel--accent h2 {
  font-size: 17px;
  margin-bottom: 8px;
}

.panel--accent p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   视图切换
   -------------------------------------------------------------------------- */
.view {
  position: relative;
  z-index: 1;
  display: none;
  min-height: calc(100vh - 64px);
}

.view.is-active {
  display: block;
  animation: viewIn 0.32s ease both;
}

@keyframes viewIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   首页
   -------------------------------------------------------------------------- */
.home {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(26px, 5vh, 64px) clamp(18px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.72fr);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 64px);
}

.home__hero {
  position: relative;
  padding-top: 8px;
}

.deck-fan {
  position: relative;
  width: 270px;
  height: 190px;
  margin: 0 0 12px;
}

.home .fan-card {
  position: absolute;
  width: 102px;
  --cw: 102px;
}

.fan-card {
  --cw: 102px;
  position: absolute;
  width: 102px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.4);
  animation: fanFloat 6s ease-in-out infinite;
}

.fan-card--1 {
  left: 4px;
  top: 26px;
  transform: rotate(-16deg);
  animation-delay: -1s;
}

.fan-card--2 {
  left: 86px;
  top: 0;
  z-index: 2;
  transform: rotate(3deg);
}

.fan-card--3 {
  left: 168px;
  top: 28px;
  transform: rotate(17deg);
  animation-delay: -3.4s;
}

@keyframes fanFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

.hero-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 18px;
  line-height: 0.86;
}

.hero-title__uno {
  font-family: var(--font-display);
  font-size: clamp(68px, 11vw, 132px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.055em;
  color: #fff;
  text-shadow:
    0 6px 0 var(--uno-red),
    0 10px 0 rgba(150, 20, 24, 0.55),
    0 24px 60px rgba(229, 53, 45, 0.35);
}

.hero-title__cn {
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.lead {
  margin: 0 0 26px;
  max-width: 480px;
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.85;
  color: #b8c0d8;
}

.home__name {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(460px, 100%);
  margin: 0 0 16px;
}

.home__name label {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.input--name {
  height: 48px;
  background: rgba(255, 255, 255, 0.055);
}

.home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.home__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home__chips li {
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11.5px;
  color: var(--muted);
}

.home__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps {
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #c3cadf;
}

.steps li span {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  margin-top: 1px;
}

.mini-tags {
  display: flex;
  gap: 6px;
}

.mini-tags span {
  padding: 4px 9px;
  border-radius: 20px;
  background: rgba(244, 196, 48, 0.1);
  border: 1px solid rgba(244, 196, 48, 0.22);
  color: #f5d67c;
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   大厅
   -------------------------------------------------------------------------- */
.lobby {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 30px) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.lobby__main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.lobby__side {
  position: sticky;
  top: 84px;
}

.room-card {
  display: flex;
  gap: clamp(20px, 4vw, 46px);
  justify-content: space-between;
  flex-wrap: wrap;
  overflow: hidden;
}

.room-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.28), transparent 68%);
  pointer-events: none;
}

.room-card__left {
  min-width: 220px;
}

.room-code {
  display: flex;
  align-items: center;
  gap: 14px;
}

.room-code strong {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.6vw, 58px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.1em;
  line-height: 1;
  background: linear-gradient(120deg, #ffffff 10%, #ffd6d2 55%, #ffb3ad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 18px rgba(229, 53, 45, 0.22));
}

.room-code .icon-btn {
  flex: 0 0 auto;
}

.room-card__right {
  flex: 1 1 280px;
  max-width: 430px;
  padding-top: 4px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.copy-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.copy-row .btn {
  flex: 0 0 auto;
  height: 40px;
}

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

.player-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  min-height: 64px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.player-row.is-you {
  border-color: rgba(168, 188, 255, 0.32);
  background: rgba(120, 150, 255, 0.08);
}

.player-row.is-host {
  border-color: rgba(244, 196, 48, 0.24);
}

.player-row__body {
  min-width: 0;
  flex: 1;
}

.player-row__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-row__name .crown {
  color: var(--yellow);
  font-size: 12px;
}

.player-row__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

.player-row__actions {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.mini-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-2);
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.mini-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mini-icon--danger:hover {
  background: rgba(229, 53, 45, 0.16);
  color: #ff8f87;
}

.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #6a8cff, #9a5cf5);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2), 0 6px 14px rgba(0, 0, 0, 0.24);
  text-transform: uppercase;
}

.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar--xs {
  width: 26px;
  height: 26px;
  font-size: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.lobby__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.lobby__footer .hint {
  flex: 1;
  min-width: 180px;
}

.empty-seat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 64px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--muted-2);
  font-size: 12px;
}

/* 设置 */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
}

.field__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.segmented button {
  padding: 8px 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented button.is-active {
  background: #f7f8ff;
  color: #171a29;
}

.segmented button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.switch {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch__track {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 23px;
  margin-top: 1px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.18s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.switch input:checked + .switch__track {
  background: var(--green);
}

.switch input:checked + .switch__track::after {
  transform: translateX(17px);
}

.switch input:focus-visible + .switch__track {
  box-shadow: 0 0 0 3px rgba(120, 150, 255, 0.25);
}

.switch input:disabled + .switch__track {
  opacity: 0.4;
}

.switch__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch__text b {
  font-size: 13.5px;
  font-weight: 700;
}

.switch__text small {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.rules-note {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid rgba(244, 196, 48, 0.18);
  background: rgba(244, 196, 48, 0.06);
}

.rules-note span {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #e7c66a;
}

.rules-note p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #c6b88c;
}

/* --------------------------------------------------------------------------
   牌桌
   -------------------------------------------------------------------------- */
.view--table {
  padding: 10px clamp(9px, 2vw, 22px) 12px;
  min-height: calc(100vh - 64px);
}

.table-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 308px;
  gap: 12px;
  height: calc(100vh - 86px);
  min-height: 480px;
}

.arena {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 0;
}

.opponents {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  flex: 0 0 auto;
}

.opponent {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 6px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(20, 24, 40, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.opponent.is-turn {
  border-color: rgba(255, 209, 102, 0.75);
  background: rgba(52, 42, 20, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.3), 0 0 26px rgba(255, 209, 102, 0.16);
}

.opponent.is-turn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 209, 102, 0.7);
  animation: turnPulse 1.9s ease-out infinite;
  pointer-events: none;
}

@keyframes turnPulse {
  0% { opacity: 0.9; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.06); }
  100% { opacity: 0; }
}

.opponent .avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.opponent__body {
  min-width: 0;
}

.opponent__name {
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 700;
}

.opponent__sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.count-cards {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.count-cards::before {
  content: "";
  width: 7px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(160deg, #fff, #c9cde0);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.uno-tag {
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--uno-red);
  color: #fff;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.04em;
  transform: rotate(6deg);
  box-shadow: 0 4px 10px rgba(229, 53, 45, 0.45);
}

.opponent.is-offline {
  opacity: 0.55;
}

.opponent__host {
  color: var(--yellow);
  font-size: 10px;
}

/* 牌桌中央 */
.board {
  position: relative;
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 6vw, 80px);
}

.board::before {
  content: "";
  position: absolute;
  width: min(900px, 92%);
  aspect-ratio: 2.5 / 1;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(47, 92, 118, 0.28), rgba(11, 18, 30, 0.12) 58%, transparent 74%);
  border: 1px solid rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 0;
}

.board::after {
  content: "";
  position: absolute;
  width: min(760px, 80%);
  aspect-ratio: 2.4 / 1;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.055);
  pointer-events: none;
  z-index: 0;
}

.turn-chip {
  position: absolute;
  top: 6px;
  left: 50%;
  z-index: 6;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 18, 31, 0.72);
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.turn-chip.is-me {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.32);
  background: rgba(52, 42, 20, 0.72);
}

.turn-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: turnDot 1.6s ease-in-out infinite;
}

@keyframes turnDot {
  0%, 100% { opacity: 0.45; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.12); }
}

.board__round {
  position: absolute;
  top: 4px;
  left: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.5;
}

.board__round b {
  color: #cfd6ea;
  font-weight: 700;
}

.piles {
  display: flex;
  align-items: center;
  gap: clamp(20px, 5vw, 58px);
}

.pile-wrap {
  --pile-card: clamp(92px, 10vw, 136px);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pile-wrap::before,
.pile-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  width: var(--pile-card, clamp(80px, 9vw, 116px));
  aspect-ratio: 5 / 7.4;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d1120;
  z-index: 0;
  pointer-events: none;
}

.pile-wrap::before {
  transform: rotate(-7deg) translate(-3px, 2px);
}

.pile-wrap::after {
  transform: rotate(6deg) translate(4px, 1px);
}

.pile {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  border-radius: 14px;
}

.deck {
  transition: transform 0.18s ease, filter 0.18s ease;
}

.deck .card {
  --cw: clamp(92px, 10vw, 136px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.42);
}

.deck:hover {
  transform: translateY(-5px);
}

.deck.is-ready .card {
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.85), 0 18px 38px rgba(255, 209, 102, 0.2);
}

.deck.is-disabled {
  filter: saturate(0.5) brightness(0.72);
  cursor: not-allowed;
  transform: none;
}

.deck__count {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 4;
  min-width: 29px;
  height: 29px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #f7f8ff;
  color: #151827;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.32);
}

.deck__label {
  display: block;
  margin-top: 7px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.discard {
  --cw: clamp(96px, 10.6vw, 142px);
  position: relative;
  z-index: 2;
  width: var(--cw);
  aspect-ratio: 5 / 7.4;
}

.discard::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow, rgba(255, 255, 255, 0.12)) 0%, transparent 66%);
  opacity: 0.28;
  filter: blur(10px);
  pointer-events: none;
}

.discard .card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-width: 3px;
  border-radius: 12px;
}

.discard .card.is-top {
  animation: discardPop 0.28s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}

@keyframes discardPop {
  from { transform: scale(0.86) rotate(-8deg); opacity: 0.4; }
  to { transform: scale(1) rotate(-2deg); opacity: 1; }
}

.discard .card.is-top {
  transform: rotate(-2deg);
}

.discard .card.behind-1 {
  transform: rotate(7deg) translate(3px, 2px);
  filter: brightness(0.72);
}

.discard .card.behind-2 {
  transform: rotate(-9deg) translate(-3px, -1px);
  filter: brightness(0.5);
}

.color-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(15, 19, 32, 0.8);
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.color-chip__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--chip, #9aa3be);
  box-shadow: 0 0 10px var(--chip, transparent);
}

.color-chip b {
  color: #fff;
  font-weight: 700;
}

.board__side {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.dir-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(15, 19, 32, 0.75);
  font-size: 10.5px;
  color: var(--muted);
}

.dir-chip__icon {
  font-size: 15px;
  line-height: 1;
  color: #cfd6ea;
  display: inline-block;
  transition: transform 0.3s ease;
}

.dir-chip.is-reverse .dir-chip__icon {
  transform: rotate(180deg);
}

.mini-stat {
  font-size: 10px;
  color: var(--muted-2);
  text-align: right;
  line-height: 1.5;
}

/* 提示条 */
.banners {
  position: absolute;
  top: auto;
  bottom: 2px;
  left: 50%;
  z-index: 30;
  width: min(600px, 94%);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}

.banner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(17, 21, 35, 0.94);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: bannerIn 0.24s ease both;
}

@keyframes bannerIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.banner__icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 900;
}

.banner__text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #d7ddef;
}

.banner__text b {
  color: #fff;
}

.banner__sub {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--muted);
}

.banner__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
}

.banner__actions .btn {
  padding: 6px 11px;
  font-size: 11.5px;
  border-radius: 9px;
}

.banner--warn {
  border-color: rgba(244, 196, 48, 0.35);
  background: linear-gradient(180deg, rgba(58, 45, 16, 0.96), rgba(27, 24, 15, 0.96));
}

.banner--warn .banner__icon {
  background: rgba(244, 196, 48, 0.18);
  color: #f5d67c;
}

.banner--danger {
  border-color: rgba(229, 53, 45, 0.4);
  background: linear-gradient(180deg, rgba(63, 20, 24, 0.96), rgba(28, 15, 18, 0.96));
}

.banner--danger .banner__icon {
  background: rgba(229, 53, 45, 0.2);
  color: #ff9d96;
}

.banner--info {
  border-color: rgba(120, 150, 255, 0.28);
}

.banner--info .banner__icon {
  background: rgba(120, 150, 255, 0.14);
  color: #aebfff;
}

.banner__timer {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-top: 5px;
}

.banner__timer span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #f4c430;
  transform-origin: left;
  animation: timerBar linear both;
}

@keyframes timerBar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* 手牌区 */
.hand-zone {
  position: relative;
  flex: 0 0 auto;
  padding: 9px 13px 7px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(27, 32, 52, 0.82), rgba(12, 15, 27, 0.94));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hand-zone.is-my-turn {
  border-color: rgba(255, 209, 102, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.1), 0 -12px 40px rgba(0, 0, 0, 0.22);
}

.hand-zone.is-my-turn {
  border-color: rgba(255, 209, 102, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.1), 0 -12px 40px rgba(0, 0, 0, 0.22);
}

.hand-zone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

.hand-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.hand-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.hand-title .eyebrow {
  margin: 0;
}

.hand-title strong {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.hand-title__hint {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hand-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.hand-tools .btn {
  padding: 7px 13px;
  font-size: 12px;
  border-radius: 10px;
  height: 36px;
}

.uno-btn {
  position: relative;
  width: 58px;
  height: 58px;
  margin-top: -18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid #fff;
  background: radial-gradient(circle at 32% 28%, #ff7268, #d92727 68%, #a81a20);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  transform: rotate(-8deg);
  box-shadow: 0 12px 26px rgba(217, 39, 39, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.uno-btn:hover {
  transform: rotate(-3deg) scale(1.06);
}

.uno-btn.is-armed {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 14px 30px rgba(217, 39, 39, 0.6);
}

.uno-btn.is-live {
  animation: unoPulse 0.9s ease-in-out infinite;
}

@keyframes unoPulse {
  0%, 100% { transform: rotate(-8deg) scale(1); box-shadow: 0 0 0 0 rgba(229, 53, 45, 0.55), 0 12px 26px rgba(217, 39, 39, 0.45); }
  50% { transform: rotate(-4deg) scale(1.07); box-shadow: 0 0 0 10px rgba(229, 53, 45, 0), 0 16px 32px rgba(217, 39, 39, 0.6); }
}

.hand-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 30px 4px 4px;
  margin-top: -27px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.hand {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 128px;
  padding: 0 6px;
  width: max-content;
  margin: 0 auto;
}

.hand .card {
  --cw: clamp(62px, 6.1vw, 88px);
  margin-left: calc(-1 * var(--overlap, 16px));
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.2, 0.9, 0.4, 1.2), box-shadow 0.16s ease, filter 0.16s ease;
  will-change: transform;
}

.hand .card:first-child {
  margin-left: 0;
}

.hand .card:hover {
  transform: translateY(-18px) rotate(-1deg);
  z-index: 6;
  box-shadow: 0 22px 34px rgba(0, 0, 0, 0.45);
}

.hand .card.is-playable {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), 0 0 0 1.5px rgba(255, 255, 255, 0.34);
}

.hand .card.is-playable::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.hand .card.is-muted {
  filter: saturate(0.55) brightness(0.7);
  opacity: 0.82;
  cursor: not-allowed;
}

.hand .card.is-muted:hover {
  transform: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}

.hand-tip {
  margin: 4px 2px 0;
  min-height: 16px;
  font-size: 11.5px;
  text-align: center;
  color: var(--muted);
}

.hand-tip b {
  color: #ffd166;
}

.hand-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 108px;
  color: var(--muted-2);
  font-size: 12px;
}

/* 侧栏 */
.side-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(15, 19, 32, 0.78);
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.side-scrim {
  display: none;
}

.side-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px 7px 0;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.side-tabs button {
  flex: 1;
  padding: 9px 4px;
  border: 0;
  border-radius: 9px 9px 0 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease;
}

.side-tabs button.is-active {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.side-tabs .side-close {
  display: none;
  flex: 0 0 auto;
  width: 34px;
  font-size: 18px;
}

.side-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 14px;
}

.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.log-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}

.log-item.is-new {
  animation: logIn 0.2s ease both;
}

@keyframes logIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.log-item:last-child {
  border-bottom: 0;
}

.log-item__dot {
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.log-item[data-kind="play"] .log-item__dot { background: var(--blue); }
.log-item[data-kind="draw"] .log-item__dot { background: var(--yellow); }
.log-item[data-kind="action"] .log-item__dot { background: #9a6cf5; }
.log-item[data-kind="uno"] .log-item__dot { background: var(--uno-red); }
.log-item[data-kind="win"] .log-item__dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.log-item[data-kind="warn"] .log-item__dot { background: #ff9d3d; }

.log-item__msg {
  font-size: 12px;
  line-height: 1.55;
  color: #c6cde0;
  word-break: break-word;
}

.log-item__msg b {
  color: #fff;
}

.log-item__time {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  color: var(--muted-2);
  opacity: 0.75;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 6px;
  border-radius: 11px;
  border: 1px solid transparent;
}

.player-line.is-turn {
  background: rgba(255, 209, 102, 0.08);
  border-color: rgba(255, 209, 102, 0.2);
}

.player-line__body {
  flex: 1;
  min-width: 0;
}

.player-line__name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-line__meta {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 8px;
}

.player-line__score {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.player-line__score small {
  font-size: 9px;
  color: var(--muted-2);
  font-weight: 600;
}

.player-line__btns {
  display: flex;
  gap: 2px;
}

.side-empty {
  padding: 24px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
}

.side-section-title {
  margin: 12px 4px 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   UNO 卡牌
   -------------------------------------------------------------------------- */
.card {
  --cw: 92px;
  --card-bg: #e63946;
  --card-ink: #d32222;
  display: block;
  position: relative;
  flex: 0 0 auto;
  width: var(--cw);
  aspect-ratio: 5 / 7.4;
  border-radius: calc(var(--cw) * 0.105);
  border: clamp(2px, calc(var(--cw) * 0.04), 4px) solid #fff;
  background: var(--card-bg);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
}

.card[data-color="r"] { --card-bg: #e63b3b; --card-ink: #d32222; }
.card[data-color="y"] { --card-bg: #f7c531; --card-ink: #c99400; }
.card[data-color="g"] { --card-bg: #2fae62; --card-ink: #1d8a49; }
.card[data-color="b"] { --card-bg: #2f7ce0; --card-ink: #1f5fc4; }
.card[data-color="w"] { --card-bg: #15161d; --card-ink: #ffffff; }

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 38%, rgba(0, 0, 0, 0.08));
  pointer-events: none;
}

.card__oval {
  position: absolute;
  inset: 8% 7%;
  z-index: 1;
  border-radius: 50% / 42%;
  background: #fff;
  transform: rotate(-22deg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.card__center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: calc(var(--cw) * 0.4);
  font-weight: 900;
  line-height: 1;
  color: var(--card-ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  letter-spacing: -0.03em;
}

.card__center svg {
  width: 72%;
  height: 72%;
}

.card__center--text {
  font-size: calc(var(--cw) * 0.2);
  letter-spacing: 0.01em;
}

.card__corner {
  position: absolute;
  z-index: 3;
  font-family: var(--font-display);
  font-size: calc(var(--cw) * 0.135);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.card__corner--tl {
  top: 5%;
  left: 8%;
}

.card__corner--br {
  right: 8%;
  bottom: 5%;
  transform: rotate(180deg);
}

.card[data-color="w"] .card__oval {
  background: conic-gradient(from 40deg, #e63b3b 0 25%, #f7c531 0 50%, #2fae62 0 75%, #2f7ce0 0 100%);
}

.card[data-color="w"] .card__center {
  color: #fff;
  font-size: calc(var(--cw) * 0.19);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 14px rgba(0, 0, 0, 0.5);
}

.card[data-color="w"][data-v="wild4"] .card__center {
  font-size: calc(var(--cw) * 0.34);
}

.card[data-color="w"] .card__corner {
  color: #fff;
}

.card--back {
  --card-bg: #101018;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 8px, transparent 8px 16px),
    #101018;
}

.card--back .card__oval {
  background: #e5352d;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.card__back-logo {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: calc(var(--cw) * 0.19);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  transform: rotate(-20deg);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

  /* 卡面图案靠 JS 注入 SVG；此处只保留尺寸 */
.card__icon {
  width: 76%;
  height: 76%;
}

/* --------------------------------------------------------------------------
   结果弹窗
   -------------------------------------------------------------------------- */
.modal-layer {
  pointer-events: auto;
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.modal-layer.is-in {
  opacity: 1;
}

.modal {
  position: relative;
  width: min(500px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: clamp(20px, 4vw, 32px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(172deg, #1a2036, #111524 70%);
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.2, 1, 0.3, 1);
}

.modal-layer.is-in .modal {
  transform: none;
}

.modal--wide {
  width: min(760px, 100%);
}

.modal h2 {
  margin: 0 0 8px;
  font-size: clamp(21px, 3vw, 26px);
  line-height: 1.3;
}

.modal__lead {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.modal__actions .btn {
  flex: 1 1 auto;
}

.modal__close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 18px;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.form-field label {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.code-input {
  height: 58px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
}

.form-error {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  color: #ff8f87;
}

/* 颜色选择 */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0 8px;
}

.color-choice {
  position: relative;
  height: 86px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: var(--choice);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.color-choice:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.color-choice[data-color="r"] { --choice: linear-gradient(135deg, #ff6a5e, #c81f28); }
.color-choice[data-color="y"] { --choice: linear-gradient(135deg, #ffd95c, #d19a00); color: #2b2100; }
.color-choice[data-color="g"] { --choice: linear-gradient(135deg, #55d788, #1c8a48); }
.color-choice[data-color="b"] { --choice: linear-gradient(135deg, #63a2ff, #1f5abc); }

/* 结果 */
.result-head {
  position: relative;
  padding: 4px 0 18px;
  text-align: center;
}

.result-head::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 80px;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.result-head .eyebrow {
  margin-bottom: 8px;
}

.result-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.2;
}

.result-title em {
  font-style: normal;
  color: #ffd166;
}

.result-points {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.result-points b {
  color: var(--green);
  font-size: 18px;
}

.score-table {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 18px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) minmax(104px, 1fr) minmax(64px, 0.6fr) minmax(96px, 0.9fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.score-row.is-winner {
  background: linear-gradient(90deg, rgba(244, 196, 48, 0.16), rgba(244, 196, 48, 0.04));
  border: 1px solid rgba(244, 196, 48, 0.24);
}

.score-row__player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.score-row__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.score-row__idx {
  font-size: 9px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.score-row__cards {
  display: flex;
  gap: 0;
  align-items: center;
  min-height: 22px;
}

.mini-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 26px;
  margin-left: -5px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: var(--mini, #444);
  color: var(--mini-ink, #fff);
  font-size: 8px;
  font-weight: 800;
  transform: rotate(var(--r, 0deg));
}

.mini-card:first-child {
  margin-left: 0;
}

.mini-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.score-row__lost {
  color: #ff9d96;
  font-variant-numeric: tabular-nums;
}

.score-row__total {
  text-align: right;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.score-row__total small {
  font-size: 9px;
  color: var(--muted-2);
  font-weight: 600;
}

.score-row__total-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.progress {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green), #8ee2a9);
}

.match-banner {
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
  background: radial-gradient(circle at 50% 0, rgba(244, 196, 48, 0.2), rgba(244, 196, 48, 0.04));
  border: 1px solid rgba(244, 196, 48, 0.3);
}

.match-banner b {
  display: block;
  font-size: 18px;
  color: #ffd166;
  margin-bottom: 4px;
}

.match-banner span {
  font-size: 12px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   本机同屏交接页
   -------------------------------------------------------------------------- */
.local-cover {
  pointer-events: auto;
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(600px 400px at 50% 20%, rgba(47, 124, 224, 0.18), transparent 70%),
    rgba(5, 8, 16, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.local-cover.is-in {
  opacity: 1;
}

.local-cover__panel {
  width: min(430px, 100%);
  text-align: center;
  padding: 32px 26px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(170deg, rgba(31, 37, 60, 0.96), rgba(14, 18, 32, 0.98));
  box-shadow: var(--shadow-lg);
}

.local-cover__eyes {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 14px;
  animation: coverBlink 4s infinite;
}

@keyframes coverBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.15); }
}

.local-cover__panel h2 {
  margin: 0 0 10px;
  font-size: clamp(21px, 4vw, 28px);
  line-height: 1.35;
}

.local-cover__panel h2 em {
  font-style: normal;
  color: #ffd166;
}

.local-cover__panel p {
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.local-cover__name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Toast / 彩带 / 空状态
   -------------------------------------------------------------------------- */
.toast-root {
  position: fixed;
  top: 76px;
  right: 22px;
  z-index: 130;
  width: min(380px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  pointer-events: none;
}

.toast {
  padding: 11px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(23, 28, 46, 0.97);
  color: #eef1ff;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.22s ease both, toastOut 0.3s ease 3.2s forwards;
}

.toast--error {
  border-color: rgba(229, 53, 45, 0.45);
  background: rgba(56, 20, 24, 0.97);
  color: #ffd1ce;
}

.toast--success {
  border-color: rgba(47, 174, 98, 0.45);
  background: rgba(18, 48, 32, 0.97);
  color: #c9f7d9;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(6px); }
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translate3d(var(--dx, 0), 110vh, 0) rotate(var(--rot, 720deg));
    opacity: 0.9;
  }
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0b0e18;
  color: #fff;
  z-index: 999;
}

/* --------------------------------------------------------------------------
   规则弹窗
   -------------------------------------------------------------------------- */
.rules {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rules h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #ffd166;
}

.rules p,
.rules li {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: #b9c1d8;
}

.rules ul {
  margin: 6px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rules b {
  color: #eef1ff;
}

.rules .rule-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.rule-pill {
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 11px;
  color: #dfe4f5;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .home {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .home__side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lobby {
    grid-template-columns: minmax(0, 1fr);
  }

  .lobby__side {
    position: static;
  }

  .table-layout {
    grid-template-columns: minmax(0, 1fr) 272px;
  }
}

@media (max-width: 900px) {
  .table-layout {
    grid-template-columns: minmax(0, 1fr);
    height: calc(100dvh - 82px);
  }

  .side-panel {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    z-index: 70;
    width: min(350px, 90vw);
    border-radius: 18px 0 0 0;
    transform: translateX(103%);
    transition: transform 0.24s cubic-bezier(0.2, 1, 0.3, 1);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.4);
  }

  .side-panel.is-open {
    transform: none;
  }

  .side-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(4, 6, 12, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .side-scrim.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .side-tabs .side-close {
    display: block;
  }

  .board__side {
    right: 2px;
    bottom: 0;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 56px;
    gap: 10px;
    padding: 0 12px;
  }

  .topbar__meta {
    overflow: hidden;
  }

  .topbar__meta .tag {
    display: none;
  }

  .room-pill {
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .topbar__actions {
    gap: 5px;
  }

  .topbar__actions .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .topbar__actions .btn--sm {
    height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .brand__mark {
    width: 40px;
    height: 27px;
  }

  .brand__mark span {
    font-size: 11px;
  }

  .brand__text {
    display: none;
  }

  .view {
    min-height: calc(100vh - 56px);
  }

  .home {
    min-height: calc(100vh - 56px);
    padding: 22px 16px 40px;
  }

  .home__side {
    grid-template-columns: minmax(0, 1fr);
  }

  .deck-fan {
    transform: scale(0.85);
    transform-origin: left top;
    height: 148px;
    margin-bottom: 2px;
  }

  .hero-title {
    gap: 10px;
  }

  .hero-title__uno {
    text-shadow: 0 4px 0 var(--uno-red), 0 8px 0 rgba(150, 20, 24, 0.5), 0 18px 40px rgba(229, 53, 45, 0.3);
  }

  .home__name {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .home__actions .btn {
    flex: 1 1 46%;
    padding: 13px 12px;
    font-size: 14px;
  }

  .home__actions .btn--ghost {
    flex-basis: 100%;
  }

  .lobby {
    padding: 14px 12px 30px;
  }

  .panel {
    padding: 17px;
    border-radius: 18px;
  }

  .player-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .room-code strong {
    font-size: 38px;
  }

  .view--table {
    padding: 6px 7px 8px;
    min-height: 0;
  }

  .table-layout {
    height: calc(100dvh - 68px);
    min-height: 420px;
    gap: 6px;
  }

  .arena {
    gap: 3px;
  }

  .opponents {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 3px 2px;
    scrollbar-width: none;
  }

  .opponents::-webkit-scrollbar {
    display: none;
  }

  .opponent {
    padding: 4px 9px 4px 4px;
    gap: 6px;
    border-radius: 13px;
    flex: 0 0 auto;
  }

  .opponent .avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .opponent__name {
    max-width: 76px;
    font-size: 11.5px;
  }

  .opponent__sub {
    font-size: 9.5px;
  }

  .board {
    min-height: 150px;
    gap: 14px;
  }

  .board::before {
    width: 100%;
    aspect-ratio: 1.9 / 1;
  }

  .board::after {
    width: 92%;
    aspect-ratio: 1.8 / 1;
  }

  .turn-chip {
    top: 4px;
    display: inline-flex;
    padding: 5px 10px;
    font-size: 10.5px;
  }

  .board__side {
    display: none;
  }

  .board__round {
    top: 2px;
    left: 2px;
    gap: 1px;
    font-size: 9px;
  }

  .pile-wrap::before,
  .pile-wrap::after {
    width: var(--pile-card, 74px);
  }

  .pile-wrap {
    --pile-card: clamp(68px, 18vw, 86px);
  }

  .deck .card {
    --cw: clamp(68px, 18vw, 86px);
  }

  .discard {
    --cw: clamp(72px, 19vw, 94px);
    width: var(--cw);
  }

  .piles {
    gap: clamp(16px, 8vw, 40px);
  }

  .color-chip {
    margin-top: 7px;
    font-size: 9.5px;
    padding: 3px 8px;
  }

  .banners {
    top: 0;
    bottom: auto;
    width: 100%;
  }

  .banner {
    padding: 7px 9px;
    gap: 8px;
    border-radius: 11px;
  }

  .banner__icon {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .banner__text {
    font-size: 11.5px;
  }

  .banner__sub {
    font-size: 9.5px;
  }

  .banner__actions .btn {
    padding: 5px 8px;
    font-size: 10.5px;
  }

  .hand-zone {
    padding: 7px 8px 5px;
    border-radius: 16px;
  }

  .hand-head {
    align-items: center;
  }

  .hand-title .eyebrow,
  .hand-title__hint {
    display: none;
  }

  .hand-title strong {
    font-size: 14px;
  }

  .hand-title strong::after {
    content: " 张";
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
  }

  .hand-tools {
    gap: 5px;
  }

  .hand-tools .btn {
    height: 31px;
    padding: 5px 9px;
    font-size: 11px;
  }

  .uno-btn {
    width: 48px;
    height: 48px;
    font-size: 13px;
    margin-top: -12px;
  }

  .hand-scroll {
    padding-top: 24px;
    padding-bottom: 9px;
    margin-top: -22px;
  }

  .hand {
    min-height: 92px;
    justify-content: flex-start;
    padding: 0 2px 10px;
  }

  .hand .card {
    --cw: clamp(54px, 15.4vw, 68px);
  }

  .hand .card:hover {
    transform: translateY(-10px);
  }

  .hand-tip {
    font-size: 10.5px;
    margin-top: 2px;
  }

  .side-panel {
    top: 56px;
    background: #0d1220;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5);
  }

  .side-scrim {
    display: block;
  }

  .toast-root {
    top: 68px;
    right: 10px;
    bottom: auto;
    width: min(360px, calc(100vw - 20px));
  }
}

@media (max-width: 560px) {
  .score-row {
    grid-template-columns: minmax(90px, 1.2fr) minmax(44px, 0.6fr) minmax(60px, 0.7fr);
    row-gap: 2px;
  }

  .score-head .score-row__idx:last-child {
    display: none;
  }

  .score-row__total-wrap {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .score-row__total-wrap .progress {
    flex: 1 1 auto;
    width: auto;
  }

  .score-row__total {
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .hero-title__uno {
    font-size: 64px;
  }

  .hero-title__cn {
    font-size: 16px;
    letter-spacing: 0.14em;
  }

  .home__actions .btn {
    flex-basis: 100%;
  }

  .home__chips li {
    font-size: 10.5px;
  }

  .modal__actions .btn {
    flex-basis: 100%;
  }
}

@media (max-height: 560px) {
  body.is-table:not(.has-overlay) {
    overflow: auto;
  }

  .view--table {
    min-height: 0;
  }

  .table-layout {
    height: auto;
    min-height: 0;
  }

  .board {
    flex: 0 0 auto;
    min-height: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
