/* =========================================================
   私密房间、密码弹窗、横屏引导、看牌定缺
   ========================================================= */

.rooms-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rooms-header-left .icon-button {
  color: var(--text-soft);
}

.rooms-header-left button.brand-lockup {
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.rooms-header-left button.brand-lockup:hover .brand-seal {
  transform: translateY(-1px);
}

.rooms-header-left button.brand-lockup:focus-visible {
  outline: 2px solid rgba(176, 58, 46, 0.55);
  outline-offset: 4px;
  border-radius: 12px;
}

.rooms-header-left .brand-seal {
  transition: transform 0.18s ease;
}

.room-main {
  padding-top: clamp(10px, 1.5vw, 18px);
}

.rooms-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.rooms-intro h1 {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.6vw, 58px);
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.1;
}

.rooms-intro p {
  margin-top: 11px;
  max-width: 650px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.8;
}

.rooms-intro .eyebrow {
  color: var(--vermilion);
}

.rooms-intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.rooms-intro-actions .btn {
  min-height: 44px;
  border-radius: 12px;
}

.room-refresh {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--line);
}

.room-refresh:hover {
  background: rgba(255, 255, 255, 0.7);
}

.rooms-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.room-list-panel {
  min-height: 300px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(188, 167, 127, 0.55);
  background: rgba(255, 252, 244, 0.64);
  box-shadow: var(--shadow-soft);
}

.room-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(188, 167, 127, 0.35);
}

.room-list-head h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
}

.room-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(47, 118, 96, 0.1);
  color: #2b6d55;
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 13px;
}

.room-list-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 14px;
  text-align: left;
  border: 1px solid rgba(188, 167, 127, 0.38);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.34);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.room-list-item:hover {
  border-color: rgba(183, 66, 52, 0.4);
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.room-list-item.is-full {
  opacity: 0.55;
  cursor: default;
}

.room-list-item.is-full:hover {
  border-color: rgba(188, 167, 127, 0.38);
  background: rgba(255, 255, 255, 0.34);
  transform: none;
}

.room-list-item.is-full .room-list-join {
  background: rgba(28, 45, 39, 0.06);
  color: var(--muted);
}

.room-lock {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: rgba(47, 118, 96, 0.09);
  color: #326d56;
}

.room-lock .icon {
  width: 17px;
  height: 17px;
}

.room-list-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.room-list-code {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.room-list-host {
  font-size: 10px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.room-list-guest {
  color: #2b6d55;
  font-weight: 800;
}

.guest-mode-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 340px;
  padding: 8px 12px;
  border: 1px solid rgba(47, 118, 96, 0.18);
  border-radius: 999px;
  color: #2b6d55;
  background: rgba(47, 118, 96, 0.07);
  font-size: 9px;
  line-height: 1.45;
}

.guest-mode-note .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.room-list-join {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  height: 31px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(183, 66, 52, 0.08);
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 700;
}

.rooms-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 20px 46px;
  gap: 8px;
}

.rooms-empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: rgba(47, 118, 96, 0.08);
  color: var(--jade);
}

.rooms-empty strong {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}

.rooms-empty p {
  max-width: 320px;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.7;
}

.rooms-empty .btn {
  margin-top: 10px;
}

.rooms-aside {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  color: var(--paper);
  background:
    radial-gradient(circle at 94% 8%, rgba(90, 151, 121, 0.34), transparent 42%),
    linear-gradient(145deg, #174b3d, #0c2c23);
  box-shadow: var(--shadow-soft);
}

.rooms-aside::after {
  content: "鎖";
  position: absolute;
  right: -6px;
  bottom: -42px;
  font-family: var(--font-serif);
  font-size: 150px;
  color: rgba(231, 209, 154, 0.055);
  pointer-events: none;
}

.rooms-aside .eyebrow {
  color: var(--gold-light);
  font-size: 9px;
}

.rooms-aside h3 {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
}

.rooms-aside p {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  color: rgba(246, 237, 219, 0.58);
  font-size: 10px;
  line-height: 1.8;
}

.rooms-aside .btn {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  min-height: 43px;
  border-radius: 11px;
}

.rooms-rule-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid rgba(231, 209, 154, 0.14);
  color: rgba(246, 237, 219, 0.46);
  font-size: 9px;
  line-height: 1.65;
}

.rooms-rule-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex: 0 0 auto;
  color: var(--gold);
}

/* 我的房间 */
.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.room-intro {
  align-items: flex-start;
}

.room-intro-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  width: 100%;
}

.room-intro-heading {
  --title-size: clamp(32px, 3.8vw, 44px);
  --title-line: calc(var(--title-size) * 1.1);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-width: 0;
  width: 100%;
}

.room-intro-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.room-intro-actions .btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 11px;
}

.room-intro-actions .btn .icon {
  width: 15px;
  height: 15px;
}

.room-intro-main .room-intro-desc {
  margin-top: 0;
}

.room-supported {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0;
}

.room-supported-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  row-gap: 4px;
  align-items: stretch;
  min-width: 0;
}

.room-supported-chip {
  display: inline-flex;
  align-items: center;
  margin-left: -1px;
  padding: 3px 6px;
  border: 1px solid rgba(188, 167, 127, 0.42);
  border-radius: 99px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}
.room-supported-empty {.room-supported-chip
  color: var(--muted);.room-supported-chip
  font-size: 9px;
  line-height: 22px;
}

.room-card {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 26px;
  color: var(--paper);
  background:
    radial-gradient(circle at 84% 8%, rgba(86, 145, 114, 0.28), transparent 34%),
    linear-gradient(145deg, #184d3e 0%, #0d3329 56%, #09271f 100%);
  box-shadow: 0 24px 60px rgba(18, 47, 38, 0.22);
}

.room-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px solid rgba(231, 209, 154, 0.12);
  pointer-events: none;
}

.room-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.room-code-label {
  display: block;
  color: rgba(246, 237, 219, 0.44);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.room-code-value {
  display: block;
  margin-top: 5px;
  font-family: var(--font-num);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  line-height: 1;
}

.room-head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.room-head-meta .chip {
  color: rgba(246, 237, 219, 0.66);
  border-color: rgba(231, 209, 154, 0.17);
  background: rgba(255, 255, 255, 0.045);
}

.room-head-meta .chip .icon {
  width: 12px;
  height: 12px;
}

.room-head-meta .room-password-chip {
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.room-head-meta .room-password-chip:hover {
  color: var(--gold-light);
  border-color: rgba(231, 209, 154, 0.42);
  background: rgba(255, 255, 255, 0.1);
}

.room-head-meta .room-password-chip:focus-visible {
  outline: 2px solid rgba(231, 209, 154, 0.72);
  outline-offset: 2px;
}

.room-head-meta .room-password-chip .icon:last-child {
  width: 11px;
  height: 11px;
  opacity: 0.68;
}

.room-seats {
  --seat-size: clamp(140px, 13vw, 170px);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, var(--seat-size));
  grid-template-rows: repeat(3, var(--seat-size));
  grid-template-areas:
    ". opposite ."
    "left center right"
    ". self .";
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 24px auto 18px;
}

/* 等待房间的牌桌中央：一盏暖灯和两颗骰子 */
.room-table-center {
  grid-area: center;
  align-self: center;
  justify-self: center;
  position: relative;
  z-index: 2;
  width: clamp(64px, 7.6vw, 96px);
  aspect-ratio: 1;
  border: 1px dashed rgba(231, 209, 154, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 229, 170, 0.2), transparent 46%),
    radial-gradient(circle at 50% 62%, rgba(198, 162, 92, 0.13), rgba(5, 26, 21, 0.18) 74%);
  box-shadow: inset 0 0 0 7px rgba(5, 26, 21, 0.16);
  pointer-events: none;
}

.room-table-center::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 24%;
  width: 70%;
  height: 48%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0, rgba(255, 225, 160, 0.28), transparent 72%);
  clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
  opacity: 0.8;
  z-index: 1;
}

.room-table-center::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 66%;
  height: 16%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 222, 150, 0.3), transparent 70%);
  filter: blur(1px);
  z-index: 0;
}

.room-table-lamp {
  position: absolute;
  left: 50%;
  top: 12%;
  width: clamp(22px, 2.4vw, 30px);
  height: clamp(14px, 1.55vw, 19px);
  transform: translateX(-50%);
  z-index: 3;
}

.room-table-lamp::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 1px;
  height: clamp(8px, 1vw, 12px);
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(231, 209, 154, 0.08), rgba(231, 209, 154, 0.62));
}

.room-table-lamp::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, #f8e6b0 0%, #d9b267 45%, #9a7133 100%);
  clip-path: polygon(22% 0, 78% 0, 100% 68%, 50% 100%, 0 68%);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
}

.room-table-lamp i {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: clamp(5px, 0.65vw, 7px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #ffedb4;
  box-shadow:
    0 0 6px 2px rgba(255, 231, 170, 0.9),
    0 0 16px 5px rgba(255, 218, 132, 0.35);
}

.room-table-dice {
  position: absolute;
  left: 50%;
  bottom: 13%;
  display: flex;
  align-items: flex-end;
  gap: clamp(3px, 0.35vw, 5px);
  transform: translateX(-50%);
  z-index: 4;
}

.room-table-dice::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 92%;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35), transparent 72%);
  filter: blur(1px);
  z-index: -1;
}

.room-die {
  position: relative;
  width: clamp(14px, 1.55vw, 20px);
  aspect-ratio: 1;
  border-radius: clamp(3px, 0.32vw, 4.5px);
  background-color: #f7eed9;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 1px 0 #fffaf0,
    inset 0 -2px 3px rgba(142, 105, 48, 0.18),
    0 3px 6px rgba(0, 0, 0, 0.26);
}

.room-die.is-three {
  transform: rotate(-9deg) translateY(1px);
  background-image:
    radial-gradient(circle at 27% 27%, #79322b 0 1.9px, transparent 2.3px),
    radial-gradient(circle at 50% 50%, #79322b 0 1.9px, transparent 2.3px),
    radial-gradient(circle at 73% 73%, #79322b 0 1.9px, transparent 2.3px);
}

.room-die.is-five {
  transform: rotate(8deg);
  background-image:
    radial-gradient(circle at 27% 27%, #79322b 0 1.8px, transparent 2.2px),
    radial-gradient(circle at 73% 27%, #79322b 0 1.8px, transparent 2.2px),
    radial-gradient(circle at 50% 50%, #a43c30 0 2px, transparent 2.4px),
    radial-gradient(circle at 27% 73%, #79322b 0 1.8px, transparent 2.2px),
    radial-gradient(circle at 73% 73%, #79322b 0 1.8px, transparent 2.2px);
}

.room-seat.is-self {
  grid-area: self;
}

.room-seat.is-opposite {
  grid-area: opposite;
}

.room-seat.is-left {
  grid-area: left;
}

.room-seat.is-right {
  grid-area: right;
}

.room-seat {
  position: relative;
  width: var(--seat-size);
  height: var(--seat-size);
  min-height: 0;
  padding: 13px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 14px;
  border: 1px solid rgba(231, 209, 154, 0.13);
  background: rgba(5, 26, 21, 0.29);
  text-align: center;
}

.room-seat.is-me {
  border-color: rgba(231, 209, 154, 0.55);
  background: rgba(22, 69, 56, 0.7);
  box-shadow: 0 0 0 1px rgba(231, 209, 154, 0.08);
}

.room-seat.is-empty {
  border-style: dashed;
  color: rgba(246, 237, 219, 0.36);
}

.room-seat.is-selectable {
  width: 100%;
  appearance: none;
  font: inherit;
  color: rgba(246, 237, 219, 0.46);
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.room-seat.is-selectable:hover,
.room-seat.is-selectable:focus-visible {
  border-color: rgba(231, 209, 154, 0.55);
  background: rgba(22, 69, 56, 0.56);
  color: var(--gold-light);
  outline: none;
}

.room-seat-position {
  position: absolute;
  top: 7px;
  left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(231, 209, 154, 0.08);
  color: rgba(246, 237, 219, 0.55);
  font-family: var(--font-num);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.room-seat.is-me .room-seat-position {
  background: rgba(231, 209, 154, 0.16);
  color: var(--gold-light);
}

.room-seat-avatar {
  width: 40px;
  height: 40px;
  margin-top: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-size: 19px;
}

.room-seat-avatar .icon {
  width: 18px;
  height: 18px;
  color: rgba(246, 237, 219, 0.3);
}

.room-seat strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
}

.room-seat-note {
  color: rgba(246, 237, 219, 0.38);
  font-size: 8px;
}

.room-seat-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 15px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  background: var(--vermilion);
  color: #fff3e2;
  font-size: 7px;
  font-weight: 700;
}

.room-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid rgba(231, 209, 154, 0.13);
  flex-wrap: wrap;
}

.room-start {
  min-height: 46px;
  padding: 0 22px;
}

.room-leave,
.room-destroy {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 10px;
}

.room-leave {
  color: rgba(246, 237, 219, 0.55);
  border-color: rgba(231, 209, 154, 0.16);
}

.room-leave:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
}

.room-destroy {
  margin-left: auto;
  border-color: rgba(240, 171, 156, 0.24);
  color: rgba(255, 195, 182, 0.7);
  background: rgba(255, 255, 255, 0.04);
}

.room-destroy:hover {
  color: #ffd6cb;
  border-color: rgba(240, 171, 156, 0.45);
  background: rgba(183, 66, 52, 0.16);
}

.room-waiting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(246, 237, 219, 0.56);
  font-size: 10px;
}

.room-waiting .dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

.room-side-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(188, 167, 127, 0.5);
  background: rgba(255, 252, 244, 0.62);
  box-shadow: var(--shadow-soft);
}

.room-side-card .eyebrow {
  color: var(--vermilion);
  font-size: 9px;
}

.room-password-card.is-editable {
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.room-password-card.is-editable:hover {
  border-color: rgba(176, 58, 46, 0.46);
  background: rgba(255, 252, 244, 0.82);
  transform: translateY(-1px);
}

.room-password-card.is-editable:focus-visible {
  outline: 2px solid rgba(176, 58, 46, 0.6);
  outline-offset: 3px;
}

.room-password-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.room-password-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--vermilion);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.room-password-edit .icon {
  width: 12px;
  height: 12px;
}

.room-side-card h3 {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
}

.room-side-card p {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-soft);
  line-height: 1.8;
}

.room-share {
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.3);
}

.room-share span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.room-share strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 22px;
  letter-spacing: 0.08em;
}

.room-side-card .rooms-rule-note {
  color: var(--text-soft);
  border-color: rgba(188, 167, 127, 0.35);
}

.room-side-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.fan-settings-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(176, 58, 46, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(255, 252, 244, 0.92), rgba(246, 236, 214, 0.78));
}

.fan-settings-card::after {
  content: '番';
  position: absolute;
  right: -4px;
  bottom: -18px;
  color: rgba(176, 58, 46, 0.07);
  font-family: var(--font-serif);
  font-size: 108px;
  line-height: 1;
  pointer-events: none;
}

.fan-cap-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

.fan-cap-display strong {
  color: var(--vermilion);
  font-family: var(--font-num);
  font-size: 46px;
  font-weight: 800;
  line-height: 0.95;
}

.fan-cap-display span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fan-cap-display.is-off strong {
  color: var(--gold-dark);
  font-size: 38px;
}

.fan-cap-display.is-off span {
  color: var(--muted);
}


.fan-enabled-count {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(188, 167, 127, 0.44);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--text-soft);
  font-size: 9px;
  position: relative;
  z-index: 1;
}

.fan-settings-card .btn {
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.fan-settings-card .rooms-rule-note {
  margin-top: 12px;
  padding-top: 10px;
}

.room-fan-summary {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "cap button";
  align-content: center;
  align-items: center;
  justify-content: start;
  column-gap: clamp(5px, calc(var(--title-size) * 0.12), 9px);
  width: auto;
  min-width: 0;
  height: var(--title-line);
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0 clamp(6px, calc(var(--title-size) * 0.19), 11px);
  border-radius: clamp(10px, calc(var(--title-size) * 0.28), 16px);
  box-sizing: border-box;
  overflow: hidden;
}

.room-fan-summary::after {
  display: none;
}

.room-fan-summary .fan-cap-display {
  grid-area: cap;
  margin-top: 0;
  gap: clamp(2px, calc(var(--title-size) * 0.045), 4px);
}

.room-fan-summary .fan-cap-display strong {
  font-size: clamp(20px, calc(var(--title-size) * 0.62), 36px);
}

.room-fan-summary .fan-cap-display.is-off strong {
  font-size: clamp(18px, calc(var(--title-size) * 0.56), 32px);
}

.room-fan-summary .fan-cap-meta {
  font-family: var(--font-num);
  font-size: clamp(7px, calc(var(--title-size) * 0.17), 10px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--text-soft);
}

.room-fan-summary .btn {
  grid-area: button;
  margin-top: 0;
  min-height: clamp(26px, calc(var(--title-size) * 0.68), 42px);
  padding: 0 clamp(8px, calc(var(--title-size) * 0.22), 14px);
  gap: clamp(3px, calc(var(--title-size) * 0.07), 5px);
  font-size: clamp(9px, calc(var(--title-size) * 0.2), 12px);
  box-shadow: 0 6px 14px rgba(157, 123, 58, 0.2);
}

.room-fan-summary .btn .icon {
  width: clamp(11px, calc(var(--title-size) * 0.26), 16px);
  height: clamp(11px, calc(var(--title-size) * 0.26), 16px);
}

.fan-settings-modal {
  width: min(640px, 100%);
}

.fan-settings-modal .modal-footer {
  background: var(--paper-soft);
}

.fan-settings-summary {
  padding: 16px;
  border: 1px solid rgba(188, 167, 127, 0.42);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.38);
}

.fan-cap-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fan-cap-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.fan-cap-copy strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}

.fan-cap-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 160px;
  padding: 4px;
  border: 1px solid rgba(188, 167, 127, 0.46);
  border-radius: 999px;
  background: var(--paper-soft);
  transition: opacity 0.18s ease;
}

.fan-cap-stepper.is-disabled {
  opacity: 0.42;
}

.fan-cap-stepper button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(188, 167, 127, 0.14);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.fan-cap-stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.fan-cap-stepper strong {
  min-width: 44px;
  color: var(--vermilion);
  font-family: var(--font-num);
  font-size: 26px;
  text-align: center;
}

.fan-cap-preview {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed rgba(188, 167, 127, 0.46);
  color: var(--vermilion);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
}

.fan-cap-preview.is-off {
  color: var(--gold-dark);
}

.fan-group {
  margin-top: 16px;
}

.fan-group h4 {
  margin: 0 0 8px 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fan-toggle-list {
  overflow: hidden;
  border: 1px solid rgba(188, 167, 127, 0.38);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.3);
}

.fan-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border-top: 1px solid rgba(188, 167, 127, 0.26);
}

.fan-toggle-row:first-child {
  border-top: 0;
}

.fan-toggle-row.is-on {
  background: rgba(255, 252, 244, 0.52);
}

.fan-toggle-copy {
  min-width: 0;
}

.fan-toggle-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.fan-toggle-copy strong em {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(176, 58, 46, 0.1);
  color: var(--vermilion);
  font-family: var(--font-num);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.fan-toggle-copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 9px;
  line-height: 1.5;
}

.fan-group-special {
  padding-top: 2px;
}

.fan-readonly-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(188, 167, 127, 0.12);
  color: var(--text-soft);
  font-size: 9px;
  line-height: 1.6;
}

.fan-readonly-note .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--vermilion);
}

/* 密码弹窗 */
.password-modal {
  width: min(460px, 100%);
}

.room-password-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: -6px;
}

.pin-field-group {
  display: block;
}

.pin-field {
  display: grid;
  grid-template-columns: repeat(4, 56px);
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.pin-box {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  caret-color: var(--vermilion);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.pin-box:focus {
  border-color: rgba(183, 66, 52, 0.62);
  background: var(--paper-soft);
  box-shadow: 0 0 0 3px rgba(183, 66, 52, 0.09);
}

.pin-box:disabled {
  opacity: 0.55;
}

@media (max-width: 520px) {
  .pin-field {
    grid-template-columns: repeat(4, 50px);
    gap: 10px;
  }

  .pin-box {
    width: 50px;
    height: 50px;
    border-radius: 11px;
    font-size: 22px;
  }
}

.password-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 4px 0 2px;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.65;
}

.password-note .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--gold-dark);
}

.password-attempts {
  align-self: flex-end;
  margin: -5px 2px 6px;
  color: var(--vermilion);
  font-size: 9px;
  font-weight: 700;
}

.guest-access-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 10px;
  padding: 16px;
  border: 1px solid rgba(188, 167, 127, 0.46);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.32));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.guest-access-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.guest-access-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.guest-access-copy span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.guest-access-options {
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
}

.guest-access-button {
  min-width: 72px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(188, 167, 127, 0.62);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.guest-access-button:hover {
  border-color: rgba(183, 66, 52, 0.36);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.guest-access-button:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

.guest-access-button[data-value="false"].is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-soft);
  box-shadow: 0 2px 8px rgba(5, 24, 20, 0.16);
}

.guest-access-button[data-value="true"].is-active {
  border-color: var(--jade);
  background: var(--jade);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 90, 73, 0.2);
}

@media (max-width: 520px) {
  .guest-access-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .guest-access-options {
    width: 100%;
    gap: 12px;
  }

  .guest-access-button {
    flex: 1;
    height: 44px;
  }
}

.room-password-form .confirm-actions {
  margin-top: 16px;
}

/* 30 秒出牌倒计时 */
.turn-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  border: 1px solid rgba(231, 209, 154, 0.42);
  background:
    radial-gradient(circle at 50% 32%, rgba(198, 162, 92, 0.2), transparent 65%),
    rgba(4, 22, 17, 0.55);
  color: var(--gold-light);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 0 0 3px rgba(231, 209, 154, 0.05);
  flex: 0 0 auto;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.turn-timer small {
  margin-top: 2px;
  font-family: var(--font-sans);
  font-size: 6px;
  font-weight: 500;
  color: rgba(246, 237, 219, 0.38);
}

.turn-timer.is-urgent {
  border-color: rgba(210, 91, 66, 0.8);
  color: #ffd1c2;
  background: rgba(150, 49, 35, 0.45);
  animation: timer-pulse 1s ease-in-out infinite;
}

.turn-timer.is-expired {
  opacity: 0.4;
}

@keyframes timer-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 3px rgba(231, 209, 154, 0.04);
  }
  50% {
    box-shadow:
      inset 0 0 0 3px rgba(231, 209, 154, 0.06),
      0 0 12px rgba(210, 91, 66, 0.18);
  }
}

/* AI / 真人标签 */
.seat-kind {
  display: inline-flex;
  align-items: center;
  height: 15px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(246, 237, 219, 0.5);
}

.seat-kind.is-ai {
  color: #e7d19a;
  background: rgba(198, 162, 92, 0.18);
}

.seat-kind.is-human {
  color: #a9d6b8;
  background: rgba(47, 118, 96, 0.24);
}

/* 看牌定缺（内嵌） */
.void-inline-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(231, 209, 154, 0.15);
  background: rgba(5, 24, 19, 0.55);
  color: rgba(246, 237, 219, 0.72);
}

.void-inline-title > .icon {
  color: var(--gold-light);
  width: 16px;
  height: 16px;
}

.void-inline-title span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.void-inline-title strong {
  font-size: 9px;
  font-weight: 700;
}

.void-inline-title small {
  font-size: 7px;
  color: rgba(246, 237, 219, 0.38);
}

.void-inline-choices {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.void-inline-choice {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  height: 35px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(231, 209, 154, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 237, 219, 0.68);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.void-inline-choice:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.11);
}

.void-inline-choice b {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
}

.void-inline-choice span {
  font-size: 8px;
  color: rgba(246, 237, 219, 0.42);
}

.void-inline-choice.is-active {
  border-color: rgba(231, 209, 154, 0.72);
  background: rgba(198, 162, 92, 0.2);
  color: var(--gold-light);
}

.void-inline-choice.suit-0.is-active {
  border-color: rgba(232, 160, 149, 0.8);
  background: rgba(183, 66, 52, 0.28);
  color: #ffd3c8;
}

.void-inline-choice.suit-1.is-active {
  border-color: rgba(159, 206, 176, 0.8);
  background: rgba(47, 118, 96, 0.32);
  color: #d4f1db;
}

.void-inline-choice.suit-2.is-active {
  border-color: rgba(157, 189, 221, 0.8);
  background: rgba(43, 93, 134, 0.32);
  color: #dbeaff;
}

.void-confirm {
  min-width: 82px;
  background: var(--vermilion);
  border-color: rgba(255, 255, 255, 0.16);
}

.void-confirm .icon {
  width: 13px;
  height: 13px;
}

/* 横屏引导 */
.rotate-layer {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 36%, rgba(48, 120, 95, 0.34), transparent 55%),
    rgba(3, 16, 13, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--paper);
}

.rotate-card {
  width: min(390px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rotate-card .eyebrow {
  color: var(--gold-light);
  margin-top: 30px;
}

.rotate-card h2 {
  margin-top: 11px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.rotate-card p {
  margin-top: 12px;
  max-width: 320px;
  color: rgba(246, 237, 219, 0.56);
  font-size: 11px;
  line-height: 1.8;
}

.rotate-card .btn {
  margin-top: 26px;
  min-height: 46px;
  padding: 0 24px;
}

.rotate-skip {
  margin-top: 15px;
  color: rgba(246, 237, 219, 0.36);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rotate-skip:hover {
  color: rgba(246, 237, 219, 0.7);
}

.rotate-phone {
  position: relative;
  width: 62px;
  height: 112px;
  border-radius: 12px;
  border: 2px solid rgba(231, 209, 154, 0.7);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 30px rgba(198, 162, 92, 0.09);
  animation: rotate-hint 2.4s ease-in-out infinite;
}

.rotate-phone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(231, 209, 154, 0.5);
  transform: translateX(-50%);
}

.rotate-phone-screen {
  position: absolute;
  inset: 8px 6px 16px;
  border-radius: 6px;
  background:
    linear-gradient(rgba(231, 209, 154, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 209, 154, 0.06) 1px, transparent 1px);
  background-size: 9px 9px;
}

.rotate-arrow {
  position: absolute;
  right: -23px;
  top: 50%;
  width: 22px;
  height: 22px;
  color: var(--gold-light);
  transform: translateY(-50%);
}

.rotate-arrow .icon {
  width: 22px;
  height: 22px;
}

@keyframes rotate-hint {
  0%,
  20% {
    transform: rotate(0deg);
  }
  55%,
  80% {
    transform: rotate(90deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* 房间结算 */
.settlement-wait {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(188, 167, 127, 0.45);
  color: var(--text-soft);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 420px) and (orientation: portrait) {
  .seat-backs {
    width: 66px;
    flex-wrap: wrap;
    padding-left: 3.4px;
    row-gap: 1px;
  }

  .seat-backs .tile {
    width: 10px;
    margin-left: -3.4px;
  }
}

@media (max-width: 900px) {
  .turn-timer {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .turn-timer small {
    font-size: 5px;
  }

  .rooms-intro {
    display: block;
    margin-bottom: 18px;
  }

  .room-intro-heading {
    --title-size: 38px;
    gap: 8px 10px;
  }

  .room-intro-actions {
    gap: 6px;
  }

  .room-intro-actions .btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 10px;
  }

  .rooms-intro-actions {
    margin-top: 16px;
    justify-content: flex-start;
  }

  .rooms-intro-actions .btn {
    flex: 0 0 auto;
    min-width: 150px;
    max-width: 220px;
  }

  .rooms-layout,
  .room-layout {
    grid-template-columns: 1fr;
  }

  .room-list-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .rooms-aside {
    display: none;
  }

  .room-card {
    padding: 20px;
    border-radius: 20px;
  }

  .room-seats {
    --seat-size: clamp(120px, 17vw, 150px);
    gap: 10px;
    margin: 18px auto 16px;
  }

  .room-seat {
    min-height: 0;
    padding: 10px 6px 8px;
    gap: 4px;
  }

  .room-seat-avatar {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .room-seat strong {
    font-size: 9px;
  }

  .room-seat-note {
    font-size: 7px;
  }

  .room-seat-position {
    top: 5px;
    left: 5px;
    padding: 1px 4px;
    font-size: 6px;
  }

  .room-side-card {
    display: none;
  }

  .room-side-card.fan-settings-card {
    display: grid;
  }

  .rooms-header-left {
    gap: 8px;
  }

  .rooms-header-left .brand-words strong {
    font-size: 15px;
  }

  .room-card-head {
    align-items: center;
  }

  .room-head-meta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .room-code-value {
    font-size: 32px;
  }

  .room-actions {
    margin-top: 16px;
    padding-top: 14px;
  }

  .room-start {
    flex: 1;
    min-height: 43px;
    font-size: 11px;
    padding: 0 13px;
  }

  .room-leave {
    min-height: 38px;
    padding: 0 12px;
  }

  .void-inline-title {
    min-height: 24px;
    padding: 0 7px;
  }

  .void-inline-title > .icon {
    width: 13px;
    height: 13px;
  }

  .void-inline-title strong {
    font-size: 8px;
  }

  .void-inline-title small {
    display: none;
  }

  .void-inline-choice {
    height: 31px;
    padding: 0 8px;
  }

  .void-inline-choice b {
    font-size: 11px;
  }

  .void-confirm {
    min-width: 65px;
    height: 31px;
    font-size: 9px;
    padding: 0 9px;
  }
}

@media (max-width: 420px) {
  .rooms-intro h1 {
    font-size: 30px;
  }

  .room-list-item {
    gap: 9px;
    padding: 11px 10px;
  }

  .room-lock {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .room-list-code {
    font-size: 12px;
  }

  .room-seat {
    min-height: 0;
    padding: 12px 7px 10px;
  }

  .room-seat-avatar {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .room-seat strong {
    font-size: 9px;
  }

  .room-seat-note {
    font-size: 7px;
  }

  .room-actions {
    gap: 7px;
  }

  .room-start {
    font-size: 10px;
  }

  .room-waiting {
    font-size: 9px;
  }

  .rotate-card h2 {
    font-size: 29px;
  }

  .rotate-card p {
    font-size: 10px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .turn-timer {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .turn-timer small {
    font-size: 5px;
  }

  .room-screen .lobby-header,
  .rooms-screen .lobby-header {
    padding-top: calc(8px + var(--safe-top));
  }

  .room-screen .rooms-intro,
  .rooms-screen .rooms-intro {
    margin-bottom: 10px;
  }

  .room-screen .rooms-intro h1,
  .rooms-screen .rooms-intro h1 {
    font-size: 28px;
  }

  .room-screen .rooms-intro p,
  .rooms-screen .rooms-intro p {
    display: none;
  }

  .room-seat {
    min-height: 0;
    padding: 8px 5px;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .room-seat-avatar {
    width: 28px;
    height: 28px;
    margin-top: 0;
    font-size: 13px;
  }

  .room-seat-badge {
    display: none;
  }

  .room-card {
    padding: 16px;
  }

  .room-seats {
    margin-top: 12px;
  }

  .room-actions {
    margin-top: 10px;
    padding-top: 10px;
  }
}

@media (max-height: 620px) and (orientation: portrait) {
  .rotate-card {
    gap: 2px;
  }

  .rotate-phone {
    width: 48px;
    height: 88px;
  }

  .rotate-card .eyebrow {
    margin-top: 18px;
  }

  .rotate-card .btn {
    margin-top: 16px;
  }
}

/* ---------- 局域网邀请 ---------- */
.lan-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 8px 0 12px;
}

.lan-qr {
  width: 176px;
  height: 176px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.lan-qr-caption {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.lan-address-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 4px;
  padding: 0;
  list-style: none;
}

.lan-address {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(216, 197, 163, 0.18);
}

.lan-address.is-active {
  border-color: var(--gold);
  background: rgba(198, 162, 92, 0.16);
}

.lan-address-pick {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.lan-address-pick strong {
  font-family: var(--font-num);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.lan-address-pick span {
  color: var(--muted);
  font-size: 9px;
}

.lan-address .btn-mini {
  flex: 0 0 auto;
  padding: 4px 8px;
  font-size: 9px;
}

.lan-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.password-note.is-warn {
  color: var(--vermilion-dark);
}

.password-note.is-warn .icon {
  color: var(--vermilion);
}

.room-rules-panel {
  margin-top: 18px;
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid rgba(188, 167, 127, 0.42);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(176, 58, 46, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(255, 252, 244, 0.9), rgba(246, 236, 214, 0.72));
  box-shadow: 0 10px 30px rgba(77, 49, 24, 0.06);
}

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

.room-rules-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.15;
}

.room-pattern-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-top: 14px;
}

.room-pattern-group {
  min-width: 0;
  margin-top: 0;
}

.room-pattern-group h4 {
  margin: 0 0 8px 2px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.room-pattern-group.is-inactive h4 {
  color: var(--muted);
}

.room-pattern-group .fan-toggle-list {
  background: rgba(255, 255, 255, 0.38);
}

.room-pattern-group.is-inactive .fan-toggle-list {
  background: rgba(255, 255, 255, 0.18);
}

.room-pattern-group .fan-toggle-row {
  justify-content: flex-start;
}

.room-pattern-group.is-inactive .fan-toggle-copy strong {
  color: var(--muted);
}

.room-pattern-group.is-inactive .fan-toggle-copy strong em {
  background: rgba(188, 167, 127, 0.14);
  color: var(--muted);
}

.room-pattern-empty {
  display: block;
  padding: 12px 13px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .room-side-stack {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .room-seats {
    --seat-size: clamp(80px, 22vw, 102px);
    gap: 7px;
  }

  .room-seat {
    padding: 8px 4px 6px;
    gap: 3px;
  }

  .room-seat-avatar {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .room-seat strong {
    font-size: 8px;
  }

  .room-seat-position {
    top: 4px;
    left: 4px;
    padding: 1px 3px;
    font-size: 6px;
  }

  .room-seat-badge {
    top: 4px;
    right: 4px;
    height: 13px;
    padding: 0 4px;
    font-size: 6px;
  }

  .room-side-stack {
    grid-template-columns: 1fr;
  }

  .room-rules-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .room-rules-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .room-pattern-groups {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .room-supported-chips {
    gap: 0;
    row-gap: 3px;
  }

  .room-supported-chip {
    padding: 2px 5px;
    font-size: 8px;
  }
}

@media (max-width: 380px) {
  .room-seats {
    --seat-size: 78px;
    gap: 4px;
  }

  .room-seat {
    padding: 7px 3px 5px;
  }

  .room-seat-avatar {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .room-intro-heading {
    --title-size: 36px;
    gap: 8px;
  }

  .room-fan-summary {
    padding: 0 6px;
  }

  .room-fan-summary .fan-cap-meta {
    font-size: 6px;
  }

  .room-fan-summary .btn {
    min-height: 24px;
    padding: 0 6px;
    gap: 2px;
    font-size: 8px;
  }

  .room-fan-summary .btn .icon {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 520px) {
  .fan-settings-modal .modal-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .fan-cap-toggle-row {
    align-items: flex-start;
    gap: 10px;
  }

  .fan-cap-controls {
    gap: 8px;
  }

  .fan-cap-stepper {
    width: 132px;
    padding: 3px;
  }

  .fan-cap-stepper button {
    width: 33px;
    height: 33px;
    font-size: 18px;
  }

  .fan-cap-stepper strong {
    min-width: 34px;
    font-size: 20px;
  }

  .fan-toggle-row {
    gap: 9px;
    padding: 10px 11px;
  }

  .fan-toggle-copy span {
    font-size: 8px;
  }

  .fan-settings-modal .modal-footer .btn {
    flex: 1;
  }
}