/* ================================================================
   Тайный Санта — новогодняя тема
   ================================================================ */

:root {
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius: 20px;
  --radius-lg: 28px;

  --bg: #04150e;
  --bg-2: #08251a;
  --bg-3: #0b3223;
  --topbar: rgba(4, 21, 14, 0.82);
  --panel: rgba(9, 38, 27, 0.68);
  --panel-solid: #0a2a1e;
  --panel-deep: rgba(2, 16, 11, 0.55);
  --line: rgba(233, 196, 106, 0.15);
  --line-strong: rgba(233, 196, 106, 0.36);
  --text: #f2f6ee;
  --muted: #9fbfae;
  --green: #2f9e6b;
  --green-deep: #177a4f;
  --green-soft: #6fd3a0;
  --gold: #e9c46a;
  --gold-soft: #f5dea2;
  --danger: #e2705f;
  --danger-soft: #ffb7aa;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.22);
  --glow: 0 0 44px rgba(47, 158, 107, 0.22);
}

[data-theme="light"] {
  --bg: #f3efe3;
  --bg-2: #e6eee4;
  --bg-3: #dbe8dc;
  --topbar: rgba(243, 239, 227, 0.86);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #ffffff;
  --panel-deep: rgba(255, 255, 255, 0.6);
  --line: rgba(18, 82, 56, 0.14);
  --line-strong: rgba(18, 82, 56, 0.32);
  --text: #0d2f22;
  --muted: #56766a;
  --green: #177a4f;
  --green-deep: #106642;
  --green-soft: #2f9e6b;
  --gold: #a97b1f;
  --gold-soft: #8c6412;
  --danger: #b6473a;
  --danger-soft: #9e3428;
  --shadow: 0 22px 60px rgba(24, 66, 49, 0.14);
  --shadow-soft: 0 12px 30px rgba(24, 66, 49, 0.1);
  --glow: 0 0 44px rgba(47, 158, 107, 0.14);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 620px at 12% -12%, rgba(47, 158, 107, 0.26), transparent 62%),
    radial-gradient(900px 520px at 92% -4%, rgba(233, 196, 106, 0.13), transparent 58%),
    radial-gradient(900px 620px at 50% 112%, rgba(20, 92, 61, 0.42), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

[data-theme="light"] body {
  background-image:
    radial-gradient(1100px 620px at 10% -10%, rgba(47, 158, 107, 0.2), transparent 60%),
    radial-gradient(900px 520px at 95% 0%, rgba(201, 155, 58, 0.14), transparent 60%),
    radial-gradient(900px 600px at 50% 112%, rgba(126, 176, 142, 0.32), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

#snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

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

h1, h2, h3, h4 {
  line-height: 1.15;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

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

::selection {
  background: rgba(233, 196, 106, 0.32);
  color: var(--text);
}

/* ------------------------------ topbar ------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 13px 28px;
  background: var(--topbar);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  flex: 0 0 auto;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(233, 196, 106, 0.2), rgba(47, 158, 107, 0.3));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand-text small {
  font-size: 9.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.topnav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.topnav a {
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.topnav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.topnav a.active {
  color: var(--gold-soft);
  background: rgba(233, 196, 106, 0.07);
  border-color: var(--line);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  max-width: 210px;
  transition: border-color 0.18s, background 0.18s;
}

.user-chip:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.user-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, transform 0.18s, background 0.18s;
  flex: 0 0 auto;
}

.icon-btn:hover {
  color: var(--gold-soft);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ------------------------------ layout ------------------------------ */

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 34px 28px 90px;
  flex: 1;
}

.footer {
  padding: 26px 28px 34px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.4px;
}

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

.gold {
  color: var(--gold-soft);
}

.center {
  text-align: center;
}

/* ------------------------------ кнопки ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  color: #f4fff8;
  background: linear-gradient(135deg, #2f9e6b, #177a4f);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 26px rgba(23, 122, 79, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(23, 122, 79, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-gold {
  color: #241a05;
  background: linear-gradient(135deg, #f2d68a, #d9ae4d);
  border-color: rgba(120, 84, 10, 0.25);
  box-shadow: 0 12px 26px rgba(180, 135, 35, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-gold:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(180, 135, 35, 0.38);
}

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

[data-theme="light"] .btn-ghost {
  background: rgba(255, 255, 255, 0.72);
}

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

.btn-danger {
  color: var(--danger-soft);
  background: rgba(226, 112, 95, 0.07);
  border-color: rgba(226, 112, 95, 0.38);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(226, 112, 95, 0.14);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ------------------------------ карточки ------------------------------ */

.card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), transparent 42%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] .card {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.35) 42%),
    var(--panel);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill svg {
  width: 12px;
  height: 12px;
}

.pill-live {
  color: #86e6b6;
  background: rgba(47, 158, 107, 0.14);
  border-color: rgba(47, 158, 107, 0.32);
}

[data-theme="light"] .pill-live {
  color: #106642;
  background: rgba(47, 158, 107, 0.12);
  border-color: rgba(23, 122, 79, 0.28);
}

.pill-done {
  color: var(--gold-soft);
  background: rgba(233, 196, 106, 0.1);
  border-color: rgba(233, 196, 106, 0.3);
}

.pill-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12.5px;
  color: var(--muted);
  max-width: 100%;
}

[data-theme="light"] .chip {
  background: rgba(255, 255, 255, 0.6);
}

.chip svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
  flex: 0 0 auto;
}

.chip b {
  color: var(--text);
  font-weight: 600;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--gold);
}

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

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 18px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 30px);
  margin: 0;
}

.section-head .count {
  color: var(--muted);
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

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

.card-head h2,
.card-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  margin: 0;
}

.card-head .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 5px;
  line-height: 1.5;
}

/* ------------------------------ аватары ------------------------------ */

.avatar {
  --a1: #6fd3a0;
  --a2: #2f9e6b;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #052116;
  background: linear-gradient(140deg, var(--a1), var(--a2));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

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

.avatar.lg {
  width: 76px;
  height: 76px;
  font-size: 25px;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar {
  margin-left: -10px;
  border: 2px solid var(--panel-solid);
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.avatar-more {
  margin-left: -10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel-solid);
  border: 2px solid var(--panel-solid);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* ------------------------------ формы ------------------------------ */

.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.field > label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-deep);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.input::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.input:hover {
  border-color: var(--line-strong);
}

.input:focus {
  outline: none;
  border-color: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(47, 158, 107, 0.18);
}

textarea.input {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9c46a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  cursor: pointer;
}

option {
  background: var(--panel-solid);
  color: var(--text);
}

.form-error {
  display: none;
  padding: 11px 14px;
  border-radius: 11px;
  background: rgba(226, 112, 95, 0.12);
  border: 1px solid rgba(226, 112, 95, 0.34);
  color: var(--danger-soft);
  font-size: 13.5px;
  line-height: 1.45;
}

.form-error.show {
  display: block;
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* ------------------------------ авторизация ------------------------------ */

.auth-shell {
  width: min(1140px, 100%);
  margin: 0 auto;
  padding: 48px 28px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 68px;
  align-items: center;
}

.auth-hero {
  position: relative;
}

.auth-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(42px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.5px;
  margin: 18px 0 20px;
}

.auth-hero h1 em {
  font-style: italic;
  color: var(--gold-soft);
}

.auth-lead {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: 480px;
  margin: 0 0 28px;
}

.auth-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  max-width: 460px;
}

.auth-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-points svg {
  width: 19px;
  height: 19px;
  color: var(--gold);
  flex: 0 0 auto;
  margin-top: 1px;
}

.auth-points b {
  color: var(--text);
  font-weight: 600;
}

.auth-art {
  width: 102px;
  margin: 0 0 16px;
  pointer-events: none;
  animation: floaty 8s ease-in-out infinite;
}

.auth-art svg {
  width: 100%;
  height: auto;
}

.auth-card {
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--glow), var(--shadow);
}

.auth-tabs {
  display: flex;
  padding: 4px;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  margin-bottom: 24px;
}

[data-theme="light"] .auth-tabs {
  background: rgba(18, 82, 56, 0.06);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.active {
  color: #f4fff8;
  background: linear-gradient(135deg, #2f9e6b, #177a4f);
  box-shadow: 0 8px 20px rgba(23, 122, 79, 0.38);
}

.auth-foot {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.auth-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(233, 196, 106, 0.09);
  border: 1px solid rgba(233, 196, 106, 0.3);
  color: var(--gold-soft);
  font-size: 13px;
  line-height: 1.5;
}

.auth-notice svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}

/* ------------------------------ дашборд ------------------------------ */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 30px;
  padding: 46px 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 280px at 88% 4%, rgba(233, 196, 106, 0.17), transparent 70%),
    radial-gradient(560px 340px at -2% 108%, rgba(47, 158, 107, 0.24), transparent 70%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 580px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.4px;
  margin: 14px 0 14px;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-soft);
}

.hero-lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 500px;
}

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

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
}

.hero-art::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 196, 106, 0.16), transparent 66%);
  filter: blur(4px);
}

.hero-tree {
  position: relative;
  width: min(215px, 100%);
  animation: floaty 7s ease-in-out infinite;
}

.hero-tree svg {
  width: 100%;
  height: auto;
}

.join-strip {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  flex-wrap: wrap;
}

.join-strip form {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}

.join-strip .input {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: var(--font-mono);
  font-weight: 600;
  min-width: 0;
}

.join-strip .label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.join-strip .label svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.room-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.room-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(340px 160px at 100% 0%, rgba(233, 196, 106, 0.09), transparent 70%);
  pointer-events: none;
}

.room-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--glow), var(--shadow);
}

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

.room-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.room-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 23px;
  margin: 0;
  overflow-wrap: anywhere;
}

.room-desc {
  margin: -6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.room-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  color: var(--muted);
  font-size: 12.5px;
}

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

.room-meta svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
  opacity: 0.9;
}

.room-card .btn {
  margin-top: auto;
}

.room-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

.room-card-foot .btn {
  flex: 1;
}

.gift-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold-soft);
  background: rgba(233, 196, 106, 0.09);
  border: 1px solid rgba(233, 196, 106, 0.22);
  max-width: 100%;
}

.gift-note svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.gift-note span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  padding: 46px 26px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

[data-theme="light"] .empty {
  background: rgba(255, 255, 255, 0.4);
}

.empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(47, 158, 107, 0.12);
  border: 1px solid var(--line);
  color: var(--gold);
}

.empty-icon svg {
  width: 26px;
  height: 26px;
}

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

.empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 420px;
}

/* ------------------------------ комната ------------------------------ */

.room-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.18s;
}

.back-link:hover {
  color: var(--gold-soft);
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.room-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.room-title-row h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: -0.3px;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.room-lead {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 640px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.profile-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 46px);
  margin: 10px 0 0;
}

.draw-date {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-soft);
}

.draw-date svg {
  width: 14px;
  height: 14px;
}

.room-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(292px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.room-main,
.room-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.panel {
  padding: 24px;
}

.panel-pad {
  padding: 26px;
}

/* ---------------------- карточка подопечного ---------------------- */

.santa-card {
  padding: 28px;
  border-color: rgba(233, 196, 106, 0.3);
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(233, 196, 106, 0.15), transparent 70%),
    linear-gradient(150deg, rgba(233, 196, 106, 0.08), transparent 46%),
    var(--panel);
  overflow: hidden;
}

[data-theme="light"] .santa-card {
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(201, 155, 58, 0.14), transparent 70%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.9), transparent 46%),
    var(--panel);
}

.santa-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -46px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px dashed rgba(233, 196, 106, 0.24);
  pointer-events: none;
}

.santa-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.santa-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.santa-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 34px);
  margin: 0;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.santa-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.5;
}

.preferences-quote {
  margin: 0 0 18px;
  padding: 15px 17px;
  border-left: 2px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

[data-theme="light"] .preferences-quote {
  background: rgba(18, 82, 56, 0.05);
}

.subhead {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.subhead::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.draw-wait {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 8px 4px 4px;
}

.draw-wait-art {
  width: 92px;
  flex: 0 0 auto;
  animation: floaty 8s ease-in-out infinite;
}

.draw-wait-art svg {
  width: 100%;
  height: auto;
}

.draw-wait h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 8px;
}

.draw-wait p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* ---------------------- пожелания ---------------------- */

.preferences-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preferences-edit .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.preferences-edit .hint {
  font-size: 12px;
  color: var(--muted);
}

.wish-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.wish-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 16px;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .wish-item {
  background: rgba(255, 255, 255, 0.66);
}

.wish-item h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.wish-price {
  color: var(--gold-soft);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

.wish-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.wish-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.wish-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--green-soft);
  border: 1px solid rgba(47, 158, 107, 0.32);
  background: rgba(47, 158, 107, 0.08);
  max-width: 100%;
  transition: background 0.18s, border-color 0.18s;
}

[data-theme="light"] .wish-link {
  color: var(--green-deep);
}

.wish-link:hover {
  background: rgba(47, 158, 107, 0.16);
  border-color: rgba(47, 158, 107, 0.5);
}

.wish-link svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.wish-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}

.wish-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.mini-btn:hover {
  color: var(--gold-soft);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.mini-btn.danger:hover {
  color: var(--danger-soft);
  border-color: rgba(226, 112, 95, 0.5);
  background: rgba(226, 112, 95, 0.1);
}

.mini-btn svg {
  width: 15px;
  height: 15px;
}

.hollow-list {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

/* ---------------------- приглашение и участники ---------------------- */

.invite-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: rgba(0, 0, 0, 0.22);
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--gold-soft);
  user-select: all;
}

.path-box {
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: var(--panel-deep);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  word-break: break-all;
  user-select: all;
}

[data-theme="light"] .invite-code {
  background: rgba(18, 82, 56, 0.05);
}

.copy-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
  transition: color 0.18s, border-color 0.18s;
}

.copy-btn:hover {
  color: var(--gold-soft);
  border-color: var(--line-strong);
}

.copy-btn svg {
  width: 16px;
  height: 16px;
}

.member-list {
  display: flex;
  flex-direction: column;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.member-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.member-row:first-child {
  padding-top: 0;
}

.member-name + .member-tag {
  margin-left: auto;
}

.member-tag + .member-tag {
  margin-left: 0;
}

.member-name + .mini-btn {
  margin-left: auto;
}

.member-tag + .mini-btn {
  margin-left: 2px;
}

.member-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-tag {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.member-tag.self {
  color: var(--gold-soft);
  border-color: rgba(233, 196, 106, 0.3);
  background: rgba(233, 196, 106, 0.07);
}

.member-tag.off {
  opacity: 0.7;
}

/* ---------------------- панель управления ---------------------- */

.admin-panel {
  margin-top: 24px;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(233, 196, 106, 0.3);
  background:
    radial-gradient(480px 240px at 100% 0%, rgba(233, 196, 106, 0.1), transparent 70%),
    linear-gradient(160deg, rgba(233, 196, 106, 0.06), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] .admin-panel {
  background:
    radial-gradient(480px 240px at 100% 0%, rgba(201, 155, 58, 0.12), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.92), transparent 42%),
    var(--panel);
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.admin-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 23px;
  margin: 0 0 5px;
}

.admin-head h2 svg {
  width: 19px;
  height: 19px;
  color: var(--gold);
}

.admin-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.admin-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

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

.admin-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 20px minmax(150px, 1.05fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .admin-row {
  background: rgba(255, 255, 255, 0.62);
}

.admin-giver {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.admin-giver span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-arrow {
  color: var(--gold);
  display: grid;
  place-items: center;
}

.admin-arrow svg {
  width: 15px;
  height: 15px;
}

.admin-row .input {
  padding: 8px 32px 8px 11px;
  font-size: 13px;
  border-radius: 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9c46a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.admin-row .row-actions {
  display: flex;
  gap: 6px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.admin-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.admin-block h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.warn-text {
  color: var(--danger-soft);
}

/* ------------------------------ профиль ------------------------------ */

.profile-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.profile-card {
  padding: 30px 26px;
  text-align: center;
}

.profile-card .avatar {
  margin: 0 auto;
}

.profile-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 27px;
  margin: 18px 0 4px;
  overflow-wrap: anywhere;
}

.profile-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.profile-since {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.theme-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-option {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.theme-option svg {
  width: 17px;
  height: 17px;
}

.theme-option:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.theme-option.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(233, 196, 106, 0.08);
}

/* ------------------------------ диалоги ------------------------------ */

#dialog-root dialog {
  width: min(94vw, 500px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.55);
}

#dialog-root dialog.wide {
  width: min(96vw, 620px);
}

#dialog-root dialog::backdrop {
  background: rgba(2, 12, 7, 0.62);
  backdrop-filter: blur(5px);
}

#dialog-root dialog[open] {
  animation: dialogIn 0.22s ease both;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 24px 0;
}

.dialog-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 5px;
}

.dialog-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px 24px;
  max-height: min(62vh, 520px);
  overflow-y: auto;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 24px 24px;
  flex-wrap: wrap;
}

.dialog-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
}

.dialog-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.dialog-close svg {
  width: 16px;
  height: 16px;
}

/* ------------------------------ тосты ------------------------------ */

#toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--green-soft);
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  line-height: 1.5;
  animation: toastIn 0.24s ease both;
  pointer-events: auto;
}

.toast.error {
  border-left-color: var(--danger);
}

.toast svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--green-soft);
}

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

.toast.leaving {
  animation: toastOut 0.2s ease both;
}

/* ------------------------------ загрузка ------------------------------ */

.loading-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}

/* ------------------------------ декоративные элементы ------------------------------ */

.garland {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42px;
  pointer-events: none;
  opacity: 0.9;
}

.garland svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bulb {
  position: absolute;
  width: 7px;
  height: 10px;
  border-radius: 45% 45% 55% 55%;
  background: #f0d489;
  box-shadow: 0 0 12px 2px rgba(233, 196, 106, 0.5);
  animation: twinkle 3.4s ease-in-out infinite;
}

.bulb.g {
  background: #7ce3b1;
  box-shadow: 0 0 12px 2px rgba(94, 224, 162, 0.45);
}

.bulb.r {
  background: #ef907b;
  box-shadow: 0 0 12px 2px rgba(239, 144, 123, 0.42);
}

.snowflake {
  position: absolute;
  color: rgba(233, 196, 106, 0.28);
  pointer-events: none;
  animation: spin 26s linear infinite;
}

[data-theme="light"] .snowflake {
  color: rgba(18, 82, 56, 0.2);
}

/* ------------------------------ анимации ------------------------------ */

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

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

@keyframes twinkle {
  0%, 100% {
    opacity: 0.45;
    filter: brightness(0.85);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
  }
}

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

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

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

.hero,
.room-top,
.room-grid,
.admin-panel,
.rooms-section,
.profile-grid,
.auth-shell {
  animation: fadeUp 0.4s ease both;
}

/* ------------------------------ адаптив ------------------------------ */

@media (max-width: 1020px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
    padding-top: 56px;
  }

  .auth-art {
    top: -30px;
    right: 6%;
    width: 150px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 38px 32px;
  }

  .hero-art {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .topbar {
    gap: 12px;
    padding: 11px 16px;
  }

  .brand-text small {
    display: none;
  }

  .topbar-right {
    gap: 7px;
  }

  .user-chip span {
    display: none;
  }

  .user-chip {
    padding: 3px;
    border: none;
    background: transparent;
  }

  .page {
    padding: 22px 16px 70px;
  }

  .hero {
    padding: 30px 22px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(30px, 8vw, 40px);
  }

  .auth-shell {
    padding: 32px 16px 48px;
    gap: 30px;
  }

  .auth-art {
    display: none;
  }

  .auth-card {
    padding: 22px;
  }

  .panel,
  .panel-pad,
  .santa-card,
  .admin-panel,
  .profile-card {
    padding: 20px;
  }

  .dialog-head {
    padding: 20px 18px 0;
  }

  .dialog-body {
    padding: 16px 18px;
  }

  .dialog-actions {
    padding: 2px 18px 20px;
  }

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

  .admin-arrow {
    display: none;
  }

  .admin-row .input {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-row .row-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-split {
    grid-template-columns: 1fr;
  }

  .draw-wait {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .draw-wait-art {
    width: 70px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .join-strip form {
    min-width: 100%;
  }

  .join-strip .label {
    width: 100%;
  }

  .section-head {
    margin-top: 30px;
  }
}

@media (max-width: 620px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topnav {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .brand-text strong {
    font-size: 16px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

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

  .invite-code {
    font-size: 18px;
    letter-spacing: 4px;
  }
}

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