/* Phase 1 opt-in foundations. Not loaded by the existing production templates. */
:root {
  --pe-color-ink: #1f2926;
  --pe-color-forest: #203b32;
  --pe-color-moss: #718477;
  --pe-color-ivory: #f5f1e8;
  --pe-color-paper: #fbfaf6;
  --pe-color-champagne: #c3a879;
  --pe-color-line: rgba(31, 41, 38, .16);
  --pe-font-heading: Georgia, "Times New Roman", "Noto Serif CJK SC", "Yu Mincho", serif;
  --pe-font-body: Arial, "Helvetica Neue", "Noto Sans CJK SC", "Noto Sans KR", sans-serif;
  --pe-text-body: clamp(1rem, .96rem + .2vw, 1.125rem);
  --pe-text-heading: clamp(2.25rem, 1.25rem + 4vw, 5rem);
  --pe-space-1: .25rem;
  --pe-space-2: .5rem;
  --pe-space-3: .75rem;
  --pe-space-4: 1rem;
  --pe-space-6: 1.5rem;
  --pe-space-8: 2rem;
  --pe-space-12: 3rem;
  --pe-space-section: clamp(3rem, 8vw, 7rem);
  --pe-radius-card: 1rem;
  --pe-content-width: 80rem;
  --pe-touch-target: 3rem;
  --pe-focus-ring: 3px solid #203b32;
}
.pe-shell { max-width: var(--pe-content-width); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem); }
.pe-grid { display: grid; gap: var(--pe-space-6); grid-template-columns: minmax(0, 1fr); }
.pe-grid > * { min-width: 0; }
.pe-media { margin: 0; aspect-ratio: var(--pe-media-ratio, 4 / 3); background: var(--pe-color-ivory); overflow: hidden; border-radius: var(--pe-radius-card); }
.pe-media img, .pe-media video, .pe-media iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.pe-action { display: inline-flex; justify-content: center; align-items: center; min-height: var(--pe-touch-target); padding: .75rem 1rem; }
.pe-action:focus-visible, .pe-media a:focus-visible { outline: var(--pe-focus-ring); outline-offset: 4px; }
.pe-mobile-actions { padding-bottom: max(.5rem, env(safe-area-inset-bottom)); }
@media (min-width: 48rem) { .pe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 75rem) { .pe-grid[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .pe-media { scroll-behavior: auto; } }

/* Reuse the home's two existing families. No font download or desktop override. */
@media (max-width: 900px) {
  body {
    --pe-mobile-display: var(--serif, var(--pe-font-heading));
    --pe-mobile-soft: var(--sans, var(--pe-font-body));
    --pe-mobile-tracking: -.025em;
    --pe-mobile-section-gap: 48px;
  }
  /* The actual home promo uses this regular sans family. CJK display copy
     follows that readable treatment instead of small synthetic serif strokes. */
  html:lang(ko) body, html:lang(ja) body, html:lang(zh-CN) body {
    --pe-mobile-display: var(--pe-mobile-soft);
    --pe-mobile-tracking: -.025em;
  }
  html:lang(ko) body { --pe-mobile-soft: Arial, "Helvetica Neue", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", sans-serif; }
  html:lang(ja) body { --pe-mobile-soft: Arial, "Helvetica Neue", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif; }
  html:lang(zh-CN) body { --pe-mobile-soft: Arial, "Helvetica Neue", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", sans-serif; }
  :is(.menu-page, .seo-page, .pe-booking-page) { font-family: var(--pe-mobile-soft); }
  :where(.menu-page, .seo-page, .pe-booking-page) :where(h1,h2,h3,p,li,dd,a) { overflow-wrap: anywhere; }
  html:lang(ko) :where(.menu-page, .seo-page, .pe-booking-page) :where(h1,h2,h3,p,li,dd) { word-break: keep-all; }
  html:lang(ja) :where(.menu-page, .seo-page, .pe-booking-page), html:lang(zh-CN) :where(.menu-page, .seo-page, .pe-booking-page) { line-break: strict; word-break: normal; }
}

/* Phase 2A.1: mobile presentation only. Home hero and >=901px stay untouched. */
@media (max-width: 900px) {
  body[data-pe-home] .pe-mobile-services > h2 {
    font: 400 clamp(29px, 7.6vw, 38px)/1.22 var(--pe-mobile-display);
    letter-spacing: var(--pe-mobile-tracking); color: #203b32;
    margin: 0 0 12px; text-wrap: balance;
  }
  .pe-mobile-services { gap: 14px; }
  .pe-service { padding: 12px; gap: 18px; grid-template-columns: 92px minmax(0,1fr); border-color: #e5e4d9; border-radius: 20px; background: #f3f1e9; }
  .pe-service picture { min-height: 122px; border-radius: 13px; }
  .pe-service > div { padding: 6px 4px 6px 0; }
  body[data-pe-home] .pe-service h3 { font: 400 18px/1.4 var(--pe-mobile-soft); letter-spacing: -.025em; margin: 0 0 14px; padding-right: 18px; overflow-wrap: anywhere; text-wrap: pretty; }
  .pe-service li { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; gap: 8px; min-height: 25px; font: 400 12px/1.6 var(--pe-mobile-soft); }
  .pe-service strong { justify-self: end; font: 600 14px/1.6 var(--pe-mobile-soft); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em; }
  .pe-service small { font-size: 10px; letter-spacing: 0; }
  .pe-service-arrow { top: 17px; right: 14px; display: grid; place-items: center; width: 18px; height: 18px; }
  .pe-service-arrow svg { width: 18px; height: 18px; transform: rotate(-45deg); }
  .pe-service:active { background: #e8ecdf; border-color: #81927e; }
  .pe-all-services { min-height: 54px; border-radius: 16px; padding: 14px 18px; font: 500 14px/1.5 var(--pe-mobile-soft); letter-spacing: 0; }
  .pe-all-services:active { background: #304d40; }
  /* Existing mobile home sections keep their information and image sources. */
  body[data-pe-home] :is(.booking-grid,.visit-grid) h2 { font-family: var(--pe-mobile-display); font-weight: 400; line-height: 1.22; letter-spacing: var(--pe-mobile-tracking); }
  body[data-pe-home] .booking-grid strong { font: 400 20px/1.4 var(--pe-mobile-soft); letter-spacing: -.02em; }
  body[data-pe-home] .booking-grid span { font: 400 14px/1.75 var(--pe-mobile-soft); }
  body[data-pe-home] .visit-grid dd { min-width: 0; overflow-wrap: anywhere; }
  body[data-pe-home] :is(.booking-section,.visit-section) .button { border-radius: 16px; font: 500 13px/1.5 var(--pe-mobile-soft); letter-spacing: 0; text-transform: none; }

  :is(.menu-page,.seo-page) { background: #fbfaf6; }
  :is(.menu-page,.seo-page) :focus-visible { outline: 3px solid #718477; outline-offset: 4px; }
  .seo-container, .menu-page .container { width: calc(100% - 40px); }
  :is(.seo-hero h1,.seo-section h2,.menu-hero h1,.menu-category h2,.menu-final-cta h2) {
    font-family: var(--pe-mobile-display); font-weight: 400; line-height: 1.18;
    letter-spacing: var(--pe-mobile-tracking); text-wrap: balance;
  }
  .seo-header-inner { gap: 12px; min-height: 78px; }
  .seo-brand { font-size: 1.15rem; }
  .seo-brand small { font-size: 8px; letter-spacing: .12em; }
  .seo-nav { gap: 0; }
  .seo-lang { gap: 0; }
  .seo-lang a { display: grid; place-items: center; min-width: 44px; min-height: 48px; font-size: 12px; font-weight: 400; }
  .seo-nav .seo-book { display: none; }
  .seo-hero { min-height: 0; border-radius: 0 0 26px 26px; }
  .seo-hero:after { background: linear-gradient(180deg,#102b1f80,#102b1fe6); }
  .seo-hero-copy { max-width: 680px; padding-block: 40px; }
  .seo-breadcrumb { font-size: 12px; line-height: 1.6; margin-bottom: 30px; }
  .seo-eyebrow { font-size: 10px; font-weight: 500; letter-spacing: .1em; }
  .seo-hero h1 { font-size: clamp(34px,8.7vw,52px); margin: 18px 0; }
  .seo-hero p { font-size: 15px; line-height: 1.75; }
  .seo-hero .seo-note { background: transparent; color: #f5f1e8; border: 0; border-block: 1px solid #ffffff38; padding: 14px 0; margin: 24px 0 0; font-size: 13px; }
  .seo-actions { gap: 10px; margin-top: 24px; }
  .seo-button { min-height: 50px; border-radius: 14px; padding: 12px 16px; font: 500 14px/1.5 var(--pe-mobile-soft); letter-spacing: 0; }
  .seo-hero .seo-actions { display: grid; grid-template-columns: 1fr; }
  .seo-hero .seo-actions > :last-child { border-color: transparent; text-decoration: underline; text-underline-offset: 5px; }
  .seo-section { padding-block: var(--pe-mobile-section-gap); }
  .seo-section.alt { background: #f5f1e8; }
  .seo-section h2 { font-size: clamp(28px,7.2vw,38px); margin: 0 0 20px; }
  .seo-section p, .seo-section li { font-size: 15px; line-height: 1.8; }
  .seo-lead { max-width: 58ch; }
  .seo-facts,.seo-card-grid,.seo-link-grid { gap: 14px; margin-top: 26px; }
  .seo-fact,.seo-card,.seo-link-card { padding: 24px 22px; border: 1px solid #203b3224; border-radius: 20px; background: #fbfaf6; min-width: 0; }
  .seo-fact strong { font: 400 28px/1.25 var(--pe-mobile-display); letter-spacing: -.025em; }
  .seo-fact span { font-size: 14px; }
  .seo-card h3,.seo-link-card h3 { font: 400 23px/1.35 var(--pe-mobile-display); letter-spacing: -.02em; }
  .seo-link-card { text-decoration: none; }
  .seo-card p, .seo-link-card p { margin: 12px 0 0; }
  .seo-price-list li { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding-block: 12px; font-size: 13px; }
  .seo-price-list strong { justify-self: end; font: 600 14px/1.8 var(--pe-mobile-soft); font-variant-numeric: tabular-nums; }
  .seo-note { border-radius: 0 14px 14px 0; padding: 18px; }
  .seo-section .seo-note { font-size: 13px; line-height: 1.75; }
  .seo-faq summary { font: 400 18px/1.5 var(--pe-mobile-soft); padding-block: 8px; min-height: 48px; }
  .seo-contact-grid { gap: 40px; }
  .seo-contact-grid dd { font-size: 15px; }
  .seo-contact-grid dt { font-size: 11px; letter-spacing: .03em; }
  .seo-contact-grid a[href^="tel:"], .seo-contact-grid a[href^="mailto:"] { display: inline-flex; align-items: center; min-height: 44px; }
  .seo-map-links { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .seo-inline-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
  .seo-footer nav a { display: flex; align-items: center; min-height: 44px; }
  .seo-mobile-actions { padding-bottom: env(safe-area-inset-bottom); }
  .seo-mobile-actions a { min-height: 56px; display: grid; place-items: center; font: 500 12px/1.4 var(--pe-mobile-soft); }

  .menu-header { padding-inline: 20px; gap: 12px; min-height: 84px; }
  .menu-header-actions { gap: 8px; }
  .menu-header .menu-toggle, .menu-language .language-current { width: 48px; min-height: 48px; }
  .menu-header .language-current { width: auto; min-width: 62px; }
  .menu-language .language-options button { min-height: 48px; }
  body[data-pe-home] .language-options button { color: #203b32; }
  body[data-pe-home] .language-options button:is(:hover,:focus-visible,[aria-selected=true]) { background: #dce6dd; }
  .menu-header .brand span { font-size: 32px; }
  .menu-hero { min-height: 0; border-radius: 0 0 26px 26px; }
  .menu-hero-copy { padding-block: 54px 42px; }
  .menu-hero-copy h1 { font-size: clamp(36px,9vw,56px); line-height: 1.2; margin: 18px 0; }
  .menu-hero-copy>p:not(.eyebrow) { font-size: 15px; line-height: 1.75; }
  .menu-hero-actions { gap: 10px; margin-top: 26px; }
  .menu-page .button { min-height: 50px; border-radius: 14px; font: 500 14px/1.5 var(--pe-mobile-soft); letter-spacing: 0; text-transform: none; }
  .menu-anchor-nav>div { padding-block: 8px; margin-inline: 20px; }
  .menu-anchor-nav a { min-height: 44px; font: 500 12px/1.4 var(--pe-mobile-soft); letter-spacing: 0; text-transform: none; }
  .menu-intro { padding-block: 30px 0; }
  .menu-intro p { font: 400 17px/1.75 var(--pe-mobile-soft); color: #536257; }
  .menu-category { padding: 48px 20px; scroll-margin-top: 76px; }
  .menu-category-head { gap: 24px; margin-bottom: 24px; grid-template-columns: 1fr; }
  .menu-category-head h2 { font-size: clamp(30px,7.8vw,42px); margin: 12px 0; }
  .menu-category .eyebrow { color: #74603c; letter-spacing: .08em; font-weight: 500; }
  .menu-category-subtitle { font-size: 14px; line-height: 1.8; color: #536257; }
  .menu-category-image { max-width: none; aspect-ratio: 16/10; border-radius: 20px; }
  .menu-grid { grid-template-columns: 1fr; gap: 14px; }
  .menu-card { padding: 26px 22px; border-radius: 20px; background: #fbfaf6; box-shadow: none; }
  .menu-card h3 { font: 400 21px/1.4 var(--pe-mobile-soft); letter-spacing: -.025em; text-wrap: pretty; }
  .menu-card > p { font: 400 14px/1.8 var(--pe-mobile-soft); color: #536257; margin-block: 14px 22px; }
  .menu-card dt { font: 400 11px/1.6 var(--pe-mobile-soft); color: #536257; letter-spacing: 0; }
  .menu-card dl>div { display: block; }
  .menu-card dd { margin-top: 12px; }
  .menu-card li { justify-content: space-between; gap: 12px; white-space: normal; font: 400 13px/1.9 var(--pe-mobile-soft); }
  .menu-card li strong { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .signature-badge { font: 500 10px/1.4 var(--pe-mobile-soft); letter-spacing: .06em; color: #74603c; }
  .menu-final-cta { padding-block: 48px; }
  .menu-final-cta-inner { padding: 28px 22px; border-radius: 22px; grid-template-columns: 1fr; gap: 24px; }
  .menu-final-cta h2 { font-size: clamp(30px,7.8vw,42px); }
  .menu-final-cta p { font-size: 14px; line-height: 1.8; color: #e1e4d9; }
  .menu-final-cta-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .menu-footer a { min-height: 44px; }
  .menu-page .consent-btn { border-radius: 12px; font: 500 12px/1.5 var(--pe-mobile-soft); letter-spacing: 0; text-transform: none; }
  .pe-booking-page main { padding: 32px 24px; border: 1px solid #ffffff30; border-radius: 26px; background: #203b32; }
  .pe-booking-page h1 { font: 400 clamp(28px,7.5vw,38px)/1.3 var(--pe-mobile-display); letter-spacing: -.025em; }
  .pe-booking-page .hint { line-height: 1.8; color: #e1e4d9; }
  .pe-booking-page .button { border-radius: 14px; font: 500 14px/1.5 var(--pe-mobile-soft); letter-spacing: 0; text-transform: none; }
  @media (min-width: 600px) {
    .pe-service { padding: 14px; }
    .pe-service picture { height: 144px; }
    .pe-service > div { padding: 4px; }
    .pe-service-arrow { top: auto; bottom: 16px; }
    .menu-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .seo-hero .seo-actions { grid-template-columns: 1fr 1fr; }
    .seo-hero .seo-actions > :last-child { grid-column: 1/-1; }
  }
  @media (hover: hover) {
    .pe-service:hover { border-color: #81927e; background: #eeeee4; }
  }
}
