/* ==========================================================================
   place.css — shared styles for /places/<slug>.html (S4)
   Fraunces editorial · warm paper palette · sticky meta sidebar on desktop
   ========================================================================== */

/* ---------- article wrapper ---------------------------------------------- */
.place-spread {
  max-width: 1280px;
  margin-inline: auto;
  padding-block-end: clamp(3rem, 8vw, 6rem);
}

/* ---------- HERO --------------------------------------------------------- */
.place-hero {
  position: relative;
  height: 52vh;
  min-height: 380px;
  max-height: 640px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}
.place-hero picture,
.place-hero picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.place-hero picture::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(15,26,20,0.72) 80%, rgba(15,26,20,0.92) 100%);
}
.place-hero--block .place-hero-block {
  position: absolute;
  inset: 0;
  background: var(--ink);
  overflow: hidden;
}
.place-hero--block .hero-block-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.place-hero--block .place-hero-copy {
  /* Slightly boost legibility over the full-bleed SVG */
  background: linear-gradient(0deg, rgba(15,26,20,0.52) 0%, rgba(15,26,20,0) 72%);
}
/* Map rule: when running from build_place_pages.py, hero block SVG pattern
   acts as azulejo + oversized first-char + bottom-right coord stamp. */

.place-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(0.5rem, 1.5vw, 1rem);
}
.place-hero-copy .eyebrow {
  color: rgba(244, 237, 225, 0.85);
}
.place-hero-copy h1 {
  color: var(--paper);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  align-items: baseline;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.02;
}
.place-hero-copy h1 .latin {
  font-size: 0.5em;
  font-weight: 300;
  font-style: italic;
  opacity: 0.72;
  letter-spacing: -0.01em;
}
.place-hero-copy .lede {
  max-width: 58ch;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.6;
  color: rgba(244, 237, 225, 0.9);
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
}

/* ---------- LAYOUT ------------------------------------------------------- */
.place-layout {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .place-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

/* ---------- META SIDEBAR ------------------------------------------------- */
.place-meta {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  font-size: 0.9375rem;
}
@media (min-width: 900px) {
  .place-meta {
    position: sticky;
    top: 80px;
    order: 2;
  }
}

.place-meta dl {
  display: grid;
  gap: 0.875rem;
}
.place-meta dl > div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--rule);
}
.place-meta dl > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.place-meta dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.65;
  padding-top: 0.125rem;
}
.place-meta dd {
  margin: 0;
  line-height: 1.55;
  word-break: break-word;
}
.place-meta dd a {
  color: var(--moss);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.place-meta dd a:hover { color: var(--accent); }

.meta-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8f4b17 !important;
  text-decoration: none !important;
  margin-left: 0.5rem;
  white-space: nowrap;
}

.warn-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: rgba(193, 58, 58, 0.12);
  color: var(--warn);
  border-radius: 2px;
  font-size: 0.8125rem;
}

/* ---------- VISITED CHECK ------------------------------------------------ */
.visited-check {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.25rem;
  padding: 0.75rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  user-select: none;
  transition: background var(--dur-fast) var(--ease-out);
}
.visited-check:hover { background: #fffaf0; }
.visited-check input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.check-visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: transparent;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.check-visual::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform var(--dur-fast) var(--ease-out);
  margin-top: -2px;
}
.visited-check input:checked ~ .check-visual {
  background: var(--moss);
  border-color: var(--moss);
}
.visited-check input:checked ~ .check-visual::after {
  transform: rotate(-45deg) scale(1);
}
.check-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.check-stamp {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--moss);
  opacity: 0.8;
}

/* ---------- AFFILIATE ---------------------------------------------------- */
.affiliate-block {
  margin-top: 1rem;
  padding: 0.875rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
}
.affiliate-block .eyebrow {
  color: rgba(244, 237, 225, 0.7);
  margin-bottom: 0.5rem;
}
.affiliate-cta {
  display: block;
  padding: 0.625rem 0.75rem;
  background: var(--accent);
  color: #1a1108;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  margin-bottom: 0.5rem;
  text-align: center;
  transition: transform var(--dur-fast), background var(--dur-fast);
}
.affiliate-cta:last-of-type { margin-bottom: 0.625rem; }
.affiliate-cta:hover {
  background: #e68f3f;
  transform: translateY(-1px);
}
.affiliate-block .footnote {
  color: rgba(244, 237, 225, 0.6);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ---------- HERO BADGES -------------------------------------------------- */
.hero-vegan-badge,
.hero-privilege-badge {
  position: absolute;
  top: clamp(0.85rem, 2.5vw, 1.5rem);
  right: clamp(0.85rem, 2.5vw, 1.5rem);
  z-index: 3;
  display: inline-block;
  padding: 0.45rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 2px;
}
.hero-vegan-badge {
  background: var(--moss);
  color: var(--paper);
}
.hero-privilege-badge {
  background: var(--accent);
  color: #1a1108;
}

/* ---------- NARRATIVE ---------------------------------------------------- */
.place-narrative {
  max-width: 72ch;
  font-family: var(--font-body);
}
.narrative-section {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.narrative-no {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #324a38;
  margin: 0 0 0.65rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.narrative-no-num {
  color: #8f4b17;
  font-weight: 700;
  opacity: 1;
}
.narrative-section h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  line-height: 1.1;
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
  display: inline-block;
}

/* callout variants (行前優惠, 公休確認) */
.narrative-section.is-callout {
  position: relative;
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.narrative-section.is-privilege {
  background: rgba(217, 126, 43, 0.06);
  border: 1px dashed rgba(217, 126, 43, 0.55);
  border-radius: 2px;
}
.narrative-section.is-privilege::before {
  content: "✦  Boarding  Pass  ·  Privilege  ✦";
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.narrative-section.is-privilege h2 {
  border-bottom-color: var(--accent);
}
.narrative-section.is-affirm {
  background: rgba(62, 92, 68, 0.06);
  border-left: 3px solid var(--moss);
}
.narrative-section h3 {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  margin: 1.25rem 0 0.5rem;
  line-height: 1.2;
}
.narrative-section h4, .narrative-section h5, .narrative-section h6 {
  font-family: var(--font-body);
  font-weight: 700;
  margin: 1rem 0 0.375rem;
}
.narrative-section p {
  font-size: 1.0625rem;
  line-height: 1.85;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.narrative-section ul,
.narrative-section ol {
  margin: 0.5rem 0 1.25rem 1.25rem;
  padding: 0;
}
.narrative-section ul li,
.narrative-section ol li {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 0.4375rem;
  position: relative;
  padding-left: 1rem;
  list-style: none;
}
.narrative-section ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  top: -0.1em;
  font-weight: 900;
  color: var(--accent);
  font-size: 1.25rem;
}
.narrative-section ol {
  counter-reset: narr;
}
.narrative-section ol li::before {
  counter-increment: narr;
  content: counter(narr) ".";
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
}

.narrative-section a {
  color: var(--moss);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.narrative-section a:hover { color: var(--accent); }

.narrative-section blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: var(--surface);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  line-height: 1.7;
}

.narrative-section code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--surface);
  padding: 0.0625rem 0.3125rem;
  border-radius: 2px;
}

.narrative-section pre {
  background: var(--ink);
  color: var(--paper);
  padding: 1rem;
  border-radius: 2px;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.8125rem;
  line-height: 1.55;
}
.narrative-section pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.narrative-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
}
.narrative-section thead th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.5rem 0.625rem;
  background: var(--ink);
  color: var(--paper);
}
.narrative-section td {
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid var(--rule);
  line-height: 1.5;
}
.narrative-section tbody tr:last-child td { border-bottom: 0; }
.narrative-section tbody tr:nth-child(even) { background: var(--surface); }

.narrative-section hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 1.5rem 0;
}

.narrative-section strong { font-weight: 700; color: var(--ink); }
.narrative-section em { font-style: italic; font-family: var(--font-display); font-weight: 300; }

/* ---------- RELATED ------------------------------------------------------ */
.place-related {
  max-width: 1100px;
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.place-related h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: transform var(--dur-fast), border-color var(--dur-fast);
}
.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.related-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.2;
  margin: 0;
}
.related-card .eyebrow {
  font-size: 0.6875rem;
}
.related-card .related-arrow {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0;
}

/* ---------- site footer (reuse tokens) ---------------------------------- */
.site-footer {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem);
  background: var(--ink);
  color: var(--paper);
}
.site-footer .footer-grid {
  max-width: 1200px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  font-size: 0.8125rem;
  line-height: 1.55;
  opacity: 0.85;
}
.site-footer .footer-affiliate {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.72;
}
.site-footer a {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- PULLQUOTE (editorial) --------------------------------------- */
.place-pullquote {
  margin: clamp(2rem, 5vw, 3rem) 0;
  padding: 0 0 0 clamp(1.25rem, 3vw, 2rem);
  border-left: 3px solid var(--accent);
  max-width: 62ch;
}
.place-pullquote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.place-pullquote cite {
  display: block;
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moss);
}
.place-pullquote cite::before { content: "— "; }

/* ---------- META tel button emphasis ------------------------------------- */
.place-meta dl > div.meta-tel-row dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.place-meta a[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink) !important;
  background: var(--paper);
  padding: 0.35rem 0.6rem 0.35rem 0.6rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  text-decoration: none !important;
  transition: background var(--dur-fast), color var(--dur-fast);
  min-height: 32px;
}
.place-meta a[href^="tel:"]:hover,
.place-meta a[href^="tel:"]:focus-visible {
  background: var(--ink);
  color: var(--paper) !important;
}
.place-meta a[href^="tel:"]::before {
  content: "☎";
  font-size: 0.95em;
  color: var(--accent);
}
.place-meta a[href^="tel:"]:hover::before,
.place-meta a[href^="tel:"]:focus-visible::before {
  color: var(--paper);
}

/* ---------- MOBILE-FIRST RWD refinements -------------------------------- */
@media (max-width: 520px) {
  .place-hero { height: 40vh; min-height: 280px; }
  .place-hero-copy { padding: 1.5rem 1rem; }
  .place-hero-copy h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .place-hero-copy .lede { font-size: 1rem; }

  .place-layout {
    padding-inline: 1rem;
    gap: 1.25rem;
  }
  .place-meta {
    padding: 1rem;
  }
  .place-meta dl { gap: 0.7rem; }
  .place-meta dl > div {
    grid-template-columns: 4rem 1fr;
    gap: 0.5rem;
    padding-bottom: 0.6rem;
  }

  .narrative-section h2 { font-size: 1.4rem; }
  .narrative-section p {
    font-size: 1.0625rem;
    line-height: 1.85;
  }
  .narrative-section ul li,
  .narrative-section ol li {
    font-size: 1rem;
    line-height: 1.75;
  }
  .narrative-section.is-callout {
    padding: 1.15rem 1rem;
  }

  .place-pullquote {
    padding-left: 1rem;
    margin: 2rem 0;
  }
  .place-pullquote blockquote {
    font-size: 1.35rem;
    line-height: 1.4;
  }

  .related-grid { grid-template-columns: 1fr; gap: 0.75rem; }

  .hero-vegan-badge,
  .hero-privilege-badge {
    font-size: 0.62rem;
    padding: 0.35rem 0.6rem;
  }

  /* tables — allow horizontal scroll on narrow screens */
  .narrative-section table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.875rem;
  }
}

/* ---------- print -------------------------------------------------------- */
@media print {
  .site-header, .affiliate-block, .visited-check, .place-related { display: none; }
  .place-hero { height: auto; min-height: 0; max-height: none; color: var(--ink); background: var(--paper); }
  .place-hero picture { display: none; }
  .place-hero-copy { color: var(--ink); }
  .place-hero-copy h1 { color: var(--ink); }
  .place-hero-copy .lede { color: var(--ink); }
  .place-meta { position: static; }
  .hero-vegan-badge, .hero-privilege-badge { display: none; }
  .place-pullquote { break-inside: avoid; }
}
