/* =========================================================
   璀璨宝石 · Splendor Online
   A hand-built, dependency-free interface.
   ========================================================= */

:root {
  --bg: #07100d;
  --bg-soft: #0b1713;
  --panel: rgba(17, 32, 26, 0.78);
  --panel-solid: #111f19;
  --panel-raised: #16271f;
  --ink: #efeadd;
  --ink-soft: #c9c3b3;
  --muted: #8d9185;
  --faint: #5e675e;
  --gold: #d6b16a;
  --gold-bright: #f2daa0;
  --gold-deep: #8e682b;
  --line: rgba(225, 199, 143, 0.14);
  --line-strong: rgba(225, 199, 143, 0.28);
  --danger: #dd7a6e;
  --success: #7cc4a5;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 14px 38px rgba(0, 0, 0, 0.35);
  --radius: 14px;

  --gem-white: #e7edf2;
  --gem-white-deep: #8fa1ae;
  --gem-white-glow: rgba(231, 237, 242, 0.26);
  --gem-blue: #3d8fe7;
  --gem-blue-deep: #174e91;
  --gem-blue-glow: rgba(61, 143, 231, 0.32);
  --gem-green: #2dad72;
  --gem-green-deep: #0f5d3d;
  --gem-green-glow: rgba(45, 173, 114, 0.3);
  --gem-red: #de5555;
  --gem-red-deep: #861d26;
  --gem-red-glow: rgba(222, 85, 85, 0.3);
  --gem-black: #4b545f;
  --gem-black-deep: #171c22;
  --gem-black-glow: rgba(75, 84, 95, 0.34);
  --gem-gold: #e5b954;
  --gem-gold-deep: #91651a;
  --gem-gold-glow: rgba(229, 185, 84, 0.3);
}

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

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 20% -10%, #1e3d2e 0%, transparent 45%),
    radial-gradient(circle at 90% 8%, #2c2417 0%, transparent 38%),
    linear-gradient(180deg, #0a1411 0%, var(--bg) 58%, #060c0a 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

::selection {
  background: rgba(214, 177, 106, 0.32);
  color: #fff8e7;
}

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

button {
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

input {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- ambient background ---------- */

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

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.glow-a {
  width: 42vw;
  height: 42vw;
  left: -16vw;
  top: 18vh;
  background: radial-gradient(circle, rgba(34, 94, 64, 0.28), transparent 68%);
}

.glow-b {
  width: 38vw;
  height: 38vw;
  right: -14vw;
  top: -10vh;
  background: radial-gradient(circle, rgba(146, 106, 46, 0.16), transparent 70%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(225, 199, 143, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 199, 143, 0.026) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 28%, #000 0%, transparent 72%);
}

/* ---------- generic controls ---------- */

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: 180ms ease;
}

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

.ghost-btn.compact {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.text-btn {
  color: var(--gold);
  font-size: inherit;
  padding: 0;
  border-bottom: 1px solid rgba(214, 177, 106, 0.28);
  transition: 150ms ease;
}

.text-btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-size: 15px;
  transition: 160ms ease;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.icon-btn.danger:hover {
  color: var(--danger);
  border-color: rgba(221, 122, 110, 0.45);
}

.primary-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0 20px 0 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 242, 200, 0.38);
  border-radius: 10px;
  color: #1b160b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 40%),
    linear-gradient(135deg, #e8c980 0%, #d1a85a 46%, #b88a3e 100%);
  box-shadow:
    0 10px 24px rgba(177, 132, 54, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.07em;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.42) 45%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 700ms ease;
}

.primary-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 16px 32px rgba(177, 132, 54, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.primary-btn:hover:not(:disabled)::after {
  transform: translateX(120%);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-btn:disabled {
  filter: grayscale(0.55) brightness(0.65);
  opacity: 0.65;
}

.primary-btn .btn-arrow {
  font-size: 20px;
  line-height: 1;
  opacity: 0.8;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- connection banner ---------- */

.connection-banner {
  position: fixed;
  z-index: 120;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid rgba(214, 177, 106, 0.25);
  border-radius: 999px;
  background: rgba(14, 26, 21, 0.92);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- views ---------- */

.view {
  position: relative;
  z-index: 2;
  animation: view-in 420ms ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================================================
   HOME
   ========================================================= */

.home-view {
  display: flex;
  flex-direction: column;
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
}

.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: 86px;
  border-bottom: 1px solid rgba(225, 199, 143, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-gem {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 45px;
  color: var(--gold);
  font-size: 25px;
  filter: drop-shadow(0 0 16px rgba(214, 177, 106, 0.32));
}

.brand-gem::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(214, 177, 106, 0.25);
  transform: rotate(45deg) scale(0.7);
}

.brand-gem.small {
  width: 30px;
  height: 32px;
  font-size: 19px;
}

.brand-gem.small::before {
  display: none;
}

.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-words strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.brand-words small {
  margin-top: 5px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.34em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.live-pill,
.room-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-pill i,
.room-status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(124, 196, 165, 0.1);
  animation: live-pulse 2.6s ease infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 470px);
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  flex: 1 0 auto;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: clamp(46px, 7vh, 92px) 0 clamp(38px, 6vh, 72px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding-bottom: 70px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero h1 {
  position: relative;
  margin: 18px 0 24px;
  font-family: var(--serif);
  font-size: clamp(58px, 7.4vw, 104px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0.03em;
  color: transparent;
  background:
    linear-gradient(178deg, #fff9e9 4%, #efe1c1 32%, #cfaf70 66%, #9b7437 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 15px 36px rgba(0, 0, 0, 0.4));
}

.hero h1 .h1-latin {
  display: block;
  margin-top: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 400;
  letter-spacing: 0.78em;
  color: rgba(214, 177, 106, 0.56);
  -webkit-text-fill-color: rgba(214, 177, 106, 0.56);
}

.lead {
  max-width: 540px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.95;
  letter-spacing: 0.02em;
}

.lead strong {
  color: var(--gold-bright);
  font-weight: 600;
}

.feature-row {
  display: flex;
  gap: clamp(24px, 3vw, 44px);
  margin-top: 36px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 72px;
}

.feature b {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.feature span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 42px;
  color: rgba(201, 195, 179, 0.52);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.hero-note .line {
  width: 46px;
  height: 1px;
  background: rgba(225, 199, 143, 0.18);
}

/* floating gems */

.gem-cloud {
  position: absolute;
  right: -30px;
  bottom: -22px;
  width: 430px;
  height: 250px;
  pointer-events: none;
  opacity: 0.9;
}

.floating-gem {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0%, 92% 24%, 82% 88%, 18% 88%, 8% 24%);
  transform: rotate(calc(var(--i) * 7deg - 14deg));
  animation: float-gem 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.7s);
}

.floating-gem span {
  transform: rotate(45deg);
  font-size: 0.7em;
  opacity: 0.55;
}

.floating-gem::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: inherit;
  clip-path: polygon(50% 0, 94% 26%, 82% 88%, 18% 88%, 6% 26%);
}

.floating-gem::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.5), transparent 38%);
  opacity: 0.5;
}

.gem-white {
  left: 10px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, #eef4f7, #8499a6);
  box-shadow: 0 12px 30px var(--gem-white-glow);
}

.gem-blue {
  left: 74px;
  bottom: 92px;
  width: 68px;
  height: 68px;
  background: linear-gradient(145deg, #6fb5ff, #185197);
  box-shadow: 0 18px 45px var(--gem-blue-glow);
}

.gem-green {
  left: 155px;
  bottom: 26px;
  width: 82px;
  height: 82px;
  background: linear-gradient(145deg, #56d49b, #126642);
  box-shadow: 0 18px 45px var(--gem-green-glow);
}

.gem-red {
  left: 250px;
  bottom: 96px;
  width: 55px;
  height: 55px;
  background: linear-gradient(145deg, #fa8585, #8f2029);
  box-shadow: 0 14px 34px var(--gem-red-glow);
}

.gem-black {
  right: 4px;
  bottom: 34px;
  width: 65px;
  height: 65px;
  background: linear-gradient(145deg, #77828e, #171c22);
  box-shadow: 0 16px 38px var(--gem-black-glow);
}

.gem-gold {
  right: 54px;
  bottom: 124px;
  width: 36px;
  height: 36px;
  background: linear-gradient(145deg, #ffe19a, #a87520);
  box-shadow: 0 10px 26px var(--gem-gold-glow);
}

@keyframes float-gem {
  0%,
  100% {
    transform: translateY(0) rotate(calc(var(--i) * 7deg - 14deg));
  }
  50% {
    transform: translateY(-13px) rotate(calc(var(--i) * 7deg - 6deg));
  }
}

/* ---------- entry panel ---------- */

.entry-panel {
  position: relative;
  align-self: center;
  padding: 0;
  border: 1px solid rgba(225, 199, 143, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 36%),
    rgba(14, 27, 22, 0.76);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.entry-panel::before,
.entry-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.entry-panel::before {
  inset: 8px;
  border: 1px solid rgba(225, 199, 143, 0.06);
  border-radius: 12px;
}

.entry-panel::after {
  top: -70px;
  right: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 177, 106, 0.12), transparent 68%);
}

.panel-ornament {
  position: absolute;
  top: 70px;
  right: 0;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 177, 106, 0.3));
}

.entry-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(225, 199, 143, 0.1);
}

.entry-tab {
  position: relative;
  height: 58px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  transition: 180ms ease;
}

.entry-tab::after {
  content: "";
  position: absolute;
  right: 28%;
  bottom: -1px;
  left: 28%;
  height: 1px;
  background: var(--gold);
  opacity: 0;
  transform: scaleX(0.4);
  transition: 220ms ease;
}

.entry-tab:hover {
  color: var(--ink-soft);
}

.entry-tab.active {
  color: var(--gold-bright);
}

.entry-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.entry-content {
  position: relative;
  z-index: 1;
  padding: 28px 30px 24px;
}

.entry-form {
  display: flex;
  flex-direction: column;
  gap: 19px;
  animation: form-in 260ms ease both;
}

@keyframes form-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2px;
}

.form-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.28em;
}

.form-heading h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.form-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(214, 177, 106, 0.22);
  border-radius: 50%;
  color: var(--gold);
  font-size: 12px;
  opacity: 0.7;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span,
.field > legend {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(225, 199, 143, 0.13);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(4, 10, 8, 0.45);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  transition: 170ms ease;
}

.field input::placeholder {
  color: rgba(141, 145, 133, 0.55);
}

.field input:focus {
  outline: none;
  border-color: rgba(214, 177, 106, 0.5);
  background: rgba(6, 13, 10, 0.68);
  box-shadow:
    0 0 0 3px rgba(214, 177, 106, 0.08),
    inset 0 2px 8px rgba(0, 0, 0, 0.16);
}

.field input.code-input {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  text-align: center;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(225, 199, 143, 0.1);
  border-radius: 9px;
  background: rgba(3, 8, 6, 0.35);
}

.segmented[data-group="visibility"] {
  grid-template-columns: 1fr 1fr;
}

.segmented label {
  position: relative;
  cursor: pointer;
}

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

.segmented label span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  transition: 160ms ease;
}

.segmented label:hover span {
  color: var(--ink-soft);
}

.segmented input:checked + span {
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(214, 177, 106, 0.17), rgba(214, 177, 106, 0.08));
  box-shadow: inset 0 0 0 1px rgba(214, 177, 106, 0.22);
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--gold);
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.difficulty-option {
  position: relative;
  cursor: pointer;
}

.difficulty-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.difficulty-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 52px;
  padding: 9px 8px;
  border: 1px solid rgba(225, 199, 143, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  text-align: center;
  transition: 160ms ease;
}

.difficulty-card b {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.difficulty-card small {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.difficulty-option:hover .difficulty-card {
  border-color: rgba(225, 199, 143, 0.2);
}

.difficulty-option input:checked + .difficulty-card {
  border-color: rgba(214, 177, 106, 0.42);
  background: linear-gradient(180deg, rgba(214, 177, 106, 0.12), rgba(214, 177, 106, 0.035));
  box-shadow: inset 0 0 20px rgba(214, 177, 106, 0.04);
}

.difficulty-option input:checked + .difficulty-card b {
  color: var(--gold-bright);
}

.difficulty-option input:focus-visible + .difficulty-card {
  outline: 2px solid var(--gold);
}

.mushroom-option .difficulty-card b {
  color: #cdb6e8;
}

.mushroom-option input:checked + .difficulty-card {
  border-color: rgba(170, 133, 214, 0.6);
  background: linear-gradient(180deg, rgba(139, 102, 184, 0.16), rgba(139, 102, 184, 0.05));
  box-shadow: inset 0 0 20px rgba(139, 102, 184, 0.08);
}

.mushroom-option input:checked + .difficulty-card b {
  color: #e4d4f7;
}

.boss-rule-hint {
  margin-top: 2px;
  color: #a990c5;
  font-size: 9px;
  line-height: 1.55;
}

.info-block {
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(225, 199, 143, 0.08);
  border-radius: 8px;
  background: rgba(3, 8, 6, 0.26);
}

.info-icon {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 17px;
  line-height: 1.3;
}

.info-block p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.form-footnote {
  margin-top: -4px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-align: center;
}

.panel-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-top: 1px solid rgba(225, 199, 143, 0.08);
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.dot-sep {
  color: rgba(214, 177, 106, 0.35);
}

/* ---------- lower home ---------- */

.home-lower {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  border-top: 1px solid rgba(225, 199, 143, 0.08);
  border-bottom: 1px solid rgba(225, 199, 143, 0.08);
  background: rgba(225, 199, 143, 0.065);
}

.lower-card {
  display: flex;
  gap: 16px;
  padding: 22px 28px;
  background: rgba(7, 16, 13, 0.64);
}

.lower-num {
  color: rgba(214, 177, 106, 0.42);
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.lower-card b {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.lower-card p {
  color: var(--faint);
  font-size: 10px;
  line-height: 1.7;
}

.home-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px max(22px, env(safe-area-inset-bottom));
  color: rgba(141, 145, 133, 0.5);
  font-size: 9px;
  letter-spacing: 0.06em;
}

/* =========================================================
   LOBBY
   ========================================================= */

.lobby-view {
  min-height: 100vh;
}

.lobby-view .home-nav {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.lobby-content {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(44px, 7vh, 82px) 0 60px;
}

.lobby-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.lobby-heading .eyebrow {
  margin-bottom: 11px;
}

.lobby-heading h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.room-code-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  vertical-align: baseline;
}

.room-code {
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 0.78em;
  letter-spacing: 0.15em;
}

.copy-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(225, 199, 143, 0.18);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  transition: 160ms ease;
}

.copy-code:hover {
  color: var(--gold);
  border-color: rgba(214, 177, 106, 0.4);
}

.lobby-sub {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.lobby-actions {
  display: flex;
  gap: 9px;
  padding-bottom: 4px;
}

.lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(310px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.seat-panel,
.lobby-side {
  border: 1px solid rgba(225, 199, 143, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.025), transparent 32%),
    rgba(13, 26, 21, 0.75);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.seat-panel {
  padding: 24px;
}

.seat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.seat-panel-head h2,
.lobby-side h2 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.seat-count {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.seat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.seat-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(225, 199, 143, 0.1);
  border-radius: 11px;
  background: rgba(5, 12, 9, 0.32);
  overflow: hidden;
  transition: 180ms ease;
}

.seat-card::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -36px;
  width: 98px;
  height: 98px;
  border: 1px solid rgba(214, 177, 106, 0.06);
  transform: rotate(45deg);
}

.seat-card.filled:hover {
  border-color: rgba(225, 199, 143, 0.18);
}

.seat-card.empty {
  border-style: dashed;
  opacity: 0.7;
}

.seat-card.you {
  border-color: rgba(214, 177, 106, 0.28);
  background: linear-gradient(150deg, rgba(214, 177, 106, 0.08), rgba(5, 12, 9, 0.3));
}

.seat-avatar {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #0b1611;
  background: linear-gradient(145deg, var(--avatar-a, #d8b878), var(--avatar-b, #91702f));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.seat-avatar.bot {
  color: var(--gold);
  background: linear-gradient(145deg, #22362c, #111e18);
  border-color: rgba(214, 177, 106, 0.22);
  font-size: 21px;
}

.seat-info {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.seat-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 19px;
  padding: 0 7px;
  border: 1px solid rgba(225, 199, 143, 0.11);
  border-radius: 4px;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.tag.gold {
  color: var(--gold);
  border-color: rgba(214, 177, 106, 0.24);
  background: rgba(214, 177, 106, 0.06);
}

.tag.boss {
  color: #e1c6ff;
  border-color: rgba(170, 133, 214, 0.36);
  background: rgba(139, 102, 184, 0.12);
}

.room-mode-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(214, 177, 106, 0.28);
  border-radius: 3px;
  color: var(--gold);
  background: rgba(214, 177, 106, 0.07);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.06em;
  vertical-align: 1px;
}

.tag.live {
  color: var(--success);
  border-color: rgba(124, 196, 165, 0.2);
}

.tag.offline {
  color: var(--danger);
  border-color: rgba(221, 122, 110, 0.18);
}

.seat-remove {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: var(--faint);
  font-size: 12px;
  transition: 150ms ease;
}

.seat-remove:hover {
  color: var(--danger);
  background: rgba(221, 122, 110, 0.09);
}

.empty-slot-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 50px;
  border: 1px dashed rgba(225, 199, 143, 0.15);
  border-radius: 10px;
  color: rgba(225, 199, 143, 0.22);
  font-size: 20px;
}

.empty-slot-text {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.lobby-side {
  padding: 24px;
}

.lobby-side-section + .lobby-side-section {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(225, 199, 143, 0.08);
}

.lobby-side p.hint {
  margin-top: 7px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.75;
}

.invite-row {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.invite-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(225, 199, 143, 0.12);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(4, 10, 8, 0.42);
  font-size: 10px;
  outline: none;
}

.copy-invite {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(214, 177, 106, 0.25);
  border-radius: 7px;
  color: var(--gold);
  background: rgba(214, 177, 106, 0.07);
  font-size: 10px;
  letter-spacing: 0.06em;
  transition: 160ms ease;
}

.copy-invite:hover {
  background: rgba(214, 177, 106, 0.13);
}

.add-bot-row {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.add-bot-row select {
  flex: 1;
  height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(225, 199, 143, 0.12);
  border-radius: 7px;
  color: var(--ink-soft);
  background: #0b1712;
  font-size: 11px;
}

.side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(225, 199, 143, 0.16);
  border-radius: 7px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  white-space: nowrap;
  transition: 160ms ease;
}

.side-btn:hover {
  border-color: rgba(225, 199, 143, 0.3);
  color: var(--ink);
}

.start-btn {
  margin-top: 18px;
}

.lobby-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 12px;
  text-align: center;
}

.lobby-waiting .spinner {
  width: 22px;
  height: 22px;
}

.lobby-waiting b {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.lobby-waiting p {
  max-width: 250px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.7;
}

.lobby-tip {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(225, 199, 143, 0.07);
  border-radius: 8px;
  background: rgba(4, 10, 8, 0.25);
}

.lobby-tip span {
  color: var(--gold);
  font-size: 13px;
}

.lobby-tip p {
  color: var(--faint);
  font-size: 9px;
  line-height: 1.7;
}

/* =========================================================
   GAME
   ========================================================= */

.game-view {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.game-topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  flex: 0 0 auto;
  height: 60px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(225, 199, 143, 0.1);
  background: linear-gradient(180deg, rgba(10, 20, 16, 0.94), rgba(8, 16, 13, 0.88));
  backdrop-filter: blur(16px);
}

.game-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-brand > div {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.game-brand strong {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.game-brand small {
  margin-top: 4px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 6px;
  letter-spacing: 0.32em;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(225, 199, 143, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  font-size: 9px;
  letter-spacing: 0.12em;
  transition: 160ms ease;
}

.meta-chip.room-chip {
  color: var(--gold);
  font-family: Georgia, serif;
  letter-spacing: 0.14em;
}

.meta-chip.room-chip:hover {
  border-color: rgba(214, 177, 106, 0.35);
  background: rgba(214, 177, 106, 0.07);
}

.game-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.game-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 330px;
  gap: 12px;
  flex: 1;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.left-rail,
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 177, 106, 0.15) transparent;
}

.left-rail::-webkit-scrollbar,
.right-rail::-webkit-scrollbar,
.market-board::-webkit-scrollbar,
.log-list::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.left-rail::-webkit-scrollbar-thumb,
.right-rail::-webkit-scrollbar-thumb,
.market-board::-webkit-scrollbar-thumb,
.log-list::-webkit-scrollbar-thumb {
  background: rgba(214, 177, 106, 0.16);
  border-radius: 4px;
}

.panel {
  position: relative;
  border: 1px solid rgba(225, 199, 143, 0.1);
  border-radius: 12px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.022), transparent 34%),
    rgba(12, 24, 19, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 13px 8px;
}

.panel-heading h2 {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.panel-sub {
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---------- nobles ---------- */

.nobles-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px 10px 11px;
}

.noble-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 69px;
  padding: 8px 5px 6px;
  border: 1px solid rgba(214, 177, 106, 0.18);
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 177, 106, 0.12), transparent 60%),
    linear-gradient(160deg, #1b2c24, #101d17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: 180ms ease;
}

.noble-tile:hover {
  border-color: rgba(214, 177, 106, 0.42);
  transform: translateY(-1px);
}

.noble-crown {
  position: absolute;
  top: 4px;
  left: 6px;
  color: rgba(214, 177, 106, 0.55);
  font-size: 9px;
}

.noble-points {
  position: absolute;
  top: 3px;
  right: 5px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 11px;
}

.noble-points small {
  font-size: 6px;
  opacity: 0.7;
}

.noble-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 27px;
  margin: 1px 0 5px;
  color: rgba(214, 177, 106, 0.72);
  font-size: 14px;
}

.noble-req {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.noble-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 24px;
  height: 17px;
  padding: 0 3px;
  border: 1px solid color-mix(in srgb, var(--gem) 35%, transparent);
  border-radius: 4px;
  color: var(--gem);
  background: color-mix(in srgb, var(--gem) 12%, #07100d);
  font-family: Georgia, serif;
  font-size: 8px;
}

.noble-chip i {
  font-size: 6px;
  font-style: normal;
}

.noble-tile.owned {
  opacity: 0.38;
  filter: grayscale(0.7);
}

/* ---------- bank ---------- */

.bank-panel {
  display: flex;
  flex-direction: column;
}

.bank-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 2px 10px 8px;
}

.bank-token {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  background: rgba(4, 10, 8, 0.33);
  text-align: left;
  transition: 160ms ease;
}

.bank-token:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--gem) 38%, transparent);
  background: color-mix(in srgb, var(--gem) 7%, rgba(4, 10, 8, 0.4));
}

.bank-token.selected {
  border-color: color-mix(in srgb, var(--gem) 62%, transparent);
  background: color-mix(in srgb, var(--gem) 13%, rgba(4, 10, 8, 0.42));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--gem) 12%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--gem) 9%, transparent);
}

.bank-token:disabled {
  opacity: 0.45;
}

.bank-token.depleted {
  opacity: 0.35;
  filter: grayscale(0.5);
}

.bank-token.wide {
  grid-column: 1 / -1;
  min-height: 46px;
}

.token-orb {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.52), transparent 28%),
    radial-gradient(circle at 50% 55%, var(--gem), var(--gem-deep) 78%);
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--gem) 22%, transparent),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25);
  font-size: 9px;
}

.bank-token.wide .token-orb {
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.55), transparent 28%),
    radial-gradient(circle at 50% 55%, #f0c968, #956719 80%);
}

.token-meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.token-meta b {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.token-meta small {
  margin-top: 3px;
  color: var(--faint);
  font-family: Georgia, serif;
  font-size: 10px;
}

.token-count {
  position: absolute;
  top: 4px;
  right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 99px;
  color: #1b1509;
  background: var(--gold);
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  animation: pop-in 180ms ease both;
}

@keyframes pop-in {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.token-controls {
  margin-top: auto;
  padding: 0 9px 9px;
}

.token-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(225, 199, 143, 0.08);
  border-radius: 7px;
  background: rgba(4, 10, 8, 0.3);
}

.token-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  border-radius: 5px;
  color: var(--faint);
  font-size: 10.5px;
  transition: 150ms ease;
}

.token-mode:hover:not(:disabled) {
  color: var(--ink-soft);
}

.token-mode.active {
  color: var(--gold-bright);
  background: rgba(214, 177, 106, 0.1);
  box-shadow: inset 0 0 0 1px rgba(214, 177, 106, 0.15);
}

.token-mode:disabled {
  opacity: 0.35;
}

.token-mode b {
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.7;
}

.token-hint {
  min-height: 29px;
  padding: 8px 2px 4px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.45;
}

.token-hint strong {
  color: var(--gold);
  font-weight: 500;
}

.token-tray {
  display: flex;
  align-items: center;
  gap: 5px;
}

.token-tray-gems {
  display: flex;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.tray-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid color-mix(in srgb, var(--gem) 35%, transparent);
  border-radius: 50%;
  color: var(--gem);
  background: color-mix(in srgb, var(--gem) 10%, transparent);
  font-size: 8px;
}

.confirm-tokens {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(214, 177, 106, 0.28);
  border-radius: 6px;
  color: var(--gold-bright);
  background: rgba(214, 177, 106, 0.08);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  transition: 150ms ease;
}

.confirm-tokens:hover:not(:disabled) {
  background: rgba(214, 177, 106, 0.16);
}

.confirm-tokens:disabled {
  opacity: 0.3;
  border-color: rgba(225, 199, 143, 0.12);
}

/* ---------- board ---------- */

.board-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.turn-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 15px;
  min-height: 46px;
  margin-bottom: 9px;
  padding: 9px 14px;
  border: 1px solid rgba(225, 199, 143, 0.1);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(214, 177, 106, 0.06), transparent 55%),
    rgba(12, 24, 19, 0.55);
  overflow: hidden;
}

.turn-banner.your-turn {
  border-color: rgba(214, 177, 106, 0.3);
  background:
    linear-gradient(90deg, rgba(214, 177, 106, 0.12), transparent 62%),
    rgba(12, 24, 19, 0.64);
  box-shadow: 0 0 28px rgba(214, 177, 106, 0.05);
}

.turn-banner.urgent {
  border-color: rgba(214, 177, 106, 0.44);
}

.turn-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.turn-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(214, 177, 106, 0.08);
  animation: live-pulse 2s ease infinite;
}

.turn-banner:not(.your-turn) .turn-pulse {
  background: var(--faint);
  box-shadow: none;
  animation: none;
}

.turn-text {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.turn-text em {
  color: var(--gold-bright);
  font-style: normal;
}

.turn-sub {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.turn-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-round {
  display: none;
  color: var(--faint);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.small-action {
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid rgba(214, 177, 106, 0.2);
  border-radius: 5px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: 150ms ease;
}

.small-action:hover {
  background: rgba(214, 177, 106, 0.1);
}

.small-action.active {
  color: #171207;
  background: var(--gold);
  border-color: var(--gold-bright);
}

.market-board {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: stretch;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.market-row {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: 32px repeat(4, minmax(0, 1fr)) 85px;
  gap: 7px;
  min-height: 150px;
}

.level-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(225, 199, 143, 0.07);
  border-radius: 7px;
  background: rgba(4, 10, 8, 0.22);
  color: var(--faint);
}

.level-rail b {
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(214, 177, 106, 0.55);
}

.level-rail span {
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0.55;
}

/* ---------- development cards ---------- */

.dev-card {
  --gem: var(--gem-white);
  --gem-deep: var(--gem-white-deep);
  --gem-glow: var(--gem-white-glow);
  position: relative;
  min-width: 0;
  border: 1px solid rgba(225, 199, 143, 0.14);
  border-radius: 9px;
  background: #101b16;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
  user-select: none;
  isolation: isolate;
}

.dev-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 75% 8%, var(--gem-glow), transparent 42%),
    linear-gradient(160deg, color-mix(in srgb, var(--gem) 22%, #0d1712), #0b1410 72%);
  opacity: 0.92;
}

.dev-card::after {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 6px;
  pointer-events: none;
}

.dev-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--gem) 42%, rgba(214, 177, 106, 0.4));
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.32),
    0 0 0 1px var(--gem-glow);
}

.dev-card.affordable {
  border-color: color-mix(in srgb, var(--gold) 52%, var(--gem) 28%);
  box-shadow:
    0 0 0 1px rgba(214, 177, 106, 0.12),
    0 0 22px rgba(214, 177, 106, 0.07);
}

.dev-card.affordable:hover {
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(214, 177, 106, 0.28),
    0 0 26px rgba(214, 177, 106, 0.1);
}

.card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 150px;
  padding: 7px 8px 6px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: 25px;
}

.card-points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border: 1px solid rgba(214, 177, 106, 0.42);
  border-radius: 50%;
  color: var(--gold-bright);
  background: rgba(8, 15, 12, 0.78);
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.card-points.zero {
  border-color: rgba(255, 255, 255, 0.08);
  color: transparent;
}

.card-bonus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: color-mix(in srgb, var(--gem) 85%, #fff);
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.38), transparent 32%),
    radial-gradient(circle at 50% 60%, var(--gem), var(--gem-deep) 80%);
  box-shadow:
    0 3px 10px var(--gem-glow),
    inset 0 -2px 4px rgba(0, 0, 0, 0.26);
  font-size: 8px;
}

.card-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 49px;
  margin: 2px 0 4px;
  overflow: hidden;
}

.card-art::before,
.card-art::after {
  content: "";
  position: absolute;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gem) 38%, transparent), transparent);
  transform: rotate(-24deg);
  opacity: 0.65;
}

.card-art::before {
  top: 28%;
}

.card-art::after {
  bottom: 23%;
}

.card-gem {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(36px, 3.2vw, 52px);
  height: clamp(41px, 3.7vw, 59px);
  color: rgba(255, 255, 255, 0.23);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(160deg, var(--gem), var(--gem-deep));
  clip-path: polygon(50% 0%, 94% 27%, 82% 91%, 18% 91%, 6% 27%);
  box-shadow: 0 9px 24px var(--gem-glow);
  font-size: 12px;
  filter: drop-shadow(0 0 12px var(--gem-glow));
}

.card-gem::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.21);
  clip-path: polygon(50% 0%, 94% 27%, 82% 91%, 18% 91%, 6% 27%);
}

.card-level {
  position: absolute;
  right: 1px;
  bottom: -2px;
  color: color-mix(in srgb, var(--gem) 17%, transparent);
  font-family: Georgia, serif;
  font-size: clamp(30px, 3.5vw, 54px);
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
}

.card-cost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 31px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.cost-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 29px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--gem) 40%, transparent);
  border-radius: 5px;
  color: color-mix(in srgb, var(--gem) 80%, #fff);
  background: color-mix(in srgb, var(--gem) 13%, rgba(4, 9, 7, 0.82));
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cost-chip i {
  color: var(--gem);
  font-size: 8px;
  font-style: normal;
  opacity: 0.9;
}

.cost-chip b {
  font-weight: 400;
}

.cost-chip.discounted {
  border-style: dashed;
  opacity: 0.72;
}

.cost-chip.discounted::after {
  content: "−";
  margin-left: 1px;
  color: var(--success);
  font-size: 9px;
}

.card-actions {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  z-index: 3;
  display: flex;
  gap: 4px;
  padding: 7px 5px 5px;
  border-radius: 5px;
  background: linear-gradient(0deg, rgba(6, 12, 9, 0.98) 55%, rgba(6, 12, 9, 0));
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition: 150ms ease;
}

.dev-card:hover .card-actions,
.dev-card:focus-within .card-actions {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.card-action {
  flex: 1;
  min-height: 25px;
  padding: 0 5px;
  border: 1px solid rgba(214, 177, 106, 0.28);
  border-radius: 4px;
  color: var(--gold-bright);
  background: rgba(214, 177, 106, 0.12);
  font-size: 8px;
  letter-spacing: 0.04em;
  transition: 140ms ease;
}

.card-action:hover:not(:disabled) {
  background: rgba(214, 177, 106, 0.24);
}

.card-action.reserve {
  border-color: rgba(225, 199, 143, 0.14);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.055);
}

.card-action.reserve:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
}

.card-action:disabled {
  opacity: 0.35;
}

.card-affordable-dot {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 7px var(--gold);
}

/* ---------- decks ---------- */

.deck-stack {
  position: relative;
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 0;
  background: none;
  perspective: 600px;
}

.deck-stack::before,
.deck-stack::after {
  content: "";
  position: absolute;
  inset: 7px 3px 4px 7px;
  border: 1px solid rgba(225, 199, 143, 0.11);
  border-radius: 7px;
  background: #0c1612;
  transition: 180ms ease;
}

.deck-stack::before {
  transform: translate(4px, -4px) rotate(1.5deg);
}

.deck-stack::after {
  transform: translate(2px, -2px);
}

.deck-face {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 5px;
  margin: 0 3px 4px 3px;
  padding: 8px 4px;
  border: 1px solid rgba(214, 177, 106, 0.16);
  border-radius: 7px;
  background:
    repeating-linear-gradient(45deg, rgba(214, 177, 106, 0.032) 0 2px, transparent 2px 7px),
    linear-gradient(150deg, #1a2b23, #0d1813);
  transition: 180ms ease;
}

.deck-stack:hover .deck-face {
  border-color: rgba(214, 177, 106, 0.4);
  background:
    repeating-linear-gradient(45deg, rgba(214, 177, 106, 0.05) 0 2px, transparent 2px 7px),
    linear-gradient(150deg, #21382d, #0f1c16);
}

.deck-stack:disabled {
  opacity: 0.42;
  filter: grayscale(0.5);
}

.deck-face b {
  color: rgba(214, 177, 106, 0.8);
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.deck-face small {
  color: var(--faint);
  font-size: 7px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.deck-face em {
  margin-top: 5px;
  padding: 3px 6px;
  border: 1px solid rgba(214, 177, 106, 0.14);
  border-radius: 3px;
  color: var(--gold);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ---------- my area ---------- */

.my-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 104px;
  margin-top: 9px;
}

.my-reserved,
.my-bonuses {
  border: 1px solid rgba(225, 199, 143, 0.1);
  border-radius: 10px;
  background: rgba(12, 24, 19, 0.6);
}

.my-reserved {
  min-width: 0;
  padding: 8px 10px 9px;
}

.my-area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 19px;
  margin-bottom: 6px;
}

.my-area-head h3 {
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.my-area-head span {
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.reserved-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.reserved-mini {
  --gem: var(--gem-white);
  --gem-deep: var(--gem-white-deep);
  --gem-glow: var(--gem-white-glow);
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 51px;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--gem) 26%, rgba(225, 199, 143, 0.1));
  border-radius: 7px;
  background:
    radial-gradient(circle at 76% 10%, var(--gem-glow), transparent 46%),
    color-mix(in srgb, var(--gem) 9%, rgba(7, 14, 11, 0.88));
  text-align: left;
  transition: 160ms ease;
}

.reserved-mini:hover {
  border-color: color-mix(in srgb, var(--gem) 52%, transparent);
  transform: translateY(-1px);
}

.reserved-mini.empty {
  align-items: center;
  justify-content: center;
  border-style: dashed;
  border-color: rgba(225, 199, 143, 0.09);
  background: rgba(4, 10, 8, 0.2);
  color: rgba(225, 199, 143, 0.16);
  font-size: 13px;
  cursor: default;
}

.reserved-mini .res-gem {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 27px;
  color: rgba(255, 255, 255, 0.24);
  background: linear-gradient(160deg, var(--gem), var(--gem-deep));
  clip-path: polygon(50% 0%, 94% 27%, 82% 91%, 18% 91%, 6% 27%);
  font-size: 6px;
}

.res-meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.res-meta b {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.res-cost {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.res-cost .cost-chip {
  min-width: 15px;
  height: 13px;
  padding: 0 2px;
  border: 0;
  color: color-mix(in srgb, var(--gem) 76%, #fff);
  background: transparent;
  font-size: 7px;
}

.res-cost .cost-chip i {
  font-size: 4px;
}

.res-points {
  position: absolute;
  top: 2px;
  right: 4px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 9px;
}

.res-buy {
  position: absolute;
  right: 3px;
  bottom: 2px;
  padding: 1px 3px;
  border-radius: 2px;
  color: var(--gold);
  font-size: 6px;
  opacity: 0;
  transition: 140ms ease;
}

.reserved-mini:hover .res-buy {
  opacity: 1;
}

.my-bonuses {
  display: flex;
  flex-direction: column;
  padding: 8px 10px 9px;
}

.bonus-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.bonus-count {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.bonus-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: color-mix(in srgb, var(--gem) 82%, #fff);
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.35), transparent 28%),
    radial-gradient(circle at 50% 55%, var(--gem), var(--gem-deep) 80%);
  box-shadow: 0 3px 9px color-mix(in srgb, var(--gem) 22%, transparent);
  font-size: 7px;
}

.bonus-count b {
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
}

.self-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(225, 199, 143, 0.07);
  color: var(--faint);
  font-size: 7px;
}

.self-score b {
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 400;
}

/* ---------- players ---------- */

.players-panel {
  flex: 0 0 auto;
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 2px 9px 10px;
}

.player-card {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(225, 199, 143, 0.07);
  border-radius: 8px;
  background: rgba(4, 10, 8, 0.28);
  transition: 180ms ease;
}

.player-card.active {
  border-color: rgba(214, 177, 106, 0.32);
  background: linear-gradient(90deg, rgba(214, 177, 106, 0.09), rgba(4, 10, 8, 0.24));
  box-shadow: inset 2px 0 0 var(--gold);
}

.player-card.autopilot {
  border-color: rgba(124, 164, 214, 0.3);
  background: linear-gradient(90deg, rgba(88, 132, 184, 0.11), rgba(4, 10, 8, 0.24));
}

.autopilot-pill,
.boss-pill {
  display: inline-flex;
  align-items: center;
  height: 16px;
  margin-left: 5px;
  padding: 0 5px;
  border: 1px solid rgba(124, 164, 214, 0.35);
  border-radius: 3px;
  color: #a9c8ec;
  background: rgba(88, 132, 184, 0.13);
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

.boss-pill {
  color: #e1c6ff;
  border-color: rgba(170, 133, 214, 0.5);
  background: rgba(139, 102, 184, 0.18);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.boss-meta {
  color: #bda6df;
}

.boss-meta.ready {
  color: var(--gold-bright);
}

.autopilot-mini {
  margin-left: 3px;
  padding: 1px 5px;
  border: 1px solid rgba(214, 177, 106, 0.22);
  border-radius: 3px;
  color: var(--gold);
  background: rgba(214, 177, 106, 0.06);
  font-family: var(--sans);
  font-size: 7.5px;
  transition: 140ms ease;
}

.autopilot-mini:hover {
  border-color: rgba(214, 177, 106, 0.5);
  background: rgba(214, 177, 106, 0.14);
}

.player-card.self .player-name::after {
  content: "你";
  margin-left: 4px;
  padding: 1px 3px;
  border: 1px solid rgba(214, 177, 106, 0.22);
  border-radius: 2px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 8px;
  vertical-align: 1px;
}

.player-avatar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 47px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  color: #0c1611;
  background: linear-gradient(145deg, var(--avatar-a, #d8b878), var(--avatar-b, #91702f));
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.player-avatar.bot {
  color: var(--gold);
  background: linear-gradient(145deg, #22372c, #111e18);
  border-color: rgba(214, 177, 106, 0.2);
}

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

.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 16px;
}

.player-name {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-score {
  flex: 0 0 auto;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1;
}

.player-score small {
  margin-left: 1px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 6px;
}

.player-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.player-stats .mini-token-set {
  display: flex;
  gap: 2px;
}

.mini-token {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gem);
  font-family: Georgia, serif;
  font-size: 12px;
}

.mini-token i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gem);
  box-shadow: 0 0 4px var(--gem-glow);
}

.mini-token.gold {
  color: var(--gem-gold);
}

.player-bonuses {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(225, 199, 143, 0.055);
}

.bonus-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  border-radius: 4px;
  color: var(--gem);
  background: color-mix(in srgb, var(--gem) 13%, transparent);
  font-family: Georgia, serif;
  font-size: 11px;
}

.player-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  color: var(--faint);
  font-size: 9.5px;
  white-space: nowrap;
}

.player-meta b {
  color: var(--ink-soft);
  font-weight: 500;
}

.turn-flag {
  position: absolute;
  top: -1px;
  right: 5px;
  padding: 1px 4px;
  border-radius: 0 0 3px 3px;
  color: #171207;
  background: var(--gold);
  font-size: 7px;
  letter-spacing: 0.04em;
}

/* ---------- log ---------- */

.log-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.log-list {
  flex: 1;
  min-height: 96px;
  max-height: none;
  overflow-y: auto;
  padding: 0 10px 10px;
  scrollbar-width: thin;
}

.log-entry {
  display: flex;
  gap: 7px;
  padding: 5px 0;
  border-top: 1px solid rgba(225, 199, 143, 0.045);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

.log-entry:first-child {
  border-top: 0;
}

.log-dot {
  flex: 0 0 auto;
  width: 4px;
  height: 4px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--faint);
}

.log-entry[data-kind="buy"] .log-dot {
  background: var(--gold);
  box-shadow: 0 0 5px rgba(214, 177, 106, 0.5);
}

.log-entry[data-kind="noble"] .log-dot {
  background: #c7a9e9;
}

.log-entry[data-kind="reserve"] .log-dot {
  background: var(--gem-blue);
}

.log-entry[data-kind="take"] .log-dot {
  background: var(--gem-green);
}

.log-entry[data-kind="discard"] .log-dot {
  background: var(--danger);
}

.log-entry[data-kind="end"] {
  color: var(--gold-bright);
}

.log-entry[data-kind="end"] .log-dot {
  background: var(--gold-bright);
}

.log-entry strong {
  color: var(--ink-soft);
  font-weight: 500;
}
