:root {
  --bg-cream: #f6f0e4;
  --bg-warm: #efe6d3;
  --card-bg: #fff9ec;
  --card-border: #e3d7be;
  --text-primary: #3f352b;
  --text-secondary: #5a4f43;
  --button-bg: #fff9ec;
  --button-border: #dccfb3;
  --button-text: #4a4033;
  --shadow-soft: 0 8px 24px rgba(58, 40, 20, 0.08);
  --radius-card: 16px;
  --radius-btn: 14px;
  --accent-highline: #ddeccf;
  --accent-little-island: #d5e8d8;
  --accent-broadway: #f3d6d6;
  --accent-ferry: #d6e3f3;
  --accent-dumbo: #e3d8f1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 255, 255, 0.26), transparent 40%),
    radial-gradient(circle at 84% 88%, rgba(255, 255, 255, 0.2), transparent 44%),
    linear-gradient(160deg, var(--bg-cream), var(--bg-warm));
}

.grain {
  /* Paper grain overlay for a subtle textured look. */
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.2;
  background:
    repeating-linear-gradient(10deg, rgba(110, 89, 63, 0.03) 0 1px, rgba(255, 255, 255, 0.05) 1px 3px),
    repeating-linear-gradient(104deg, rgba(120, 98, 69, 0.02) 0 1px, rgba(255, 255, 255, 0.06) 1px 4px);
}

.outing-page {
  position: relative;
  z-index: 1;
  width: min(980px, 94vw);
  margin: 24px auto 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.top-row {
  display: flex;
  justify-content: flex-start;
}

.back-button {
  min-height: 48px;
  padding: 10px 16px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--button-text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.back-button:hover {
  transform: translateY(-2px);
  background: #fbf1da;
}

.header-card,
.preview-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.header-card {
  padding: 18px 20px;
  text-align: center;
}

h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 700;
  color: var(--text-primary);
}

.subtitle {
  margin: 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.6;
}

.places {
  /* Desktop layout: 3 buttons in row one, remaining buttons flow to row two. */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.place-button {
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--button-text);
  font: inherit;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(58, 40, 20, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.place-button:hover {
  transform: translateY(-2px);
  background: #f7ecd4;
}

.place-button[data-place="highline"].active {
  background: var(--accent-highline);
}

.place-button[data-place="little_island"].active {
  background: var(--accent-little-island);
}

.place-button[data-place="broadway"].active {
  background: var(--accent-broadway);
}

.place-button[data-place="ferry"].active {
  background: var(--accent-ferry);
}

.place-button[data-place="dumbo"].active {
  background: var(--accent-dumbo);
}

.place-button.active {
  box-shadow: 0 8px 18px rgba(58, 40, 20, 0.14);
}

.place-button:focus-visible,
.back-button:focus-visible {
  outline: 2px solid #8a7352;
  outline-offset: 2px;
}

.preview-card {
  /* Image preview container with placeholder/error support. */
  min-height: 320px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.placeholder,
.error-text {
  margin: 0;
  color: var(--text-secondary);
  text-align: center;
}

.preview-image {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 250ms ease, transform 250ms ease;
}

.preview-image.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .outing-page {
    gap: 20px;
    margin-top: 16px;
  }

  h1 {
    font-size: clamp(1.7rem, 8vw, 2.3rem);
  }

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

  .preview-card {
    min-height: 260px;
  }

  .preview-image {
    max-height: 420px;
  }
}
