/* ============================================================
   提瓦特锄地签 — visual system
   ============================================================ */

:root {
  --bg: #06100e;
  --bg-deep: #040b0a;
  --surface: rgba(11, 29, 25, 0.78);
  --surface-solid: #0d211d;
  --surface-raised: rgba(20, 44, 38, 0.72);
  --surface-soft: rgba(31, 57, 49, 0.36);
  --gold: #d9bb7d;
  --gold-bright: #f5e6bd;
  --gold-deep: #a77d3d;
  --ink: #f2ecdd;
  --ink-soft: #d4cec0;
  --muted: #92a89e;
  --muted-dim: #687d74;
  --teal: #79d5c2;
  --teal-dim: #346f64;
  --danger: #e28b7b;
  --line: rgba(221, 197, 150, 0.16);
  --line-strong: rgba(221, 197, 150, 0.3);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --font-display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --el-anemo: #78d6c1;
  --el-geo: #f3bd55;
  --el-electro: #b894ff;
  --el-dendro: #9cdc58;
  --el-hydro: #54c6ff;
  --el-pyro: #ff7d67;
  --el-cryo: #a9e8ff;
  --el-other: #d8c8a2;
}

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

html {
  min-height: 100%;
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% -10%, #11312a 0%, transparent 52%),
    linear-gradient(180deg, #071512 0%, var(--bg) 58%, var(--bg-deep) 100%);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

::selection {
  color: #10201c;
  background: var(--gold);
}

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

/* ---------- atmosphere ---------- */

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

.atmosphere__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.atmosphere__glow--one {
  top: -18vw;
  left: 18%;
  width: 52vw;
  height: 42vw;
  background: radial-gradient(circle, rgba(59, 137, 120, 0.35), transparent 68%);
}

.atmosphere__glow--two {
  right: -12vw;
  bottom: 4vh;
  width: 46vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(139, 105, 42, 0.19), transparent 68%);
}

.atmosphere__stars {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(238, 226, 194, 0.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 8%, rgba(238, 226, 194, 0.7) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 49% 14%, rgba(238, 226, 194, 0.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 6%, rgba(238, 226, 194, 0.8) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 84% 19%, rgba(238, 226, 194, 0.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 8%, rgba(238, 226, 194, 0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 42%, rgba(238, 226, 194, 0.4) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 76% 32%, rgba(238, 226, 194, 0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 23% 31%, rgba(238, 226, 194, 0.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 57% 24%, rgba(238, 226, 194, 0.35) 50%, transparent 51%);
  animation: starBreath 9s ease-in-out infinite alternate;
}

@keyframes starBreath {
  from { opacity: 0.26; }
  to { opacity: 0.52; }
}

.atmosphere__moon {
  position: absolute;
  top: 9vh;
  right: 13vw;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  opacity: 0.55;
  background: radial-gradient(circle at 38% 36%, #faf1d7, #d6c495 48%, rgba(214, 196, 149, 0.12) 70%);
  box-shadow: 0 0 70px rgba(246, 231, 187, 0.25), 0 0 160px rgba(246, 231, 187, 0.12);
}

.atmosphere__mountains {
  position: absolute;
  bottom: -3vh;
  left: 0;
  width: 100%;
  height: 68vh;
  opacity: 0.82;
}

/* ---------- app shell ---------- */

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.boot-splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.boot-sigil {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 30px;
  box-shadow: inset 0 0 26px rgba(217, 187, 125, 0.08), 0 0 50px rgba(217, 187, 125, 0.08);
  animation: sigilPulse 2.4s ease-in-out infinite;
}

@keyframes sigilPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1); }
}

.page {
  width: min(1360px, calc(100% - 72px));
  margin: 0 auto;
  padding: 0 0 72px;
  animation: pageIn 0.7s var(--ease) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 0 max(36px, calc((100vw - 1360px) / 2));
  border-bottom: 1px solid rgba(221, 197, 150, 0.09);
  background: linear-gradient(180deg, rgba(6, 16, 14, 0.94), rgba(6, 16, 14, 0.72));
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
}

.brand__mark {
  width: 38px;
  height: 38px;
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(217, 187, 125, 0.22));
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

.brand__text small {
  margin-top: 5px;
  font-size: 8px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

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

.conn-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 5px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.conn-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.conn-state.is-off i {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: 0.2s ease;
}

.nav-btn:hover {
  border-color: var(--line);
  color: var(--gold-bright);
  background: rgba(217, 187, 125, 0.05);
}

.nav-btn svg,
.icon-btn svg,
.btn svg {
  flex: 0 0 auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  margin-left: 6px;
  padding: 0 13px 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(17, 38, 33, 0.5);
}

.user-chip__avatar {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(217, 187, 125, 0.2), rgba(121, 213, 194, 0.08));
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 12px;
  border: 1px solid rgba(217, 187, 125, 0.24);
}

.user-chip__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-chip__meta strong {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

.user-chip__meta small {
  margin-top: 3px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  transition: 0.2s ease;
}

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

.icon-btn--danger:hover {
  color: var(--danger);
  border-color: rgba(226, 139, 123, 0.28);
}

/* ---------- buttons / fields ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.btn--primary {
  color: #18221d;
  border-color: #ead7a4;
  background: linear-gradient(135deg, #f4e4b8 0%, #d9bb7d 52%, #bd9550 100%);
  box-shadow: 0 10px 34px rgba(180, 140, 72, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn--primary:hover:not(:disabled) {
  box-shadow: 0 14px 42px rgba(211, 176, 105, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn--outline {
  color: var(--gold-bright);
  border-color: rgba(217, 187, 125, 0.34);
  background: rgba(217, 187, 125, 0.04);
}

.btn--outline:hover:not(:disabled) {
  border-color: rgba(217, 187, 125, 0.62);
  background: rgba(217, 187, 125, 0.08);
}

.btn--ghost {
  color: var(--ink-soft);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.018);
}

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

.btn--danger {
  color: var(--danger);
  border-color: rgba(226, 139, 123, 0.24);
  background: rgba(226, 139, 123, 0.04);
}

.btn--danger:hover:not(:disabled) {
  border-color: rgba(226, 139, 123, 0.46);
  background: rgba(226, 139, 123, 0.08);
}

.btn--small {
  min-height: 34px;
  padding: 0 13px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.btn:disabled {
  opacity: 0.38;
  filter: saturate(0.5);
}

.btn--loading {
  pointer-events: none;
}

.btn--loading::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

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

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  color: var(--ink);
  border: 1px solid rgba(221, 197, 150, 0.19);
  border-radius: 3px;
  outline: none;
  background: rgba(4, 12, 10, 0.56);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: #61746b;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(217, 187, 125, 0.58);
  box-shadow: 0 0 0 3px rgba(217, 187, 125, 0.07);
  background: rgba(4, 12, 10, 0.76);
}

.textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.65;
}

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .input {
  border-radius: 3px 0 0 3px;
}

.input-group .btn {
  min-height: 44px;
  border-radius: 0 3px 3px 0;
  margin-left: -1px;
}

.search-field {
  position: relative;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--muted-dim);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field .input {
  padding-left: 38px;
}

/* ---------- login ---------- */

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px max(36px, calc((100vw - 1360px) / 2)) 34px;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
}

.login-brand__note {
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
  align-items: center;
  gap: clamp(44px, 7vw, 120px);
  flex: 1;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 42px 0 52px;
}

.login-editorial {
  position: relative;
  animation: riseIn 0.9s var(--ease) both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.eyebrow--plain::before {
  display: none;
}

.login-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(58px, 7vw, 100px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 0 10px 60px rgba(0, 0, 0, 0.3);
}

.login-title span {
  display: block;
  margin-top: 4px;
  color: transparent;
  background: linear-gradient(105deg, #f8e9c1 8%, #d9bb7d 45%, #ab8243 86%);
  background-clip: text;
  -webkit-background-clip: text;
}

.login-subtitle {
  max-width: 490px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.04em;
}

.login-marks {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}

.login-mark {
  min-width: 58px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-align: center;
  background: rgba(12, 30, 26, 0.45);
}

.login-mark strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--gold-bright);
}

.login-mark small {
  display: block;
  margin-top: 2px;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted-dim);
}

.login-mark.plus {
  min-width: auto;
  border: 0;
  background: none;
  color: var(--muted-dim);
  font-size: 18px;
}

.login-quote {
  margin: 48px 0 0;
  padding-left: 17px;
  border-left: 1px solid rgba(217, 187, 125, 0.35);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.login-card {
  position: relative;
  padding: 36px 34px 28px;
  border: 1px solid rgba(221, 197, 150, 0.2);
  border-radius: 5px;
  background:
    linear-gradient(160deg, rgba(27, 54, 46, 0.52), rgba(7, 19, 16, 0.84)),
    rgba(8, 20, 17, 0.78);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  animation: riseIn 0.85s 0.12s var(--ease) both;
}

.login-card::before,
.login-card::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.login-card::before {
  top: 9px;
  left: 9px;
  border-top: 1px solid rgba(217, 187, 125, 0.5);
  border-left: 1px solid rgba(217, 187, 125, 0.5);
}

.login-card::after {
  right: 9px;
  bottom: 9px;
  border-right: 1px solid rgba(217, 187, 125, 0.35);
  border-bottom: 1px solid rgba(217, 187, 125, 0.35);
}

.login-card__head {
  margin-bottom: 27px;
}

.login-card__head h2 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.login-card__head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.uid-field {
  position: relative;
  margin-bottom: 16px;
}

.uid-field span {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.16em;
  transform: translateY(-50%);
}

.uid-field input {
  height: 56px;
  padding-left: 47px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.18em;
}

.login-submit {
  width: 100%;
  min-height: 50px;
}

.login-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 11px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 22px 0 18px;
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.login-perks {
  display: grid;
  gap: 9px;
}

.login-perk {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.login-perk svg {
  color: var(--teal);
}

.login-card__foot {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(221, 197, 150, 0.09);
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.75;
}

.login-card__foot b {
  color: var(--gold);
  font-weight: 400;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.1em;
}

/* ---------- dashboard ---------- */

.dashboard {
  padding-top: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.78fr);
  align-items: center;
  gap: clamp(30px, 5vw, 86px);
  min-height: 510px;
  padding: 24px 0 32px;
}

.hero-copy {
  animation: riseIn 0.8s var(--ease) both;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(50px, 5.4vw, 78px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.02em;
}

.hero-title .gold {
  display: inline-block;
  color: transparent;
  background: linear-gradient(105deg, #f7e8bf 10%, #d9bb7d 55%, #a98042 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-title .line {
  display: block;
}

.hero-lede {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 2.05;
  letter-spacing: 0.025em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-actions .btn {
  min-height: 50px;
  padding: 0 25px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  color: var(--muted-dim);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-deep);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 470px;
  animation: riseIn 0.9s 0.1s var(--ease) both;
}

.orrery-wrap {
  position: relative;
  width: min(100%, 455px);
  aspect-ratio: 1;
}

.orrery-wrap::before {
  content: "";
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 187, 125, 0.1), transparent 63%);
  filter: blur(20px);
}

.orrery {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(217, 187, 125, 0.12);
  background:
    radial-gradient(circle at 50% 50%, rgba(121, 213, 194, 0.035), transparent 58%),
    repeating-conic-gradient(from 0deg, rgba(217, 187, 125, 0.13) 0deg 0.5deg, transparent 0.5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0 29%, #000 29.5% 100%);
  mask-image: radial-gradient(circle, transparent 0 29%, #000 29.5% 100%);
  animation: slowTurn 80s linear infinite;
}

.orrery::before,
.orrery::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(217, 187, 125, 0.2);
}

.orrery::before {
  inset: 11%;
}

.orrery::after {
  inset: 25%;
  border-style: dashed;
  border-color: rgba(217, 187, 125, 0.26);
}

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

.orrery-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(217, 187, 125, 0.16);
  pointer-events: none;
}

.orrery-ring--outer {
  inset: 2%;
}

.orrery-ring--inner {
  inset: 38%;
  border-color: rgba(121, 213, 194, 0.2);
}

.orrery-ring--inner::before,
.orrery-ring--inner::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.orrery-ring--inner::before {
  top: -3px;
  left: 50%;
}

.orrery-ring--inner::after {
  bottom: -3px;
  left: 50%;
}

.orrery-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 114px;
  height: 114px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(217, 187, 125, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(28, 55, 47, 0.9), rgba(7, 19, 16, 0.94) 70%);
  box-shadow:
    0 0 0 8px rgba(217, 187, 125, 0.025),
    0 0 55px rgba(217, 187, 125, 0.12),
    inset 0 0 30px rgba(217, 187, 125, 0.04);
  transform: translate(-50%, -50%);
}

.orrery-core::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(217, 187, 125, 0.23);
  border-radius: 50%;
}

.orrery-core strong {
  position: relative;
  z-index: 1;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.orrery-core small {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  color: var(--muted-dim);
  font-size: 7px;
  letter-spacing: 0.27em;
}

.orbit-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 70px;
  transform: translate(-50%, -50%);
  text-align: center;
}

.orbit-node::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-bottom: 4px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: #0b1c17;
  box-shadow: 0 0 14px rgba(217, 187, 125, 0.35);
}

.orbit-node strong {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.orbit-node small {
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.orbit-node.p1 { top: 10%; left: 50%; }
.orbit-node.p2 { top: 50%; left: 91%; }
.orbit-node.p3 { top: 90%; left: 50%; }
.orbit-node.p4 { top: 50%; left: 9%; }

.orbit-node.p2::before,
.orbit-node.p4::before {
  border-color: var(--teal);
  box-shadow: 0 0 14px rgba(121, 213, 194, 0.3);
}

.orbit-float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(217, 187, 125, 0.16);
  border-radius: 2px;
  background: rgba(8, 21, 18, 0.74);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.13em;
  backdrop-filter: blur(12px);
  animation: floatY 5.5s ease-in-out infinite;
}

.orbit-float svg {
  color: var(--gold);
}

.orbit-float--one {
  top: 12%;
  left: 0;
}

.orbit-float--two {
  right: -2%;
  bottom: 17%;
  animation-delay: -2.5s;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.orrery-caption {
  position: absolute;
  bottom: -8px;
  left: 50%;
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.28em;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* dashboard cards */

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.dash-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background:
    linear-gradient(150deg, rgba(25, 50, 43, 0.4), rgba(7, 19, 16, 0.62));
  backdrop-filter: blur(16px);
  transition: border-color 0.25s ease, transform 0.25s var(--ease), background 0.25s ease;
}

button.dash-card {
  text-align: left;
}

.dash-card:hover {
  border-color: rgba(217, 187, 125, 0.36);
  background:
    linear-gradient(150deg, rgba(33, 64, 54, 0.48), rgba(7, 19, 16, 0.7));
  transform: translateY(-2px);
}

.dash-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(217, 187, 125, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.dash-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dash-card__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 187, 125, 0.2);
  border-radius: 3px;
  color: var(--gold);
  background: rgba(217, 187, 125, 0.04);
}

.dash-card__index {
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.dash-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.dash-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.dash-card__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
}

.big-number {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1;
}

.big-number small {
  color: var(--muted-dim);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.mini-progress {
  height: 2px;
  margin-top: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.mini-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-dim), var(--teal));
  transition: width 0.5s var(--ease);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.dash-card--rules .rule-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 17px;
}

.rule-mini span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 10px;
}

.rule-mini b {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 400;
}

.dash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(221, 197, 150, 0.08);
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.dash-footer span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* ---------- room ---------- */

.room-page {
  padding-top: 20px;
  padding-bottom: 38px;
}

.room-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.82fr);
  align-items: end;
  gap: 32px;
  padding-bottom: 18px;
}

.room-heading .eyebrow {
  margin-bottom: 12px;
}

.room-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.03em;
}

.room-heading h1 em {
  color: var(--gold-bright);
  font-style: normal;
}

.room-heading__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.room-code-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px 5px 11px;
  border: 1px solid rgba(217, 187, 125, 0.25);
  border-radius: 3px;
  color: var(--gold-bright);
  background: rgba(217, 187, 125, 0.055);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
}

.room-code-chip button {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.room-code-chip button:hover {
  color: var(--gold-bright);
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 9px var(--teal);
}

.live-status.is-waiting i {
  background: var(--gold);
  box-shadow: 0 0 9px var(--gold);
}

.live-status.is-paused i {
  background: var(--danger);
  box-shadow: 0 0 9px var(--danger);
}

.timer-panel {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 94px;
  align-items: center;
  gap: 18px;
  min-height: 118px;
  padding: 16px 22px;
  border: 1px solid rgba(217, 187, 125, 0.23);
  border-radius: 4px;
  background:
    linear-gradient(145deg, rgba(29, 58, 49, 0.5), rgba(7, 19, 16, 0.84)),
    rgba(8, 20, 17, 0.6);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.timer-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 22px;
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.round-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  align-self: stretch;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}

.round-block span {
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.22em;
}

.round-block strong {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.round-block small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.timer-main {
  min-width: 0;
}

.timer-main__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.timer-main__head span:last-child {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.clock {
  margin-top: 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 31px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.timer-progress {
  height: 2px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
}

.timer-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal-dim), var(--gold));
  transition: width 0.25s linear;
}

.total-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.total-block span {
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.total-block strong {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.total-block small {
  color: var(--muted-dim);
  font-size: 8px;
}

.command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 11px 16px 11px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(11, 29, 25, 0.55);
  backdrop-filter: blur(16px);
}

.command-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.command-copy__icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(217, 187, 125, 0.2);
  border-radius: 50%;
}

.command-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.command-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.05em;
}

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

.command-divider {
  width: 1px;
  height: 23px;
  margin: 0 3px;
  background: var(--line);
}

.btn--draw {
  min-height: 45px;
  padding: 0 22px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.btn--draw svg {
  animation: none;
}

.btn--draw:hover svg {
  animation: spin 6s linear infinite;
}

.guest-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(11, 29, 25, 0.45);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.guest-note svg {
  flex: 0 0 auto;
  color: var(--gold);
}

.guest-note b {
  color: var(--ink-soft);
  font-weight: 400;
}

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

.seat-card {
  position: relative;
  min-height: 316px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 5px;
  background:
    linear-gradient(155deg, rgba(25, 50, 43, 0.37), rgba(7, 19, 16, 0.74)),
    rgba(9, 23, 19, 0.56);
  backdrop-filter: blur(16px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.seat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25px;
  right: 25px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 187, 125, 0.28), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.seat-card.is-mine {
  border-color: rgba(121, 213, 194, 0.3);
  box-shadow: inset 0 0 45px rgba(121, 213, 194, 0.025);
}

.seat-card.is-mine::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(121, 213, 194, 0.5), transparent);
}

.seat-card.is-drawn {
  background:
    linear-gradient(155deg, rgba(34, 62, 53, 0.44), rgba(7, 19, 16, 0.78)),
    rgba(9, 23, 19, 0.56);
}

.seat-card.is-drawn::before {
  opacity: 1;
}

.seat-card.is-empty {
  border-style: dashed;
  background: rgba(8, 21, 18, 0.32);
}

.seat-card.is-rolling {
  border-color: rgba(217, 187, 125, 0.58);
  box-shadow: 0 0 45px rgba(217, 187, 125, 0.08);
}

.seat-card.is-rolling .seat-card__content {
  filter: blur(3px);
  opacity: 0.45;
}

.seat-card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.seat-card__head {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(221, 197, 150, 0.08);
}

.seat-index {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 53px;
}

.seat-index span {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
}

.seat-index small {
  color: var(--muted-dim);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.seat-player {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.seat-player__line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.seat-player strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-player small {
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  border: 1px solid rgba(217, 187, 125, 0.28);
  border-radius: 2px;
  color: var(--gold);
  font-size: 7px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.role-badge--me {
  border-color: rgba(121, 213, 194, 0.28);
  color: var(--teal);
}

.seat-head__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.seat-kick {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--muted-dim);
  background: none;
  opacity: 0;
  transition: 0.2s ease;
}

.seat-card:hover .seat-kick {
  opacity: 1;
}

.seat-kick:hover {
  color: var(--danger);
  border-color: rgba(226, 139, 123, 0.25);
}

.seat-card__body {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  flex: 1;
  min-height: 0;
}

.character-pane {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 22px 16px 20px 19px;
  border-right: 1px solid rgba(221, 197, 150, 0.08);
  background:
    radial-gradient(circle at 26% 48%, color-mix(in srgb, var(--el, #d8c8a2) 8%, transparent), transparent 57%);
}

.element-seal {
  position: relative;
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--el) 40%, transparent);
  border-radius: 50%;
  color: var(--el);
  background:
    radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--el) 15%, transparent), rgba(7, 19, 16, 0.85) 70%);
  box-shadow:
    0 0 30px color-mix(in srgb, var(--el) 12%, transparent),
    inset 0 0 22px color-mix(in srgb, var(--el) 8%, transparent);
}

.element-seal::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed color-mix(in srgb, var(--el) 30%, transparent);
  border-radius: 50%;
}

.element-seal span {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 25px;
  text-shadow: 0 0 15px color-mix(in srgb, var(--el) 35%, transparent);
}

.element-seal small {
  position: absolute;
  right: -3px;
  bottom: 4px;
  z-index: 2;
  padding: 0 3px;
  border-radius: 2px;
  color: var(--muted);
  background: #0a1c17;
  font-size: 6px;
  letter-spacing: 0.13em;
}

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

.character-info .slot-label,
.event-info .slot-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-dim);
  font-size: 7px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.character-info h2 {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.character-info h2.is-placeholder {
  color: var(--muted-dim);
  font-size: 19px;
}

.stars {
  display: flex;
  gap: 2px;
  margin-top: 7px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.stars .dim {
  color: rgba(217, 187, 125, 0.23);
}

.char-reroll {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  background: rgba(7, 19, 16, 0.72);
  opacity: 0;
  transition: 0.2s ease;
}

.seat-card:hover .char-reroll,
.char-reroll:focus-visible {
  opacity: 1;
}

.char-reroll:hover {
  color: var(--gold-bright);
  border-color: rgba(217, 187, 125, 0.42);
}

.event-pane {
  min-width: 0;
  padding: 20px 17px 17px;
  display: flex;
  flex-direction: column;
}

.event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.event-head .slot-label {
  margin-bottom: 3px;
}

.event-reroll {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 23px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--muted-dim);
  background: transparent;
  font-size: 8px;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: 0.2s ease;
}

.seat-card:hover .event-reroll,
.event-reroll:focus-visible {
  opacity: 1;
}

.event-reroll:hover {
  color: var(--gold-bright);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.event-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.event-title-row h3 {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-title-row h3.is-placeholder {
  color: var(--muted-dim);
  font-size: 15px;
}

.event-value {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-left: auto;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
}

.event-value small {
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 9px;
}

.event-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-placeholder {
  margin: 9px 0 0;
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.75;
}

.status-bar {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 30px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid rgba(221, 197, 150, 0.08);
}

.status-bar__label {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid;
  border-radius: 2px;
  font-size: 8px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tag svg {
  width: 8px;
  height: 8px;
}

.tag--permanent {
  color: var(--gold-bright);
  border-color: rgba(217, 187, 125, 0.36);
  background: rgba(217, 187, 125, 0.075);
}

.tag--temporary {
  color: var(--teal);
  border-color: rgba(121, 213, 194, 0.3);
  background: rgba(121, 213, 194, 0.055);
}

.tag-empty {
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.empty-seat {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 24px;
  text-align: center;
}

.empty-seat__seat {
  color: rgba(217, 187, 125, 0.16);
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 0.9;
}

.empty-seat h3 {
  margin: 3px 0 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.empty-seat p {
  margin: 0;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.empty-seat__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 6px 10px;
  border: 1px solid rgba(217, 187, 125, 0.14);
  border-radius: 2px;
  color: var(--gold);
  background: rgba(217, 187, 125, 0.035);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.room-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(9, 24, 20, 0.45);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.room-bottom__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.room-bottom__left svg {
  color: var(--gold);
}

.room-bottom__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted-dim);
  font-size: 9px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.legend-dot--permanent { background: var(--gold); box-shadow: 0 0 6px rgba(217, 187, 125, 0.5); }
.legend-dot--temporary { background: var(--teal); box-shadow: 0 0 6px rgba(121, 213, 194, 0.5); }

/* ---------- modal ---------- */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(2, 8, 7, 0.7);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.modal-panel {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(88vh, 920px);
  border: 1px solid rgba(221, 197, 150, 0.24);
  border-radius: 5px;
  background:
    linear-gradient(160deg, rgba(27, 54, 46, 0.88), rgba(7, 18, 15, 0.97)),
    var(--surface-solid);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.32s var(--ease);
  overflow: hidden;
}

.modal-layer.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

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

.modal-panel--small {
  width: min(480px, 100%);
}

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

.modal-head {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(221, 197, 150, 0.1);
}

.modal-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  width: 48px;
  height: 1px;
  background: var(--gold);
}

.modal-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.modal-close {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  margin-top: -3px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  transition: 0.2s ease;
}

.modal-close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 187, 125, 0.25) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(217, 187, 125, 0.2);
}

.modal-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(121, 213, 194, 0.15);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(121, 213, 194, 0.035);
  font-size: 10px;
  line-height: 1.7;
}

.modal-note svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--teal);
}

.modal-note--gold {
  border-color: rgba(217, 187, 125, 0.18);
  background: rgba(217, 187, 125, 0.04);
}

.modal-note--gold svg {
  color: var(--gold);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.modal-actions--end {
  justify-content: flex-end;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 20px -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 27, 23, 0.92), rgba(8, 21, 18, 0.985));
  backdrop-filter: blur(16px);
}

.modal-divider {
  height: 1px;
  margin: 20px 0;
  background: var(--line);
}

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

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

.form-grid .span-2 {
  grid-column: span 2;
}

.form-grid .span-3 {
  grid-column: span 3;
}

.form-hint {
  margin: 6px 0 0;
  color: var(--muted-dim);
  font-size: 9px;
  line-height: 1.65;
}

.form-error {
  margin: 12px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(226, 139, 123, 0.22);
  border-radius: 2px;
  color: var(--danger);
  background: rgba(226, 139, 123, 0.04);
  font-size: 10px;
  line-height: 1.6;
}

/* ---------- library modal ---------- */

.library-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.library-toolbar .search-field {
  flex: 1;
  min-width: 170px;
}

.library-toolbar .btn {
  flex: 0 0 auto;
}

.library-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.library-count {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.library-count strong {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}

.library-count em {
  color: var(--muted-dim);
  font-style: normal;
}

.library-hint {
  color: var(--muted-dim);
  font-size: 9px;
}

.element-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 15px;
}

.element-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
  font-size: 9px;
  transition: 0.18s ease;
}

.element-pill:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.element-pill.is-active {
  color: var(--gold-bright);
  border-color: rgba(217, 187, 125, 0.42);
  background: rgba(217, 187, 125, 0.07);
}

.element-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--el);
  box-shadow: 0 0 7px color-mix(in srgb, var(--el) 50%, transparent);
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.char-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 95px;
  padding: 12px 10px 10px;
  overflow: hidden;
  border: 1px solid rgba(221, 197, 150, 0.1);
  border-radius: 3px;
  color: var(--muted);
  text-align: left;
  background: rgba(255, 255, 255, 0.014);
  transition: 0.18s ease;
}

.char-tile::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--el) 21%, transparent), transparent 70%);
  opacity: 0.45;
}

.char-tile:hover {
  border-color: rgba(217, 187, 125, 0.3);
  background: rgba(217, 187, 125, 0.035);
}

.char-tile.is-owned {
  color: var(--ink);
  border-color: rgba(121, 213, 194, 0.23);
  background: rgba(121, 213, 194, 0.045);
}

.char-tile.is-owned::before {
  opacity: 1;
}

.char-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.char-element {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--el) 42%, transparent);
  border-radius: 50%;
  color: var(--el);
  font-family: var(--font-display);
  font-size: 10px;
  background: color-mix(in srgb, var(--el) 7%, transparent);
}

.char-check {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221, 197, 150, 0.18);
  border-radius: 2px;
  color: #0b1c17;
}

.char-tile.is-owned .char-check {
  border-color: var(--teal);
  background: var(--teal);
}

.char-name {
  width: 100%;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.char-tile.is-owned .char-name {
  color: var(--gold-bright);
}

.char-rarity {
  color: var(--gold-deep);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.char-tile.is-owned .char-rarity {
  color: var(--gold);
}

.library-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 27, 23, 0.92), rgba(8, 21, 18, 0.985));
  backdrop-filter: blur(16px);
}

.library-footer__left {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 180px;
  padding: 28px;
  color: var(--muted-dim);
  text-align: center;
}

.empty-state svg {
  color: var(--gold-deep);
  opacity: 0.65;
}

.empty-state h3 {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
}

.empty-state p {
  margin: 0;
  font-size: 10px;
  line-height: 1.7;
}

/* ---------- event library ---------- */

.event-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.event-toolbar .search-field {
  flex: 1;
  min-width: 180px;
}

.event-toolbar .btn {
  flex: 0 0 auto;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.event-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(221, 197, 150, 0.1);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.014);
  transition: 0.18s ease;
}

.event-row:hover {
  border-color: rgba(217, 187, 125, 0.25);
  background: rgba(217, 187, 125, 0.025);
}

.event-row__main {
  flex: 1;
  min-width: 0;
}

.event-row__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.event-row__title h3 {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
}

.event-row__value {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 2px 6px;
  border: 1px solid rgba(217, 187, 125, 0.22);
  border-radius: 2px;
  color: var(--gold);
  background: rgba(217, 187, 125, 0.04);
  font-size: 8px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.event-row__value b {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
}

.event-row__desc {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.event-row__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
}

.event-row__actions .icon-btn {
  width: 28px;
  height: 28px;
}

.event-count {
  margin: 0 0 12px;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.event-count b {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
}

.random-insert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px dashed rgba(217, 187, 125, 0.22);
  border-radius: 3px;
  background: rgba(217, 187, 125, 0.025);
}

.random-insert__copy {
  min-width: 0;
}

.random-insert__copy .form-hint {
  margin-top: 4px;
}

.random-insert__stack {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.random-insert__controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--muted-dim);
  font-size: 9px;
}

.random-insert__controls .input {
  width: 68px;
  min-height: 36px;
  padding: 6px 8px;
  text-align: center;
}

.random-insert__controls .random-insert__options {
  flex: 1;
  width: 250px;
  text-align: left;
  font-size: 10px;
}

.random-insert__controls .btn {
  margin-left: 2px;
}

code {
  padding: 1px 4px;
  border: 1px solid rgba(121, 213, 194, 0.16);
  border-radius: 2px;
  color: var(--teal);
  background: rgba(121, 213, 194, 0.04);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.92em;
}

.tag-editor {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tag-editor__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 32px;
  gap: 7px;
}

.tag-editor__row .input,
.tag-editor__row .select {
  min-height: 38px;
  font-size: 11px;
}

.tag-editor__remove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 38px;
  border: 1px solid rgba(226, 139, 123, 0.18);
  border-radius: 2px;
  color: var(--muted-dim);
  background: rgba(226, 139, 123, 0.02);
}

.tag-editor__remove:hover {
  color: var(--danger);
  border-color: rgba(226, 139, 123, 0.36);
}

.tag-editor__empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 2px;
  color: var(--muted-dim);
  text-align: center;
  font-size: 9px;
}

.code-block {
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid rgba(121, 213, 194, 0.12);
  border-radius: 3px;
  color: #b7d8ce;
  background: rgba(2, 9, 7, 0.55);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 10px;
  line-height: 1.7;
  white-space: pre;
}

.import-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  flex: 1;
  min-width: 150px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: 0.18s ease;
}

.radio-card:has(input:checked) {
  border-color: rgba(217, 187, 125, 0.42);
  color: var(--ink-soft);
  background: rgba(217, 187, 125, 0.045);
}

.radio-card input {
  margin: 3px 0 0;
  accent-color: var(--gold);
}

.radio-card strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
}

.radio-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 8px;
  line-height: 1.5;
}

.file-drop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px dashed rgba(217, 187, 125, 0.24);
  border-radius: 3px;
  background: rgba(217, 187, 125, 0.025);
  color: var(--muted);
  font-size: 10px;
}

.file-drop__input {
  display: none;
}

.file-drop .btn {
  flex: 0 0 auto;
}

/* ---------- create / join room ---------- */

.round-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.round-option {
  position: relative;
}

.round-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.round-option span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 60px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
  transition: 0.18s ease;
  cursor: pointer;
}

.round-option span b {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
}

.round-option span small {
  color: var(--muted-dim);
  font-size: 8px;
}

.round-option input:checked + span {
  border-color: rgba(217, 187, 125, 0.48);
  color: var(--gold-bright);
  background: rgba(217, 187, 125, 0.07);
}

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

.join-preview {
  min-height: 102px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(4, 13, 11, 0.32);
}

.join-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.join-preview__head b {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.seat-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.seat-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 57px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.014);
  transition: 0.18s ease;
}

.seat-choice strong {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
}

.seat-choice small {
  overflow: hidden;
  max-width: 100%;
  color: var(--muted-dim);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-choice:hover:not(:disabled) {
  border-color: rgba(217, 187, 125, 0.4);
}

.seat-choice.is-selected {
  border-color: rgba(121, 213, 194, 0.48);
  background: rgba(121, 213, 194, 0.06);
}

.seat-choice:disabled {
  opacity: 0.38;
}

.join-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-align: center;
}

/* ---------- confirm dialog ---------- */

.confirm-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.9;
}

.confirm-copy b {
  color: var(--gold-bright);
  font-weight: 500;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

/* ---------- draw overlay ---------- */

.draw-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 27px;
  background:
    radial-gradient(circle at 50% 48%, rgba(24, 57, 48, 0.9), rgba(2, 8, 7, 0.96) 67%);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.draw-overlay.is-visible {
  opacity: 1;
}

.draw-overlay.is-leaving {
  opacity: 0;
}

.draw-sigil {
  position: relative;
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 187, 125, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(217, 187, 125, 0.1), inset 0 0 60px rgba(217, 187, 125, 0.04);
}

.draw-sigil::before,
.draw-sigil::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(217, 187, 125, 0.35);
}

.draw-sigil::before {
  inset: 13px;
  animation: slowTurn 8s linear infinite;
}

.draw-sigil::after {
  inset: 35px;
  border-style: solid;
  border-color: rgba(121, 213, 194, 0.24);
  animation: reverseTurn 5s linear infinite;
}

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

.draw-sigil span {
  position: relative;
  z-index: 1;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 56px;
  text-shadow: 0 0 35px rgba(217, 187, 125, 0.45);
  animation: sigilPulse 1.8s ease-in-out infinite;
}

.draw-overlay h2 {
  margin: 0;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
}

.draw-overlay p {
  margin: -14px 0 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.17em;
}

.draw-overlay__line {
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: lineBreath 1.4s ease-in-out infinite;
}

@keyframes lineBreath {
  0%, 100% { opacity: 0.3; transform: scaleX(0.6); }
  50% { opacity: 1; transform: scaleX(1); }
}

/* ---------- toasts ---------- */

.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: min(380px, calc(100vw - 44px));
  padding: 11px 14px;
  border: 1px solid rgba(121, 213, 194, 0.26);
  border-radius: 3px;
  color: var(--ink-soft);
  background: rgba(9, 28, 23, 0.94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  font-size: 11px;
  line-height: 1.65;
  pointer-events: auto;
  animation: toastIn 0.35s var(--ease) both;
}

.toast svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--teal);
}

.toast.is-error {
  border-color: rgba(226, 139, 123, 0.34);
}

.toast.is-error svg {
  color: var(--danger);
}

.toast.is-warning {
  border-color: rgba(217, 187, 125, 0.3);
}

.toast.is-warning svg {
  color: var(--gold);
}

.toast.is-leaving {
  animation: toastOut 0.28s ease forwards;
}

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

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

/* ---------- misc ---------- */

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

.guide-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(221, 197, 150, 0.08);
}

.guide-step:last-child {
  border-bottom: 0;
}

.guide-step > b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(217, 187, 125, 0.25);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
}

.guide-step h3 {
  margin: 3px 0 4px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.guide-step p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.85;
}

.seat-card.is-revealing .character-info h2,
.seat-card.is-revealing .event-title-row h3,
.seat-card.is-revealing .event-value,
.seat-card.is-revealing .tag {
  animation: revealDrawn 0.85s var(--ease) both;
}

.seat-card.is-revealing .event-title-row h3 {
  animation-delay: 0.08s;
}

.seat-card.is-revealing .event-value {
  animation-delay: 0.14s;
}

.seat-card.is-revealing .tag {
  animation-delay: 0.2s;
}

@keyframes revealDrawn {
  0% { opacity: 0; transform: translateY(5px); filter: blur(3px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); }
}

.micro-label {
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }

.spin {
  animation: spin 0.9s linear infinite;
}

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

/* ---------- responsive ---------- */

@media (max-width: 1140px) {
  .page {
    width: min(100% - 48px, 1100px);
  }

  .topbar {
    padding: 0 24px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
    gap: 30px;
  }

  .room-hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1fr);
  }

  .seat-card__body {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .character-pane {
    padding-left: 15px;
    gap: 11px;
  }

  .element-seal {
    width: 58px;
    height: 58px;
  }

  .element-seal span {
    font-size: 21px;
  }
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 44px;
    max-width: 560px;
    padding-top: 28px;
  }

  .login-editorial {
    text-align: center;
  }

  .login-editorial .eyebrow {
    justify-content: center;
  }

  .login-title {
    font-size: 72px;
  }

  .login-subtitle {
    margin-right: auto;
    margin-left: auto;
  }

  .login-marks {
    justify-content: center;
  }

  .login-quote {
    display: none;
  }

  .login-card {
    margin-bottom: 24px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 28px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy .eyebrow,
  .hero-actions,
  .hero-meta {
    justify-content: center;
  }

  .hero-lede {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-visual {
    min-height: 390px;
    margin-top: 4px;
  }

  .orrery-wrap {
    width: min(100%, 380px);
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .dash-card {
    min-height: 150px;
  }

  .room-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .timer-panel {
    max-width: none;
  }

  .seats-grid {
    grid-template-columns: 1fr;
  }

  .seat-card {
    min-height: 310px;
  }

  .seat-card__body {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  }

  .seat-kick,
  .char-reroll,
  .event-reroll {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .page {
    width: calc(100% - 28px);
    padding-bottom: 48px;
  }

  .topbar {
    min-height: 64px;
    gap: 8px;
    padding: 0 12px;
  }

  .brand {
    gap: 8px;
    flex: 0 0 auto;
  }

  .brand__mark {
    width: 31px;
    height: 31px;
  }

  .brand__text strong {
    font-size: 14px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .brand__text small {
    display: none;
  }

  .topbar__right {
    flex: 0 0 auto;
    gap: 0;
  }

  .conn-state {
    display: none;
  }

  .nav-btn {
    width: 32px;
    height: 33px;
    padding: 0;
    justify-content: center;
  }

  .nav-btn span {
    display: none;
  }

  .user-chip {
    width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
    margin-left: 3px;
    border-radius: 50%;
  }

  .user-chip__meta {
    display: none;
  }

  .user-chip__avatar {
    width: 26px;
    height: 26px;
  }

  .icon-btn {
    width: 33px;
    height: 33px;
  }

  .login-page {
    padding: 18px 20px 24px;
  }

  .login-brand__note {
    display: none;
  }

  .login-title {
    font-size: clamp(55px, 16vw, 78px);
  }

  .login-subtitle {
    font-size: 12px;
  }

  .login-card {
    padding: 28px 22px 23px;
  }

  .login-footer {
    justify-content: center;
    text-align: center;
  }

  .login-footer span:last-child {
    display: none;
  }

  .hero {
    padding-top: 16px;
  }

  .hero-title {
    font-size: clamp(40px, 11vw, 58px);
  }

  .hero-lede {
    font-size: 12px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: 330px;
  }

  .orrery-wrap {
    width: min(100%, 310px);
  }

  .orrery-core {
    width: 88px;
    height: 88px;
  }

  .orrery-core strong {
    font-size: 27px;
  }

  .orbit-node strong {
    font-size: 11px;
  }

  .orbit-float {
    font-size: 8px;
  }

  .dash-grid {
    gap: 10px;
  }

  .dash-card {
    padding: 19px;
  }

  .dash-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-page {
    padding-top: 18px;
  }

  .room-heading h1 {
    font-size: 36px;
  }

  .room-heading__meta {
    gap: 9px;
  }

  .timer-panel {
    grid-template-columns: 76px minmax(0, 1fr) 76px;
    gap: 11px;
    min-height: 112px;
    padding: 14px;
  }

  .round-block {
    padding-right: 10px;
  }

  .round-block strong {
    font-size: 38px;
  }

  .clock {
    font-size: 24px;
  }

  .total-block {
    padding-left: 10px;
  }

  .total-block strong {
    font-size: 12px;
  }

  .command-bar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .command-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .command-actions .btn--draw {
    flex: 1;
  }

  .command-divider {
    display: none;
  }

  .seat-card {
    min-height: 0;
  }

  .seat-card__head {
    padding: 9px 12px;
  }

  .seat-card__body {
    grid-template-columns: 1fr;
  }

  .character-pane {
    border-right: 0;
    border-bottom: 1px solid rgba(221, 197, 150, 0.08);
    padding: 16px 14px;
  }

  .event-pane {
    padding: 15px 14px;
  }

  .character-info h2 {
    font-size: 24px;
  }

  .element-seal {
    width: 60px;
    height: 60px;
  }

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

  .modal-layer {
    padding: 0;
    align-items: flex-end;
  }

  .modal-panel {
    width: 100%;
    max-height: 92vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
    transform: translateY(30px);
  }

  .modal-layer.is-open .modal-panel {
    transform: translateY(0);
  }

  .modal-head {
    padding: 18px 18px 14px;
  }

  .modal-head h2 {
    font-size: 21px;
  }

  .modal-body {
    padding: 16px 18px 24px;
  }

  .library-toolbar {
    flex-wrap: wrap;
  }

  .library-footer,
  .sticky-actions {
    margin-right: -18px;
    margin-bottom: -24px;
    margin-left: -18px;
    padding: 12px 18px;
  }

  .library-toolbar .search-field {
    flex-basis: 100%;
  }

  .library-toolbar .btn {
    flex: 1;
  }

  .char-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 6px;
  }

  .char-tile {
    min-height: 88px;
    padding: 10px 8px;
  }

  .form-grid,
  .form-grid--3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-grid .span-2,
  .form-grid .span-3 {
    grid-column: span 1;
  }

  .round-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tag-editor__row {
    grid-template-columns: minmax(0, 1fr) 88px 32px;
  }

  .random-insert {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .random-insert__stack {
    width: 100%;
  }

  .random-insert__controls {
    flex-wrap: wrap;
  }

  .random-insert__controls .random-insert__options {
    width: 100%;
    flex-basis: 100%;
  }

  .random-insert__controls .btn {
    flex: 1;
  }

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

  .event-row {
    gap: 8px;
    padding: 11px;
  }

  .event-row__desc {
    white-space: normal;
  }

  .event-row__actions {
    flex-direction: column;
  }

  .toast-root {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 430px) {
  .timer-panel {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .total-block {
    grid-column: span 2;
    flex-direction: row;
    align-items: baseline;
    gap: 7px;
    padding: 8px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .command-actions .btn--ghost span {
    display: none;
  }

  .command-actions .btn--ghost {
    width: 39px;
    padding: 0;
  }

  .room-code-chip {
    font-size: 11px;
  }

  .seat-card__head {
    flex-wrap: wrap;
  }
}

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