:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #66736f;
  --paper: #fbfbf8;
  --surface: #ffffff;
  --line: #dde4df;
  --green: #123b33;
  --green-2: #1f6b57;
  --rust: #ba5a31;
  --gold: #d8a742;
  --blue: #386b8d;
  --rose: #8f4d5c;
  --shadow: 0 18px 50px rgba(12, 24, 20, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 0;
}

.hero {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  color: #fff;
  background: var(--green);
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 24, 20, 0.74), rgba(10, 24, 20, 0.22) 45%, rgba(10, 24, 20, 0.78)),
    linear-gradient(90deg, rgba(10, 24, 20, 0.72), rgba(10, 24, 20, 0.08) 72%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 750;
}

.brand__mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  font-size: 0.78rem;
}

.topbar__actions,
.mobile-view-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pwa-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 158px;
}

.app-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  padding: 0 11px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.app-status::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.app-status.is-ready::before {
  background: #7bd88f;
}

.app-status.is-offline::before {
  background: var(--rust);
}

.install-button {
  min-height: 34px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  padding: 0 13px;
  font-weight: 800;
  white-space: nowrap;
}

.install-button[hidden] {
  display: none;
}

.view-tab,
.bottom-nav__item {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.topbar .view-tab {
  color: rgba(255, 255, 255, 0.82);
}

.view-tab:hover,
.bottom-nav__item:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.view-tab.is-active {
  background: #fff;
  color: var(--green);
  border-color: #fff;
}

.hero__content {
  width: min(720px, 100%);
  padding-top: 62px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd98b;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.03;
  letter-spacing: 0;
}

.hero__dates {
  margin: 12px 0 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.06rem;
}

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

.metric {
  min-width: 112px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(7px);
}

.metric strong {
  display: block;
  font-size: 1.05rem;
}

.metric span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
}

.workspace {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 44px;
}

.day-rail {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(20, 32, 28, 0.07);
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.day-list {
  display: grid;
  gap: 8px;
}

.day-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.day-button:hover {
  border-color: rgba(31, 107, 87, 0.42);
}

.day-button.is-active {
  border-color: var(--green-2);
  background: #edf6f2;
}

.day-button__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.day-number {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.day-date {
  color: var(--muted);
  font-size: 0.78rem;
}

.day-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
}

.progress-bar {
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe4df;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-2), var(--gold));
}

.content-area {
  min-width: 0;
}

.mobile-view-tabs {
  display: none;
  margin-bottom: 12px;
  overflow-x: auto;
  color: var(--green);
}

.mobile-view-tabs .view-tab {
  border-color: var(--line);
  background: #fff;
}

.mobile-view-tabs .view-tab.is-active {
  background: var(--green);
  color: #fff;
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 14px;
}

.tool-row__actions {
  display: flex;
  gap: 8px;
}

.search-box {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-box input,
.filter-select,
.note-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.search-box input:focus,
.filter-select:focus,
.note-input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(31, 107, 87, 0.16);
}

.icon-button,
.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green);
  font-weight: 750;
  text-decoration: none;
}

.icon-button {
  width: 44px;
  font-size: 1.4rem;
}

.ghost-button,
.small-button {
  padding: 0 12px;
  font-size: 0.86rem;
}

.small-button.is-active,
.ghost-button.is-active {
  border-color: var(--green-2);
  background: var(--green);
  color: #fff;
}

.status-banner {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-left: 4px solid var(--rust);
  border-radius: var(--radius);
  background: #fff7ef;
  color: #633820;
}

.status-banner.is-visible {
  display: block;
}

.section-stack {
  display: grid;
  gap: 16px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.section-head p {
  margin: 3px 0 0;
  color: var(--muted);
}

.day-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 16px;
}

.primary-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 32, 28, 0.06);
}

.primary-panel {
  padding: 20px;
}

.side-panel {
  padding: 16px;
}

.day-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.day-heading h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
}

.day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf8;
  color: var(--muted);
  padding: 4px 10px;
  font-size: 0.84rem;
  font-weight: 650;
}

.pill--green {
  border-color: rgba(31, 107, 87, 0.24);
  background: #edf6f2;
  color: var(--green);
}

.pill--rust {
  border-color: rgba(186, 90, 49, 0.24);
  background: #fff3ec;
  color: #874320;
}

.pill--blue {
  border-color: rgba(56, 107, 141, 0.24);
  background: #edf5fa;
  color: #23506f;
}

.route-line {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.route-point {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.route-dot {
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--rust);
  box-shadow: 0 0 0 2px rgba(186, 90, 49, 0.28);
}

.route-point strong {
  display: block;
}

.route-point span {
  color: var(--muted);
}

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

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

.priority-box {
  min-height: 120px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.priority-box h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.clean-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.place-card,
.capsule-card,
.result-card,
.check-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(20, 32, 28, 0.05);
}

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

.place-card__head,
.capsule-card__head,
.result-card__head,
.check-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.place-card h3,
.capsule-card h3,
.result-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.place-card p,
.capsule-card p,
.result-card p {
  margin: 5px 0 0;
  color: var(--muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tiny-action {
  min-width: 36px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green);
  font-weight: 800;
}

.tiny-action.is-active {
  border-color: var(--green-2);
  background: #edf6f2;
}

.tiny-action.is-favorite {
  border-color: rgba(216, 167, 66, 0.5);
  background: #fff8df;
  color: #7a5513;
}

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

.capsule-card__body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.launch-text {
  padding: 10px;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #f0f6fa;
  color: #244b66;
  font-size: 0.92rem;
}

.audio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.filter-field {
  display: grid;
  gap: 5px;
  min-width: 180px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
}

.detail-panel.is-open {
  display: block;
}

.detail-panel__scrim {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 15, 0.42);
}

.detail-panel__sheet {
  position: absolute;
  top: 0;
  right: 0;
  width: min(720px, 100%);
  height: 100%;
  overflow: auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.detail-panel__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 248, 0.96);
  backdrop-filter: blur(10px);
}

.detail-panel__head h2 {
  margin: 0;
  font-size: 1.7rem;
}

.detail-panel__body {
  padding: 18px;
}

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

.markdown h2,
.markdown h3,
.markdown h4 {
  margin: 16px 0 0;
  line-height: 1.18;
}

.markdown p,
.markdown ul {
  margin: 0;
}

.markdown ul {
  padding-left: 20px;
}

.markdown blockquote {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--rust);
  border-radius: var(--radius);
  background: #fff7ef;
  color: #65351e;
}

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

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

.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.check-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--green-2);
}

.check-label span {
  font-weight: 700;
}

.note-input {
  min-height: 86px;
  padding: 10px 12px;
  resize: vertical;
}

.bottom-nav {
  display: none;
}

@media (max-width: 920px) {
  .topbar__actions {
    display: none;
  }

  .topbar {
    gap: 12px;
  }

  .pwa-controls {
    min-width: auto;
  }

  .hero {
    min-height: 280px;
  }

  .hero__content {
    padding-top: 44px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .workspace {
    grid-template-columns: 1fr;
    margin-top: 16px;
    padding-bottom: 74px;
  }

  .day-rail {
    position: static;
    max-height: none;
  }

  .day-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .mobile-view-tabs {
    display: flex;
  }

  .day-overview,
  .priority-grid,
  .card-grid,
  .capsule-grid {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    position: fixed;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(18, 59, 51, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 34px rgba(12, 24, 20, 0.22);
    backdrop-filter: blur(12px);
  }

  .bottom-nav__item {
    min-height: 42px;
    padding: 0 4px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
  }

  .bottom-nav__item.is-active {
    background: var(--green);
    color: #fff;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 245px;
  }

  .hero__inner,
  .workspace {
    width: min(100% - 20px, 1180px);
  }

  .hero__inner {
    padding-top: 12px;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
  }

  .hero__content {
    padding-top: 34px;
  }

  h1 {
    font-size: 2rem;
  }

  .hero__dates {
    font-size: 0.95rem;
  }

  .metric {
    min-width: calc(50% - 4px);
  }

  .tool-row {
    grid-template-columns: 1fr;
  }

  .tool-row__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .icon-button {
    width: 100%;
  }

  .day-heading {
    display: grid;
  }

  .day-heading h2 {
    font-size: 1.55rem;
  }

  .primary-panel,
  .side-panel {
    padding: 14px;
  }

  .section-head {
    display: grid;
  }

  .filters {
    display: grid;
  }

  .filter-field {
    min-width: 0;
  }
}
