html[data-jeju-template] {
  --sea: #b94308;
  --orange: #eb741c;
  --ink: #201b18;
  --muted: #645b55;
  --line: #e6d9cd;
  --foam: #fbf7f2;
  --thai-paper: #fffdfa;
  --thai-navy: #142337;
  --thai-size: min(1260px, calc(100% - 72px));
  scroll-padding-top: 24px;
}

html[data-jeju-template] body {
  margin: 0;
  color: var(--ink);
  background: var(--thai-paper);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html[data-jeju-template] :is(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 3px;
}

html[data-jeju-template] .site-header {
  position: relative;
  inset: auto;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

html[data-jeju-template] .site-header .header-inner {
  width: var(--thai-size);
  max-width: none;
  min-height: 0;
  margin-inline: auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: minmax(65px, auto) auto;
  gap: 0;
  align-items: center;
}

html[data-jeju-template] .header-inner > .brand {
  grid-area: 1 / 1;
  width: max-content;
  margin: 0;
}

html[data-jeju-template] .header-inner > .header-utilities {
  grid-area: 1 / 2;
  justify-self: end;
}

html[data-jeju-template] .header-inner > .primary-nav {
  grid-area: 2 / 1 / 3 / 3;
  width: 100%;
  margin: 0;
  min-height: 49px;
  height: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1px 25px;
  align-items: stretch;
  border-top: 1px solid var(--line);
  overflow: visible;
}

html[data-jeju-template] .primary-nav > :is(a, details) {
  flex: 0 0 auto;
}

html[data-jeju-template] .primary-nav > :is(a, details > summary) {
  min-height: 47px;
  padding-inline: 3px;
  font-size: 14px;
}

html[data-jeju-template] .ko-feature-nav .ko-nav-panel {
  border-radius: 4px;
}

html[data-jeju-template] .language-picker > summary {
  min-height: 38px;
  padding-inline: 14px;
  border-radius: 25px;
}

html[data-jeju-template] .language-picker nav > a:is([data-language-link="tw"], [data-language-link="cn"], [data-language-link="hk"], [data-language-link="th"]),
html[data-jeju-template] .language-picker nav > span:is([lang="zh-TW"], [lang="zh-CN"], [lang="zh-HK"], [lang="th"]) {
  display: none;
}

html[data-jeju-template] .page {
  width: var(--thai-size);
  max-width: none;
  margin: 0 auto;
  padding: 30px 0 75px;
}

html[data-jeju-template] .page-intro:not(.hero-copy) {
  padding: 34px 0 28px;
  margin: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

html[data-jeju-template] .page-intro h1 {
  max-width: 27ch;
  margin: 8px 0 13px;
  color: var(--ink);
  font-size: clamp(36px, 5vw, 69px);
  line-height: 1.15;
  letter-spacing: -0.055em;
}

html[data-jeju-template] .page-intro > p:not(.eyebrow) {
  max-width: 75ch;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.8;
}

html[data-jeju-template] .crumbs {
  margin-bottom: 4px;
}

html[data-jeju-template] .crumbs a {
  color: var(--sea);
}

html[data-jeju-template] .quick-answer {
  background: #fff2e5;
  border: 1px solid #f4d1ad;
  border-left: 4px solid var(--orange);
  border-radius: 0 5px 5px 0;
  padding: clamp(15px, 2vw, 26px);
}

html[data-jeju-template] .page-contents {
  background: transparent;
  border: 0;
  border-block: 1px solid var(--line);
  margin-block: 22px 31px;
  padding: 13px 0;
}

html[data-jeju-template] .page-contents :is(a, .toc-group) {
  border-radius: 25px;
}

html[data-jeju-template] .button {
  border-radius: 25px;
  background: var(--sea);
  color: #fff;
  line-height: 1.35;
  min-height: 44px;
}

html[data-jeju-template] .filter-fields :is(input, select) {
  border-radius: 6px;
  background: #fff;
}

html[data-jeju-template] .filter-panel {
  background: #fff;
  border-radius: 6px;
  padding: clamp(15px, 3vw, 28px);
}

html[data-jeju-template] :is(.search-cards, .place-grid, .food-grid, .visitor-plan-grid, .coupon-grid) {
  gap: 22px;
}

html[data-jeju-template] :is(.place-card, .food-item, .visitor-plan-card, .coupon-card) {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

html[data-jeju-template] :is(.place-card, .food-item) {
  padding: 18px;
}

html[data-jeju-template] :is(.place-card, .food-item) .card-photo {
  border-radius: 4px;
  background: #f0e9e2;
}

html[data-jeju-template] :is(.place-card, .food-item) h3 {
  line-height: 1.32;
  letter-spacing: -0.025em;
}

html[data-jeju-template] .guide-section {
  scroll-margin-top: 24px;
  padding-block: 29px;
}

html[data-jeju-template] .guide-section h2 {
  font-size: clamp(24px, 3vw, 35px);
  letter-spacing: -0.04em;
}

html[data-jeju-template] .faq details {
  padding: 14px 17px;
  margin: 8px 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
}

html[data-jeju-template] .faq summary {
  min-height: 28px;
}

html[data-jeju-template] .detail-layout {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 295px);
  gap: clamp(18px, 4vw, 52px);
}

html[data-jeju-template] .detail-layout aside {
  top: 22px;
  border-radius: 7px;
  background: #fff7ed;
}

html[data-jeju-template] .guide-photo {
  max-width: 100%;
  margin: 24px 0;
}

html[data-jeju-template] .guide-photo-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 560px;
  background: #f2eeea;
  border-radius: 6px;
  overflow: hidden;
}

html[data-jeju-template] .guide-photo-media > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

/* Preserve uncropped full frames for CC BY-ND / displayFullFrame photos without empty letterbox bars. */
html[data-jeju-template] .guide-photo-media:has(> img.photo-contain) {
  aspect-ratio: auto;
  max-height: none;
  background: transparent;
  display: flex;
  justify-content: center;
}

html[data-jeju-template] .guide-photo-media > img.photo-contain {
  position: static;
  inset: auto;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  border-radius: 6px;
}

html[data-jeju-template] .card-photo img.photo-contain {
  object-fit: contain;
}

html[data-jeju-template="coast"] .guide-photo-media:not(:has(> img.photo-contain)) {
  max-height: 520px;
}

html[data-jeju-template="culture"] .guide-photo-media:not(:has(> img.photo-contain)) {
  background: #f5ede2;
}

html[data-jeju-template] .guide-photo figcaption {
  font-size: 12px;
}

html[data-jeju-template] .guide-facts {
  background: #fff;
  padding-inline: 16px;
  border-radius: 6px;
}

html[data-jeju-template] .notice {
  background: #fff3e8;
}

html[data-jeju-template="food"] .food-grid .food-item:has(.guide-photo) .guide-photo-media {
  aspect-ratio: 16 / 10;
  max-height: none;
  display: block;
  background: #f2eeea;
}

html[data-jeju-template="food"] .food-grid .food-item:has(.guide-photo) .guide-photo-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
}

html[data-jeju-template="weather"] .visitor-plan-card {
  border-top: 3px solid var(--orange);
  border-radius: 0 0 7px 7px;
}

html[data-jeju-template="transport"] :is(.jump-links, .table-scroll) {
  background: #fff;
  border-radius: 7px;
}

html[data-jeju-template="journey"] :is(.trip-card, .route-ribbon) {
  border-radius: 7px;
}

html[data-jeju-template="listing"] :is(.directory-categories, .jump-links) a {
  border-radius: 25px;
}

html[data-jeju-template="coupons"] .coupon-card {
  border-top: 3px solid var(--orange);
}

html[data-jeju-template] footer {
  background: #302218;
  color: #fff4e8;
}

html[data-jeju-template] footer :is(a, p, small, strong) {
  color: #fff4e8;
}

html[data-jeju-template] footer .footer-contact {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

html[data-jeju-template] footer .footer-contact span {
  display: inline-block;
  font-weight: 700;
  opacity: 0.88;
}

html[data-jeju-template] footer .footer-contact a {
  color: #ffd6af;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

/* Foreign home variants without the Korean journey layout keep the overlaid hero header. */
html[data-jeju-template="home"]:not([data-jeju-journey]) .site-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  background: linear-gradient(180deg, #111c30c9, #111c303b 85%, transparent);
  border: none;
}

html[data-jeju-template="home"]:not([data-jeju-journey]) :is(.primary-nav > a, .primary-nav > details > summary, .header-utilities > a) {
  color: white;
}

html[data-jeju-template="home"]:not([data-jeju-journey]) .header-inner > .brand {
  padding: 4px 11px 4px 4px;
  border-radius: 8px;
  background: #fffdfa;
}

html[data-jeju-template="home"]:not([data-jeju-journey]) .site-header .header-inner > .primary-nav {
  border-color: #ffffff69;
}

html[data-jeju-template="home"]:not([data-jeju-journey]) .primary-nav > details > summary:hover {
  color: var(--ink);
}

html[data-jeju-template="home"]:not([data-jeju-journey]) .language-picker > summary {
  color: white;
  border: 1px solid #ffffff7a;
  background: #111c308f;
}

html[data-jeju-template="home"] .hero-fullbleed .hero-main {
  height: min(750px, max(625px, 83svh));
}

html[data-jeju-template="home"] .hero-fullbleed .hero-shade {
  background: linear-gradient(180deg, #16263730 0%, #111c3064 50%, #101928e6 100%);
}

html[data-jeju-template="home"] .hero-fullbleed .hero-copy {
  position: absolute;
  top: 46%;
  left: 50%;
  right: auto;
  width: min(760px, 87%);
  text-align: center;
  transform: translate(-50%, -45%);
}

html[data-jeju-template="home"] .hero-fullbleed .hero-copy .eyebrow {
  display: inline-flex;
  color: #ffe4c9;
  padding: 5px 14px;
  border: 1px solid #ffcc9b9e;
  border-radius: 25px;
  font-size: 11px;
  letter-spacing: 0.19em;
}

html[data-jeju-template="home"] .hero-fullbleed .hero-copy h1 {
  margin: 24px 0 15px;
  font-size: clamp(42px, 6.15vw, 88px);
  line-height: 1.18;
  letter-spacing: -0.06em;
}

html[data-jeju-template="home"] .hero-fullbleed .hero-copy h1 em {
  color: #ffd6af;
}

html[data-jeju-template="home"] .hero-fullbleed .hero-copy .lead {
  max-width: none;
  margin: 0;
  font-size: clamp(14px, 1.7vw, 18px);
}

html[data-jeju-template="home"] .hero-fullbleed .hero-toolbar {
  width: var(--thai-size);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

html[data-jeju-template="home"] .hero-fullbleed .hero-period-label {
  top: 160px;
  right: max(18px, calc((100% - 1260px) / 2));
}

html[data-jeju-template="home"] .hero-caption {
  margin: 0 auto;
  width: var(--thai-size);
}

@media (max-width: 920px) {
  html[data-jeju-template] {
    --thai-size: calc(100% - 44px);
  }
  html[data-jeju-template] .header-inner > .primary-nav {
    gap: 0 15px;
  }
  html[data-jeju-template] .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-jeju-template] .detail-layout aside {
    position: static;
  }
}

@media (max-width: 600px) {
  html[data-jeju-template] {
    --thai-size: calc(100% - 30px);
  }
  html[data-jeju-template] .site-header .header-inner {
    grid-template-rows: minmax(55px, auto) auto;
  }
  html[data-jeju-template] .header-inner > .primary-nav {
    gap: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  html[data-jeju-template] .primary-nav > :is(a, details > summary) {
    font-size: 11px;
    padding-inline: 2px;
    min-height: 39px;
  }
  html[data-jeju-template] .site-header .ko-nav-panel {
    left: 0;
    right: auto;
    width: min(calc(100vw - 30px), 310px);
    max-width: none;
  }
  html[data-jeju-template] .page {
    padding-top: 18px;
  }
  html[data-jeju-template] .page-intro:not(.hero-copy) {
    padding-top: 18px;
    margin-bottom: 18px;
  }
  html[data-jeju-template] .page-intro h1 {
    font-size: clamp(29px, 9.5vw, 46px);
  }
  html[data-jeju-template="home"] .hero-fullbleed .hero-main {
    height: 735px;
  }
  html[data-jeju-template="home"] .hero-fullbleed .hero-period-label {
    top: 145px;
  }
  html[data-jeju-template="home"] .hero-fullbleed .hero-copy {
    top: 40%;
    width: 91%;
  }
  html[data-jeju-template="home"] .hero-fullbleed .hero-copy h1 {
    font-size: clamp(32px, 9.6vw, 49px);
    margin-block: 18px 12px;
  }
  html[data-jeju-template="home"] .hero-fullbleed .hero-copy .lead {
    font-size: 13px;
  }
  html[data-jeju-template="home"] .hero-fullbleed .hero-copy .lead br {
    display: none;
  }
  html[data-jeju-template="home"] .hero-fullbleed .hero-copy .eyebrow {
    font-size: 9px;
  }
}
