:root {
  --bg: #f5efe3;
  --panel: rgba(255, 252, 246, 0.92);
  --panel-strong: #fffaf1;
  --text: #14213d;
  --muted: #5b6470;
  --accent: #0f4c5c;
  --accent-2: #d97706;
  --accent-soft: rgba(15, 76, 92, 0.1);
  --danger: #b42318;
  --border: rgba(20, 33, 61, 0.12);
  --shadow: 0 24px 80px rgba(20, 33, 61, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.16), transparent 28%),
    linear-gradient(180deg, #d8eef2 0%, var(--bg) 38%, #f7f1e8 100%);
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(960px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero {
  padding: 28px;
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(135deg, rgba(15, 76, 92, 0.98), rgba(20, 33, 61, 0.95)),
    #0f4c5c;
  color: #fffaf1;
  box-shadow: var(--shadow);
}

.eyebrow,
.label,
.microcopy {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: rgba(255, 250, 241, 0.76);
}

.hero h1,
.hero h2,
.panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  line-height: 0.95;
  max-width: 9ch;
}

.subtitle,
.detail {
  margin: 10px 0 0;
  color: rgba(255, 250, 241, 0.84);
}

.assistant-summary {
  margin: 16px 0 0;
  max-width: 50rem;
  color: rgba(255, 250, 241, 0.92);
  font-size: 1.02rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.hero-card,
.panel,
.timeline-card {
  border-radius: var(--radius);
}

.hero-card {
  padding: 20px;
  background: rgba(255, 250, 241, 0.09);
  border: 1px solid rgba(255, 250, 241, 0.1);
}

.hero-card h2 {
  font-size: 1.5rem;
}

.countdown {
  margin-top: 16px;
  font-size: 1.15rem;
  font-weight: 700;
}

.panel {
  margin-top: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(20, 33, 61, 0.08);
  backdrop-filter: blur(8px);
}

.panel-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.assistant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.assistant-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 76, 92, 0.06), rgba(255, 255, 255, 0.72));
  border: 1px solid var(--border);
}

.assistant-card h3 {
  margin: 0;
  font-size: 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
}

.assistant-copy,
.handoff-copy {
  margin: 10px 0 0;
  color: var(--muted);
}

.prompt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.prompt-chip {
  padding: 10px 14px;
  border: 1px solid rgba(15, 76, 92, 0.14);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
}

.ask-panel {
  margin-top: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

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

.primary {
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: var(--accent-soft);
  color: var(--accent);
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.danger {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

textarea,
input {
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
}

.timeline {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.timeline-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 239, 227, 0.8));
  border: 1px solid var(--border);
}

.timeline-card.active {
  border-color: rgba(217, 119, 6, 0.4);
  box-shadow: 0 12px 34px rgba(217, 119, 6, 0.12);
}

.timeline-card.done {
  opacity: 0.7;
}

.timeline-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.timeline-time {
  text-align: right;
  color: var(--muted);
  white-space: nowrap;
}

.timeline-location,
.timeline-details {
  color: var(--muted);
}

.trip-form,
.event-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

dialog {
  width: min(560px, calc(100vw - 24px));
  border: none;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(20, 33, 61, 0.38);
}

.event-form {
  padding: 24px;
  background: var(--panel-strong);
}

.dialog-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.close-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  color: var(--text);
  font-size: 1.6rem;
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100vw - 16px, 960px);
    padding-top: 12px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .assistant-grid {
    grid-template-columns: 1fr;
  }

  .timeline-row {
    flex-direction: column;
  }

  .timeline-time {
    text-align: left;
    white-space: normal;
  }
}
