/**
 * 스테이럭스 매거진 (STAYLUXE Journal - 여행 콘텐츠: 큐레이션 · 여행후기 · 인터뷰 · 매거진)
 * - 목록 : /stayluxe/magazine        (templates/site/stayluxe/magazine/list.html)
 * - 상세 : /stayluxe/magazine/{tcIdx} (templates/site/stayluxe/magazine/view.html)
 * - 톤 : 블랙 히어로 + 화이트 본문, 스테이럭스 블루(--primary-color)는 가는 포인트로만 사용
 * - 영문 디스플레이 : Cormorant Garamond (페이지 head 에서 로드)
 * - 슬라이더 : Swiper 11 (stayluxe-layout 에서 로드)
 */

.slm {
  --slm-serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --slm-ink: #0d0d0f;
  --slm-ink-2: #17171a;
  --slm-text: #1f1f22;
  --slm-text-2: #5f5f66;
  --slm-text-3: #9a9aa2;
  --slm-line: #e6e6ea;
  --slm-paper: #f7f7f5;
  --slm-on-dark: #f4f4f2;
  --slm-on-dark-2: rgba(244, 244, 242, 0.68);
  --slm-on-dark-3: rgba(244, 244, 242, 0.4);
  --slm-line-dark: rgba(255, 255, 255, 0.14);
  --slm-accent: var(--primary-color, #3b82f6);
  --slm-accent-light: var(--primary-light, #60a5fa);
  --slm-measure: 720px;
  --slm-wide: 1280px;
  --slm-gutter: 4%;
  --slm-gap: clamp(3.5rem, 7vw, 6.5rem);
  --slm-ease: cubic-bezier(0.25, 0.8, 0.25, 1);

  margin-top: var(--sl-header-h, 64px);
  background: #fff;
  color: var(--slm-text);
  font-family: 'NanumBarunGothic', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

.slm a { color: inherit; text-decoration: none; }
.slm img { display: block; max-width: 100%; }
.slm figure { margin: 0; }

.slm-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--slm-gutter);
}

.slm-measure {
  width: 100%;
  max-width: calc(var(--slm-measure) + var(--slm-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--slm-gutter);
}

.slm-wide {
  width: 100%;
  max-width: calc(var(--slm-wide) + var(--slm-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--slm-gutter);
}

.slm-arrow { display: inline-block; width: 18px; height: 1px; background: currentColor; position: relative; transition: width 0.25s ease; }
.slm-arrow::after { content: ''; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }

.slm-preview-bar {
  background: var(--slm-accent);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.6rem var(--slm-gutter);
}

/* 읽기 진행 표시 (헤더 바로 아래) */
.slm-progress {
  position: fixed;
  left: 0;
  top: var(--sl-header-h, 64px);
  z-index: 999;
  width: 100%;
  height: 2px;
  background: var(--slm-accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ==========================================================
   1. 상세 - 히어로 (가운데 정렬 에디토리얼)
   ========================================================== */
.slm-hero {
  position: relative;
  min-height: calc(min(92vh, 920px) - var(--sl-header-h, 64px));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--slm-ink);
  color: var(--slm-on-dark);
  text-align: center;
}

.slm-hero picture, .slm-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.slm-hero-img { object-fit: cover; transform: scale(1.05); animation: slmHeroIn 2.6s var(--slm-ease) forwards; }
@keyframes slmHeroIn { to { transform: scale(1); } }

.slm-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(13, 13, 15, 0.82) 0%, rgba(13, 13, 15, 0.5) 45%, rgba(13, 13, 15, 0.1) 80%),
    linear-gradient(0deg, rgba(13, 13, 15, 0.7) 0%, rgba(13, 13, 15, 0) 55%);
}

.slm-hero-inner {
  position: relative;
  width: 100%;
  max-width: 1040px;
  padding: 7rem var(--slm-gutter) clamp(3.5rem, 7vw, 6rem);
}

.slm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--slm-on-dark-2);
}

.slm-kicker::before, .slm-kicker::after { content: ''; width: 36px; height: 1px; background: var(--slm-accent-light); }
.slm-kicker b { color: #fff; font-weight: 700; }

.slm-title {
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.slm-subtitle {
  max-width: 760px;
  margin: 1.4rem auto 0;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.8;
  color: var(--slm-on-dark-2);
}

.slm-byline {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  color: var(--slm-on-dark-2);
}

.slm-byline em { font-family: var(--slm-serif); font-style: italic; font-size: 1.15rem; color: #fff; }
.slm-byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--slm-accent-light); }

.slm-hero.is-plain { min-height: 0; background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%); }
.slm-hero.is-plain .slm-hero-inner { padding-top: 6rem; padding-bottom: 5rem; }

/* ==========================================================
   2. 상세 - 본문
   ========================================================== */
.slm-article { padding-bottom: var(--slm-gap); }

.slm-lead {
  padding-top: var(--slm-gap);
  font-size: clamp(1.1rem, 1.7vw, 1.32rem);
  line-height: 2.05;
  letter-spacing: -0.01em;
  color: var(--slm-text);
}

.slm-lead p::first-letter {
  float: left;
  margin: 0.16em 0.65rem 0 0;
  font-family: var(--slm-serif);
  font-size: 4.4em;
  font-weight: 600;
  line-height: 0.82;
  color: var(--slm-ink);
}

.slm-lead::after {
  content: '';
  display: block;
  clear: both;
  width: 56px;
  height: 1px;
  margin: 3rem auto 0;
  background: var(--slm-accent);
}

.slm-block { padding-top: var(--slm-gap); }

.slm-text {
  font-size: 1.0625rem;
  line-height: 2.05;
  letter-spacing: -0.01em;
  color: #3b3b40;
}

/* TITLE : 가운데 정렬 챕터 */
.slm-chapter-head { text-align: center; margin-bottom: 2.6rem; }

.slm-chapter-no {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  font-family: var(--slm-serif);
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: 2px;
  color: var(--slm-text-2);
}

.slm-chapter-no::before, .slm-chapter-no::after { content: ''; width: 44px; height: 1px; background: var(--slm-accent); }
.slm-chapter-no b { font-size: 2.6rem; font-style: normal; font-weight: 500; letter-spacing: 0; color: var(--slm-ink); }

.slm-chapter-title {
  margin-top: 1rem;
  font-size: clamp(1.55rem, 2.8vw, 2.3rem);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.03em;
}

.slm-chapter .slm-text { margin-bottom: 2.6rem; }

/* BODY : 소제목 */
.slm-body-title {
  margin-bottom: 1.3rem;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
  padding-left: 1rem;
  border-left: 2px solid var(--slm-accent);
}

.slm-body .slm-measure + .slm-gallery { margin-top: 2.8rem; }

/* 이미지 + 캡션 */
.slm-figure img { width: 100%; height: auto; background: var(--slm-paper); }

.slm-figure figcaption {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--slm-text-3);
  text-align: center;
}

.slm-wide-list { display: grid; gap: 2.2rem; }

.slm-gallery { display: grid; gap: clamp(0.75rem, 1.4vw, 1.25rem); }
.slm-gallery.is-single { max-width: calc(1080px + var(--slm-gutter) * 2); }
.slm-gallery.is-pair { grid-template-columns: repeat(2, 1fr); align-items: start; }
.slm-gallery.is-pair .slm-figure img { aspect-ratio: 4 / 5; object-fit: cover; }

.slm-gallery.is-grid { grid-template-columns: repeat(3, 1fr); }
.slm-gallery.is-grid .slm-figure { position: relative; overflow: hidden; }
.slm-gallery.is-grid .slm-figure img { aspect-ratio: 1 / 1; height: 100%; object-fit: cover; transition: transform 1.2s var(--slm-ease); }
.slm-gallery.is-grid .slm-figure:first-child { grid-column: span 2; grid-row: span 2; }
.slm-gallery.is-grid .slm-figure:first-child img { aspect-ratio: auto; }
.slm-gallery.is-grid .slm-figure:hover img { transform: scale(1.04); }

.slm-gallery.is-grid figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 2.2rem 1rem 0.8rem;
  background: linear-gradient(0deg, rgba(13, 13, 15, 0.72), rgba(13, 13, 15, 0));
  color: var(--slm-on-dark);
  font-size: 0.8rem;
  text-align: left;
}

/* 동영상 */
.slm-video { position: relative; aspect-ratio: 16 / 9; background: var(--slm-ink); margin-bottom: 2.4rem; }
.slm-video iframe, .slm-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 블록 링크 버튼 */
.slm-cta-wrap { margin-top: 2.4rem; }
.slm-chapter .slm-cta-wrap { text-align: center; }

.slm-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  height: 50px;
  padding: 0 1.8rem;
  border: 1px solid var(--slm-ink);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--slm-ink);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.slm-cta:hover { background: var(--slm-ink); color: #fff; }
.slm-cta:hover .slm-arrow { width: 26px; }

/* SLIDE : 블랙 밴드 + Swiper (가운데 슬라이드 + 양옆 미리보기) */
.slm-slide-sec {
  margin-top: var(--slm-gap);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
  background: var(--slm-ink);
  color: var(--slm-on-dark);
}

.slm-slide-sec .slm-body-title { color: #fff; }
.slm-slide-sec .slm-text { color: var(--slm-on-dark-2); }
.slm-slide-sec .slm-measure { margin-bottom: 2.8rem; }
.slm-slide-sec .slm-cta { color: #fff; border-color: var(--slm-on-dark-3); }
.slm-slide-sec .slm-cta:hover { background: #fff; color: var(--slm-ink); border-color: #fff; }

.slm-swiper { overflow: hidden; }
.slm-swiper .swiper-slide { width: min(72vw, 1180px); transition: opacity 0.5s ease; }
.slm-swiper .swiper-slide:not(.swiper-slide-active) { opacity: 0.35; }
.slm-swiper.is-single .swiper-slide { opacity: 1; }

.slm-swiper .swiper-slide img {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 78vh;
  object-fit: cover;
  background: var(--slm-ink-2);
}

.slm-slider-ui {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.6rem;
}

.slm-slider-count { font-family: var(--slm-serif); font-size: 1rem; letter-spacing: 2px; color: var(--slm-on-dark-3); white-space: nowrap; }
.slm-slider-count b { font-size: 1.9rem; font-weight: 500; color: #fff; }
.slm-slider-caption { min-height: 1.6em; font-size: 0.85rem; line-height: 1.6; color: var(--slm-on-dark-2); text-align: center; }
.slm-slider-nav { display: flex; gap: 0.6rem; }

.slm-slider-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid var(--slm-line-dark);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.slm-slider-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.slm-slider-prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.slm-slider-next::before { transform: translate(-70%, -50%) rotate(45deg); }
.slm-slider-btn:hover { background: var(--slm-accent); border-color: var(--slm-accent); }
.slm-slider-btn.swiper-button-disabled { opacity: 0.3; pointer-events: none; }

/* 해시태그 */
.slm-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; padding-top: var(--slm-gap); }
.slm-tags span { padding: 0.45rem 1rem; border: 1px solid var(--slm-line); border-radius: 999px; font-size: 0.8rem; color: var(--slm-text-2); }

/* ==========================================================
   3. 상세 - 하단 (IN THIS STORY / MORE STORIES)
   ========================================================== */
.slm-sec-head { text-align: center; margin-bottom: 2.8rem; }
.slm-sec-head .en { display: block; font-family: var(--slm-serif); font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 500; font-style: italic; line-height: 1.1; }
.slm-sec-head .ko { display: inline-block; margin-top: 0.7rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 4px; color: var(--slm-text-3); }

.slm-story-links { padding: var(--slm-gap) 0; background: var(--slm-paper); }

.slm-link-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 2rem); }
.slm-link-grid.is-1 { grid-template-columns: minmax(0, 520px); justify-content: center; }
.slm-link-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 520px)); justify-content: center; }

.slm-link-card { display: block; background: #fff; transition: box-shadow 0.4s ease, transform 0.4s ease; }
.slm-link-card:hover { box-shadow: 0 24px 50px -30px rgba(13, 13, 15, 0.45); transform: translateY(-3px); }
.slm-link-thumb { aspect-ratio: 3 / 2; overflow: hidden; background: #ececec; }
.slm-link-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--slm-ease); }
.slm-link-card:hover .slm-link-thumb img { transform: scale(1.05); }
.slm-link-body { padding: 1.3rem 1.4rem 1.5rem; }
.slm-link-type { font-size: 0.7rem; font-weight: 700; letter-spacing: 3px; color: var(--slm-accent); }
.slm-link-title { display: block; margin-top: 0.5rem; font-size: 1.05rem; font-weight: 700; line-height: 1.5; }
.slm-link-sub { display: block; margin-top: 0.3rem; font-size: 0.8rem; color: var(--slm-text-3); }
.slm-link-more { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 2px; color: var(--slm-ink); }
.slm-link-card:hover .slm-arrow { width: 26px; }

.slm-more { padding: var(--slm-gap) 0; }
.slm-more-foot { display: flex; justify-content: center; margin-top: 3rem; }

/* ==========================================================
   4. 카드 (목록 / MORE STORIES 공통)
   ========================================================== */
.slm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(1.25rem, 2.4vw, 2.5rem);
  row-gap: clamp(2.5rem, 4vw, 4rem);
}

.slm-card { display: block; }
.slm-card-thumb { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #ececec; }
.slm-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--slm-ease); }
.slm-card:hover .slm-card-thumb img { transform: scale(1.05); }

.slm-card-noimg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--slm-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

.slm-card-body { padding-top: 1.3rem; }
.slm-card-cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 3px; color: var(--slm-accent); }

.slm-card-title {
  margin-top: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slm-card-sub {
  margin-top: 0.55rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--slm-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slm-card-meta { margin-top: 0.9rem; font-family: var(--slm-serif); font-size: 0.95rem; font-style: italic; color: var(--slm-text-3); }

/* 대표 카드 : 와이드 이미지 위 텍스트 */
.slm-card.is-featured { position: relative; margin-bottom: clamp(3.5rem, 6vw, 6rem); color: #fff; }
.slm-card.is-featured .slm-card-thumb { aspect-ratio: 21 / 9; }
.slm-card.is-featured .slm-card-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 13, 15, 0.85) 0%, rgba(13, 13, 15, 0.2) 55%, rgba(13, 13, 15, 0) 100%); }

.slm-card.is-featured .slm-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  max-width: 900px;
}

.slm-card.is-featured .slm-card-cat { color: var(--slm-accent-light); }
.slm-card.is-featured .slm-card-title { font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.35; }
.slm-card.is-featured .slm-card-sub { color: var(--slm-on-dark-2); font-size: 1rem; }
.slm-card.is-featured .slm-card-meta { color: var(--slm-on-dark-3); }

.slm-card-read { display: inline-flex; align-items: center; gap: 0.7rem; margin-top: 1.4rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 2px; }
.slm-card:hover .slm-card-read .slm-arrow { width: 26px; }

/* ==========================================================
   5. 목록 - 마스트헤드 / 탭 / 페이징
   ========================================================== */
.slm-masthead {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 5vw, 4.5rem);
  text-align: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  color: #fff;
}

.slm-masthead-eyebrow { display: inline-flex; align-items: center; gap: 1rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 5px; color: var(--slm-on-dark-2); }
.slm-masthead-eyebrow::before, .slm-masthead-eyebrow::after { content: ''; width: 36px; height: 1px; background: var(--slm-accent-light); }
.slm-masthead-title { margin-top: 0.8rem; font-family: var(--slm-serif); font-size: clamp(3rem, 8vw, 6.4rem); font-weight: 500; line-height: 1; }
.slm-masthead-title em { font-style: italic; }
.slm-masthead-sub { margin-top: 1.3rem; font-size: 0.9rem; letter-spacing: 2px; color: var(--slm-on-dark-2); }

.slm-tabs { border-bottom: 1px solid var(--slm-line); background: #fff; }

.slm-tabs-inner {
  display: flex;
  justify-content: center;
  gap: clamp(1.25rem, 3vw, 3rem);
  overflow-x: auto;
  scrollbar-width: none;
}

.slm-tabs-inner::-webkit-scrollbar { display: none; }

.slm-tab {
  position: relative;
  flex: none;
  padding: 1.2rem 0 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slm-text-3);
  transition: color 0.25s ease;
}

.slm-tab:hover, .slm-tab.is-active { color: var(--slm-ink); }
.slm-tab.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--slm-accent); }

.slm-list { padding: clamp(3rem, 6vw, 5rem) 0 var(--slm-gap); }
.slm-empty { padding: 6rem 0; text-align: center; color: var(--slm-text-3); }
.slm-empty .en { display: block; margin-bottom: 0.6rem; font-family: var(--slm-serif); font-style: italic; font-size: 2rem; color: var(--slm-ink); }

.slm-paging .pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.3rem; margin-top: 3.5rem; }

.slm-paging .pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.6rem;
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--slm-text-2);
  transition: background 0.25s ease, color 0.25s ease;
}

.slm-paging .pagination a.page-link:hover { background: #f1f1f1; color: var(--slm-ink); }
.slm-paging .pagination a.choice { background: var(--slm-ink); color: #fff; font-weight: 700; pointer-events: none; }
.slm-paging .pagination a.disabled { opacity: 0.3; pointer-events: none; }
.slm-paging .pagination .pprev, .slm-paging .pagination .prev, .slm-paging .pagination .next, .slm-paging .pagination .nnext { font-size: 0; }
.slm-paging .pagination .pprev::before, .slm-paging .pagination .prev::before, .slm-paging .pagination .next::before, .slm-paging .pagination .nnext::before { font-size: 1rem; line-height: 1; }
.slm-paging .pagination .pprev::before { content: '\00AB'; }
.slm-paging .pagination .prev::before { content: '\2039'; }
.slm-paging .pagination .next::before { content: '\203A'; }
.slm-paging .pagination .nnext::before { content: '\00BB'; }

/* 목록으로 버튼 */
.slm-btn-line {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  height: 50px;
  padding: 0 2rem;
  border: 1px solid var(--slm-ink);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  transition: background 0.3s ease, color 0.3s ease;
}

.slm-btn-line:hover { background: var(--slm-ink); color: #fff; }

/* ==========================================================
   6. 반응형
   ========================================================== */
@media (max-width: 1024px) {
  .slm-grid, .slm-link-grid { grid-template-columns: repeat(2, 1fr); }
  .slm-link-grid.is-1 { grid-template-columns: minmax(0, 520px); }
}

@media (max-width: 768px) {
  .slm-hero { min-height: calc(min(84vh, 760px) - var(--sl-header-h, 64px)); }
  .slm-hero-inner { padding-top: 5rem; }

  .slm-lead p::first-letter { font-size: 3.6em; }
  .slm-text { font-size: 1rem; line-height: 1.95; }

  .slm-gallery.is-pair, .slm-gallery.is-grid { grid-template-columns: repeat(2, 1fr); }
  .slm-gallery.is-grid .slm-figure:first-child { grid-column: span 2; grid-row: auto; }
  .slm-gallery.is-grid .slm-figure:first-child img { aspect-ratio: 4 / 3; }
  .slm-gallery.is-grid figcaption { padding: 1.6rem 0.6rem 0.5rem; }

  .slm-swiper .swiper-slide { width: 86vw; }
  .slm-swiper .swiper-slide img { aspect-ratio: 4 / 5; }
  .slm-slider-ui { grid-template-columns: auto 1fr; row-gap: 0.6rem; }
  .slm-slider-caption { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .slm-slider-nav { justify-self: end; }
  .slm-slider-btn { width: 42px; height: 42px; }

  .slm-card.is-featured .slm-card-thumb { aspect-ratio: 4 / 5; }
  .slm-tabs-inner { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .slm-grid, .slm-link-grid, .slm-link-grid.is-2 { grid-template-columns: 1fr; }
  .slm-card-thumb { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  .slm-hero-img { animation: none; transform: none; }
}
