/* enidu Studio — minimal CSS for server-rendered admin */
:root {
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --bg: #faf8f5;
  --bg-elev: #ffffff;
  --bg-deep: #f2efe9;
  --ink: #1f1b16;
  --ink-soft: #4a4540;
  --ink-mute: #8a857e;
  --line: #e8e4de;
  --primary: #e85d2a;
  --primary-soft: #fef0ea;
  --primary-deep: #b8431a;
  --accent: #2a8a5a;
  --accent-soft: #e6f5ed;
  --warn: #c8811a;
  --warn-soft: #fdf3e0;
  --shadow: 0 8px 24px -8px rgba(31, 27, 22, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.admin-topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}
.admin-topbar .brand .dot {
  width: 28px;
  height: 28px;
  display: block;
}
.admin-topbar .brand .pill {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--ink) 8%, transparent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.admin-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  flex: 1;
}
.admin-sidebar {
  padding: 20px 12px;
  border-right: 1px solid var(--line);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-sidebar .group {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 700;
  padding: 16px 12px 6px;
}
.admin-sidebar .nav-item {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.admin-sidebar .nav-item:hover {
  background: var(--bg-deep);
}
.admin-sidebar .nav-active {
  background: color-mix(in oklab, var(--ink) 8%, transparent);
  color: var(--ink);
}

.admin-main {
  padding: 28px 32px;
  max-width: 960px;
}
.page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.page-title .sub {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 4px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.stat-tile {
  padding: 16px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat-tile .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 700;
}
.stat-tile .value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-top: 6px;
}
.stat-tile .delta {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
}
.stat-tile .delta.up {
  color: var(--accent);
}
.stat-tile .delta.down {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
}
.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.4);
}
.btn-primary {
  background: var(--primary);
  color: var(--bg-elev);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-deep);
}
.btn-ghost {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.btn-danger {
  background: var(--primary);
  color: var(--bg-elev);
}
.btn-danger:hover:not(:disabled) {
  background: var(--primary-deep);
}
.btn-lg {
  padding: 14px 24px;
  font-size: 14px;
  border-radius: 12px;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-block {
  width: 100%;
  justify-content: center;
}

.field {
  margin-bottom: 16px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.field-hint {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 4px;
}
.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-elev);
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
}
.textarea {
  min-height: 80px;
  resize: vertical;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.chip {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-soft);
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg-elev);
}
.filter-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.quiz-table {
  display: flex;
  flex-direction: column;
}
.live-quiz-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
@media (max-width: 900px) {
  .live-quiz-grid {
    grid-template-columns: 1fr;
  }
}
.live-quiz-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 120ms ease;
}
.live-quiz-card:hover {
  box-shadow: var(--shadow);
}

.quiz-table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 64px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.quiz-table-row.head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 700;
}
.quiz-table-row.body {
  cursor: pointer;
  border-radius: 12px;
}
.quiz-table-row.body:hover {
  background: var(--bg-deep);
}
.quiz-row-link {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.quiz-row-actions {
  display: flex;
  justify-content: flex-end;
}
.quiz-row-actions a {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mute);
  text-decoration: none;
}
.quiz-row-actions a:hover {
  color: var(--primary);
}

.step-track {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
}
.step.active {
  background: var(--primary-soft);
  color: var(--primary-deep);
}
.step.done {
  color: var(--accent);
}
.step .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-deep);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}
.step.active .num {
  background: var(--primary);
  color: var(--bg-elev);
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  background: var(--bg-elev);
  padding: 4px;
  border-radius: 999px;
  width: fit-content;
  border: 1px solid var(--line);
}
.tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.tab.active {
  background: var(--ink);
  color: var(--bg-elev);
}

.auth-screen {
  min-height: calc(100vh - 53px);
  display: grid;
  place-items: center;
  padding: 40px;
}
.auth-form {
  width: 100%;
  max-width: 440px;
}

/* Two-column admin auth (hero + form) */
.auth-split {
  min-height: calc(100vh - 53px);
  display: grid;
  grid-template-columns: 1fr 480px;
}
.auth-hero {
  padding: 60px 56px;
  background:
    radial-gradient(circle at 0% 100%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 60%),
    var(--ink);
  color: var(--bg-elev);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.auth-hero .ring {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.auth-panel {
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-elev);
}
@media (max-width: 860px) {
  .auth-split {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    display: none;
  }
}

/* Marketing landing */
.marketing-hero {
  padding: 80px 0 60px;
  text-align: center;
}
.marketing-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 22px;
}
.marketing-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 64px;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
  text-wrap: balance;
}
.marketing-hero p {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 18px auto 32px;
  max-width: 560px;
  line-height: 1.5;
}
.marketing-hero .ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}
.feat-card {
  padding: 22px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.feat-card .ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  font-size: 20px;
}
.feat-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
}
.feat-card p {
  font-size: 13.5px;
  color: var(--ink-mute);
  margin: 0;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .marketing-hero h1 {
    font-size: 40px;
  }
  .feat-grid {
    grid-template-columns: 1fr;
  }
}

/* Quiz builder — Setup screen */
.builder-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .builder-grid {
    grid-template-columns: 1fr;
  }
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.category-tile {
  padding: 14px 10px;
  border-radius: 14px;
  background: var(--bg-elev);
  border: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 120ms ease;
  text-align: center;
}
.category-tile.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.category-tile .emoji {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.category-tile .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.category-tile.active .label {
  color: var(--primary-deep);
}

.choice-row {
  display: flex;
  gap: 8px;
}
.choice-row > * {
  flex: 1;
}
.choice-pill,
.choice-card {
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  text-align: start;
}
.choice-pill.active,
.choice-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-deep);
}
.choice-card {
  display: block;
  padding: 12px 14px;
}
.choice-card .sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  margin-top: 2px;
}
.choice-card.active .sub {
  color: var(--primary-deep);
  opacity: 0.85;
}

.builder-preview {
  background: var(--ink);
  color: var(--bg-elev);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px -16px rgba(31, 27, 22, 0.3);
}
.builder-preview .glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.builder-preview .body {
  position: relative;
}
.builder-preview .chips {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}
.builder-preview .chip-soft {
  background: rgba(255, 255, 255, 0.15);
  color: var(--bg-elev);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.builder-preview .chip-bold {
  background: var(--primary);
  color: var(--bg-elev);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.builder-preview .title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  min-height: 28px;
}
.builder-preview .meta {
  opacity: 0.7;
  font-size: 12px;
  margin-top: 4px;
}
.builder-preview .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}
.builder-preview .row .label {
  font-size: 10px;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.builder-preview .row .value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  margin-top: 2px;
}

.builder-tip {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-deep);
  border-radius: 12px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* Quiz builder — rounds + editor */
.round-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.round-item {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 28px auto 1fr 110px auto;
  align-items: center;
  gap: 14px;
}
.round-media-strip {
  display: flex;
  gap: 4px;
}
.round-media-strip img,
.round-media-strip .ph {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.round-media-strip .ph {
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
}
.round-item .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--ink-mute);
}
.round-item .thumb {
  aspect-ratio: 1 / 1;
  width: 60px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  overflow: hidden;
  position: relative;
}

.media-uploader {
  aspect-ratio: 16 / 11;
  background: var(--bg-deep);
  border: 2px dashed var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  text-align: center;
  padding: 24px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.media-uploader:hover {
  border-color: var(--primary);
  color: var(--primary-deep);
}
.media-uploader.has-media {
  border-style: solid;
  padding: 0;
}

.option-row {
  display: grid;
  grid-template-columns: 36px 1fr 110px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--bg-elev);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
}
.option-row.correct {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.option-row .key {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--ink) 8%, transparent);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}
.option-row.correct .key {
  background: var(--accent);
  color: var(--bg-elev);
}
.option-row input {
  background: transparent;
  border: 0;
  padding: 8px 4px;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  outline: none;
  color: var(--ink);
  font-family: inherit;
}
.option-row .mark-correct {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  color: var(--ink-soft);
  cursor: pointer;
  border: 0;
  font-family: inherit;
}
.option-row.correct .mark-correct {
  background: var(--accent);
  color: var(--bg-elev);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status.live {
  background: #e6f5ed;
  color: #2a8a5a;
}
.status.live .dot {
  background: #2a8a5a;
}
.status.draft {
  background: #f2efe9;
  color: #8a857e;
}
.status.draft .dot {
  background: #8a857e;
}
.status.scheduled {
  background: #e8f0ff;
  color: #3a6bc8;
}
.status.scheduled .dot {
  background: #3a6bc8;
}
.status.closed {
  background: #f5f0ea;
  color: #6b5a3d;
}
.status.closed .dot {
  background: #6b5a3d;
}

.brand-footer {
  margin-top: auto;
  text-align: center;
  padding: 28px 20px 22px;
  font-size: 12.5px;
  color: var(--ink-mute);
  font-weight: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.brand-footer a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 25%, transparent);
  padding-bottom: 1px;
  transition:
    border-color 120ms ease,
    color 120ms ease;
}
.brand-footer a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.brand-footer .heart {
  display: inline-block;
  animation: heart-beat 1.6s ease-in-out infinite;
}
@keyframes heart-beat {
  0%,
  100% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.18);
  }
  40% {
    transform: scale(1);
  }
}

.avatar-preset {
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  place-items: center;
  font-size: 22px;
  color: var(--bg-elev);
}
.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 12px;
  background: var(--bg-deep);
  border-radius: 14px;
}
.avatar-preset-btn {
  padding: 4px;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  border: 0;
  display: grid;
  place-items: center;
  font-family: inherit;
}
.avatar-preset-btn.selected {
  background: var(--bg-elev);
  box-shadow: 0 0 0 2px var(--primary);
}
.avatar-tab {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  border: 0;
  font-family: inherit;
}
.avatar-tab.active {
  background: var(--ink);
  color: var(--bg-elev);
}

/* ===== Player: leaderboard rows ===== */
.lbrow {
  display: grid;
  grid-template-columns: 36px 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
}
.lbrow .rk {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--ink-mute);
  text-align: center;
  font-feature-settings: "tnum";
}
.lbrow .nm {
  font-weight: 600;
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lbrow .sc {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
  font-feature-settings: "tnum";
}
.lbrow.me {
  background: var(--primary-soft);
}
.lbrow.me .rk,
.lbrow.me .nm,
.lbrow.me .sc {
  color: var(--primary-deep);
}
.lbrow.top1 .rk {
  color: #d4a017;
}
.lbrow.top2 .rk {
  color: #8a8175;
}
.lbrow.top3 .rk {
  color: #b87333;
}

/* ===== Player: avatar bubble ===== */
.avatar-bubble {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--bg-elev);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Player: timer ring ===== */
.timer-ring {
  --p: 1;
  --sz: 48px;
  width: var(--sz);
  height: var(--sz);
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--p) * 360deg), color-mix(in oklab, var(--ink) 10%, transparent) 0);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.timer-ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--bg-elev);
  border-radius: 50%;
}
.timer-ring span {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  font-feature-settings: "tnum";
}

/* ===== Quote card (admin preview + player round) ===== */
.quote-card {
  container-type: inline-size;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11cqi;
  box-shadow: 0 16px 40px -16px rgba(31, 27, 22, 0.3);
}
.quote-card .mark {
  position: absolute;
  top: 2cqi;
  left: 6cqi;
  font-family: Georgia, serif;
  font-size: 34cqi;
  line-height: 0.7;
  opacity: 0.18;
}
.quote-card .q {
  position: relative;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-style: italic;
  font-size: 10cqi;
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.quote-card .q.long {
  font-size: 7.8cqi;
}
.quote-card .q.xlong {
  font-size: 6.2cqi;
}
.quote-card .q.placeholder {
  opacity: 0.4;
}
.quote-card .by {
  position: relative;
  margin-top: 6cqi;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 5cqi;
  letter-spacing: 0.01em;
}
.quote-card .by .dash {
  width: 7cqi;
  height: 2px;
  opacity: 0.6;
  border-radius: 2px;
}
.quote-card .by.anon {
  opacity: 0.5;
  font-size: 4.5cqi;
}
.quote-card .brand {
  position: absolute;
  bottom: 5cqi;
  right: 6cqi;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.5;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.4cqi;
}
.quote-card .brand .e {
  width: 5cqi;
  height: 5cqi;
  border-radius: 1.4cqi;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 3.2cqi;
}
.quote-card.classic {
  background: #f6f1e8;
  border: 1px solid #e4dac6;
  color: #1f1b16;
}
.quote-card.classic .mark { color: var(--qc-g1); }
.quote-card.classic .by { color: var(--qc-fg); }
.quote-card.classic .by .dash { background: var(--qc-fg); }
.quote-card.classic .brand { color: #1f1b16; }
.quote-card.classic .brand .e { background: var(--qc-g1); color: #fff; }
.quote-card.bold {
  background: var(--ink);
  color: #fefaf2;
}
.quote-card.bold .q {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal;
}
.quote-card.bold .mark { color: #fefaf2; }
.quote-card.bold .by { color: var(--qc-g1); }
.quote-card.bold .by .dash { background: var(--qc-g1); }
.quote-card.bold .brand { color: #fefaf2; }
.quote-card.bold .brand .e { background: rgba(255, 255, 255, 0.85); color: #1f1b16; }
.quote-card.accent {
  background: linear-gradient(145deg, var(--qc-g1), var(--qc-g2));
  color: #fff;
}
.quote-card.accent .mark { color: #fff; }
.quote-card.accent .by { color: rgba(255, 255, 255, 0.85); }
.quote-card.accent .by .dash { background: rgba(255, 255, 255, 0.85); }
.quote-card.accent .brand { color: #fff; }
.quote-card.accent .brand .e { background: rgba(255, 255, 255, 0.85); color: var(--qc-g2); }

/* ===== Player: finish screen ===== */
.share-card {
  background: var(--ink);
  color: var(--bg-elev);
  border-radius: 22px;
  padding: 22px 22px 20px;
  position: relative;
  overflow: hidden;
}
.share-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 110% 0%, color-mix(in oklab, var(--primary) 80%, transparent), transparent 60%),
    radial-gradient(circle at -10% 110%, color-mix(in oklab, var(--accent) 60%, transparent), transparent 60%);
  pointer-events: none;
}
.share-card > * {
  position: relative;
}

/* htmx request indicators */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request .htmx-show-idle { display: none; }

/* ===== Player: active round ===== */
.round-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dk-quiz-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dk-round-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}
.round-media .round-frame {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-deep);
  position: relative;
}
.round-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(31, 27, 22, 0.18) 100%);
  pointer-events: none;
}
.round-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.round-side .q-eyebrow {
  font-size: 12px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.round-side .q-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0;
}
.round-stat {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
}
.round-stat .cell {
  flex: 1;
}
.round-stat .label {
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.round-stat .value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  margin-top: 2px;
  color: var(--primary);
}
.round-stat .cell:last-child .value {
  color: var(--ink);
}
.round-stat .value .unit {
  font-size: 14px;
  color: var(--ink-mute);
  font-weight: 700;
}
.round-stat .divider {
  width: 1px;
  align-self: stretch;
  background: var(--line);
}
.chip.solid {
  background: var(--ink);
  color: var(--bg-elev);
  border: 0;
}

/* ===== Player: desktop shell ===== */
.dk-app {
  flex: 1;
  display: grid;
  grid-template-columns: 248px 1fr;
  background: var(--bg);
}
.dk-sidebar {
  border-inline-end: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.dk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  text-decoration: none;
  color: var(--ink);
}
.dk-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--bg-elev);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  transform: rotate(-6deg);
  flex-shrink: 0;
}
.dk-brand .word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.dk-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dk-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}
.dk-nav-item:hover {
  background: color-mix(in oklab, var(--ink) 5%, transparent);
  color: var(--ink);
}
.dk-nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-deep);
}
.dk-nav-item svg {
  flex-shrink: 0;
}
.dk-next-card {
  margin-top: 18px;
  padding: 14px;
  background: var(--bg-deep);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 120ms ease;
}
.dk-next-card:hover {
  transform: translateY(-1px);
}
.dk-next-card .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 700;
}
.dk-next-card .name {
  font-weight: 700;
  font-size: 14px;
  margin-top: 4px;
}
.dk-next-card .closes {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary);
  margin-top: 4px;
  font-weight: 700;
}
.dk-side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dk-studio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg-elev);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.dk-signout {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  text-decoration: none;
}
.dk-signout:hover {
  color: var(--ink);
}
.dk-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dk-page {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 48px;
}
.dk-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}
.dk-page-head h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.03em;
  margin: 0;
}
.dk-sub {
  color: var(--ink-mute);
  font-size: 13px;
  margin-top: 6px;
}
.dk-section-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.dk-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-mute);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 16px;
  text-decoration: none;
}
.dk-back:hover {
  color: var(--ink);
}

/* dk home */
.dk-hero {
  display: flex;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  text-align: start;
  text-decoration: none;
  color: #fff;
  min-height: 280px;
  position: relative;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.dk-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -16px rgba(31, 27, 22, 0.35);
}
.dk-hero-emoji {
  position: absolute;
  right: -30px;
  bottom: -40px;
  font-size: 280px;
  opacity: 0.22;
  line-height: 1;
  pointer-events: none;
}
.dk-hero-body {
  padding: 40px;
  position: relative;
  z-index: 1;
}
.dk-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 44px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.dk-hero-meta {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  margin-top: 8px;
}
.dk-hero-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}
.dk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dk-grid.four {
  grid-template-columns: repeat(4, 1fr);
}
.dk-quiz-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.dk-quiz-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.dk-quiz-art {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  font-size: 64px;
  color: #fff;
}
.dk-quiz-meta {
  padding: 14px 16px;
}
.dk-quiz-meta .name {
  font-weight: 700;
  font-size: 15px;
}
.dk-quiz-meta .meta {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 3px;
}
.dk-quiz-meta .foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dk-quiz-meta .closes {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

/* dk detail */
.dk-detail {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: start;
}
.dk-detail-art {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 140px;
}
.dk-detail-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -0.03em;
  margin: 12px 0 0;
}
.dk-detail-desc {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.5;
}
.dk-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.dk-stat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.dk-stat .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 700;
}
.dk-stat .val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  margin-top: 6px;
}

/* dk profile */
.dk-profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0 8px;
}
.dk-profile-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.03em;
  margin: 0;
}

/* dk landing (logged out) */
.dk-landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1000px 500px at 100% -10%, color-mix(in oklab, var(--primary) 12%, transparent), transparent 60%),
    radial-gradient(800px 460px at -10% 110%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%),
    var(--bg);
}
.dk-landing-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
}
.dk-landing-hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 72px;
  align-items: center;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 56px 60px;
}
.dk-landing-pitch {
  min-width: 0;
}
.dk-tagline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 68px;
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin: 0;
}
.dk-values {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.dk-value {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px 9px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.dk-value-ic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.dk-ways-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin-top: 40px;
  margin-bottom: 14px;
}
.dk-media-trio {
  display: grid;
  grid-template-columns: repeat(2, 124px);
  gap: 20px;
}
.dk-mt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.dk-mt-art {
  width: 124px;
  height: 124px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 46px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 32px -16px rgba(31, 27, 22, 0.4);
}
.dk-mt-cap {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.dk-mt-fade {
  animation: dk-fade 3s ease-in-out infinite;
}
@keyframes dk-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}
.dk-mt-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
}
.dk-mt-grid span {
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.dk-landing-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.dk-landing-stats .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
}
.dk-landing-stats .lbl {
  font-size: 12px;
  color: var(--ink-mute);
}
.dk-landing-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 18px 40px -16px rgba(31, 27, 22, 0.25);
}
.dk-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.dk-card-sub {
  color: var(--ink-mute);
  font-size: 14px;
  margin-top: 6px;
  margin-bottom: 22px;
}
.dk-legal {
  text-align: center;
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 16px;
}

/* rail collapse: during a round, and the tablet icon rail */
@media (min-width: 769px) {
  .dk-app.rail {
    grid-template-columns: 88px 1fr;
  }
  .dk-app.rail .dk-brand .word,
  .dk-app.rail .dk-nav-item span,
  .dk-app.rail .dk-next-card,
  .dk-app.rail .dk-side-foot {
    display: none;
  }
  .dk-app.rail .dk-nav-item {
    justify-content: center;
    padding: 11px;
  }
}

@media (min-width: 769px) and (max-width: 980px) {
  .dk-app {
    grid-template-columns: 88px 1fr;
  }
  .dk-app .dk-brand .word,
  .dk-app .dk-nav-item span,
  .dk-app .dk-next-card,
  .dk-app .dk-side-foot {
    display: none;
  }
  .dk-app .dk-nav-item {
    justify-content: center;
    padding: 11px;
  }
}

@media (max-width: 980px) {
  .dk-page {
    padding: 28px 24px;
  }
  .dk-grid,
  .dk-grid.four {
    grid-template-columns: repeat(2, 1fr);
  }
  .dk-round-split,
  .dk-detail,
  .dk-stat-row {
    grid-template-columns: 1fr;
  }
  .dk-landing-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 20px 24px 48px;
  }
  .dk-media-trio {
    grid-template-columns: repeat(2, 1fr);
  }
  .dk-media-trio .dk-mt-art {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }
  .dk-tagline {
    font-size: 44px;
  }
}

/* mobile: off-canvas sidebar drawer */
.dk-mobile-bar {
  display: none;
}
.dk-burger {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-deep);
  color: var(--ink);
  border: 0;
  cursor: pointer;
}
.dk-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(31, 27, 22, 0.45);
  z-index: 39;
}
.dk-backdrop.show {
  display: block;
}

@media (max-width: 768px) {
  .dk-app,
  .dk-app.rail {
    grid-template-columns: 1fr;
  }
  .dk-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 268px;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 200ms ease;
  }
  .dk-sidebar.open {
    transform: none;
    box-shadow: 0 18px 40px -16px rgba(31, 27, 22, 0.35);
  }
  .dk-mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-elev);
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .dk-mobile-bar .word {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
  }
  .dk-mobile-bar .dk-logo {
    width: 28px;
    height: 28px;
    font-size: 15px;
    border-radius: 8px;
  }
}
@media (max-width: 560px) {
  .dk-grid,
  .dk-grid.four {
    grid-template-columns: 1fr;
  }
  .dk-hero-title {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dk-mt-fade {
    animation: none;
  }
  .dk-sidebar {
    transition: none;
  }
}