:root {
  --ink: #1a1208;
  --paper: #fff8e1;
  --maroon: #8b0000;
  --gold: #f5c542;
  --primary: #8b0000;
  --accent: #ff8c00;
  --muted: #6b5b4b;
  --radius: 1rem;
  --shadow: 0 14px 36px rgba(40, 10, 0, 0.14);
  --font: "Noto Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 14%, transparent), transparent 42%),
    var(--paper);
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--primary);
  margin: 0 0 0.35rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 28%, transparent);
}
.btn.ghost {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--primary);
  box-shadow: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.hub-header, .app-top, .admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(135deg, #8b0000, #4a0000);
  color: #ffe082;
  border-bottom: 1px solid rgba(245, 197, 66, 0.25);
}
.hub-header .eyebrow,
.app-top .eyebrow,
.admin-top .eyebrow { color: rgba(255, 224, 130, 0.78); }
.hub-header .muted,
.app-top .muted { color: rgba(255, 232, 180, 0.72); }
.hub-header h1, .app-top h1, .admin-top h1 { margin: 0; font-size: clamp(1.2rem, 4vw, 1.8rem); color: #fff; }
.hub-header .hub-subtitle {
  margin: 0.2rem 0 0;
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  font-weight: 700;
  color: rgba(255, 224, 130, 0.9);
}
.hub-grid {
  --hub-min: 220px;
  --hub-gap: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--hub-min), 1fr));
  gap: var(--hub-gap);
  padding: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}
.hub-density-comfortable .hub-grid { --hub-min: 260px; --hub-gap: 1.15rem; }
.hub-density-cozy .hub-grid { --hub-min: 220px; --hub-gap: 1rem; }
.hub-density-compact .hub-grid { --hub-min: 170px; --hub-gap: 0.75rem; }

.hub-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.hub-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--primary) 18%, transparent);
}
.hub-cover {
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  position: relative;
  display: grid;
  place-items: center;
}
.hub-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-cover-fallback {
  color: rgba(255, 255, 255, 0.92);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.hub-meta { padding: 0.95rem 1rem 1.25rem; }
.hub-meta h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: var(--primary);
}
.hub-meta p { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.92rem; }
.hub-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.pill {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.hub-open {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.hub-footer {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* List: icon left, content right */
.hub-layout-list .hub-grid {
  grid-template-columns: 1fr;
  max-width: 720px;
}
.hub-layout-list.hub-density-comfortable .hub-grid { max-width: 780px; }
.hub-layout-list.hub-density-compact .hub-grid { max-width: 640px; }
.hub-layout-list .hub-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
}
.hub-layout-list .hub-cover {
  width: 96px;
  min-height: 96px;
  aspect-ratio: 1;
  flex-shrink: 0;
}
.hub-layout-list.hub-density-comfortable .hub-cover { width: 112px; min-height: 112px; }
.hub-layout-list.hub-density-compact .hub-cover { width: 72px; min-height: 72px; }
.hub-layout-list .hub-meta {
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.hub-layout-list .hub-meta h2 {
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-layout-list .hub-meta p {
  margin: 0 0 0.45rem;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-layout-list .hub-card:hover { transform: translateY(-2px); }
.hub-layout-list .hub-cover-fallback { font-size: 1.45rem; }

/* Icons: launcher-style tiles */
.hub-layout-icons .hub-grid {
  --hub-min: 120px;
  max-width: 900px;
}
.hub-layout-icons.hub-density-comfortable .hub-grid { --hub-min: 140px; }
.hub-layout-icons.hub-density-cozy .hub-grid { --hub-min: 120px; }
.hub-layout-icons.hub-density-compact .hub-grid { --hub-min: 96px; }
.hub-layout-icons .hub-card {
  text-align: center;
}
.hub-layout-icons .hub-cover {
  aspect-ratio: 1;
}
.hub-layout-icons .hub-meta {
  padding: 0.55rem 0.45rem 0.85rem;
}
.hub-layout-icons .hub-meta h2 {
  font-size: 0.82rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.hub-layout-icons .hub-meta p,
.hub-layout-icons .hub-meta-row {
  display: none;
}
.hub-layout-icons .hub-card:hover { transform: translateY(-3px) scale(1.01); }
.hub-layout-icons .hub-cover-fallback { font-size: 1.6rem; }

@media (max-width: 520px) {
  .hub-density-comfortable .hub-grid { --hub-min: 100%; }
  .hub-layout-icons.hub-density-comfortable .hub-grid { --hub-min: 44%; }
  .hub-layout-icons.hub-density-cozy .hub-grid { --hub-min: 30%; }
  .hub-layout-icons.hub-density-compact .hub-grid { --hub-min: 22%; }
  .hub-layout-list .hub-cover { width: 72px; min-height: 72px; }
}

.app-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0 5.5rem;
}
.app-hero {
  padding: 1rem 1.15rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.app-hero h2 { margin: 0.2rem 0 0.5rem; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}
.stat {
  background: #fff7e8;
  border-radius: 0.8rem;
  padding: 0.7rem;
  text-align: center;
}
.stat strong { display: block; font-size: 1.25rem; color: var(--primary); }
.player-card, .text-card {
  margin: 1rem 1.15rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.player-card select, .admin-form input, .admin-form textarea, .admin-form select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid #e2d3bf;
  font: inherit;
  margin: 0.35rem 0 0.75rem;
}
.admin-form label {
  display: block;
  font-weight: 700;
  color: #5c4634;
  font-size: 0.9rem;
}
.admin-form .field-block {
  display: block;
  margin-bottom: 0.35rem;
}
.admin-form .field-label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
}
.admin-form .section-help {
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--accent, #ff8c00) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent, #ff8c00) 22%, #eadfce);
  color: #6b5b4a;
  font-size: 0.86rem;
  line-height: 1.45;
}
.field-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  outline: none;
}
.field-info-icon {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent, #ff8c00) 75%, #5c4634);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  cursor: help;
  box-shadow: 0 0 0 1px rgba(92, 70, 52, 0.12);
}
.field-info.is-active .field-info-icon,
.field-info.is-open .field-info-icon {
  background: var(--primary, #8b0000);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary, #8b0000) 25%, transparent);
}
/* Fixed tips escape accordion/card overflow clipping */
.field-info-tip {
  position: fixed;
  z-index: 10050;
  left: 0;
  top: 0;
  width: max-content;
  max-width: min(20rem, calc(100vw - 1.25rem));
  padding: 0.6rem 0.75rem;
  border-radius: 0.55rem;
  background: #2f241c;
  color: #fff8f0;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 12px 32px rgba(47, 36, 28, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
.field-info.is-active .field-info-tip,
.field-info.is-open .field-info-tip,
body > .field-info-tip.is-floating {
  opacity: 1;
  visibility: visible;
}
.field-info-tip::before {
  content: "";
  position: absolute;
  left: var(--arrow-left, 50%);
  bottom: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: #2f241c;
}
.field-info-tip.is-above::before {
  bottom: auto;
  top: 100%;
  border-bottom-color: transparent;
  border-top-color: #2f241c;
}
.field-info-tip code {
  display: inline;
  padding: 0.05rem 0.28rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.86em;
  color: #ffe7c2;
}
.field-info-tip strong {
  color: #fff;
  font-weight: 700;
}
.theme-label-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0.45rem;
}
.theme-label-row .theme-label {
  margin: 0;
}
.form-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 640px) {
  .form-inline-grid { grid-template-columns: 1fr; }
}

/* ---- Theme studio controls (app create/edit) ---- */
.theme-panel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.form-accordion-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 0.85rem;
}
.form-accordion-toolbar-actions {
  display: flex;
  gap: 0.4rem;
}
.form-acc-btn {
  padding: 0.35rem 0.7rem !important;
  font-size: 0.8rem !important;
  margin: 0 !important;
}
.form-accordions {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.form-accordion {
  border: 1px solid #eadfce;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #fffdf8, #faf4ea);
  overflow: hidden;
}
.form-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: #3d2f22;
}
.form-accordion-toggle:hover {
  background: rgba(255, 255, 255, 0.55);
}
.form-accordion-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}
.form-accordion-step {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary, #8b0000) 14%, #fff);
  color: var(--primary, #8b0000);
  font-size: 0.78rem;
  font-weight: 800;
}
.form-accordion-chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #7a6550;
  border-bottom: 2px solid #7a6550;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  flex: 0 0 auto;
}
.form-accordion.is-open > .form-accordion-toggle .form-accordion-chevron,
.track-editor-card.is-open > .track-editor-toggle .form-accordion-chevron {
  transform: rotate(225deg);
}
.form-accordion-body {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid #eadfce;
}
.form-accordion.is-open > .form-accordion-body {
  display: block;
  padding-top: 0.9rem;
}
.form-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.form-subpanel {
  margin: 0 0 1rem;
  padding: 0.85rem;
  border: 1px dashed #e0d0b8;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
}
.form-subpanel-title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.85rem;
}
.admin-actions--sticky {
  position: sticky;
  bottom: 0.5rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid #eadfce;
  border-radius: 0.9rem;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(60, 30, 0, 0.08);
}
.track-editor-toggle {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.track-editor-toggle-main {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}
.track-editor-body {
  display: none;
  padding: 0 0.95rem 0.95rem;
  border-top: 1px solid #eadfce;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.9), #fff);
}
.track-editor-card.is-open > .track-editor-body {
  display: block;
  padding-top: 0.85rem;
}
.track-editor-card {
  padding: 0;
  overflow: hidden;
}
.theme-panel-head h3 {
  margin: 0 0 0.25rem;
}
.theme-panel-head .hint {
  margin: 0 0 0.9rem;
  color: #6b5b4a;
  font-size: 0.88rem;
}
.theme-live-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.95rem;
  color: #fff8e7;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)),
    linear-gradient(160deg, color-mix(in srgb, var(--theme-primary, #8b0000) 88%, #000), #1a0505 75%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(40, 8, 0, 0.18);
  margin-bottom: 1rem;
  overflow: hidden;
  max-width: 100%;
}
.theme-live-art {
  position: relative;
  width: 64px;
  height: 64px;
  max-width: 64px;
  max-height: 64px;
  border-radius: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--theme-accent, #ff8c00), var(--theme-primary, #8b0000));
  box-shadow: 0 6px 14px rgba(0,0,0,0.28);
}
.theme-live-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.theme-live-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  opacity: 0.9;
}
.theme-live-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}
.theme-live-copy strong {
  font-size: 1.05rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-live-copy span {
  font-size: 0.82rem;
  color: rgba(255, 232, 180, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-live-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
  margin: 0.35rem 0 0.45rem;
}
.theme-live-bar span {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, var(--theme-accent, #ff8c00), #fff3c4);
}
.theme-live-play {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: default;
  pointer-events: none;
  background: linear-gradient(145deg, #fff3c4, var(--theme-accent, #ff8c00));
  color: #4a0000;
}
.theme-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a6550;
  font-weight: 700;
}
.theme-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
}
.theme-preset {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  width: 5.4rem;
  padding: 0.4rem 0.3rem;
  border-radius: 0.75rem;
  border: 1px solid #e5d6c2;
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.theme-preset:hover {
  border-color: #c9ae8d;
  transform: translateY(-1px);
}
.theme-preset.is-active {
  border-color: var(--primary, #8b0000);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary, #8b0000) 25%, transparent);
}
.theme-preset-swatch {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.16);
}
.theme-preset-name {
  font-size: 0.7rem;
  color: #4a3b2c;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}
.theme-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.theme-color-field label {
  display: block;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a3b2c;
}
.theme-color-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.35rem;
}
.theme-color-row input[type="color"] {
  width: 3rem;
  height: 2.6rem;
  padding: 0.2rem;
  margin: 0;
  border-radius: 0.65rem;
  cursor: pointer;
  background: #fff;
}
.theme-color-row input[type="text"] {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}
.cover-hint {
  margin: -0.15rem 0 0.55rem;
  color: #6b5b4a;
  font-size: 0.82rem;
}
.cover-hint code {
  font-size: 0.78rem;
  background: rgba(255,255,255,0.7);
  padding: 0.1rem 0.3rem;
  border-radius: 0.3rem;
}
.cover-upload-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a3b2c;
}
.admin-form .cover-upload-label input[type="file"] {
  margin: 0.35rem 0 0.35rem;
  padding: 0.45rem;
  background: #fff;
}
.cover-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  max-width: 100%;
  align-items: flex-start;
}
.cover-item {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  width: 3.25rem;
}
.cover-choice {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 3.25rem;
  border-radius: 0.65rem;
  border: 2px solid #e5d6c2;
  padding: 0;
  overflow: hidden;
  background: #f3ebe0;
  cursor: pointer;
  display: block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.cover-item .cover-choice {
  flex: none;
}
.cover-choice:hover {
  border-color: #c9ae8d;
  transform: translateY(-1px);
}
.cover-choice.is-active {
  border-color: var(--primary, #8b0000);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary, #8b0000) 25%, transparent);
}
.cover-choice img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}
.cover-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0;
  text-align: center;
}
.cover-none {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #7a6550;
}
.cover-delete-btn {
  border: 0;
  background: transparent;
  color: #8a4a3a;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.cover-delete-btn:hover { color: #c62828; }
.cover-delete-btn:disabled,
.cover-upload-label.is-busy input {
  opacity: 0.55;
  cursor: wait;
}
.cover-status-ok { color: #1b5e20 !important; }
.cover-status-err { color: #b71c1c !important; }
.cover-path-label {
  margin-bottom: 0;
}
.admin-form .cover-path-label input {
  margin-bottom: 0;
}

.track-prayer-langs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.5rem 0 0;
}
.track-editor-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.track-editor-card {
  position: relative;
  border: 1px solid #e4d6c2;
  border-radius: 1rem;
  padding: 0;
  background:
    linear-gradient(180deg, #fffefb 0%, #fffaf2 100%);
  box-shadow: 0 8px 22px rgba(70, 40, 10, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.track-editor-card:hover {
  border-color: #d7c3a5;
  box-shadow: 0 10px 26px rgba(70, 40, 10, 0.08);
}
.track-editor-card.is-marked-remove {
  border-color: #e5a39a;
  background: linear-gradient(180deg, #fff7f5, #ffefec);
  box-shadow: 0 8px 22px rgba(160, 40, 20, 0.08);
}
.track-editor-card.is-marked-remove .track-editor-name {
  text-decoration: line-through;
  opacity: 0.72;
}
.track-editor-chrome {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 3.4rem;
}
.track-editor-index {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7a4e2d;
  background: #f3e6d4;
  border: 1px solid #e4d2b8;
}
.track-editor-name {
  font-size: 0.95rem;
  color: #3f2a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(100%, 18rem);
}
.track-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.track-type-pill--audio {
  color: #1b5e20;
  background: #e8f5e9;
  border-color: #c8e6c9;
}
.track-type-pill--video {
  color: #0d47a1;
  background: #e3f2fd;
  border-color: #bbdefb;
}
.track-type-pill--youtube {
  color: #b71c1c;
  background: #ffebee;
  border-color: #ffcdd2;
}
.track-type-pill--image {
  color: #4a148c;
  background: #f3e5f5;
  border-color: #e1bee7;
}
.track-remove-corner {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0.55rem 0.7rem 0.55rem 0.35rem;
  cursor: pointer;
  user-select: none;
  border-left: 1px solid #eadfce;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,248,240,0.9));
}
.track-remove-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.track-remove-ui {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e7cfc4;
  background: #fff;
  color: #8a4a3a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.track-remove-mark {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 0.28rem;
  border: 1.5px solid #c47a68;
  background: #fff;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.track-remove-mark::after {
  content: "";
  width: 0.42rem;
  height: 0.28rem;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(-45deg) translate(0.05rem, -0.05rem);
}
.track-remove-input:focus-visible + .track-remove-ui {
  outline: 2px solid color-mix(in srgb, var(--primary, #8b0000) 45%, transparent);
  outline-offset: 2px;
}
.track-remove-input:checked + .track-remove-ui {
  color: #fff;
  border-color: #c62828;
  background: linear-gradient(180deg, #e53935, #c62828);
  box-shadow: 0 6px 14px rgba(198, 40, 40, 0.22);
}
.track-remove-input:checked + .track-remove-ui .track-remove-mark {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.18);
}
.track-remove-input:checked + .track-remove-ui .track-remove-mark::after {
  border-left-color: #fff;
  border-bottom-color: #fff;
}
.track-editor-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  justify-content: space-between;
}
.track-editor-title {
  flex: 1 1 14rem;
  margin: 0;
}
.track-editor-title input {
  margin-bottom: 0;
}
.track-editor-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.track-remove-check {
  display: none;
}
.admin-form .track-remove-check input {
  width: auto;
  margin: 0;
  padding: 0;
}
.track-editor-path {
  margin: 0.55rem 0 0.75rem;
  font-size: 0.8rem;
  color: #6b5b4a;
  word-break: break-all;
}

@media (max-width: 640px) {
  .theme-colors { grid-template-columns: 1fr; }
  .theme-live-preview { grid-template-columns: 56px minmax(0, 1fr); }
  .theme-live-art { width: 56px; height: 56px; max-width: 56px; max-height: 56px; }
  .cover-choice,
  .cover-item {
    width: 2.9rem;
  }
  .cover-choice {
    height: 2.9rem;
    flex-basis: 2.9rem;
  }
  .track-prayer-langs { grid-template-columns: 1fr; }
  .form-inline-grid { grid-template-columns: 1fr; }
  .track-editor-name { max-width: 9.5rem; }
  .track-remove-text { display: none; }
  .track-remove-corner { padding: 0.55rem 0.6rem; }
}
.player-controls {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}
.progress {
  height: 8px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.85rem 0;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}
.prayer-text {
  white-space: pre-wrap;
  line-height: 1.7;
  max-height: 48vh;
  overflow: auto;
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
}
.bottom-nav {
  position: fixed;
  left: 0.55rem;
  right: 0.55rem;
  bottom: calc(0.45rem + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid color-mix(in srgb, var(--primary) 12%, #eadfce);
  border-radius: 1.15rem;
  padding: 0.4rem 0.35rem;
  backdrop-filter: blur(14px);
  box-shadow:
    0 10px 28px rgba(40, 10, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  z-index: 20;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  min-width: 0;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.1;
  padding: 0.42rem 0.15rem 0.38rem;
  border-radius: 0.85rem;
  color: #6a5746;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.bottom-nav-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
}
.bottom-nav-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.bottom-nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bottom-nav-item:hover {
  background: color-mix(in srgb, var(--accent) 12%, #fff8ef);
  color: var(--primary);
}
.bottom-nav-item.active {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--accent) 22%, #fff),
    color-mix(in srgb, var(--primary) 10%, #fff8ef)
  );
  color: var(--primary);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}
.bottom-nav-item.nav-pray.active {
  background: linear-gradient(145deg, var(--accent), var(--primary));
  color: #fff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 28%, transparent);
}
.bottom-nav-item.nav-logout {
  color: #8a6f5c;
}
.bottom-nav-item.nav-logout:hover {
  color: #c62828;
  background: #ffebee;
}

@media (max-width: 720px) {
  .bottom-nav {
    left: 0.4rem;
    right: 0.4rem;
    bottom: calc(0.35rem + env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.28rem;
    padding: 0.45rem;
  }
  .bottom-nav-item {
    font-size: 0.72rem;
    padding: 0.5rem 0.2rem;
  }
  .bottom-nav-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.admin-wrap { max-width: 980px; margin: 0 auto; padding: 1.25rem; }
.admin-wrap--studio {
  max-width: none;
  width: min(100%, 1600px);
  padding-bottom: 2rem;
}
.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 1rem;
  align-items: start;
}
.studio-form-col,
.studio-preview-col { min-width: 0; }
.studio-preview-col {
  position: sticky;
  top: 0.75rem;
  align-self: start;
}
.studio-preview-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: calc(100dvh - 1.5rem);
}
.studio-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
}
.studio-device-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.studio-device-toggle button {
  border: 1px solid #e2d3bf;
  background: #fff;
  color: #5c4634;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.studio-device-toggle button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.studio-preview-meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.studio-frame-shell {
  flex: 1;
  min-height: 420px;
  overflow: auto;
  background:
    linear-gradient(45deg, #ece3d4 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(-45deg, #ece3d4 25%, transparent 25%) -8px 0 / 16px 16px,
    #f6f0e6;
  border: 1px solid #eadfce;
  border-radius: 0.9rem;
  padding: 0.85rem;
  display: grid;
  place-items: start center;
}
.studio-device-frame {
  width: 390px;
  max-width: 100%;
  height: min(760px, calc(100dvh - 11rem));
  background: #111;
  border-radius: 1.1rem;
  padding: 0.55rem;
  box-shadow: 0 18px 40px rgba(40, 10, 0, 0.18);
  transition: width 0.2s ease;
}
.studio-device-frame[data-device="tablet"] { width: 768px; }
.studio-device-frame[data-device="laptop"] { width: 1100px; }
.studio-device-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0.7rem;
  background: #fff8e1;
  display: block;
}
.studio-preview-empty {
  margin: auto;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  max-width: 22rem;
}
.studio-preview-empty strong { color: var(--ink); display: block; margin-bottom: 0.35rem; }

.admin-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table th, .table td {
  border-bottom: 1px solid #efe4d4;
  text-align: left;
  padding: 0.55rem 0.35rem;
  vertical-align: middle;
}

.app-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.app-status-pill.is-published {
  background: #e8f5e9;
  color: #1b5e20;
}
.app-status-pill.is-draft {
  background: #fff3e0;
  color: #e65100;
}
.app-visibility-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.app-visibility-form { margin: 0; display: inline; }
.app-visibility-btn {
  border: 1px solid #e2d3bf;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
}
.app-visibility-btn.is-publish {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-color: transparent;
  color: #fff;
}
.app-visibility-btn.is-unpublish {
  border-color: #ef9a9a;
  color: #c62828;
  background: #fff;
}
.app-visibility-btn:hover { filter: brightness(0.98); }

.app-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.app-delete-btn {
  border: 1px solid #ef9a9a;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: #c62828;
  background: #fff;
}
.app-delete-btn:hover {
  background: #ffebee;
}
.admin-actions .app-delete-btn {
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
}
.app-delete-modal h3 {
  margin: 0 0 0.4rem;
  color: #8b0000;
}
.app-delete-password-label {
  display: grid;
  gap: 0.35rem;
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #5c4634;
}
.app-delete-password-label input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.7rem;
  border: 1px solid #e2d3bf;
  font: inherit;
}
.app-delete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.app-delete-confirm-btn {
  background: linear-gradient(135deg, #e53935, #b71c1c) !important;
  border-color: transparent !important;
}

.flash {
  padding: 0.75rem 0.9rem;
  border-radius: 0.7rem;
  background: #e8f5e9;
  color: #1b5e20;
  margin-bottom: 1rem;
}
.flash.error { background: #ffebee; color: #b71c1c; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: none; place-items: center; padding: 1rem; z-index: 50;
}
.modal-backdrop.open { display: grid; }
.modal {
  background: #fff; border-radius: 1rem; padding: 1.2rem; max-width: 28rem; width: 100%;
}

@media (max-width: 1100px) {
  .studio-layout { grid-template-columns: 1fr; }
  .studio-preview-col { position: static; }
  .studio-preview-card { max-height: none; }
}

/* Auth (login / register) */
.auth-body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at top left, rgba(255, 140, 0, 0.16), transparent 42%),
    linear-gradient(160deg, #fff8e1, #ffe0b2 55%, #ffcc80);
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.auth-shell--wide { grid-template-columns: 1fr; place-items: center; padding: 1.25rem; }
.auth-card {
  margin: auto;
  width: min(100%, 28rem);
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.35rem 1.35rem;
}
.auth-shell--wide .auth-card { width: min(100%, 34rem); }
.auth-logo {
  width: clamp(88px, 18vw, 140px);
  height: auto;
  display: block;
  margin: 0 auto 0.85rem;
  border-radius: 1rem;
}
.auth-card h1 { margin: 0.15rem 0 0.35rem; font-size: clamp(1.4rem, 4vw, 1.85rem); }
.auth-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #5c4634;
  margin-bottom: 0.75rem;
}
.auth-form input:not([type="hidden"]) {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid #e2d3bf;
  font: inherit;
  background: #fff;
}
.auth-password-help {
  margin: -0.25rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.7rem;
  background: #fff8e8;
  color: #6d5846;
  font-size: 0.8rem;
  line-height: 1.45;
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.auth-form .btn { width: 100%; margin-top: 0.35rem; }
.auth-links { margin: 1rem 0 0; font-size: 0.92rem; }
.auth-links a { color: var(--primary); font-weight: 600; }
.auth-aside {
  background-size: cover;
  background-position: center;
  min-height: 100dvh;
}

/* —— Admin reports —— */
.admin-wrap--reports {
  max-width: 1180px;
}
.report-filter-card h2,
.report-chart-card h2,
.report-table-grid h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink, #2a1a12);
}
.report-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.report-filter-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.report-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto auto minmax(0, 1.5fr);
  gap: 0.85rem;
  align-items: end;
}
.report-filters label {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #5c4634;
}
.report-quick-range {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #efe4d4;
}
.report-chip {
  border: 1px solid #e2d3bf;
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.report-chip:hover {
  background: #fff7e8;
  border-color: color-mix(in srgb, var(--accent) 45%, #e2d3bf);
}
.report-chip.is-active {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-color: transparent;
  color: #fff;
}
.report-scope-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 6%, #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--muted);
  font-size: 0.9rem;
}
.report-scope-bar strong {
  color: var(--primary);
  margin-right: 0.55rem;
}
.report-scope-bar span + span::before {
  content: "·";
  margin: 0 0.45rem;
  opacity: 0.55;
}
.report-scope-user {
  font-weight: 600;
  color: #5c4634;
}
.report-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.report-metric {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem;
  border: 1px solid color-mix(in srgb, var(--primary) 8%, transparent);
}
.report-metric-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 700;
}
.report-metric strong {
  display: block;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  color: var(--primary);
  line-height: 1.15;
}
.report-chart-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.report-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.report-card-note {
  margin: 0;
  font-size: 0.8rem;
  text-align: right;
}
.report-chart-frame {
  position: relative;
  height: 280px;
}
.report-chart-frame--bar {
  height: 300px;
}
.report-chart-empty {
  margin: 2.5rem auto;
  text-align: center;
}
.report-table-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 1rem;
}
.report-table-scroll {
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
}
.report-table-note {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
}
.report-user-link {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.report-user-link:hover {
  text-decoration: underline;
}
.table tr.is-selected-row td {
  background: color-mix(in srgb, var(--accent) 14%, #fff);
}
.report-empty {
  text-align: center;
  padding: 2rem 1.25rem;
}
.report-empty strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

@media (max-width: 980px) {
  .report-filters { grid-template-columns: 1fr 1fr; }
  .report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-chart-grid,
  .report-table-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .hub-header, .app-top, .admin-top { flex-direction: column; align-items: flex-start; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card { margin: 1.25rem; width: auto; }
  .auth-row { grid-template-columns: 1fr; }
  .report-filters { grid-template-columns: 1fr; }
  .report-filter-head { flex-direction: column; }
  .report-metrics { grid-template-columns: 1fr 1fr; }
  .report-chart-frame,
  .report-chart-frame--bar { height: 240px; }
}
