/* ── Themes ─────────────────────────────────────────────────────────────── */
:root,
[data-theme='sunset'] {
  --bg: linear-gradient(165deg, #1b1038 0%, #4a1f6e 52%, #b8435a 100%);
  --accent: #ffb36b;
  --accent-2: #ff6f91;
  --door-a: #ff8a65;
  --door-b: #d6456a;
  --panel: rgba(20, 12, 40, 0.62);
  --sheet: #1d1337;
}
[data-theme='ocean'] {
  --bg: linear-gradient(165deg, #031b2e 0%, #0a4a68 55%, #137f8c 100%);
  --accent: #ffd166;
  --accent-2: #4fe0d0;
  --door-a: #27b3c9;
  --door-b: #1a6f9a;
  --panel: rgba(3, 25, 40, 0.62);
  --sheet: #06263a;
}
[data-theme='forest'] {
  --bg: linear-gradient(165deg, #0d1f16 0%, #1f4a32 55%, #4a7a45 100%);
  --accent: #f4c26b;
  --accent-2: #b5e48c;
  --door-a: #6aa84f;
  --door-b: #2f6b3f;
  --panel: rgba(10, 28, 18, 0.62);
  --sheet: #112a1c;
}
[data-theme='festive'] {
  --bg: linear-gradient(165deg, #0b2a20 0%, #14573f 50%, #8c1f2b 100%);
  --accent: #ffd54a;
  --accent-2: #ff6b6b;
  --door-a: #d33a3a;
  --door-b: #8c1f2b;
  --panel: rgba(8, 28, 20, 0.62);
  --sheet: #0f2b21;
}
[data-theme='midnight'] {
  --bg: linear-gradient(165deg, #080c1c 0%, #1b2552 55%, #3d2c8d 100%);
  --accent: #8be9fd;
  --accent-2: #ffca3a;
  --door-a: #6f5bd6;
  --door-b: #3a2f94;
  --panel: rgba(8, 10, 30, 0.62);
  --sheet: #121734;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: #120a26;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: #fff;
  background: var(--bg) fixed;
  font-family: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] {
  display: none !important;
}
h1,
h2 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 0.9em;
}
.muted {
  color: rgba(255, 255, 255, 0.78);
}
.small {
  font-size: 0.875rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.backdrop i {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: drift 22s ease-in-out infinite alternate;
}
.backdrop i:nth-child(1) {
  width: 46vmax;
  height: 46vmax;
  background: var(--accent-2);
  top: -18vmax;
  right: -12vmax;
}
.backdrop i:nth-child(2) {
  width: 38vmax;
  height: 38vmax;
  background: var(--accent);
  bottom: -16vmax;
  left: -12vmax;
  animation-delay: -8s;
  opacity: 0.22;
}
.backdrop i:nth-child(3) {
  width: 24vmax;
  height: 24vmax;
  background: var(--door-a);
  top: 38%;
  left: 52%;
  animation-delay: -14s;
  opacity: 0.18;
}
@keyframes drift {
  to {
    transform: translate3d(-6vmax, 5vmax, 0) scale(1.12);
  }
}
/* Both #fx and #toast are popovers: they live in the browser's top layer so they
   also appear above the open door dialog. */
#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
}
#app {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px 56px;
}
.screen {
  animation: rise 0.5s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ── Controls ───────────────────────────────────────────────────────────── */
.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.8em 1.5em;
  font: inherit;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  color: #1b1038;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.btn.small {
  padding: 0.4em 1em;
  font-size: 0.85rem;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.icon-btn {
  appearance: none;
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
input[type='password'],
input[type='text'],
input[type='date'],
textarea {
  width: 100%;
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 0.8em 1em;
}
input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
input[type='date'] {
  color-scheme: dark;
  width: auto;
  padding: 0.35em 0.7em;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.chip {
  display: inline-block;
  padding: 0.2em 0.8em;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1b1038;
  background: var(--accent);
}

/* ── Login ──────────────────────────────────────────────────────────────── */
.login-card {
  max-width: 420px;
  margin: 12vh auto 0;
  padding: 36px 28px 30px;
  text-align: center;
}
.login-card h1 {
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  margin-bottom: 8px;
}
.login-emoji {
  font-size: 3.4rem;
  margin-bottom: 6px;
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob {
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}
.login-card .field {
  display: block;
  margin: 22px 0 8px;
}
.login-card .btn {
  width: 100%;
  margin-top: 6px;
}
.hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 12px;
}
.error {
  color: #ffb4b4;
  font-weight: 600;
}
.shake {
  animation: shake 0.4s;
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-7px);
  }
  40%,
  80% {
    transform: translateX(7px);
  }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 6px 0 22px;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
}
.hero-emoji {
  font-size: 3.2rem;
  margin-top: 4px;
}
.hero h1 {
  font-size: clamp(1.9rem, 6.5vw, 3.2rem);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
.hero .muted {
  margin: 10px auto 0;
  max-width: 560px;
}
.countdown {
  display: inline-block;
  margin: 18px 0 16px;
  padding: 0.55em 1.3em;
  border-radius: 999px;
  font-weight: 800;
  font-size: clamp(1rem, 3.4vw, 1.25rem);
  color: #1b1038;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.progress {
  height: 8px;
  max-width: 340px;
  margin: 0 auto 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: calc(var(--p, 0) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.8s ease;
}
.admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 18px auto 0;
  padding: 12px 16px;
  max-width: 560px;
  font-size: 0.9rem;
}
.admin-bar label {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Doors ──────────────────────────────────────────────────────────────── */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 184px));
  justify-content: center;
  gap: 18px;
}
.grid li {
  display: block;
  animation: rise 0.5s ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.door {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: #fff;
  font: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 28px rgba(0, 0, 0, 0.25);
  overflow: visible;
  perspective: 700px;
}
.door-inside {
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px;
  text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04) 70%), var(--sheet);
}
.door-inside .emoji {
  font-size: 2.2rem;
}
.door-inside .name {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0.92;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.door-panel {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  background: linear-gradient(150deg, var(--door-a), var(--door-b));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22), inset 0 -18px 30px rgba(0, 0, 0, 0.18);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  backface-visibility: hidden;
}
.door-panel::before {
  /* decorative inner frame */
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.22);
}
.door-panel::after {
  /* knob */
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffe08a;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18), 0 0 8px rgba(255, 224, 138, 0.8);
}
.door-num {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.door-date {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.92;
}
.door-flag {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.1em 0.7em;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #1b1038;
  background: var(--accent);
  border-radius: 99px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.door[data-state='locked'] {
  cursor: not-allowed;
}
.door[data-state='locked'] .door-panel {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
}
.door[data-state='locked'] .door-num {
  text-shadow: none;
}
.door[data-state='locked'] .door-inside {
  visibility: hidden;
}
.door[data-state='locked'] .door-date::before {
  content: '🔒 ';
}
.door[data-state='ready'] {
  animation: glow 2.2s ease-in-out infinite;
}
@keyframes glow {
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent), 0 12px 34px rgba(0, 0, 0, 0.3);
  }
}
.door[data-state='open'] .door-panel {
  transform: rotateY(-82deg);
  filter: brightness(0.9);
}
.door[data-state='ready']:hover .door-panel,
.door[data-state='ready']:focus-visible .door-panel {
  transform: rotateY(-38deg);
}
.door.deny {
  animation: shake 0.4s;
}
.door[data-done='true']::after {
  content: '✓';
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  font-size: 0.9rem;
  color: #1b1038;
  background: var(--accent-2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.footer {
  margin-top: 40px;
  text-align: center;
}

/* ── Door dialog ────────────────────────────────────────────────────────── */
dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: #fff;
  background: var(--sheet);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  overflow: auto;
}
dialog::backdrop {
  background: rgba(8, 4, 20, 0.7);
  backdrop-filter: blur(6px);
}
dialog[open] {
  animation: pop 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(18px);
  }
}
.sheet {
  padding: 18px 22px 26px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.25em 0.9em;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1b1038;
  background: var(--accent);
}
.badge[data-type='question'] {
  background: #8be9fd;
}
.badge[data-type='assignment'] {
  background: #b5e48c;
}
.badge[data-type='voucher'] {
  background: #ffd166;
}
.badge[data-type='sport'] {
  background: #ff9fb2;
}
.badge[data-type='work'] {
  background: #c3b1ff;
}
.badge[data-type='prize'] {
  background: linear-gradient(135deg, #ffd54a, #ff7eb3);
}
.sheet h2 {
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  margin-bottom: 10px;
}
.sheet-body .lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.86);
}
.sheet-body ul.checks {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.checks label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 0.7em 0.9em;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}
.checks input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent-2);
  flex: none;
}
.checks input:checked + span {
  text-decoration: line-through;
  opacity: 0.6;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.option {
  appearance: none;
  text-align: left;
  padding: 0.85em 1.1em;
  font: inherit;
  font-weight: 600;
  color: #fff;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.option:hover:not([disabled]) {
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(3px);
}
.option.correct {
  background: rgba(120, 220, 140, 0.32);
  border-color: #7ddc8c;
}
.option.wrong {
  background: rgba(255, 110, 110, 0.28);
  border-color: #ff8e8e;
}
.note {
  margin-top: 14px;
  padding: 0.8em 1em;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  border-left: 4px solid var(--accent);
}
.saved {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Timer */
.timer {
  margin: 16px 0 4px;
  padding: 16px;
  text-align: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}
.timer-time {
  font-size: 3rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.timer.finished .timer-time {
  color: var(--accent-2);
}
.timer .actions {
  justify-content: center;
  margin-top: 8px;
}

/* Voucher ticket */
.ticket {
  position: relative;
  margin: 12px 0;
  border-radius: 20px;
  color: #2b1b00;
  background: linear-gradient(135deg, #ffe08a, #ffbf5e);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  /* ticket notches */
  -webkit-mask: radial-gradient(circle 12px at 0 62%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 62%, #0000 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 12px at 0 62%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 62%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.ticket-main {
  padding: 20px 24px 18px;
}
.ticket-kicker {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}
.ticket-item {
  margin: 4px 0 2px;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
}
.ticket-where {
  font-weight: 600;
  opacity: 0.8;
}
.ticket-stub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 24px 16px;
  border-top: 2px dashed rgba(43, 27, 0, 0.35);
}
.ticket-price {
  font-weight: 900;
  font-size: 1.1rem;
}
.ticket-price small {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.7;
}
.ticket.bought::after {
  content: 'BOUGHT';
  position: absolute;
  right: 18px;
  top: 16px;
  padding: 0.1em 0.6em;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #b3261e;
  border: 3px solid #b3261e;
  border-radius: 8px;
  transform: rotate(-9deg);
  opacity: 0.85;
}
.ticket-stub .btn {
  background: #2b1b00;
}

/* Prize */
.envelope {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  margin: 16px 0 4px;
  padding: 34px 16px;
  font: inherit;
  font-weight: 800;
  color: #fff;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  animation: glow 2.2s ease-in-out infinite;
}
.envelope .big {
  font-size: 4rem;
  animation: bob 2.4s ease-in-out infinite;
}
.prize-card {
  margin-top: 8px;
  padding: 20px 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 213, 74, 0.2), rgba(255, 126, 179, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.28);
  animation: pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.prize-card ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-weight: 700;
}

/* Toast */
.toast {
  position: fixed;
  inset: auto auto max(24px, env(safe-area-inset-bottom)) 50%;
  margin: 0;
  max-width: calc(100vw - 32px);
  width: max-content;
  padding: 0.8em 1.4em;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  color: #1b1038;
  background: var(--accent);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast:popover-open {
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes toast-in {
  from {
    transform: translate(-50%, 140%);
  }
}

.noscript {
  padding: 2rem;
  text-align: center;
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  dialog {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 26px 26px 0 0;
    max-height: 92dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Front page ─────────────────────────────────────────────────────────── */
.landing {
  padding-top: 4vh;
}
.landing .lead-in {
  max-width: 620px;
}
.steps-row {
  list-style: none;
  margin: 8px 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.step {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  text-align: left;
}
.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 900;
  color: #1b1038;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.landing .login-card {
  margin-top: 0;
}
.landing .login-card h2 {
  font-size: 1.4rem;
}

/* ── Admin ──────────────────────────────────────────────────────────────── */
.pad {
  padding: 22px 24px;
  margin-bottom: 22px;
}
.pad h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}
.pad h3 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 18px;
}
.form-grid label {
  display: grid;
  gap: 6px;
  align-content: start;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}
.form-grid .wide {
  grid-column: 1 / -1;
}
.form-grid label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.form-grid input[type='checkbox'],
.pad input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-2);
}
.form-grid input[type='date'] {
  width: 100%;
}
select {
  width: 100%;
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 0.8em 1em;
  color-scheme: dark;
}
select option {
  color: #fff;
  background: #1d1337;
}
.pad input[type='text'] {
  width: 100%;
}
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.65em 0.9em;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}
.row.wrap {
  flex-wrap: wrap;
}
.row-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.14);
}
.row-main {
  flex: 1 1 200px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.block {
  display: block;
}
.tag {
  flex: none;
  padding: 0.1em 0.7em;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1b1038;
  background: var(--accent);
}
.pw-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.pw-row input {
  flex: 1;
}
.btn.danger {
  color: #ffb4b4;
}
.published {
  border-color: var(--accent);
}
.kv {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.kv > span {
  min-width: 90px;
}
code {
  padding: 0.2em 0.6em;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.published a {
  color: var(--accent);
}
.form-grid input,
.form-grid textarea,
.form-grid select,
.pad input[type='text'] {
  font-weight: 500;
}
