:root {
  --page-bg: #eaf8fb;
  --page-bg-warm: #fff3e4;
  --surface: #ffffff;
  --surface-strong: #fffaf2;
  --text: #1d2935;
  --muted: #5e6b76;
  --line: #d8e7ea;
  --accent: #f56f3a;
  --accent-dark: #c84e23;
  --sea: #168a9c;
  --feature-title: #0f6573;
  --feature-copy: #495b66;
  --shadow: 0 10px 26px rgba(31, 77, 92, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 243, 228, 0.8) 0%, rgba(234, 248, 251, 0.94) 38%, var(--page-bg) 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.detail-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}

.detail-header-inner {
  display: flex;
  justify-content: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px;
}

.logo-link {
  display: inline-block;
  width: min(390px, 82vw);
}

.logo-link img {
  width: 100%;
  height: auto;
}

.detail-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 34px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-bottom: 14px;
  padding: 9px 13px;
  border: 2px solid rgba(22, 138, 156, 0.18);
  border-radius: var(--radius);
  background: #eaf8fb;
  box-shadow: 0 3px 0 #c9e3e8;
  color: var(--sea);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 900;
  text-decoration: none;
}

.back-link:focus-visible {
  outline: 3px solid rgba(245, 111, 58, 0.45);
  outline-offset: 3px;
}

.back-link.is-pressing,
.back-link:active {
  box-shadow: inset 0 2px 5px rgba(4, 70, 80, 0.2);
}

@media (hover: hover) {
  .back-link:hover {
    border-color: rgba(22, 138, 156, 0.34);
    background: #dff5f9;
  }
}

.back-link.is-hovered {
  border-color: rgba(22, 138, 156, 0.34);
  background: #dff5f9;
}

.detail-hero {
  display: grid;
  gap: 18px;
}

.detail-photo-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

body[data-detail-type="drink"] .detail-photo-wrap {
  width: min(100%, 520px);
  justify-self: center;
}

body[data-detail-type="drink"] .detail-photo {
  aspect-ratio: 4 / 5;
  padding: 8px;
  object-fit: contain;
  background: #f4fafb;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 18px;
  background:
    linear-gradient(135deg, #f9e5ce 0%, #f8fdfd 100%);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
}

.detail-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: var(--sea);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.detail-copy h1,
.ingredients-section h2,
.notice-section h2 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

.detail-copy h1 {
  color: var(--feature-title);
  font-size: 2rem;
  font-weight: 900;
}

.detail-description,
.detail-updated,
.notice-section p,
.ingredient-card p {
  margin: 0;
}

.detail-description {
  color: var(--feature-copy);
  font-size: 1.02rem;
  font-weight: 500;
}

.detail-price {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1.75rem;
  font-weight: 1000;
  line-height: 1;
}

.summary-box {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid rgba(245, 111, 58, 0.18);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.summary-box strong {
  color: var(--accent-dark);
}

.summary-box p {
  margin: 0;
  color: var(--feature-copy);
  font-size: 0.96rem;
  font-weight: 500;
}

.detail-updated {
  padding-top: 8px;
  border-top: 1px solid rgba(22, 138, 156, 0.2);
  color: var(--feature-title);
  font-size: 0.86rem;
  font-weight: 700;
}

.ingredients-section {
  display: grid;
  gap: 14px;
  padding-top: 26px;
}

.ingredients-heading,
.contents-section {
  display: grid;
  gap: 4px;
}

.ingredients-section h2,
.contents-section h2,
.notice-section h2 {
  font-size: 1.45rem;
}

.ingredients-grid {
  display: grid;
  gap: 12px;
}

.ingredient-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(31, 77, 92, 0.09);
}

.ingredient-swatch {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 2px solid rgba(29, 41, 53, 0.12);
  border-radius: 999px;
  background: var(--sea);
}

.ingredient-swatch.is-sea { background: #168a9c; }
.ingredient-swatch.is-blue { background: #5d8aa8; }
.ingredient-swatch.is-brown { background: #8d4a35; }
.ingredient-swatch.is-crimson { background: #c92f43; }
.ingredient-swatch.is-gold { background: #d6a35f; }
.ingredient-swatch.is-rose { background: #d75871; }
.ingredient-swatch.is-orange-red { background: #e95b24; }
.ingredient-swatch.is-salmon { background: #e96654; }
.ingredient-swatch.is-coral { background: #ef7a54; }
.ingredient-swatch.is-amber { background: #f0a629; }
.ingredient-swatch.is-yellow { background: #f4c95d; }
.ingredient-swatch.is-cream { background: #f4d9a5; }
.ingredient-swatch.is-accent { background: #f56f3a; }

.ingredient-card h3 {
  margin: 0 0 3px;
  color: var(--feature-title);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.25;
}

.ingredient-card p {
  color: var(--feature-copy);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.45;
}

.contents-section {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(22, 138, 156, 0.16);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(31, 77, 92, 0.08);
}

.contents-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.contents-list li {
  padding: 7px 10px;
  border: 1px solid rgba(22, 138, 156, 0.18);
  border-radius: var(--radius);
  background: #eaf8fb;
  color: #263745;
  font-size: 0.92rem;
  font-weight: 900;
}

.notice-section {
  display: grid;
  gap: 8px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 3px solid rgba(22, 138, 156, 0.25);
}

.notice-section p {
  color: #263745;
  font-size: 0.98rem;
  font-weight: 850;
}

.detail-footer {
  padding: 18px 16px 30px;
  background: var(--surface-strong);
  color: var(--muted);
  text-align: center;
}

.detail-footer p {
  margin: 0;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.34s ease,
    transform 0.34s ease;
  transition-delay: 0ms;
  will-change: opacity, transform;
}

.ingredient-card[data-reveal-order="1"] { transition-delay: 45ms; }
.ingredient-card[data-reveal-order="2"] { transition-delay: 90ms; }
.ingredient-card[data-reveal-order="3"] { transition-delay: 135ms; }
.ingredient-card[data-reveal-order="4"] { transition-delay: 180ms; }
.ingredient-card[data-reveal-order="5"] { transition-delay: 225ms; }
.ingredient-card[data-reveal-order="6"] { transition-delay: 270ms; }

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

@media (min-width: 760px) {
  .detail-header-inner {
    padding-block: 20px;
  }

  .logo-link {
    width: 430px;
  }

  .detail-page {
    padding-top: 24px;
  }

  .detail-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: 28px;
  }

  .detail-copy h1 {
    font-size: 3rem;
  }

  .detail-price {
    font-size: 2.05rem;
  }

  .ingredients-section h2,
  .contents-section h2,
  .notice-section h2 {
    font-size: 2rem;
  }

  .ingredients-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

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

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
