/* PlanIt UI restoration - user-facing app only. */

:root,
[data-theme="light"],
[data-theme="dark"] {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --clr-bg: #f6f2eb;
  --clr-bg-2: #fffaf2;
  --clr-bg-3: #ede8dc;
  --clr-surface: #fffaf2;
  --clr-surface-2: #ffffff;
  --clr-border: rgba(26, 22, 18, 0.11);
  --clr-border-2: rgba(26, 22, 18, 0.22);
  --clr-text: #132b32;
  --clr-text-2: rgba(19, 43, 50, 0.68);
  --clr-text-3: rgba(19, 43, 50, 0.50);
  --clr-accent: #c4472a;
  --clr-accent-dim: #a83820;
  --clr-accent-glow: rgba(196, 71, 42, 0.14);
  --clr-teal: #087b7f;
  --clr-green: #14855c;
  --clr-blue: #3157ff;
  --clr-purple: #6f56a5;
  --clr-red: #c4472a;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --shadow-sm: 0 10px 26px rgba(19, 43, 50, 0.06);
  --shadow-md: 0 16px 38px rgba(19, 43, 50, 0.10);
  --shadow-lg: 0 24px 58px rgba(19, 43, 50, 0.14);
  --shadow-xl: 0 28px 70px rgba(19, 43, 50, 0.16);
  --shadow-accent: 0 0 0 1px rgba(196, 71, 42, 0.24), 0 14px 34px rgba(196, 71, 42, 0.12);
  --content-max: 1160px;
  letter-spacing: 0;
}

html,
body,
#app-root {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.planit-app {
  background:
    radial-gradient(circle at top left, rgba(8, 123, 127, 0.10), transparent 30rem),
    linear-gradient(180deg, #fbf8f1 0%, var(--clr-bg) 56%, #efe9df 100%);
  color: var(--clr-text);
}

body.planit-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(19,43,50,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19,43,50,.028) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 74%);
}

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

.app-header,
[data-theme="light"] .app-header,
[data-theme="dark"] .app-header {
  background: rgba(255, 250, 242, 0.88);
  border-bottom: 1px solid rgba(19, 43, 50, 0.08);
  box-shadow: 0 14px 38px rgba(19, 43, 50, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1160px;
}

.brand,
.brand:hover {
  color: var(--clr-text);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #132b32;
  color: #fffaf2;
  font-family: var(--font-body);
  font-weight: 900;
}

.brand-name {
  color: var(--clr-text);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.7rem;
  letter-spacing: 0;
}

.nav-link,
.btn-icon {
  color: rgba(19, 43, 50, .68);
}

.nav-link:hover,
.nav-link.active,
.btn-icon:hover {
  background: rgba(19, 43, 50, .06);
  color: var(--clr-text);
  text-decoration: none;
}

.app-main {
  max-width: 100%;
}

.module-header,
.module-page,
.module-grid-section,
.how-section,
.hero-section {
  max-width: 1160px;
}

.module-header h1,
.hero-title,
.section-title,
.result-card__name,
.current-plan-title,
.saved-plan-name {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0;
}

.module-header h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: .98;
}

.section-subtitle,
.hero-sub,
p {
  color: var(--clr-text-2);
}

.hero-section {
  min-height: auto;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

.hero-eyebrow {
  background: #132b32;
  color: #fffaf2;
  border-radius: 999px;
  letter-spacing: .08em;
}

.hero-title {
  max-width: 760px;
  color: var(--clr-text);
  font-size: clamp(2.8rem, 7vw, 5.8rem);
}

.hero-title em {
  color: var(--clr-accent);
}

.hero-sub {
  max-width: 560px;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.55;
}

.hero-steps {
  max-width: 430px;
  padding: 14px;
  border-radius: 8px;
  background: #132b32;
  box-shadow: var(--shadow-lg);
}

.hero-step {
  border-radius: 8px;
  background: #fffaf2;
  border-color: rgba(255,250,242,.20);
}

.hero-step-num {
  border-radius: 8px;
  background: var(--clr-accent);
  color: #fffaf2;
}

.hero-step-text span {
  color: var(--clr-text-2);
}

.card,
.module-tile,
.result-card,
.event-search-form,
.event-summary-bar,
.plan-footer,
.empty-state,
.current-plan,
.saved-plan-card,
.plan-step,
.cost-breakdown,
.pref-card,
.selected-event-anchor {
  border: 1px solid rgba(19, 43, 50, .10);
  border-radius: 8px;
  background: rgba(255, 250, 242, .92);
  box-shadow: var(--shadow-sm);
}

.card:hover,
.module-tile:hover,
.result-card:hover,
.saved-plan-card:hover {
  border-color: rgba(8, 123, 127, .30);
  background: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.module-tile {
  min-height: 132px;
}

.tile-icon,
.summary-icon,
.ps-icon,
.plan-step-icon,
.empty-state__icon,
.pref-card-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(8, 123, 127, .10);
  color: #065b60;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tile-icon {
  width: 38px;
  height: 38px;
  font-size: 1rem;
}

.summary-icon,
.ps-icon {
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
}

.pref-card-token {
  min-width: 54px;
  min-height: 34px;
  padding: 0 10px;
}

.btn,
.btn-sm,
.btn-lg,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-ghost,
.btn--primary,
.btn--ghost,
.btn--secondary,
button {
  border-radius: 8px;
  letter-spacing: 0;
}

.btn-primary,
.btn--primary {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #fffaf2;
  box-shadow: 0 12px 24px rgba(196, 71, 42, .16);
}

.btn-primary:hover,
.btn--primary:hover {
  background: var(--clr-accent-dim);
  border-color: var(--clr-accent-dim);
  color: #fffaf2;
}

.btn-outline,
.btn-secondary,
.btn--secondary,
.btn-ghost,
.btn--ghost {
  background: rgba(255, 250, 242, .78);
  border-color: rgba(19, 43, 50, .12);
  color: var(--clr-text);
}

input,
select,
textarea {
  border-radius: 8px;
  background: #fff;
  border-color: rgba(19, 43, 50, .14);
  color: var(--clr-text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(8, 123, 127, .42);
  box-shadow: 0 0 0 3px rgba(8, 123, 127, .12);
}

.filter-bar {
  gap: 8px;
  padding-bottom: 2px;
}

.filter-chip,
.badge,
.tag,
.step-chip {
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(19, 43, 50, .10);
  color: rgba(19, 43, 50, .68);
  font-weight: 800;
}

.filter-chip.active,
.step-chip.active,
.step-chip.done,
.badge--accent,
.tag--active {
  background: var(--clr-teal);
  border-color: var(--clr-teal);
  color: #fffaf2;
}

.event-summary-bar {
  top: calc(var(--header-h) + 10px);
  left: 50%;
  right: auto;
  width: min(1120px, calc(100% - 32px));
  height: auto;
  min-height: 62px;
  border-radius: 8px;
  transform: translate(-50%, -120%);
}

.event-summary-bar.visible {
  transform: translate(-50%, 0);
}

.summary-inner {
  padding: 10px 14px;
}

.summary-title {
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 900;
  max-width: 320px;
}

.summary-meta {
  color: var(--clr-text-2);
}

.app-main.has-summary {
  margin-top: calc(var(--header-h) + 82px);
}

.event-search-form {
  overflow: hidden;
}

.event-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
}

.event-card-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.result-card__name {
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  line-height: 1.08;
}

.result-card__meta {
  gap: 8px 12px;
  line-height: 1.4;
}

.event-card-description {
  margin-top: 8px;
  color: var(--clr-text-3);
  font-size: .88rem;
  line-height: 1.45;
}

.result-card__action {
  min-width: 150px;
}

.price {
  font-family: var(--font-body);
  color: var(--clr-teal);
  font-weight: 900;
}

.selected-event-anchor {
  padding: 16px 18px !important;
  margin-bottom: 18px !important;
  border-left: 0 !important;
  background:
    linear-gradient(135deg, #132b32 0%, #06242b 100%) !important;
  color: #fffaf2;
  box-shadow: var(--shadow-md);
}

.selected-event-anchor div,
.selected-event-anchor strong {
  color: #fffaf2 !important;
}

.selected-event-anchor div:last-child {
  color: rgba(255,250,242,.72) !important;
}

.pref-card {
  min-height: 126px;
  align-items: flex-start !important;
  text-align: left !important;
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(19,43,50,.10) !important;
  color: var(--clr-text) !important;
}

.pref-card strong {
  font-size: 1rem !important;
  color: var(--clr-text) !important;
}

.pref-card--active {
  border-color: rgba(8,123,127,.48) !important;
  background: rgba(220,239,237,.76) !important;
  box-shadow: 0 12px 28px rgba(8,123,127,.12);
}

.current-plan,
.saved-plan-card {
  padding: 18px;
}

.saved-plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.saved-plan-actions,
.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-actions .btn--full,
#save-plan-btn {
  width: auto;
}

.plan-footer {
  left: 50%;
  right: auto;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 20px));
  height: 72px;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(19,43,50,.16);
}

.plan-footer-inner {
  padding: 0 10px;
}

.progress-connector {
  display: none;
}

.plan-progress-steps {
  justify-content: space-between;
}

.progress-step {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 4px;
  border-radius: 8px;
}

.progress-step.active {
  background: #132b32;
  color: #fffaf2;
}

.progress-step.done {
  color: var(--clr-teal);
}

.ps-label {
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.ps-check {
  display: none;
}

@media (min-width: 769px) {
  .plan-footer {
    display: none !important;
  }

  .app-main.has-footer {
    padding-bottom: var(--space-16);
  }
}

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: block;
  }
}

/* ------------------------------------------------------------------
   Target mock-up pass: make the live app feel like the PlanIt phones.
   These overrides are presentation-only and preserve the ES modules.
------------------------------------------------------------------ */

body.planit-app {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -12rem, rgba(255, 255, 255, .92), transparent 34rem),
    linear-gradient(180deg, #fffaf5 0%, #f5efe6 58%, #efe7dc 100%);
}

.brand {
  align-items: center;
  gap: 10px;
}

.brand-name {
  display: inline-flex;
  flex-direction: column;
  line-height: .9;
  font-size: clamp(2rem, 4vw, 3.45rem);
  color: #063b45;
}

.brand-name::after {
  content: "ONE PLAN. EVERY DETAIL.";
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: .52rem;
  font-weight: 900;
  letter-spacing: .18em;
  color: #ef523a;
}

.brand-mark {
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, .20), transparent 18px),
    linear-gradient(135deg, #07333d, #00252c);
  box-shadow: 0 10px 24px rgba(0, 50, 58, .18);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  min-height: 78px;
}

.app-main {
  padding: 18px 16px 120px;
}

.app-main.has-summary {
  margin-top: 0;
}

.event-summary-bar {
  display: none;
}

#view-home {
  max-width: 1180px;
  margin: 0 auto;
}

#view-home .hero-section {
  padding-top: clamp(1.5rem, 4vw, 3.25rem);
}

.hero-eyebrow {
  background: transparent;
  color: #ef523a;
  padding: 0;
}

.hero-title {
  max-width: 680px;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: clamp(2.25rem, 5vw, 4.6rem);
  line-height: .98;
}

.hero-title::after {
  content: "Less chaos. More good times.";
  display: block;
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  color: #ef523a;
}

@media (min-width: 760px) {
  .view:not(#view-home):not([hidden]) {
    width: min(424px, calc(100vw - 48px));
    max-width: 424px;
    min-height: 760px;
    margin: 18px auto 48px;
    border: 2px solid rgba(18, 27, 28, .70);
    border-radius: 31px;
    overflow: hidden;
    background: #fffaf2;
    box-shadow:
      0 28px 70px rgba(19, 43, 50, .18),
      inset 0 0 0 5px rgba(255, 255, 255, .80);
  }
}

.view:not(#view-home) .module-header,
.view:not(#view-home) .module-page {
  max-width: none;
  width: 100%;
}

.view:not(#view-home) .module-header {
  padding: 22px 18px 8px;
  margin: 0;
  text-align: center;
}

.view:not(#view-home) .module-header::before {
  content: "9:41";
  display: block;
  margin-bottom: 14px;
  text-align: left;
  font-size: .72rem;
  font-weight: 900;
  color: #101b1d;
}

.app-screen-topline {
  margin-bottom: 4px;
  font-size: .78rem;
  font-weight: 900;
  color: #101b1d;
}

.view:not(#view-home) .module-header h1 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.view:not(#view-home) .section-subtitle {
  max-width: 290px;
  margin: 5px auto 0;
  font-size: .78rem;
  line-height: 1.35;
}

.view:not(#view-home) .module-page {
  padding: 10px 18px 26px;
}

.event-search-form,
.plan-preference-card,
.current-plan,
.saved-plan-card,
.empty-state,
.result-card,
.card {
  border-radius: 14px;
}

.event-search-form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.event-search-form input,
.search-input {
  min-height: 42px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(19, 43, 50, .10);
  box-shadow: 0 8px 20px rgba(19, 43, 50, .05);
}

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  margin: 12px -18px 0 0;
  padding: 0 18px 3px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  font-size: .72rem;
  color: rgba(19, 43, 50, .68);
  box-shadow: 0 6px 14px rgba(19, 43, 50, .05);
}

.filter-chip.active {
  background: #07333d;
  border-color: #07333d;
  color: #fffaf2;
}

.event-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.event-list-heading strong {
  font-size: .88rem;
  font-weight: 900;
}

.event-list-heading span {
  font-size: .72rem;
  color: rgba(19, 43, 50, .48);
}

#event-results-count {
  display: none;
}

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

.event-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-left: 0 !important;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 26px rgba(19, 43, 50, .07);
}

.event-card-thumb,
.selected-event-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

.event-card-thumb--empty,
.selected-event-thumb--empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 70% 18%, rgba(239, 82, 58, .45), transparent 24px),
    linear-gradient(135deg, #0a3c47, #041f25);
  color: #fffaf2;
  font-weight: 900;
}

.event-card .result-card__body {
  min-width: 0;
}

.event-card-topline {
  display: none;
}

.event-card .result-card__name {
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 900;
  line-height: 1.18;
  color: #101b1d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card .result-card__meta {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  font-size: .72rem;
  color: rgba(19, 43, 50, .68);
}

.event-card-description {
  display: none;
}

.event-card .result-card__action {
  grid-column: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  margin-top: 4px;
  gap: 8px;
}

.event-card .price {
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(8, 123, 127, .10);
  color: #087b7f;
  font-size: .66rem;
  font-weight: 900;
}

.event-card .btn-sm {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: .70rem;
}

.event-card--featured {
  grid-template-columns: 1fr;
  gap: 10px;
  min-height: 190px;
  padding: 12px;
  border: 0 !important;
  background:
    linear-gradient(180deg, rgba(4, 32, 38, .18), rgba(0, 24, 30, .88)),
    linear-gradient(135deg, #0d4b55 0%, #001f27 100%);
  color: #fffaf2;
}

.event-card--featured .event-card-thumb {
  width: 100%;
  height: 118px;
  border-radius: 12px;
}

.event-card--featured .result-card__name,
.event-card--featured .result-card__meta,
.event-card--featured .price {
  color: #fffaf2;
}

.event-card--featured .result-card__meta {
  color: rgba(255, 250, 242, .82);
}

.event-card--featured .result-card__action {
  grid-column: 1;
}

.event-card.selected,
.event-card--featured.selected {
  outline: 2px solid #ef523a;
  outline-offset: 2px;
}

.selected-event-anchor {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  position: sticky;
  top: 90px;
  z-index: 10;
  padding: 12px !important;
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 82% 20%, rgba(239, 82, 58, .28), transparent 64px),
    linear-gradient(135deg, #0a4650 0%, #001f27 100%) !important;
}

.selected-event-copy {
  min-width: 0;
}

.selected-event-kicker {
  margin-bottom: 3px;
  color: rgba(255, 250, 242, .58) !important;
  font-size: .63rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.selected-event-anchor strong {
  display: block;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.16;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-event-anchor span {
  display: block;
  margin-top: 2px;
  font-size: .72rem;
  color: rgba(255, 250, 242, .74) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-event-anchor .btn {
  grid-column: 2;
  justify-self: start;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  background: #ef523a;
  border-color: #ef523a;
  font-size: .70rem;
}

.plan-health-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 13px;
  border: 1px solid rgba(19, 43, 50, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 24px rgba(19, 43, 50, .06);
}

.plan-health-card span {
  display: block;
  font-size: .72rem;
  color: rgba(19, 43, 50, .68);
}

.plan-health-card strong {
  display: block;
  margin-top: 3px;
  color: #ef523a;
  font-size: 1.45rem;
  line-height: 1;
}

.plan-health-card p {
  margin: 5px 0 0;
  font-size: .74rem;
  line-height: 1.3;
}

.plan-health-ring {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #fffaf2 72%, transparent 73%),
    conic-gradient(#087b7f var(--plan-health, 40%), rgba(8, 123, 127, .15) 0);
}

.plan-health-ring em {
  font-style: normal;
  font-size: .76rem;
  font-weight: 900;
  color: #087b7f;
}

.plan-step-stack {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.target-plan-step {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border: 1px solid rgba(19, 43, 50, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 10px 22px rgba(19, 43, 50, .06);
}

.target-step-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid #087b7f;
  border-radius: 50%;
  color: #087b7f;
  font-weight: 900;
}

.target-plan-step:nth-child(2) .target-step-num {
  border-color: #ef7a2d;
  color: #ef7a2d;
}

.target-plan-step:nth-child(3) .target-step-num {
  border-color: #8b6fc5;
  color: #8b6fc5;
}

.target-plan-step:nth-child(4) .target-step-num {
  border-color: rgba(19, 43, 50, .34);
  color: rgba(19, 43, 50, .56);
}

.target-plan-step strong {
  display: block;
  font-size: .88rem;
  line-height: 1.1;
}

.target-plan-step small {
  display: block;
  margin-top: 4px;
  color: rgba(19, 43, 50, .58);
  font-size: .72rem;
}

.target-status-pill,
.status-pill,
.plan-step-check {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-planned,
.status-booked,
.plan-step--complete .plan-step-check {
  background: rgba(8, 123, 127, .12);
  color: #087b7f;
}

.status-needs-booking {
  background: rgba(239, 82, 58, .12);
  color: #ef523a;
}

.status-suggestion {
  background: rgba(139, 111, 197, .14);
  color: #7258a8;
}

.status-optional {
  background: rgba(19, 43, 50, .08);
  color: rgba(19, 43, 50, .58);
}

.plan-preference-card {
  margin-top: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 24px rgba(19, 43, 50, .06);
}

.plan-preference-card .card__header,
.plan-preference-card .card__body {
  padding: 0;
}

.plan-preference-card .card__header h3 {
  margin: 0 0 10px;
  font-size: .86rem;
  font-weight: 900;
}

.preference-grid {
  display: grid;
  gap: 8px;
}

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

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

.pref-card {
  min-height: 88px;
  padding: 10px 8px;
  border-radius: 12px;
  justify-content: flex-start;
  gap: 5px;
}

.pref-card-token {
  min-width: 0;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(8, 123, 127, .10);
  font-size: .60rem;
}

.pref-card strong {
  font-size: .78rem !important;
  line-height: 1.1;
}

.pref-card span:not(.pref-card-token) {
  font-size: .66rem;
  line-height: 1.25;
  color: rgba(19, 43, 50, .58);
}

#build-plan-btn,
#save-plan-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border-radius: 12px;
  background: #ef523a;
  border-color: #ef523a;
}

.pref-hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: .74rem;
}

.current-plan {
  padding: 14px;
  background: rgba(255, 255, 255, .86);
}

.current-plan-header {
  margin: -14px -14px 12px;
  padding: 14px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 86% 18%, rgba(239, 82, 58, .28), transparent 60px),
    linear-gradient(135deg, #0a4650 0%, #001f27 100%);
  color: #fffaf2;
}

.current-plan-title,
.saved-plan-name {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.16;
}

.current-plan-meta {
  margin: 5px 0 0;
  color: rgba(255, 250, 242, .76);
  font-size: .73rem;
}

.plan-completion {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fffaf2;
  font-size: .66rem;
  font-weight: 900;
}

.plan-steps {
  display: grid;
  gap: 8px;
}

.plan-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 250, 242, .74);
  box-shadow: none;
}

.plan-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: .72rem;
  background: rgba(8, 123, 127, .10);
  color: #087b7f;
}

.plan-step-label {
  font-size: .80rem;
  font-weight: 900;
}

.plan-step-detail {
  margin-top: 2px;
  color: rgba(19, 43, 50, .58);
  font-size: .70rem;
  line-height: 1.3;
}

.plan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.plan-actions #save-plan-btn {
  grid-column: 1 / -1;
}

.saved-plan-card {
  grid-template-columns: 1fr;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, .90);
}

.saved-plan-info {
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(8, 123, 127, .92), rgba(0, 35, 43, .96));
  color: #fffaf2;
}

.saved-plan-meta,
.saved-plan-timestamp {
  margin: 5px 0 0;
  color: rgba(255, 250, 242, .76);
  font-size: .72rem;
}

.saved-plan-actions {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.saved-plan-actions .btn {
  min-height: 34px;
  border-radius: 10px;
  font-size: .72rem;
}

.btn--danger {
  color: #c4472a !important;
}

.plan-footer {
  display: block;
  width: min(390px, calc(100% - 24px));
  height: 66px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  border-color: rgba(19, 43, 50, .10);
  box-shadow: 0 16px 42px rgba(19, 43, 50, .18);
  backdrop-filter: blur(18px);
}

.plan-progress-steps {
  height: 100%;
  gap: 2px;
}

.progress-step {
  min-height: 52px;
  border-radius: 15px;
  color: rgba(19, 43, 50, .68);
}

.progress-step.active {
  background: transparent;
  color: #07333d;
}

.progress-step.active .ps-icon {
  background: #07333d;
  color: #fffaf2;
}

.ps-icon {
  min-width: 26px;
  width: 26px;
  height: 24px;
  padding: 0;
  border-radius: 9px;
  background: transparent;
  font-size: .70rem;
}

.ps-label {
  margin-top: 2px;
  font-size: .62rem;
  font-weight: 800;
}

@media (max-width: 759px) {
  .app-header {
    position: sticky;
  }

  .header-inner {
    min-height: 64px;
    padding-inline: 14px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    font-size: 1.85rem;
  }

  .brand-name::after {
    margin-top: 5px;
    font-size: .46rem;
    letter-spacing: .14em;
  }

  .header-nav {
    display: none;
  }

  .app-main {
    padding: 8px 10px 104px;
  }

  .view:not(#view-home):not([hidden]) {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    overflow: visible;
  }

  .view:not(#view-home) .module-header {
    padding-top: 14px;
  }

  .selected-event-anchor {
    top: 74px;
  }
}

@media (max-width: 380px) {
  .view:not(#view-home) .module-page {
    padding-inline: 14px;
  }

  .preference-grid--three {
    grid-template-columns: 1fr;
  }

  .event-card .result-card__action {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  :root {
    --plan-footer-h: 76px;
  }

  .app-header {
    height: 58px;
  }

  .header-inner {
    padding: 0 14px;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .hero-section {
    padding: 28px 14px 18px;
  }

  .hero-title {
    font-size: clamp(2.7rem, 16vw, 4.2rem);
  }

  .hero-steps {
    max-width: none;
  }

  .module-grid-section,
  .how-section,
  .module-page,
  .module-header {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .event-summary-bar {
    top: calc(var(--header-h) + 8px);
    width: calc(100% - 20px);
  }

  .summary-steps {
    display: none;
  }

  .app-main.has-summary {
    margin-top: calc(var(--header-h) + 78px);
  }

  .event-card,
  .saved-plan-card {
    grid-template-columns: 1fr;
  }

  .result-card__action {
    align-items: flex-start;
    min-width: 0;
  }

  .card__body [style*="grid-template-columns:1fr 1fr"],
  .card__body [style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .app-main.has-footer {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }
}

/* Keep the phone-app restoration above legacy mobile fallbacks. */
@media (max-width: 768px) {
  .brand-name {
    font-size: 1.85rem;
  }

  .brand-name::after {
    display: block;
  }

  .app-main.has-summary {
    margin-top: 0;
  }

  .event-summary-bar {
    display: none;
  }

  .event-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .event-card--featured {
    grid-template-columns: 1fr;
  }

  .saved-plan-card {
    grid-template-columns: 1fr;
  }

  .result-card__action {
    align-items: center;
  }

  .view:not(#view-home) .module-page,
  .view:not(#view-home) .module-header {
    padding-left: 18px;
    padding-right: 18px;
  }

  .filter-bar {
    margin-right: -18px;
  }
}

body.planit-app .app-header,
body.planit-app[data-theme="dark"] .app-header,
body.planit-app[data-theme="light"] .app-header {
  background: rgba(255, 250, 242, .92) !important;
  border-bottom: 1px solid rgba(19, 43, 50, .08) !important;
  color: #07333d !important;
  box-shadow: 0 14px 38px rgba(19, 43, 50, .08) !important;
}

body.planit-app .nav-link,
body.planit-app .btn-icon {
  color: rgba(19, 43, 50, .72) !important;
}

body.planit-app .nav-link.active {
  background: #07333d !important;
  color: #fffaf2 !important;
}

body.planit-app .brand-name,
body.planit-app[data-theme="dark"] .brand-name,
body.planit-app[data-theme="light"] .brand-name {
  color: #07333d !important;
}

/* ------------------------------------------------------------------
   Responsive correction: keep the premium language, remove the literal
   phone frame from desktop and tablet layouts.
------------------------------------------------------------------ */

@media (min-width: 901px) {
  body.planit-app {
    --desktop-page: min(100% - 48px, 1220px);
  }

  .app-main {
    width: 100%;
    max-width: none;
    padding: 34px 0 72px;
  }

  .app-main.has-summary,
  .app-main.has-footer {
    margin-top: 0;
    padding-bottom: 72px;
  }

  .view:not(#view-home):not([hidden]) {
    width: var(--desktop-page) !important;
    max-width: 1220px !important;
    min-height: 0 !important;
    margin: 0 auto 56px !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .view:not(#view-home) .module-header,
  .view:not(#view-home) .module-page {
    width: 100%;
    max-width: none;
  }

  .view:not(#view-home) .module-header {
    display: grid;
    gap: 6px;
    padding: 18px 0 22px;
    margin: 0;
    text-align: left;
  }

  .view:not(#view-home) .module-header::before {
    content: none !important;
  }

  .app-screen-topline {
    font-size: .78rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #ef523a;
  }

  .view:not(#view-home) .module-header h1 {
    font-size: clamp(2.1rem, 4vw, 3.8rem);
    line-height: .98;
  }

  .view:not(#view-home) .section-subtitle {
    max-width: 660px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
  }

  .view:not(#view-home) .module-page {
    padding: 0;
  }

  .plan-footer {
    display: none !important;
  }

  .event-summary-bar {
    display: none !important;
  }

  .event-search-form {
    padding: 18px;
    border: 1px solid rgba(19, 43, 50, .10);
    background: rgba(255, 250, 242, .86);
    box-shadow: 0 18px 44px rgba(19, 43, 50, .08);
  }

  .event-search-form .card__body {
    padding: 0;
  }

  .search-input-wrap,
  .event-search-form input {
    min-height: 50px;
  }

  .filter-bar {
    flex-wrap: wrap;
    margin: 14px 0 0;
    padding: 0;
    overflow: visible;
  }

  .filter-chip {
    padding: 9px 15px;
    font-size: .82rem;
  }

  .event-list-heading {
    margin-top: 24px;
  }

  #view-explore .results-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  #view-explore .event-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  #view-explore .event-card--featured {
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    grid-column: 1 / -1;
    min-height: 236px;
    align-items: end;
    padding: 18px;
  }

  #view-explore .event-card-thumb,
  #view-explore .selected-event-thumb {
    width: 96px;
    height: 96px;
  }

  #view-explore .event-card--featured .event-card-thumb {
    width: 100%;
    height: 200px;
  }

  #view-explore .event-card-topline {
    display: flex;
  }

  #view-explore .event-card .result-card__name {
    font-size: 1.04rem;
  }

  #view-explore .event-card--featured .result-card__name {
    font-size: clamp(1.3rem, 2.4vw, 2rem);
  }

  #view-explore .event-card-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #view-explore .event-card .result-card__action {
    grid-column: 2;
    justify-content: flex-start;
  }

  #view-explore .event-card--featured .result-card__action {
    grid-column: 2;
  }

  #view-explore .event-card .price {
    max-width: none;
  }

  #view-travel .module-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
  }

  #view-travel .selected-event-anchor,
  #view-travel .plan-health-card,
  #view-travel .plan-step-stack {
    grid-column: 2;
  }

  #view-travel .selected-event-anchor {
    position: sticky;
    top: 104px;
  }

  #view-travel .plan-health-card {
    position: sticky;
    top: 262px;
  }

  #view-travel .plan-step-stack {
    position: sticky;
    top: 414px;
  }

  #view-travel .plan-preference-card,
  #view-travel #build-plan-btn,
  #view-travel .pref-hint,
  #view-travel .empty-state {
    grid-column: 1;
  }

  #view-travel .plan-preference-card {
    padding: 18px;
  }

  #view-travel .preference-grid--two {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  #view-travel .preference-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #view-travel .pref-card {
    min-height: 132px;
    padding: 16px;
  }

  #view-travel .pref-card strong {
    font-size: 1rem !important;
  }

  #view-travel .pref-card span:not(.pref-card-token) {
    font-size: .82rem;
  }

  #view-train .module-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  #view-train #train-search-form .card {
    padding: 18px;
  }

  #view-train #train-search-form .card__body,
  #view-train #train-search-form .card__footer {
    padding: 0;
  }

  #view-train #train-search-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 16px;
  }

  #view-train #train-search-form .card__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 0;
    border-top: 0;
    background: transparent;
  }

  #view-train #train-search-form input {
    min-height: 46px;
  }

  #view-train #train-results {
    margin-top: 0 !important;
  }

  #view-train .results-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #view-train .train-journey-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
  }

  #view-train .train-journey-card .result-card__action {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 150px;
    gap: 8px;
    align-items: stretch;
  }

  #view-train .train-journey-card .btn,
  #view-train .train-journey-card .price {
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  #view-dining .results-list,
  #view-hotel .results-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  #view-saved .module-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 18px;
    align-items: start;
  }

  #view-saved .current-plan {
    grid-column: 2;
    position: sticky;
    top: 104px;
  }

  #view-saved .saved-plan-card {
    grid-column: 1;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .app-main {
    padding: 24px 0 72px;
  }

  .view:not(#view-home):not([hidden]) {
    width: min(100% - 40px, 860px) !important;
    max-width: 860px !important;
    min-height: 0 !important;
    margin: 0 auto 44px !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .view:not(#view-home) .module-header {
    padding: 14px 0 18px;
    text-align: left;
  }

  .view:not(#view-home) .module-header::before {
    content: none !important;
  }

  .view:not(#view-home) .module-header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
  }

  .view:not(#view-home) .section-subtitle {
    max-width: 620px;
    margin: 0;
    font-size: .95rem;
  }

  .view:not(#view-home) .module-page {
    padding: 0;
  }

  .plan-footer {
    display: none !important;
  }

  .event-summary-bar {
    display: none !important;
  }

  .filter-bar {
    flex-wrap: wrap;
    margin: 14px 0 0;
    padding: 0;
    overflow: visible;
  }

  #view-explore .results-list,
  #view-dining .results-list,
  #view-hotel .results-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  #view-explore .event-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  #view-explore .event-card--featured {
    grid-column: 1 / -1;
    grid-template-columns: minmax(220px, .85fr) minmax(0, 1.15fr);
  }

  #view-explore .event-card--featured .event-card-thumb {
    height: 168px;
  }

  #view-train #train-search-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  #view-train .train-journey-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .app-main {
    width: 100%;
    overflow-x: hidden;
  }

  .view:not(#view-home):not([hidden]) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow-x: hidden;
  }

  .view:not(#view-home) .module-page,
  .view:not(#view-home) .module-header,
  .event-search-form,
  .event-search-form .card__body,
  .search-input-wrap,
  .search-input-wrap input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .event-search-form {
    overflow: hidden;
  }

  .filter-bar {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .plan-footer {
    display: block;
  }
}
