:root {
  --bg: #f6efe4;
  --paper: rgba(255, 250, 244, 0.88);
  --ink: #192231;
  --muted: #5b6674;
  --line: rgba(25, 34, 49, 0.12);
  --accent: #d26c3d;
  --accent-2: #197278;
  --good: #2a9d8f;
  --warn: #e76f51;
  --shadow: 0 18px 50px rgba(37, 42, 52, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(244, 184, 96, 0.24), transparent 28%),
    radial-gradient(circle at right 20%, rgba(25, 114, 120, 0.16), transparent 24%),
    linear-gradient(160deg, #fcf8f2 0%, #f5ecde 100%);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
}

.ambient-a {
  top: 10%;
  left: -120px;
  width: 260px;
  height: 260px;
  background: rgba(210, 108, 61, 0.18);
}

.ambient-b {
  right: -100px;
  bottom: 10%;
  width: 240px;
  height: 240px;
  background: rgba(25, 114, 120, 0.16);
}

.app-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

.hero {
  margin-bottom: 18px;
}

.hero-kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.95;
}

.hero p {
  max-width: 560px;
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 1.02rem;
}

.panel,
.screen {
  background: var(--paper);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.screen {
  padding: 20px;
  animation: rise 280ms ease;
}

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

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack {
  display: grid;
  gap: 12px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.title-row h2,
.title-row h3 {
  margin: 0;
  font-family: Georgia, serif;
}

.subtle {
  color: var(--muted);
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(25, 114, 120, 0.1);
  color: var(--accent-2);
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
}

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

.label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

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

.button,
.ghost-button {
  appearance: none;
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition: transform 120ms ease, opacity 120ms ease;
}

.button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.button {
  background: linear-gradient(135deg, var(--accent) 0%, #de8d52 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(210, 108, 61, 0.24);
}

.ghost-button {
  background: rgba(25, 114, 120, 0.1);
  color: var(--accent-2);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.card-grid {
  display: grid;
  gap: 12px;
}

.option-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.06);
}

.option-card.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(210, 108, 61, 0.28);
}

.option-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.option-card small {
  color: var(--muted);
}

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

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.status-pill {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(25, 114, 120, 0.1);
  color: var(--accent-2);
}

.status-pill.completed {
  background: rgba(42, 157, 143, 0.14);
  color: var(--good);
}

.status-pill.in_progress {
  background: rgba(244, 184, 96, 0.18);
  color: #9d6b10;
}

.status-pill.joined {
  background: rgba(91, 102, 116, 0.12);
  color: var(--muted);
}

.invites {
  display: grid;
  gap: 12px;
}

.invite-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(25, 34, 49, 0.18);
  background: rgba(255, 255, 255, 0.66);
}

.invite-card code {
  display: block;
  margin: 8px 0 12px;
  word-break: break-all;
  color: var(--accent-2);
}

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(25, 34, 49, 0.09);
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2) 0%, var(--accent) 100%);
}

.ranked-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ranked-pick {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(210, 108, 61, 0.12);
  color: var(--accent);
  font-size: 13px;
}

.range-wrap {
  display: grid;
  gap: 8px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

input[type="range"] {
  width: 100%;
}

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

.metric-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.metric-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.metric-card strong {
  font-size: 2rem;
  font-family: Georgia, serif;
}

.radar {
  width: 100%;
  min-height: 320px;
  background: rgba(255, 255, 255, 0.66);
  border-radius: 20px;
  padding: 10px;
  border: 1px solid var(--line);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.gap-list,
.note-list {
  display: grid;
  gap: 12px;
}

.gap-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.gap-card strong {
  display: block;
  margin-bottom: 8px;
}

.toast {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(25, 114, 120, 0.12);
  color: var(--accent-2);
}

.error {
  background: rgba(231, 111, 81, 0.14);
  color: var(--warn);
}

@media (max-width: 720px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

  .screen {
    padding: 16px;
  }

  .hero h1 {
    line-height: 1;
  }
}
