:root {
  color-scheme: light;
  --bg: #fff6e9;
  --card: rgba(255, 255, 255, 0.92);
  --text: #28231f;
  --muted: #71675f;
  --accent: #ff5a12;
  --accent-2: #ff7a1a;
  --accent-dark: #c83a09;
  --line: rgba(255, 122, 26, 0.18);
  --soft: #fff0e4;
  --shadow: 0 22px 60px rgba(155, 79, 22, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% 16%, rgba(255, 90, 18, 0.16), transparent 26%),
    radial-gradient(circle at 58% 12%, rgba(134, 71, 255, 0.18), transparent 18%),
    radial-gradient(circle at 16% 88%, rgba(255, 184, 77, 0.2), transparent 26%),
    linear-gradient(180deg, #fff9f1 0%, #ffedda 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(circle, #31c7c9 0 4px, transparent 5px),
    radial-gradient(circle, #ff5a99 0 4px, transparent 5px),
    radial-gradient(circle, #ffba2f 0 4px, transparent 5px);
  background-position: 20px 120px, 92% 220px, 82% 650px;
  background-size: 260px 260px, 310px 310px, 240px 240px;
}

h1, h2, h3, p {
  margin-top: 0;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 5;
  width: min(1180px, calc(100% - 28px));
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  cursor: pointer;
}

.brand-wordmark {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-wordmark strong {
  color: #201812;
  font-size: 28px;
  font-weight: 950;
  line-height: 0.95;
  text-transform: uppercase;
}

.brand-wordmark span {
  color: var(--accent);
}

.brand-wordmark small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

h1 {
  margin: 0;
  line-height: 0.9;
  text-transform: uppercase;
  font-size: 23px;
  letter-spacing: -0.02em;
}

h1 span {
  color: var(--accent);
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.top-link {
  width: auto;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  border: 0;
  font-weight: 800;
}

.top-link.soft {
  background: var(--soft);
  border: 1px solid var(--line);
}

.top-link.accent {
  min-width: 150px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 30px 18px 52px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 26px;
  align-items: center;
  min-height: 310px;
  padding: 40px 22px 22px;
}

.hero h2 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 70px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero h2 span {
  color: var(--accent);
}

.hero p {
  max-width: 560px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.45;
}

.mascot {
  position: relative;
  min-height: 260px;
}

.logo-art img {
  display: block;
  width: 100%;
  max-width: 390px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(255, 90, 18, 0.16);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  padding: 20px;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.role-card {
  min-height: 230px;
  text-align: center;
}

.role-card h3 {
  margin: 12px 0 10px;
  font-size: 24px;
}

.role-card p {
  color: var(--muted);
  line-height: 1.45;
}

.wide-card {
  grid-column: 1 / -1;
  min-height: auto;
  text-align: left;
}

.wide-card h3 {
  font-size: 30px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: linear-gradient(145deg, #fff0e5, #fff8ed);
  font-size: 50px;
}

button, input, select, textarea {
  width: 100%;
  font: inherit;
  border-radius: 16px;
}

button {
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(255, 90, 18, 0.2);
}

button.secondary {
  background: var(--soft);
  color: var(--accent-dark);
  box-shadow: none;
}

button.danger {
  background: #ef4444;
}

button.ghost {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

label {
  display: block;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

input, select, textarea {
  display: block;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: #fffdfb;
  color: var(--text);
}

input[type="file"] {
  padding: 11px;
  background: #fffdfb;
}

.file-preview {
  display: none;
  gap: 12px;
  align-items: center;
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px dashed rgba(255, 90, 18, 0.34);
  border-radius: 18px;
  background: rgba(255, 240, 228, 0.56);
}

.file-preview.active {
  display: flex;
}

.file-preview img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 16px;
}

.file-preview span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

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

.list {
  display: grid;
  gap: 10px;
}

.pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  margin: 0 6px 6px 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.9);
}

.choice input {
  width: auto;
}

.choice button {
  min-width: 140px;
}

.performer-photo {
  display: block;
  width: 160px;
  max-width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
}

.performer-card,
.quest-admin-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.94);
}

.performer-card-body {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

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

.performer-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

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

.performer-head b {
  font-size: 20px;
}

.performer-main p {
  margin: 8px 0;
}

.performer-meta,
.owner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stars {
  color: #ffb000;
  font-size: 22px;
  letter-spacing: 0;
  white-space: nowrap;
}

.owner-performer details,
.quest-admin-card details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.owner-performer summary,
.quest-admin-card summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--accent-dark);
}

.quest-card {
  display: grid;
  gap: 10px;
}

.quest-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.quest-slots {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.slot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.slot-button {
  width: auto;
  min-height: 42px;
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--accent-dark);
  box-shadow: none;
}

.slot-button small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.status {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 800;
}

.error {
  background: #fef2f2;
  color: #991b1b;
}

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

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr;
    top: 8px;
    gap: 10px;
  }

  .brand-wordmark strong {
    font-size: 30px;
  }

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

  .top-link.accent {
    grid-column: 1 / -1;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 22px;
  }

  .mascot {
    display: none;
  }

  .two,
  .choice {
    grid-template-columns: 1fr;
  }

  .performer-card-body {
    grid-template-columns: 1fr;
  }

  .wide-card h3 {
    font-size: 24px;
  }
}
