:root {
  color-scheme: dark;
  --ink-950: #040b16;
  --ink-900: #071528;
  --ink-850: #0a1b31;
  --ink-800: #0d223a;
  --ink-700: #15324d;
  --panel: rgba(10, 28, 49, 0.82);
  --panel-strong: rgba(9, 24, 43, 0.96);
  --line: rgba(125, 208, 226, 0.16);
  --line-strong: rgba(125, 208, 226, 0.32);
  --cyan: #66e6ef;
  --cyan-strong: #21c6d2;
  --cyan-soft: #b7f5f3;
  --gold: #f4c96c;
  --gold-strong: #d9a842;
  --gold-soft: #ffedb7;
  --rose: #ff8a9a;
  --green: #61d6a5;
  --white: #f4f8fb;
  --muted: #93a9ba;
  --muted-strong: #b7c8d4;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.2);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--ink-950);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 50% -20%, rgba(33, 198, 210, 0.17), transparent 42%),
    linear-gradient(155deg, #071528 0%, #040b16 60%, #071426 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(102, 230, 239, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 230, 239, 0.035) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

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

button,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(102, 230, 239, 0.82);
  outline-offset: 3px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--ink-950);
  background: var(--cyan-soft);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.orb {
  position: absolute;
  display: block;
  width: 280px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.14;
}

.orb-one {
  top: 6%;
  right: -160px;
  background: var(--cyan);
}

.orb-two {
  bottom: 4%;
  left: -170px;
  background: var(--gold);
}

.grid-glow {
  position: absolute;
  bottom: -240px;
  left: 50%;
  width: 720px;
  height: 520px;
  border: 1px solid rgba(102, 230, 239, 0.08);
  transform: translateX(-50%) rotateX(66deg) rotateZ(45deg);
  box-shadow: inset 0 0 90px rgba(102, 230, 239, 0.08);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: calc(8px + var(--safe-top)) max(14px, var(--safe-right)) 8px max(14px, var(--safe-left));
  background: linear-gradient(to bottom, rgba(4, 11, 22, 0.98), rgba(4, 11, 22, 0.78));
  border-bottom: 1px solid rgba(125, 208, 226, 0.12);
  backdrop-filter: blur(20px) saturate(130%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, 100%);
  margin: 0 auto;
  gap: 10px;
}

.brand-button,
.room-pill {
  border: 0;
  cursor: pointer;
}

.brand-button {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0;
  text-align: left;
  background: transparent;
  gap: 10px;
}

.brand-button strong,
.brand-button small {
  display: block;
}

.brand-button strong {
  font-family: "STSong", "SimSun", serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand-button small {
  max-width: 150px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-mark {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding-bottom: 7px;
  border: 1px solid rgba(244, 201, 108, 0.42);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(244, 201, 108, 0.13), rgba(33, 198, 210, 0.08));
  box-shadow: inset 0 0 18px rgba(244, 201, 108, 0.07);
  gap: 2px;
}

.mini-mark::after {
  position: absolute;
  right: 7px;
  bottom: 5px;
  left: 7px;
  height: 2px;
  content: "";
  background: var(--gold);
}

.mini-mark i {
  display: block;
  width: 5px;
  height: 9px;
  background: linear-gradient(var(--gold-soft), var(--gold-strong));
  clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%);
}

.mini-mark i:nth-child(2) {
  height: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.connection-pill,
.room-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  border-radius: 999px;
}

.connection-pill {
  padding: 0 9px;
  color: var(--muted-strong);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.04);
  gap: 6px;
}

.connection-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(97, 214, 165, 0.8);
}

.connection-pill[data-tone="syncing"] i {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(244, 201, 108, 0.8);
}

.connection-pill[data-tone="offline"] i {
  background: var(--rose);
  box-shadow: 0 0 10px rgba(255, 138, 154, 0.7);
}

.room-pill {
  padding: 0 11px;
  color: var(--gold-soft);
  background: rgba(244, 201, 108, 0.09);
  border: 1px solid rgba(244, 201, 108, 0.22);
  gap: 6px;
}

.room-pill span {
  display: none;
  color: var(--muted);
  font-size: 10px;
}

.room-pill b {
  font-size: 12px;
  letter-spacing: 0.1em;
}

#app {
  width: min(1120px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px max(14px, var(--safe-right)) calc(38px + var(--safe-bottom)) max(14px, var(--safe-left));
}

.boot-screen {
  display: grid;
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
  place-content: center;
  justify-items: center;
  gap: 20px;
}

.boot-screen p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.2em;
  animation: soft-pulse 1.5s ease-in-out infinite;
}

.palace-mark {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 112px;
  height: 94px;
  padding-bottom: 20px;
  filter: drop-shadow(0 0 22px rgba(244, 201, 108, 0.2));
  gap: 6px;
}

.spire {
  display: block;
  width: 22px;
  height: 45px;
  border: 1px solid rgba(244, 201, 108, 0.7);
  background: linear-gradient(180deg, rgba(244, 201, 108, 0.2), rgba(244, 201, 108, 0.04));
  clip-path: polygon(50% 0, 100% 34%, 100% 100%, 0 100%, 0 34%);
}

.spire-main {
  width: 29px;
  height: 68px;
  background: linear-gradient(180deg, rgba(102, 230, 239, 0.24), rgba(244, 201, 108, 0.06));
}

.spire-left,
.spire-right {
  opacity: 0.8;
}

.palace-base {
  position: absolute;
  right: 6px;
  bottom: 10px;
  left: 6px;
  height: 11px;
  border: 1px solid rgba(244, 201, 108, 0.76);
  border-radius: 2px 2px 7px 7px;
  background: rgba(244, 201, 108, 0.08);
}

.palace-base::before,
.palace-base::after {
  position: absolute;
  bottom: -6px;
  width: 13px;
  height: 6px;
  content: "";
  border-bottom: 1px solid rgba(244, 201, 108, 0.7);
}

.palace-base::before { left: -4px; border-left: 1px solid rgba(244, 201, 108, 0.7); }
.palace-base::after { right: -4px; border-right: 1px solid rgba(244, 201, 108, 0.7); }

@keyframes soft-pulse {
  50% { opacity: 0.45; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-enter {
  animation: float-in 0.35s ease both;
}

.landing {
  display: grid;
  min-height: calc(100vh - 36px);
  min-height: calc(100dvh - 36px);
  align-content: center;
  padding: calc(12px + var(--safe-top)) 0;
  gap: 28px;
}

.landing-hero {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
}

.landing-hero::before {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: -1;
  width: 230px;
  height: 230px;
  content: "";
  border: 1px solid rgba(102, 230, 239, 0.08);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: inset 0 0 65px rgba(102, 230, 239, 0.045);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 16px;
  padding: 0 13px;
  color: var(--cyan-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  border: 1px solid rgba(102, 230, 239, 0.2);
  border-radius: 999px;
  background: rgba(102, 230, 239, 0.06);
}

.landing h1 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(48px, 15vw, 84px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  background: linear-gradient(115deg, #fff7dc 8%, var(--gold) 47%, #c48a2c 85%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 30px rgba(244, 201, 108, 0.16));
}

.landing-lead {
  max-width: 390px;
  margin: 14px auto 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.8;
}

.feature-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  gap: 8px;
}

.feature-line li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  color: var(--muted-strong);
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  gap: 6px;
}

.feature-line li::before {
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 7px rgba(244, 201, 108, 0.8);
}

.entry-card {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.entry-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  gap: 4px;
}

.entry-tab {
  min-height: 42px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.entry-tab[aria-selected="true"] {
  color: var(--ink-950);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 6px 18px rgba(244, 201, 108, 0.16);
}

.entry-form {
  display: grid;
  margin-top: 20px;
  gap: 15px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.field-label {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.form-field small,
.field-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.input,
.select,
.textarea {
  width: 100%;
  color: var(--white);
  border: 1px solid rgba(125, 208, 226, 0.18);
  border-radius: 13px;
  background: rgba(2, 9, 18, 0.52);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input,
.select {
  min-height: 49px;
  padding: 0 14px;
}

.textarea {
  min-height: 96px;
  padding: 13px 14px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: #637a8c;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(102, 230, 239, 0.65);
  box-shadow: 0 0 0 4px rgba(102, 230, 239, 0.08);
}

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--cyan) 50%),
    linear-gradient(135deg, var(--cyan) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.input-code {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 800;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 17px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: transform 0.16s ease, filter 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  gap: 8px;
}

.button:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
}

.button:not(:disabled):hover {
  filter: brightness(1.07);
}

.button-primary {
  color: #09111b;
  background: linear-gradient(135deg, #fff1b6, var(--gold) 48%, #d9a440);
  box-shadow: 0 9px 24px rgba(217, 168, 66, 0.19);
}

.button-cyan {
  color: #03151b;
  background: linear-gradient(135deg, #b8fbf7, var(--cyan) 58%, #34c8d4);
  box-shadow: 0 9px 24px rgba(33, 198, 210, 0.16);
}

.button-ghost {
  color: var(--muted-strong);
  border-color: rgba(125, 208, 226, 0.18);
  background: rgba(125, 208, 226, 0.045);
}

.button-danger {
  color: #ffe8eb;
  border-color: rgba(255, 138, 154, 0.25);
  background: rgba(255, 138, 154, 0.1);
}

.button-block {
  width: 100%;
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 11px;
  border-radius: 10px;
}

.button-icon {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.text-button {
  padding: 4px;
  color: var(--cyan-soft);
  font-size: 12px;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.landing-footnote {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  text-align: center;
}

.game-page {
  display: grid;
  align-items: start;
  gap: 14px;
}

.stage-banner {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(118deg, rgba(244, 201, 108, 0.1), transparent 42%),
    linear-gradient(155deg, rgba(18, 51, 78, 0.76), rgba(7, 21, 40, 0.92));
  box-shadow: var(--shadow-soft);
}

.stage-banner::after {
  position: absolute;
  top: -68px;
  right: -46px;
  width: 170px;
  height: 170px;
  content: "";
  border: 1px solid rgba(244, 201, 108, 0.11);
  transform: rotate(45deg);
  box-shadow: inset 0 0 50px rgba(244, 201, 108, 0.045);
}

.stage-kicker {
  display: flex;
  align-items: center;
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  gap: 7px;
}

.stage-kicker::before {
  width: 14px;
  height: 1px;
  content: "";
  background: currentColor;
}

.stage-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.stage-banner h1,
.stage-banner h2 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 25px;
  line-height: 1.24;
  letter-spacing: 0.05em;
}

.stage-banner p {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.7;
}

.stage-badge {
  flex: 0 0 auto;
  display: grid;
  min-width: 57px;
  min-height: 57px;
  padding: 7px;
  color: var(--cyan-soft);
  border: 1px solid rgba(102, 230, 239, 0.28);
  border-radius: 17px;
  background: rgba(102, 230, 239, 0.07);
  place-content: center;
  text-align: center;
}

.stage-badge strong {
  display: block;
  font-size: 19px;
  line-height: 1;
}

.stage-badge small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.phase-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  gap: 5px;
}

.phase-track li {
  min-width: 0;
}

.phase-track span {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
}

.phase-track li.is-done span,
.phase-track li.is-current span {
  background: linear-gradient(90deg, var(--gold-strong), var(--cyan));
  box-shadow: 0 0 9px rgba(102, 230, 239, 0.22);
}

.phase-track small {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #70879a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phase-track li.is-current small {
  color: var(--cyan-soft);
}

.content-grid {
  display: grid;
  gap: 14px;
}

.main-column,
.side-column {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 48%),
    var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.panel-gold {
  border-color: rgba(244, 201, 108, 0.2);
  background:
    linear-gradient(145deg, rgba(244, 201, 108, 0.08), transparent 44%),
    var(--panel);
}

.panel-cyan {
  border-color: rgba(102, 230, 239, 0.2);
  background:
    linear-gradient(145deg, rgba(102, 230, 239, 0.07), transparent 44%),
    var(--panel);
}

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

.panel-heading h2,
.panel-heading h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.section-label {
  display: flex;
  align-items: center;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  gap: 7px;
}

.section-label::before {
  width: 6px;
  height: 6px;
  content: "";
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

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

.tone-gold { color: var(--gold); }
.tone-cyan { color: var(--cyan); }
.tone-green { color: var(--green); }
.tone-rose { color: var(--rose); }

.tag,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 0 9px;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.tag-gold { color: var(--gold-soft); border-color: rgba(244, 201, 108, 0.2); background: rgba(244, 201, 108, 0.07); }
.tag-cyan { color: var(--cyan-soft); border-color: rgba(102, 230, 239, 0.2); background: rgba(102, 230, 239, 0.07); }
.tag-green { color: #bff7dd; border-color: rgba(97, 214, 165, 0.2); background: rgba(97, 214, 165, 0.07); }
.tag-rose { color: #ffd7dc; border-color: rgba(255, 138, 154, 0.2); background: rgba(255, 138, 154, 0.07); }

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.15);
}

.metric small,
.metric strong {
  display: block;
}

.metric small {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.metric strong {
  overflow: hidden;
  color: var(--gold-soft);
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-list,
.event-list,
.trade-list,
.ranking-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 8px;
}

.player-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.13);
  gap: 10px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--cyan-soft);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(102, 230, 239, 0.19);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(102, 230, 239, 0.13), rgba(102, 230, 239, 0.03));
  place-content: center;
}

.avatar-gold {
  color: var(--gold-soft);
  border-color: rgba(244, 201, 108, 0.22);
  background: linear-gradient(145deg, rgba(244, 201, 108, 0.13), rgba(244, 201, 108, 0.03));
}

.player-info {
  min-width: 0;
}

.player-info strong,
.player-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-info strong {
  font-size: 12px;
}

.player-info small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.player-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.ready-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.ready-dot.is-ready {
  background: var(--green);
  box-shadow: 0 0 10px rgba(97, 214, 165, 0.52);
}

.host-actions {
  display: grid;
  margin-top: 14px;
  gap: 9px;
}

.host-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.room-code-display {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  color: var(--gold-soft);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.2em;
  border: 1px solid rgba(244, 201, 108, 0.16);
  border-radius: 13px;
  background: rgba(244, 201, 108, 0.055);
}

.schedule-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(122px, 40%);
  margin: 0 -17px;
  padding: 2px 17px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  gap: 8px;
}

.round-card {
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.14);
  scroll-snap-align: start;
}

.round-card.is-current {
  border-color: rgba(102, 230, 239, 0.42);
  background: rgba(102, 230, 239, 0.075);
  box-shadow: inset 0 0 18px rgba(102, 230, 239, 0.04);
}

.round-card.is-past {
  opacity: 0.53;
}

.round-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 800;
}

.round-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.round-numbers span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  color: var(--cyan-soft);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(102, 230, 239, 0.1);
  border-radius: 7px;
  background: rgba(102, 230, 239, 0.045);
  place-content: center;
}

.target-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.target-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 75px;
  padding: 11px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.14);
  gap: 10px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.target-card:not(:disabled):hover {
  border-color: rgba(102, 230, 239, 0.28);
}

.target-card.is-selected {
  border-color: rgba(244, 201, 108, 0.5);
  background: linear-gradient(135deg, rgba(244, 201, 108, 0.12), rgba(244, 201, 108, 0.035));
  box-shadow: inset 0 0 24px rgba(244, 201, 108, 0.045);
}

.target-card.is-conflict {
  opacity: 0.42;
}

.target-check {
  display: grid;
  width: 25px;
  height: 25px;
  color: transparent;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  place-content: center;
}

.target-card.is-selected .target-check {
  color: #09111b;
  border-color: var(--gold);
  background: var(--gold);
}

.target-copy {
  min-width: 0;
}

.target-copy strong,
.target-copy small {
  display: block;
}

.target-copy strong {
  font-size: 12px;
}

.target-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.target-points {
  min-width: 42px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.target-reveal-zone {
  display: grid;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  gap: 8px;
}

.reveal-choice {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.12);
  gap: 9px;
}

.reveal-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--cyan-strong);
}

.reveal-choice span {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 8px;
}

.selection-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.locked-targets {
  display: grid;
  gap: 8px;
}

.locked-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid rgba(244, 201, 108, 0.12);
  border-radius: 12px;
  background: rgba(244, 201, 108, 0.045);
  gap: 8px;
}

.locked-target strong {
  font-size: 11px;
}

.auction-numbers,
.holding-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.number-tile {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  padding: 3px;
  color: var(--cyan-soft);
  font-size: clamp(15px, 5vw, 24px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: default;
  border: 1px solid rgba(102, 230, 239, 0.2);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(102, 230, 239, 0.11), rgba(102, 230, 239, 0.015));
  box-shadow: inset 0 0 22px rgba(102, 230, 239, 0.035);
  place-content: center;
}

button.number-tile {
  cursor: pointer;
  transition: transform 0.17s ease, border-color 0.17s ease, background 0.17s ease;
}

button.number-tile:not(:disabled):hover {
  border-color: rgba(244, 201, 108, 0.64);
  transform: translateY(-2px);
}

.number-tile.is-picked {
  color: #677d8d;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.number-tile.is-picked::after {
  position: absolute;
  inset: 50% 9px auto;
  height: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.19);
  transform: rotate(-18deg);
}

.number-tile.is-selectable {
  color: var(--gold-soft);
  border-color: rgba(244, 201, 108, 0.42);
  background: linear-gradient(145deg, rgba(244, 201, 108, 0.14), rgba(244, 201, 108, 0.025));
  box-shadow: 0 0 18px rgba(244, 201, 108, 0.07), inset 0 0 22px rgba(244, 201, 108, 0.04);
}

.holding-grid {
  grid-template-columns: repeat(5, 1fr);
}

.holding-grid .number-tile {
  border-radius: 12px;
  font-size: clamp(13px, 4vw, 18px);
}

.empty-state {
  display: grid;
  min-height: 120px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  place-content: center;
  border: 1px dashed rgba(125, 208, 226, 0.15);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.08);
  gap: 7px;
}

.empty-state strong {
  color: var(--muted-strong);
  font-size: 12px;
}

.empty-state small {
  max-width: 300px;
  font-size: 10px;
  line-height: 1.6;
}

.bid-form {
  display: grid;
  gap: 12px;
}

.bid-input-wrap {
  position: relative;
}

.bid-input-wrap .input {
  height: 68px;
  padding: 0 72px 0 16px;
  color: var(--gold-soft);
  font-size: 28px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.bid-input-wrap span {
  position: absolute;
  top: 50%;
  right: 15px;
  color: var(--muted);
  font-size: 11px;
  transform: translateY(-50%);
}

.quick-bids {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.quick-bids button {
  min-height: 34px;
  padding: 0 6px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.privacy-note,
.notice {
  display: flex;
  align-items: flex-start;
  margin: 0;
  padding: 10px 11px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  border: 1px solid rgba(102, 230, 239, 0.1);
  border-radius: 11px;
  background: rgba(102, 230, 239, 0.035);
  gap: 8px;
}

.privacy-note::before,
.notice::before {
  flex: 0 0 auto;
  color: var(--cyan);
  content: "◇";
}

.waiting-state {
  display: grid;
  justify-items: center;
  min-height: 160px;
  padding: 22px;
  text-align: center;
  place-content: center;
}

.waiting-state .spinner {
  margin-bottom: 14px;
}

.waiting-state strong {
  font-size: 14px;
}

.waiting-state p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.bid-progress {
  width: min(240px, 100%);
  height: 5px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.bid-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transition: width 0.25s ease;
}

.turn-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
  padding: 12px;
  border: 1px solid rgba(102, 230, 239, 0.15);
  border-radius: 13px;
  background: rgba(102, 230, 239, 0.045);
  gap: 10px;
}

.turn-banner.is-mine {
  border-color: rgba(244, 201, 108, 0.35);
  background: rgba(244, 201, 108, 0.075);
  box-shadow: 0 0 26px rgba(244, 201, 108, 0.05);
}

.turn-banner strong,
.turn-banner small {
  display: block;
}

.turn-banner strong {
  font-size: 12px;
}

.turn-banner small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.pick-order {
  display: grid;
  counter-reset: order;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 6px;
}

.pick-order li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 39px;
  padding: 0 9px;
  counter-increment: order;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.11);
  gap: 8px;
}

.pick-order li::before {
  display: grid;
  width: 21px;
  height: 21px;
  color: var(--muted);
  font-size: 9px;
  content: counter(order);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  place-content: center;
}

.pick-order li.is-active {
  border-color: rgba(102, 230, 239, 0.27);
  background: rgba(102, 230, 239, 0.055);
}

.pick-order b {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-order span {
  color: var(--gold-soft);
  font-size: 10px;
}

.countdown {
  display: flex;
  align-items: baseline;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
  gap: 5px;
}

.countdown strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.countdown small {
  color: var(--muted);
  font-size: 9px;
}

.trade-builder {
  display: grid;
  gap: 12px;
}

.trade-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  color: var(--cyan);
  font-size: 15px;
}

.trade-card {
  display: grid;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.13);
  gap: 9px;
}

.trade-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trade-card-header strong {
  font-size: 11px;
}

.trade-numbers {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.trade-number {
  display: grid;
  min-width: 0;
  height: 46px;
  color: var(--cyan-soft);
  font-size: 16px;
  font-weight: 900;
  border: 1px solid rgba(102, 230, 239, 0.15);
  border-radius: 11px;
  background: rgba(102, 230, 239, 0.045);
  place-content: center;
}

.trade-status {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.trade-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.expression-display {
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 13px 15px;
  overflow-x: auto;
  color: var(--gold-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(19px, 6vw, 30px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(244, 201, 108, 0.2);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.expression-display.is-empty {
  color: #526a7c;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
}

.expression-numbers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.expression-key {
  min-height: 42px;
  padding: 0 5px;
  color: var(--cyan-soft);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(102, 230, 239, 0.15);
  border-radius: 11px;
  background: rgba(102, 230, 239, 0.045);
}

.expression-key.is-used {
  color: #576c7c;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.operator-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}

.operator-key {
  min-height: 42px;
  color: var(--gold-soft);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(244, 201, 108, 0.15);
  border-radius: 11px;
  background: rgba(244, 201, 108, 0.055);
}

.operator-key.utility {
  color: var(--muted-strong);
  font-size: 11px;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.expression-preview {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.expression-preview strong,
.expression-preview small {
  display: block;
}

.expression-preview strong {
  color: var(--cyan-soft);
  font-size: 13px;
}

.expression-preview small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.rule-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 8px;
}

.rule-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.55;
  gap: 8px;
}

.rule-list li::before {
  display: grid;
  width: 22px;
  height: 22px;
  color: var(--gold);
  font-size: 9px;
  content: attr(data-step);
  border: 1px solid rgba(244, 201, 108, 0.16);
  border-radius: 7px;
  background: rgba(244, 201, 108, 0.045);
  place-content: center;
}

.event-list {
  position: relative;
  gap: 0;
}

.event-list::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 4px;
  width: 1px;
  content: "";
  background: rgba(125, 208, 226, 0.13);
}

.event-list li {
  position: relative;
  padding: 0 0 12px 18px;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.55;
}

.event-list li:last-child {
  padding-bottom: 0;
}

.event-list li::before {
  position: absolute;
  top: 5px;
  left: 0;
  width: 9px;
  height: 9px;
  content: "";
  border: 2px solid var(--ink-850);
  border-radius: 50%;
  background: var(--cyan-strong);
  box-shadow: 0 0 8px rgba(33, 198, 210, 0.35);
}

.event-list time {
  display: block;
  margin-top: 2px;
  color: #687f91;
  font-size: 8px;
}

.details-panel {
  padding: 0;
  overflow: hidden;
}

.details-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 17px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.details-panel summary::-webkit-details-marker {
  display: none;
}

.details-panel summary::after {
  color: var(--cyan);
  font-size: 16px;
  content: "+";
}

.details-panel[open] summary::after {
  content: "−";
}

.details-content {
  padding: 0 17px 17px;
}

.score-hero {
  display: grid;
  justify-items: center;
  padding: 26px 18px;
  text-align: center;
}

.crown {
  position: relative;
  width: 74px;
  height: 46px;
  margin-bottom: 14px;
  clip-path: polygon(0 12%, 24% 55%, 50% 0, 76% 55%, 100% 12%, 88% 100%, 12% 100%);
  background: linear-gradient(135deg, #fff4bf, var(--gold) 55%, #c88b29);
  filter: drop-shadow(0 8px 17px rgba(244, 201, 108, 0.25));
}

.score-hero h1 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 28px;
  letter-spacing: 0.1em;
}

.score-hero p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.ranking-list {
  gap: 10px;
}

.ranking-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  padding: 13px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.14);
  gap: 10px;
}

.ranking-card.is-me {
  border-color: rgba(102, 230, 239, 0.3);
  background: rgba(102, 230, 239, 0.055);
}

.ranking-card.is-winner {
  border-color: rgba(244, 201, 108, 0.34);
  background: linear-gradient(135deg, rgba(244, 201, 108, 0.11), rgba(244, 201, 108, 0.025));
}

.rank-number {
  display: grid;
  width: 36px;
  height: 36px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  place-content: center;
}

.ranking-card.is-winner .rank-number {
  color: var(--ink-950);
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}

.rank-player {
  min-width: 0;
}

.rank-player strong,
.rank-player small {
  display: block;
}

.rank-player strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-player small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.rank-score {
  grid-column: 3;
  grid-row: 1;
  color: var(--gold-soft);
  font-size: 23px;
  font-weight: 900;
  text-align: right;
}

.ranking-card > .score-breakdown {
  grid-column: 1 / -1;
}

.rank-score small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  gap: 7px;
}

.score-breakdown div {
  padding: 7px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.12);
}

.score-breakdown small,
.score-breakdown b {
  display: block;
}

.score-breakdown small {
  color: var(--muted);
  font-size: 8px;
}

.score-breakdown b {
  margin-top: 2px;
  font-size: 11px;
}

.score-detail-list {
  display: grid;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  gap: 6px;
}

.score-detail-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 9px;
  color: var(--muted-strong);
  font-size: 9px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.1);
  gap: 8px;
}

.score-detail-list b.is-positive { color: var(--green); }
.score-detail-list b.is-negative { color: var(--rose); }

.toast-stack {
  position: fixed;
  right: max(13px, var(--safe-right));
  bottom: calc(15px + var(--safe-bottom));
  left: max(13px, var(--safe-left));
  z-index: 90;
  display: grid;
  max-width: 430px;
  margin: 0 auto;
  pointer-events: none;
  gap: 8px;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  padding: 12px 13px;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.5;
  border: 1px solid rgba(125, 208, 226, 0.2);
  border-radius: 13px;
  background: rgba(7, 21, 40, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  animation: float-in 0.22s ease both;
  gap: 9px;
}

.toast::before {
  color: var(--cyan);
  content: "◆";
}

.toast[data-tone="error"] {
  border-color: rgba(255, 138, 154, 0.25);
}

.toast[data-tone="error"]::before {
  color: var(--rose);
}

.toast[data-tone="success"] {
  border-color: rgba(97, 214, 165, 0.25);
}

.toast[data-tone="success"]::before {
  color: var(--green);
}

.toast button {
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  border: 0;
  background: transparent;
}

.busy-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 20px;
  background: rgba(2, 7, 14, 0.65);
  backdrop-filter: blur(5px);
  place-content: center;
}

.busy-layer[hidden] {
  display: none;
}

.busy-card {
  display: grid;
  min-width: 150px;
  min-height: 110px;
  justify-items: center;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  place-content: center;
  gap: 12px;
}

.busy-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 11px;
}

.spinner {
  display: block;
  width: 25px;
  height: 25px;
  border: 2px solid rgba(102, 230, 239, 0.14);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.confirm-dialog {
  width: min(calc(100% - 28px), 400px);
  padding: 0;
  color: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 21px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.confirm-dialog::backdrop {
  background: rgba(2, 7, 14, 0.72);
  backdrop-filter: blur(6px);
}

.confirm-dialog form {
  display: grid;
  justify-items: center;
  padding: 24px 20px 20px;
  text-align: center;
}

.dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 22px;
  border: 1px solid rgba(244, 201, 108, 0.2);
  border-radius: 15px;
  background: rgba(244, 201, 108, 0.07);
  place-content: center;
}

.confirm-dialog h2 {
  margin: 0;
  font-size: 17px;
}

.confirm-dialog p {
  margin: 9px 0 20px;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.7;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 8px;
}

.noscript {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 100;
  padding: 14px;
  color: #fff;
  text-align: center;
  border-radius: 12px;
  background: #862f40;
}

.fatal-card {
  display: grid;
  width: min(100%, 460px);
  min-height: calc(100vh - 60px);
  min-height: calc(100dvh - 60px);
  margin: 0 auto;
  align-content: center;
  justify-items: center;
  padding: 22px;
  text-align: center;
}

.fatal-card h1 {
  margin: 16px 0 7px;
  font-size: 22px;
}

.fatal-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

@media (min-width: 420px) {
  .target-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .target-points {
    grid-column: 2;
    text-align: left;
  }

  .auction-numbers {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 620px) {
  #app {
    padding-top: 24px;
  }

  .room-pill span {
    display: inline;
  }

  .entry-card,
  .panel,
  .stage-banner {
    padding: 22px;
  }

  .schedule-strip {
    margin-right: -22px;
    margin-left: -22px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .auction-numbers {
    grid-template-columns: repeat(6, 1fr);
  }

  .holding-grid,
  .expression-numbers {
    grid-template-columns: repeat(8, 1fr);
  }

  .trade-builder {
    grid-template-columns: 1fr 34px 1fr;
    align-items: end;
  }

  .trade-arrow {
    height: 49px;
  }
}

@media (min-width: 860px) {
  .app-header {
    padding-top: calc(11px + var(--safe-top));
    padding-bottom: 11px;
  }

  .brand-button strong {
    font-size: 18px;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
    gap: 18px;
  }

  .content-grid.single-column {
    grid-template-columns: 1fr;
  }

  .stage-banner h1,
  .stage-banner h2 {
    font-size: 31px;
  }

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

  .auction-numbers {
    grid-template-columns: repeat(7, 1fr);
  }

  .side-column.is-sticky {
    position: sticky;
    top: 82px;
  }

  .landing {
    grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.75fr);
    align-items: center;
    gap: 60px;
  }

  .landing-hero {
    justify-items: start;
    text-align: left;
  }

  .landing-lead {
    margin-left: 0;
  }

  .feature-line {
    justify-content: flex-start;
  }

  .landing-hero::before {
    left: 37%;
  }

  .landing h1 {
    font-size: clamp(68px, 8vw, 96px);
  }

  .ranking-card {
    grid-template-columns: 44px minmax(0, 1fr) 260px 74px;
  }

  .ranking-card > .score-breakdown,
  .rank-score {
    grid-column: auto;
    grid-row: auto;
  }

  .score-breakdown {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}

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

@media (forced-colors: active) {
  .button,
  .panel,
  .stage-banner,
  .target-card,
  .number-tile {
    border: 1px solid CanvasText;
  }
}
