:root {
  color-scheme: dark;
  --bg: #080b0e;
  --panel: rgba(16, 22, 26, 0.84);
  --text: #f5f2e9;
  --muted: #a8b0af;
  --line: rgba(245, 242, 233, 0.15);
  --amber: #f3b84f;
  --blue: #6bb7d6;
  --green: #8fd19e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(107, 183, 214, 0.16), transparent 32rem),
    radial-gradient(circle at 82% 4%, rgba(243, 184, 79, 0.12), transparent 28rem),
    linear-gradient(135deg, #080b0e 0%, #101719 48%, #0b1014 100%);
  color: var(--text);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.motion-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.52;
  z-index: -1;
}

.motion-field span {
  position: absolute;
  width: 58rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 242, 233, 0.2), transparent);
  transform: rotate(-18deg);
  animation: runway 12s linear infinite;
}

.motion-field span:nth-child(1) { top: 18%; left: -40%; animation-delay: -2s; }
.motion-field span:nth-child(2) { top: 38%; left: -52%; animation-delay: -7s; }
.motion-field span:nth-child(3) { top: 62%; left: -35%; animation-delay: -4s; }
.motion-field span:nth-child(4) { top: 82%; left: -60%; animation-delay: -10s; }

@keyframes runway {
  from { translate: -18vw 0; }
  to { translate: 150vw 0; }
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0;
}

.site-header:not(.planner-header) {
  min-height: 5.1rem;
}

.brand,
.site-nav,
.hero-actions,
.article-actions,
.game-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand {
  font-weight: 750;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.72rem;
  color: var(--amber);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-nav {
  gap: 0.35rem;
  border: 1px solid var(--line);
  background: rgba(8, 11, 14, 0.56);
  padding: 0.35rem;
}

.site-nav a {
  color: var(--muted);
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(245, 242, 233, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 44rem);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  width: min(1120px, calc(100% - 2rem));
  min-height: calc(100vh - 5.2rem);
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  display: grid;
  gap: 0.55rem;
  max-width: 100%;
  margin-bottom: 1.25rem;
  font-size: clamp(3.25rem, 8vw, 6.25rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0;
  margin-bottom: 0.75rem;
}

.hero-text,
.section-intro p,
.post-card p,
.game-card p,
.article-body p,
.routes-section p,
.guide-note,
.site-footer {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 38rem;
  font-size: 1.12rem;
}

.split-flap {
  position: relative;
  display: inline-block;
  width: max-content;
  max-width: 100%;
  font-size: 0.82em;
  padding: 0.13em 0.19em 0.18em;
  background: linear-gradient(#171b1e, #050607);
  border: 1px solid rgba(245, 242, 233, 0.18);
  box-shadow: inset 0 -0.08em 0 rgba(255, 255, 255, 0.08), inset 0 0.08em 0 rgba(0, 0, 0, 0.72), var(--shadow);
  color: var(--amber);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

.split-flap::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 -1px rgba(255, 255, 255, 0.08);
}

.split-flap::after {
  content: attr(data-flap);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(#2a2f32, #090b0c);
  transform-origin: top;
  animation: flap 1.2s cubic-bezier(.2,.8,.2,1) both;
}

.split-flap.small { font-size: 1.4rem; }

@keyframes flap {
  0% { transform: rotateX(88deg); filter: brightness(1.8); }
  62% { transform: rotateX(-12deg); }
  100% { transform: rotateX(0deg); filter: brightness(1); }
}

.hero-actions,
.article-actions,
.game-links {
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.78rem 1rem;
  border: 1px solid var(--line);
  font-weight: 800;
}

.button.primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #13110c;
}

.button.secondary {
  background: rgba(245, 242, 233, 0.08);
  color: var(--text);
}

.planner-card,
.post-card,
.game-card,
.article-shell,
.guide-facts {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.planner-section,
.latest-section,
.page-section,
.article-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0;
}

.planner-section {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 2rem;
  align-items: start;
}

.section-intro { max-width: 40rem; }

.planner-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 3rem;
  border: 1px solid rgba(245, 242, 233, 0.16);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  padding: 0 0.85rem;
  font: inherit;
}

textarea {
  min-height: 10rem;
  padding-top: 0.85rem;
  resize: vertical;
}

.routes-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.routes-section article {
  min-height: 15rem;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
}

.routes-section article:last-child { border-right: 0; }

.route-code {
  display: block;
  margin-bottom: 4rem;
  color: var(--blue);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.post-grid,
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.post-card,
.game-card {
  display: grid;
  align-content: start;
  min-height: 15rem;
  padding: 1.1rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.post-card:hover,
.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(243, 184, 79, 0.5);
}

.post-card span,
.game-card span,
.article-meta {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.text-link {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--amber);
  font-weight: 800;
}

.page-hero {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0 3rem;
}

.page-hero h1 { max-width: min(100%, 48rem); }

.article-shell {
  max-width: 820px;
  padding: clamp(1.2rem, 4vw, 3rem);
}

.article-body { font-size: 1.05rem; }

.article-body h2 {
  margin-top: 2.4rem;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.article-body ul {
  display: grid;
  gap: 0.65rem;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.55;
}

.guide-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  overflow: hidden;
}

.guide-facts div {
  padding: 1rem;
  background: rgba(245, 242, 233, 0.04);
}

.guide-facts span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-facts strong {
  color: var(--text);
  line-height: 1.25;
}

.source-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.source-list a {
  color: var(--amber);
  font-weight: 800;
}

.game-card { min-height: 18rem; }

.game-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #050607;
}

.game-links { align-items: stretch; margin-top: auto; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
}

.site-footer p { margin: 0; }

.footer-link {
  display: inline-block;
  margin-left: 0.8rem;
  color: var(--amber);
  font-weight: 800;
}

.contact-section {
  padding-top: 1rem;
}

.contact-form {
  max-width: 42rem;
}

.form-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 820px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .planner-section,
  .routes-section,
  .post-grid,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .hero { min-height: auto; }
  .guide-facts { grid-template-columns: 1fr; }

  .routes-section article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .routes-section article:last-child { border-bottom: 0; }

  h1 { font-size: clamp(2.75rem, 13vw, 4.4rem); }

  .split-flap {
    font-size: 0.7em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Live planner */
.planner-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.planner-header {
  height: 4.8rem;
}

.planner-page .app-shell {
  display: grid;
  grid-template-columns: minmax(20rem, 27rem) minmax(0, 1fr);
  width: min(1440px, calc(100% - 2rem));
  height: calc(100vh - 5.6rem);
  height: calc(100dvh - 5.6rem);
  margin: 0 auto 1rem;
  border: 1px solid var(--line);
  background: rgba(6, 8, 10, 0.48);
  box-shadow: var(--shadow);
  transition: grid-template-columns 0.22s ease;
}

.planner-page.sheet-collapsed .app-shell {
  grid-template-columns: 2.8rem minmax(0, 1fr);
}

.control-panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  border-right: 1px solid var(--line);
  background: rgba(8, 11, 14, 0.88);
  overflow-y: auto;
  transition: padding 0.22s ease;
}

.desktop-panel-toggle {
  position: absolute;
  top: 50%;
  right: -1.4rem;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 5.2rem;
  border: 1px solid var(--line);
  color: var(--amber);
  background: rgba(8, 11, 14, 0.94);
  box-shadow: var(--shadow);
  transform: translateY(-50%);
  cursor: pointer;
}

.desktop-panel-toggle i {
  transition: transform 0.18s ease;
}

.desktop-panel-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.planner-page.sheet-collapsed .desktop-panel-toggle i {
  transform: rotate(180deg);
}

.planner-page.sheet-collapsed .control-panel {
  padding: 0;
  overflow: visible;
}

.planner-page.sheet-collapsed .control-panel > :not(.desktop-panel-toggle) {
  visibility: hidden;
  pointer-events: none;
}

.planner-page .brand-row {
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.planner-brand-mark {
  flex: 0 0 auto;
}

.planner-page h1 {
  display: block;
  margin: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.planner-page h2,
.panel-header h2 {
  font-size: 1.05rem;
  line-height: 1.1;
}

.planner-page .split-flap.small {
  font-size: 1rem;
}

.sheet-toggle {
  display: none;
}

.location-consent,
.wizard-progress,
.trip-form,
.search-block {
  display: grid;
  gap: 0.85rem;
}

.location-consent {
  border: 1px solid rgba(107, 183, 214, 0.26);
  padding: 0.85rem;
  background: rgba(107, 183, 214, 0.08);
}

.location-consent[hidden],
.duration-panel[hidden],
.wizard-nav button[hidden],
.loading-overlay[hidden] {
  display: none;
}

.location-consent-title,
.location-consent-copy,
.wizard-progress p,
.step-kicker,
.step-title,
.form-error,
.time-summary,
.status-text,
.loader-title,
.loader-detail,
.place-card p,
.panel-header h2 {
  margin: 0;
}

.location-consent-title,
.loader-title,
.panel-header h2,
.place-card h3,
.rating-number,
.time-chip strong {
  color: var(--text);
}

.location-consent-copy,
.wizard-progress p,
.time-summary,
.status-text,
.loader-detail,
.place-card p,
.time-chip span {
  color: var(--muted);
}

.location-consent-actions,
.duration-grid,
.wizard-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.wizard-dots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.wizard-dot {
  height: 0.32rem;
  background: rgba(245, 242, 233, 0.14);
}

.wizard-dot.is-active,
.wizard-dot.is-complete {
  background: var(--amber);
}

.wizard-step {
  display: none;
  gap: 0.85rem;
}

.wizard-step.is-active {
  display: grid;
}

.step-kicker {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.step-title {
  color: var(--text);
}

.planner-page input,
.planner-page select {
  border-color: rgba(245, 242, 233, 0.16);
  background: rgba(0, 0, 0, 0.32);
}

.planner-page input:focus,
.planner-page select:focus {
  border-color: rgba(243, 184, 79, 0.8);
  outline: 3px solid rgba(243, 184, 79, 0.14);
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.mode-buttons {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 9.5rem;
  border: 1px solid var(--line);
  padding: 0.2rem;
  background: rgba(245, 242, 233, 0.07);
}

.mode-buttons button,
.quick-actions button,
.primary-action,
.secondary-action,
.ghost-action,
.panel-header button {
  min-height: 2.5rem;
  border: 1px solid var(--line);
  padding: 0.62rem 0.75rem;
  color: var(--text);
  background: rgba(245, 242, 233, 0.08);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mode-buttons button {
  min-height: 2rem;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
}

.mode-buttons button.is-active,
.primary-action {
  color: #13110c;
  background: var(--amber);
  border-color: var(--amber);
}

.secondary-action {
  color: var(--amber);
}

.ghost-action {
  color: var(--muted);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-error {
  min-height: 1.25rem;
  color: #ff9186;
  font-size: 0.9rem;
}

.suggestions {
  display: grid;
  gap: 0.35rem;
  max-height: 15rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  padding: 0.35rem;
  background: rgba(0, 0, 0, 0.52);
}

.suggestions[hidden] {
  display: none;
}

.suggestion {
  border: 0;
  padding: 0.62rem;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.suggestion:hover {
  background: rgba(245, 242, 233, 0.08);
}

.suggestion small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(90deg, rgba(245, 242, 233, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(245, 242, 233, 0.04) 1px, transparent 1px),
    #0d1215;
  background-size: 4rem 4rem;
}

#map {
  position: absolute;
  inset: 0;
  background: #0d1215;
}

.planner-page #map svg {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.planner-page .H_ib_body,
.planner-page .H_ib_tail,
.planner-page .H_btn,
.planner-page .H_l_horizontal,
.planner-page .H_l_vertical {
  border-color: rgba(245, 242, 233, 0.16) !important;
  background: rgba(8, 11, 14, 0.88) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow) !important;
}

.planner-page .H_btn:hover {
  background: rgba(245, 242, 233, 0.12) !important;
}

.planner-page .H_logo {
  opacity: 0.72;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 11, 14, 0.34);
  backdrop-filter: blur(3px);
}

.loader-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  width: min(24rem, 100%);
  border: 1px solid var(--line);
  padding: 1rem;
  background: rgba(8, 11, 14, 0.9);
  box-shadow: var(--shadow);
}

.loader-spinner {
  width: 2rem;
  height: 2rem;
  border: 4px solid rgba(243, 184, 79, 0.2);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loader-track {
  grid-column: 1 / -1;
  height: 0.45rem;
  overflow: hidden;
  background: rgba(245, 242, 233, 0.12);
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: var(--amber);
  transition: width 0.18s ease;
}

.loader-card.indeterminate .loader-bar {
  width: 45%;
  animation: indeterminate 1.2s ease-in-out infinite;
}

.results-panel,
.trip-builder-panel {
  position: absolute;
  right: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: min(28rem, calc(100% - 2rem));
  max-height: min(35rem, calc(100% - 2rem));
  border: 1px solid var(--line);
  padding: 1rem;
  background: rgba(8, 11, 14, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.results-panel {
  bottom: 1rem;
}

.trip-builder-panel {
  top: 1rem;
  max-height: min(36rem, calc(100% - 2rem));
  overflow-y: auto;
}

.results-panel[hidden] {
  display: none;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.route-key {
  position: relative;
}

.route-key summary {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(245, 242, 233, 0.08);
  cursor: pointer;
  list-style: none;
}

.route-key summary::-webkit-details-marker {
  display: none;
}

.route-key[open] summary,
.route-key summary:hover,
.route-key summary:focus-visible {
  color: var(--amber);
  border-color: var(--amber);
}

.route-key-popover {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 5;
  display: grid;
  gap: 0.55rem;
  width: 14rem;
  border: 1px solid var(--line);
  padding: 0.75rem;
  color: var(--text);
  background: rgba(8, 11, 14, 0.97);
  box-shadow: var(--shadow);
}

.route-key-popover p {
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.82rem;
}

.route-sample {
  display: block;
  height: 0;
  border-top: 4px solid var(--amber);
}

.route-sample-walk {
  border-top-style: dotted;
  border-color: var(--paper);
}

.route-sample-bike {
  border-top-style: dashed;
  border-color: var(--blue);
}

.route-sample-scooter {
  border-top-style: dashed;
  border-color: var(--green);
}

.results-list {
  container-type: inline-size;
  display: grid;
  gap: 0.7rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.place-card {
  display: grid;
  grid-template-areas:
    "identity"
    "amenities"
    "timing";
  gap: 0.8rem;
  border: 1px solid rgba(245, 242, 233, 0.14);
  padding: 0.85rem;
  background: rgba(245, 242, 233, 0.06);
}

.place-card.is-in-trip {
  border-color: rgba(143, 209, 158, 0.55);
  background: rgba(143, 209, 158, 0.08);
}

.place-card.recommendation-safe {
  border-color: rgba(143, 209, 158, 0.55);
}

.place-card.recommendation-watch {
  border-color: rgba(243, 184, 79, 0.6);
}

.place-card.recommendation-close,
.place-card.recommendation-no {
  border-color: rgba(255, 145, 134, 0.62);
}

.place-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.place-identity { grid-area: identity; min-width: 0; }
.place-meta { grid-area: amenities; display: grid; gap: 0.55rem; }
.place-timing { grid-area: timing; display: grid; gap: 0.55rem; }
.place-actions {
  display: flex;
  justify-content: flex-end;
}

.add-trip-action {
  min-height: 2.4rem;
  padding: 0.55rem 0.8rem;
}

.add-trip-action[aria-pressed="true"] {
  color: var(--green);
  border-color: rgba(143, 209, 158, 0.55);
}

.place-rating,
.rating-stars,
.service-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.rating-star {
  color: var(--amber);
}

.service-badge,
.time-chip {
  border: 1px solid rgba(245, 242, 233, 0.12);
  background: rgba(0, 0, 0, 0.24);
}

.service-badge {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--blue);
}

.trip-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.time-chip {
  display: grid;
  gap: 0.15rem;
  padding: 0.45rem 0.5rem;
}

.time-chip span {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.trip-stops {
  display: grid;
  gap: 0.6rem;
  overflow-y: auto;
}

.empty-trip,
.trip-summary {
  margin: 0;
  color: var(--muted);
}

.trip-stop {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 2.2rem;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid rgba(245, 242, 233, 0.14);
  padding: 0.65rem;
  background: rgba(245, 242, 233, 0.06);
}

.trip-stop-number {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--amber);
  border: 1px solid rgba(255, 190, 82, 0.42);
  font-weight: 900;
}

.trip-stop-copy {
  min-width: 0;
}

.trip-stop-copy h3 {
  margin: 0 0 0.2rem;
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-stop-copy p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-action {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(245, 242, 233, 0.14);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
}

.icon-action:hover,
.icon-action:focus-visible {
  color: var(--paper);
  border-color: var(--amber);
}

.trip-summary {
  line-height: 1.45;
}

.trip-breakdown {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.trip-breakdown ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trip-breakdown li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: baseline;
  border-bottom: 1px solid rgba(245, 242, 233, 0.1);
  padding-bottom: 0.35rem;
}

.trip-breakdown li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.trip-breakdown li strong {
  color: var(--text);
  white-space: nowrap;
}

.trip-breakdown-total {
  border-bottom: 0;
  padding-top: 0.25rem;
}

.trip-suggestion {
  margin: 0;
  border: 1px solid rgba(255, 145, 134, 0.3);
  padding: 0.65rem;
  color: var(--text);
  background: rgba(255, 145, 134, 0.09);
}

.trip-fit {
  color: var(--blue);
}

.trip-risk {
  color: var(--amber);
}

.recommendation {
  margin: 0;
  font-weight: 900;
}

.recommendation.safe { color: var(--green); }
.recommendation.watch { color: var(--amber); }
.recommendation.close,
.recommendation.no { color: #ff9186; }

@container (min-width: 460px) {
  .place-card {
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
    grid-template-areas:
      "identity timing"
      "amenities timing";
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(240%); }
}

@media (max-width: 860px) {
  .planner-page {
    overflow: hidden;
  }

  .desktop-panel-toggle {
    display: none;
  }

  .planner-page.sheet-collapsed .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .planner-header {
    height: auto;
    padding-bottom: 0.75rem;
  }

  .planner-page .app-shell {
    position: relative;
    display: block;
    width: 100%;
    height: calc(100vh - 8.9rem);
    height: calc(100dvh - 8.9rem);
    margin: 0;
    border-right: 0;
    border-left: 0;
  }

  .map-stage {
    position: absolute;
    inset: 0;
  }

  .planner-page .H_btn,
  .planner-page .H_l_horizontal,
  .planner-page .H_l_vertical {
    display: none !important;
  }

  .control-panel {
    position: absolute;
    left: 0.7rem;
    right: 0.7rem;
    bottom: max(0.7rem, env(safe-area-inset-bottom));
    max-height: min(70vh, 34rem);
    max-height: min(70dvh, 34rem);
    border: 1px solid var(--line);
    transition: transform 0.22s ease;
  }

  .planner-page.sheet-collapsed .control-panel {
    padding: 1rem;
    overflow-y: auto;
  }

  .planner-page.sheet-collapsed .control-panel > :not(.desktop-panel-toggle) {
    visibility: visible;
    pointer-events: auto;
  }

  .sheet-toggle {
    display: grid;
    place-items: center;
    gap: 0.35rem;
    min-height: 2rem;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 0.8rem;
    font-weight: 800;
  }

  .sheet-handle {
    width: 2.6rem;
    height: 0.32rem;
    background: rgba(245, 242, 233, 0.28);
  }

  .control-panel.is-collapsed {
    transform: translateY(calc(100% - 2.8rem));
  }

  .field-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-buttons {
    width: 100%;
  }

  .results-panel,
  .trip-builder-panel {
    top: 0.7rem;
    left: 0.7rem;
    right: 0.7rem;
    display: none;
    width: auto;
    max-height: min(33vh, 16rem);
    max-height: min(33dvh, 16rem);
    overflow-y: auto;
  }

  .planner-page.has-results-panel .results-panel:not([hidden]),
  .planner-page.has-trip-panel .trip-builder-panel {
    display: flex;
  }

  .results-panel {
    bottom: auto;
  }

  .trip-builder-panel {
    top: 0.7rem;
  }

  .planner-page.has-results-panel.has-trip-panel .trip-builder-panel {
    top: calc(min(33vh, 16rem) + 1.4rem);
    top: calc(min(33dvh, 16rem) + 1.4rem);
  }

  .results-list {
    gap: 0.5rem;
  }

  .place-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.7rem;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px transparent;
  }

  .place-card.is-in-trip {
    background:
      linear-gradient(135deg, rgba(143, 209, 158, 0.18), rgba(107, 183, 214, 0.1)),
      rgba(245, 242, 233, 0.06);
    box-shadow: inset 0 0 0 1px rgba(143, 209, 158, 0.58);
  }

  .place-card h3 {
    margin-bottom: 0.15rem;
    font-size: 0.98rem;
  }

  .place-identity p,
  .place-rating,
  .service-badges,
  .place-actions,
  .place-timing .recommendation {
    display: none;
  }

  .place-meta {
    gap: 0.3rem;
  }

  .place-timing {
    display: block;
  }

  .trip-chips {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.05rem;
  }

  .time-chip {
    flex: 1 0 auto;
    min-width: 4.2rem;
    padding: 0.38rem 0.45rem;
  }

  .time-chip span {
    font-size: 0.62rem;
  }
}
