:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(15, 19, 27, 0.86);
  --panel-strong: #10151f;
  --line: rgba(255, 255, 255, 0.10);
  --muted: #9aa4b2;
  --text: #f5f7fb;
  --accent: #ff4f6d;
  --accent-soft: rgba(255, 79, 109, 0.14);
  --cyan: #6ed7ef;
  --green: #76d9a3;
  --amber: #f5c66d;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 5%, rgba(255, 79, 109, 0.10), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(110, 215, 239, 0.08), transparent 30%),
    linear-gradient(180deg, #080a0f 0%, #06070a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.ambient { position: fixed; pointer-events: none; filter: blur(80px); opacity: .22; border-radius: 999px; }
.ambient-one { width: 300px; height: 300px; background: var(--accent); top: 12%; left: -180px; }
.ambient-two { width: 260px; height: 260px; background: var(--cyan); bottom: 8%; right: -170px; }

.app-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 56px; position: relative; z-index: 1; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.25rem; font-weight: 750; letter-spacing: -.03em; }
.brand-mark { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 22px rgba(255, 79, 109, .65); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.participant-badge, .icon-button { border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--muted); }
.participant-badge { border-radius: 999px; padding: 8px 12px; font-size: .78rem; }
.icon-button { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: center; padding: 48px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(135deg, rgba(18, 23, 33, .94), rgba(9, 12, 18, .90)); box-shadow: var(--shadow); overflow: hidden; }
.eyebrow { margin: 0 0 10px; font-size: .72rem; letter-spacing: .19em; font-weight: 800; color: var(--accent); }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(2.15rem, 4.4vw, 3.8rem); line-height: 1.01; letter-spacing: -.055em; }
.hero-copy { max-width: 660px; margin: 20px 0 0; color: var(--muted); font-size: 1.03rem; line-height: 1.65; }
.hero-orbit { width: 210px; height: 210px; position: relative; justify-self: end; }
.orbit-ring, .orbit-core { position: absolute; border-radius: 50%; inset: 50%; transform: translate(-50%, -50%); }
.orbit-ring { border: 1px solid rgba(255,255,255,.14); }
.ring-one { width: 190px; height: 190px; }
.ring-two { width: 124px; height: 124px; border-color: rgba(110,215,239,.32); }
.orbit-core { width: 42px; height: 42px; background: var(--accent); box-shadow: 0 0 46px rgba(255,79,109,.72); }

.status-strip { margin-top: 18px; display: grid; grid-template-columns: 180px 1fr auto; align-items: center; gap: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(11,14,20,.74); }
.status-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.progress-wrap { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 12px; align-items: center; color: var(--muted); font-size: .78rem; }
.progress-track { height: 7px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff8298); transition: width .3s ease; }

.button { border: 0; border-radius: 12px; min-height: 42px; padding: 0 16px; cursor: pointer; font-weight: 760; transition: transform .16s ease, opacity .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--accent); color: white; box-shadow: 0 10px 24px rgba(255,79,109,.20); }
.button-secondary { background: rgba(255,255,255,.07); color: var(--text); border: 1px solid var(--line); }
.button-quiet { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.button[disabled] { cursor: default; opacity: .4; transform: none; }

.phase-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 14px; }
.phase-tab { display: flex; align-items: center; gap: 10px; justify-content: center; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; font-weight: 720; }
.phase-tab span { font-size: .68rem; color: rgba(255,255,255,.42); }
.phase-tab.active { color: var(--text); border-color: rgba(255,79,109,.40); background: var(--accent-soft); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .72fr); gap: 16px; }
.task-panel, .summary-panel { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
.task-panel { padding: 26px; }
.summary-panel { padding: 26px; position: sticky; top: 16px; align-self: start; }
.section-heading, .summary-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.section-heading h2, .summary-panel h2 { margin: 0; letter-spacing: -.035em; }
.phase-summary { color: var(--muted); font-size: .78rem; }
.task-list { display: grid; gap: 12px; margin-top: 22px; }
.task-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 15px; align-items: center; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.025); }
.task-card.empty-state { display: block; padding: 22px; }
.task-card.empty-state .task-copy { width: 100%; max-width: none; }
.task-card.empty-state .task-copy strong { font-size: 1.08rem; }
.task-card.empty-state .task-copy p { max-width: 38rem; margin-top: 7px; }
.task-card.required { border-color: rgba(255,255,255,.15); }
.task-card.complete { background: rgba(118,217,163,.06); border-color: rgba(118,217,163,.25); }
.task-card.in_progress { background: rgba(110,215,239,.06); border-color: rgba(110,215,239,.25); }
.task-state { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); font-size: 1rem; }
.task-card.complete .task-state { color: var(--green); border-color: rgba(118,217,163,.4); }
.task-card.in_progress .task-state { color: var(--cyan); border-color: rgba(110,215,239,.4); }
.task-copy strong { display: block; margin-bottom: 5px; }
.task-copy p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.task-meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .69rem; color: rgba(255,255,255,.46); text-transform: uppercase; letter-spacing: .08em; }
.task-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.task-actions .button { min-height: 36px; padding: 0 12px; font-size: .76rem; }

.live-dot { color: var(--green); font-size: .68rem; letter-spacing: .12em; }
.summary-panel > p { color: var(--muted); line-height: 1.55; font-size: .9rem; }
.signal-stack { display: grid; gap: 10px; margin: 22px 0; }
.signal-row { display: grid; grid-template-columns: 36px 1fr; gap: 11px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.signal-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.045); color: var(--accent); }
.signal-row strong, .signal-row small { display: block; }
.signal-row small { margin-top: 3px; color: var(--muted); }
.timeline-preview { height: 92px; position: relative; margin: 24px 0 18px; }
.timeline-line { position: absolute; left: 6%; right: 6%; top: 43px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--cyan), var(--amber)); }
.timeline-point { position: absolute; top: 27px; transform: translateX(-50%); font-size: .66rem; color: var(--muted); padding-top: 28px; }
.timeline-point::before { content: ""; position: absolute; top: 12px; left: 50%; width: 10px; height: 10px; transform: translateX(-50%); border-radius: 50%; background: var(--panel-strong); border: 2px solid var(--accent); }
.point-evening { left: 7%; transform: translateX(0); }
.point-night { left: 36%; }
.point-wake { left: 67%; }
.point-morning { left: 94%; transform: translateX(-100%); }
.summary-note { display: grid; gap: 5px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.035); }
.summary-note span { color: var(--muted); font-size: .8rem; line-height: 1.45; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 11px 15px; border: 1px solid var(--line); border-radius: 12px; background: #141923; color: var(--text); box-shadow: var(--shadow); transition: .2s ease; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 34px; }
  .hero-orbit { display: none; }
  .content-grid { grid-template-columns: 1fr; }
  .summary-panel { position: static; }
}

@media (max-width: 660px) {
  .app-shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .topbar { padding-bottom: 15px; }
  .hero { padding: 24px 20px; border-radius: 22px; }
  .hero h1 { font-size: clamp(2.05rem, 10vw, 2.75rem); line-height: 1.02; letter-spacing: -.05em; }
  .hero-copy { margin-top: 16px; font-size: .96rem; line-height: 1.55; }
  .status-strip { grid-template-columns: 1fr; gap: 13px; }
  .progress-wrap { grid-template-columns: 1fr auto; }
  .phase-tabs { gap: 6px; }
  .phase-tab { font-size: .78rem; }
  .task-panel, .summary-panel { padding: 18px; border-radius: 18px; }
  .section-heading { display: block; }
  .phase-summary { display: block; margin-top: 6px; }
  .task-card { grid-template-columns: 42px 1fr; }
  .task-actions { grid-column: 1 / -1; justify-content: stretch; }
  .task-actions .button { flex: 1; }
  .participant-badge { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
