:root {
  color-scheme: light;
  --bg: #f3efe6;
  --panel: rgba(255, 250, 240, 0.76);
  --panel-border: rgba(39, 24, 8, 0.14);
  --text: #1f1812;
  --muted: #685d52;
  --healthy: #0f766e;
  --warning: #c77d16;
  --danger: #c2410c;
  --shadow: 0 24px 80px rgba(64, 43, 16, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(242, 180, 117, 0.4), transparent 24%),
    radial-gradient(circle at bottom right, rgba(21, 128, 119, 0.22), transparent 20%),
    linear-gradient(135deg, #efe3d0 0%, #f7f3eb 42%, #dfebe7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(31, 24, 18, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 24, 18, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1.3fr;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-panel,
.card {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 32px;
  align-self: start;
}

.control-panel {
  display: grid;
  gap: 24px;
}

.eyebrow,
.meta-label,
label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.96;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 400;
}

h2 {
  font-size: 1.8rem;
}

.hero-copy {
  max-width: 34rem;
  line-height: 1.6;
  font-size: 1.05rem;
}

.hero-meta,
.timing-grid,
.progress-row,
.action-row,
.participant-form,
.participant-item,
.session-header,
.card-header {
  display: flex;
  gap: 12px;
}

.hero-meta,
.timing-grid {
  margin-top: 28px;
}

.hero-meta > div,
.metric {
  flex: 1;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
}

.card {
  padding: 24px;
}

.card-header,
.session-header {
  justify-content: space-between;
  align-items: start;
}

.slot-badge,
.alert-pill {
  align-self: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.65);
}

.participant-form {
  margin-top: 20px;
}

.roster-hint {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid rgba(31, 24, 18, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 14px 16px;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  background: #1f1812;
  color: #fff8ef;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ghost-button {
  background: rgba(31, 24, 18, 0.1);
  color: var(--text);
}

.primary-action {
  min-width: 120px;
}

.participant-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.participant-item {
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
}

.participant-item[data-active="true"] {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  transform: translateX(4px);
}

.participant-name,
.dial-time {
  display: block;
  font-size: 1.2rem;
}

.participant-time,
.dial-label {
  color: var(--muted);
}

.timing-grid {
  align-items: center;
}

.dial-frame {
  flex: 0 0 280px;
  display: grid;
  place-items: center;
}

.dial-ring {
  width: 280px;
  height: 280px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 250, 240, 0.96) 0 42%, transparent 43%),
    conic-gradient(from 220deg, rgba(15, 118, 110, 0.3), rgba(194, 65, 12, 0.42), rgba(15, 118, 110, 0.3));
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.55);
}

.dial-center {
  display: grid;
  place-items: center;
  width: 175px;
  height: 175px;
  border-radius: 50%;
  background: rgba(255, 249, 240, 0.96);
  text-align: center;
}

.dial-time {
  font-size: 3rem;
  font-weight: 700;
}

.timing-meta {
  flex: 1;
  display: grid;
  gap: 14px;
}

.progress-stack {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.progress-row {
  align-items: center;
}

progress {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: rgba(31, 24, 18, 0.08);
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, #0f766e 0%, #d97706 70%, #c2410c 100%);
  border-radius: 999px;
}

.action-row {
  margin-top: 24px;
}

.state-healthy .alert-pill,
.state-idle .alert-pill {
  background: rgba(15, 118, 110, 0.14);
  color: var(--healthy);
}

.state-warning .alert-pill {
  background: rgba(199, 125, 22, 0.15);
  color: var(--warning);
}

.state-danger .alert-pill {
  background: rgba(194, 65, 12, 0.15);
  color: var(--danger);
}

.state-warning {
  box-shadow: 0 24px 90px rgba(199, 125, 22, 0.16);
}

.state-danger {
  box-shadow: 0 24px 90px rgba(194, 65, 12, 0.18);
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .timing-grid {
    flex-direction: column;
  }

  .dial-frame,
  .dial-ring {
    width: 220px;
    height: 220px;
  }

  .dial-center {
    width: 144px;
    height: 144px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 20px 14px 32px;
  }

  .hero-panel,
  .card {
    border-radius: 24px;
  }

  .action-row,
  .participant-form,
  .hero-meta {
    flex-direction: column;
  }
}
