/* May Cottage – site styles
   Palette: Pembrokeshire slate, sea blue, gorse yellow on warm limewash. */

:root {
  --ink: #1b2a33;
  --ink-soft: #46555e;
  --slate: #1f3a4d;
  --sea: #1d6a80;
  --sea-dark: #14505f;
  --gorse: #f2b705;
  --gorse-dark: #c99300;
  --limewash: #faf7f1;
  --sand: #f1ebdf;
  --white: #ffffff;
  --line: #ddd4c4;
  --tbc-bg: #fff3c4;

  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(27, 42, 51, 0.25);
  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --space: clamp(3.5rem, 8vw, 6rem);
  --header-h: 4.25rem;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--limewash);
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--slate);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 2rem + 4vw, 5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); }
p { margin: 0 0 1em; }

a { color: var(--sea-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--slate); }

:focus-visible {
  outline: 3px solid var(--gorse);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--slate); color: var(--white);
  padding: 0.75rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: 48rem; }
.center { text-align: center; justify-content: center; }
.muted { color: var(--ink-soft); font-family: var(--font-body); font-size: 0.85em; font-weight: 400; }
.small { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--sea); color: var(--white);
  font: inherit; font-weight: 650; line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--sea-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn svg { fill: currentColor; flex: none; }
.btn-small { min-height: 40px; padding: 0.45rem 1rem; font-size: 0.95rem; }
.btn-outline { background: transparent; color: var(--sea-dark); border-color: currentColor; }
.btn-outline:hover { background: var(--sea-dark); border-color: var(--sea-dark); }
.btn-access { background: var(--gorse); color: var(--ink); }
.btn-access:hover { background: var(--gorse-dark); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, 0.94);
  border-bottom: 1px solid var(--line);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(250, 247, 241, 0.82);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
  }
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem; flex: none; white-space: nowrap;
  text-decoration: none; color: var(--slate);
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; line-height: 1.1;
}
.brand small { display: block; font-family: var(--font-body); font-size: 0.72rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.04em; }


/* ---------- Language switch ---------- */
.header-tools { display: flex; align-items: center; gap: 0.6rem; }
.page-tools { display: flex; justify-content: flex-end; padding-top: 1rem; }

.lang-switch {
  display: inline-flex; align-items: center; flex: none; gap: 0.35rem;
  padding: 3px 0.6rem 3px 0.65rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 1px 2px rgba(27, 42, 51, 0.05);
}
.lang-globe { flex: none; color: var(--ink-soft); }

/* The two options sit on a track; a single pill slides between them. */
.lang-track { position: relative; display: flex; }
.lang-track::before {
  content: "";
  position: absolute; inset: 0 50% 0 0;
  border-radius: 999px; background: var(--slate);
  transition: transform 0.22s ease;
}
.lang-switch[data-active="cy"] .lang-track::before { transform: translateX(100%); }

.lang-opt {
  position: relative; z-index: 1;
  flex: 1 1 0; min-width: 4.3rem; min-height: 44px; /* AAA target size */
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.3rem 0.55rem;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-soft); font: 600 0.95rem/1 var(--font-body);
  white-space: nowrap; cursor: pointer;
  transition: color 0.22s ease;
}
.lang-opt[aria-pressed="true"] { color: var(--white); }
.lang-opt[aria-pressed="false"]:hover { color: var(--slate); }
/* The focus ring hugs the option rather than the whole pill. */
.lang-opt:focus-visible { outline: 3px solid var(--gorse); outline-offset: -3px; }
.lang-short { display: none; }
/* Guide page: sit with the header buttons, and share the brand row on small screens. */
.guide-page .lang-switch { margin-left: auto; }

@media (max-width: 30rem) {
  /* Keep the full language name for screen readers, show the short form on screen. */
  .lang-long {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
  }
  .lang-short { display: inline; letter-spacing: 0.06em; }
  /* Room is scarce beside the brand and the menu button, so the globe steps aside. */
  .lang-globe { display: none; }
  .lang-switch { padding: 3px; }
  .lang-opt { min-width: 2.7rem; padding-inline: 0.5rem; }
}
@media (max-width: 26rem) {
  /* On the narrowest phones the brand keeps its name only: the subtitle plus the
     language switch and menu button would push the header wider than the screen. */
  .site-header .brand small { display: none; }
}
@media (forced-colors: active) {
  .lang-switch { border: 1px solid ButtonText; }
  .lang-track::before { background: Highlight; }
  .lang-opt[aria-pressed="true"] { color: HighlightText; }
  .lang-opt[aria-pressed="false"] { color: ButtonText; }
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.site-nav a:not(.btn) {
  display: block; padding: 0.6rem 0.65rem; white-space: nowrap;
  color: var(--ink); text-decoration: none; font-weight: 550; border-radius: 8px;
}
.site-nav a:not(.btn):hover { background: var(--sand); }

.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  border: 0; background: transparent; border-radius: 10px; cursor: pointer;
  position: relative;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  position: absolute; left: 50%; width: 24px; height: 2.5px; margin-left: -12px;
  background: var(--slate); border-radius: 2px; content: ""; transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle-bars { top: 50%; margin-top: -1px; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* The menu button takes over while the header also carries the language switch.
   (Was 52rem before the switch was added; the full menu needs ~72rem beside it.) */
@media (max-width: 72rem) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--limewash); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav a:not(.btn) { padding: 0.9rem 0.5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav .btn { margin-top: 0.75rem; width: 100%; }
  /* Without JS the menu stays reachable */
  .no-js .site-nav { position: static; display: block; box-shadow: none; }
  .no-js .nav-toggle { display: none; }
}

/* ---------- Farm landing splash ---------- */
.splash {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background: var(--slate); color: var(--white);
}
.splash picture { display: contents; }
.splash-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 38%;
  /* Eases out of a slow zoom as the page loads; stands still under reduced motion. */
  animation: splash-settle 9s cubic-bezier(0.16, 0.7, 0.3, 1) both;
}
@keyframes splash-settle {
  from { transform: scale(1.14); }
  to { transform: none; }
}
/* A graded scrim does the work that a text-shadow would do badly. */
.splash::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 24, 32, 0.5) 0%, rgba(12, 24, 32, 0.05) 26%, rgba(12, 24, 32, 0) 45%),
    linear-gradient(0deg, rgba(12, 24, 32, 0.82) 0%, rgba(12, 24, 32, 0.45) 22%, rgba(12, 24, 32, 0) 52%);
}
/* Both sit at the page edge, not on the centred content column. */
.splash-top, .splash-bottom {
  position: relative; z-index: 2;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.splash-top { padding-top: max(1.25rem, env(safe-area-inset-top)); }
.splash-bottom { padding-bottom: max(clamp(2.5rem, 7vh, 4.5rem), env(safe-area-inset-bottom)); }

/* Glass button: it belongs to the photograph rather than sitting on top of it. */
.splash-link {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 48px; padding: 0.7rem 1.15rem 0.7rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(12, 24, 32, 0.34);
  color: var(--white); text-decoration: none;
  font-size: 1rem; font-weight: 600; letter-spacing: 0.005em;
  transition: background-color 0.3s, border-color 0.3s;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .splash-link {
    background: rgba(255, 255, 255, 0.13);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
  }
}
.splash-link:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.62);
  color: var(--white);
}
.splash-link svg { flex: none; transition: transform 0.3s ease; }
.splash-link:hover svg { transform: translateX(3px); }

/* The place name is sized so its line runs to the same width as the name above it.
   --place-ratio is that width match, measured for each wording. */
.splash-bottom {
  /* The floor keeps the second line legible: it is always a fraction of this size. */
  --wordmark: clamp(3rem, 6.5vw, 5.5rem);
  --place-ratio: 0.2919;
}
.splash-title, .splash-place {
  margin: 0 0 0 -0.045em; /* optical alignment: pull the first letter onto the left edge */
  color: var(--white);
  font-family: var(--font-body); /* the same face as the button */
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}
.splash-title { font-size: var(--wordmark); }
.splash-place { font-size: calc(var(--wordmark) * var(--place-ratio)); }
html[lang="cy"] .splash-bottom { --place-ratio: 0.3884; } /* Tyddewi, Sir Benfro is shorter */
@media (forced-colors: active) {
  .splash-link { border: 2px solid ButtonText; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 52rem);
  min-height: min(88svh, 52rem);
  display: grid;
  color: var(--white);
  background: var(--slate);
  overflow: hidden;
}
.hero picture, .hero-overlay { grid-area: 1 / 1; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  display: flex; align-items: flex-end;
  padding-block: clamp(2.5rem, 8vw, 5rem);
  background: linear-gradient(180deg, rgba(15, 30, 40, 0.1) 0%, rgba(15, 30, 40, 0.35) 40%, rgba(15, 30, 40, 0.85) 100%);
}
.hero h1 { color: var(--white); margin-bottom: 0.2em; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.hero-lede { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); max-width: 38rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 700;
  color: var(--sea); margin-bottom: 0.75rem;
}
.hero .eyebrow { color: var(--gorse); }
.hero-facts {
  list-style: none; padding: 0; margin: 1.25rem 0 1.75rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.hero-facts li {
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.3);
  padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.95rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Sections ---------- */
.section { padding-block: var(--space); }
.section-alt { background: var(--sand); }
.section-intro { max-width: 42rem; color: var(--ink-soft); margin-bottom: 2rem; }
.prose { max-width: 40rem; }

.split {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 56rem) {
  .split { grid-template-columns: 1.1fr 1fr; }
  .split-reverse .split-media { order: -1; }
}
.split-media { margin: 0; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- Highlights ---------- */
.highlights { padding-block: clamp(2.5rem, 6vw, 4rem); background: var(--white); border-bottom: 1px solid var(--line); }
.feature-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.feature-grid h3 { margin: 0.5rem 0 0.25rem; font-size: 1.15rem; }
.feature-grid p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.icon {
  display: inline-grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--sand); color: var(--sea-dark); font-weight: 700; font-size: 1.2rem;
}

/* ---------- Cards / details ---------- */
.details-grid, .area-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.area-grid { margin-top: 0; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { margin-bottom: 0.6rem; }
.card p:last-child { margin-bottom: 0; }

.ticks { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.ticks li { position: relative; padding-left: 1.75rem; margin-bottom: 0.5rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.45em;
  width: 0.55rem; height: 0.95rem;
  border: solid var(--sea); border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.tags { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li { background: var(--sand); border: 1px solid var(--line); padding: 0.3rem 0.85rem; border-radius: 999px; font-size: 0.92rem; }

/* ---------- Gallery ---------- */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.6rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 40rem) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .gallery li:first-child { grid-column: span 2; grid-row: span 2; }
}
.gallery button {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  border-radius: 10px; overflow: hidden; background: var(--line);
}
.gallery img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery button:hover img { transform: scale(1.04); }

/* ---------- Accessibility section ---------- */
.access-section { background: var(--slate); color: #e9eff2; }
.access-section h2 { color: var(--white); }
.access-section .eyebrow { color: var(--gorse); }
.access-section .ticks li::before { border-color: var(--gorse); }

/* ---------- Review ---------- */
.review { margin: 0; text-align: center; }
.stars { color: var(--gorse-dark); font-size: 1.5rem; letter-spacing: 0.2em; margin-bottom: 0.5rem; }
.review blockquote { margin: 0 0 1rem; font-family: var(--font-head); font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.6rem); line-height: 1.5; color: var(--slate); }
.review figcaption { color: var(--ink-soft); font-weight: 600; }

/* ---------- Book ---------- */
.book { background: var(--white); }
.book .hero-actions { margin: 1.5rem 0; }
.ref { font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9d3d8; padding-block: 3rem 6rem; }
.site-footer a { color: var(--white); }
.footer-inner { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); align-items: start; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer p { margin: 0 0 0.3rem; }
.site-footer .small { color: #a9b6bc; }
.brand-footer { font-family: var(--font-head); font-size: 1.4rem; color: var(--white); }

/* ---------- Floating accessibility button ---------- */
.access-fab {
  position: fixed; z-index: 60;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 52px; padding: 0.7rem 1.1rem;
  background: var(--gorse); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,0.35);
}
.access-fab svg { fill: currentColor; }
.access-fab:hover { background: var(--gorse-dark); color: var(--ink); }
@media (max-width: 26rem) {
  .access-fab { padding: 0.7rem; }
  .access-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Modal (accessibility guide) ---------- */
dialog { padding: 0; border: 0; color: var(--ink); }
.modal {
  width: min(56rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  border-radius: var(--radius);
  background: var(--limewash);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
  overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(15, 25, 32, 0.7); }
.modal-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.75rem 1rem 0.75rem 1.5rem;
  background: var(--slate); color: var(--white);
}
.modal-bar h2 { color: var(--white); margin: 0; font-size: 1.35rem; }
.modal-actions { display: flex; align-items: center; gap: 0.5rem; }
.modal-bar .btn-outline { color: var(--white); }
.modal-bar .btn-outline:hover { background: var(--white); color: var(--slate); border-color: var(--white); }
.modal-close {
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.15); color: var(--white);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.modal-close:hover { background: rgba(255,255,255,0.3); }
.modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 2.5rem; }
.modal-body .guide > h1 { display: none; }
@media (max-width: 40rem) {
  .modal { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; max-height: 100dvh; border-radius: 0; margin: 0; }
  .modal-bar .btn-outline { display: none; }
}

/* ---------- Guide content ---------- */
.guide section { padding-top: 0.5rem; margin-bottom: 1.75rem; border-top: 1px solid var(--line); }
.guide section:first-of-type { border-top: 0; }
.guide h2 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem); margin-top: 1rem; }
.guide ul:not(.ticks), .guide ol { padding-left: 1.25rem; }
.guide li { margin-bottom: 0.45rem; }
.guide { max-width: 46rem; }
.guide-updated { color: var(--ink-soft); font-size: 0.95rem; }
.guide-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.guide-photos figure { margin: 0; }
.guide-photos img { display: block; width: 100%; height: auto; border-radius: 8px; }
.guide-photos figcaption { margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.9rem; }
.note { background: var(--sand); padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.95rem; }
.tbc { background: var(--tbc-bg); padding: 0 0.3em; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.guide-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 36rem) {
  .guide-page .header-inner { flex-wrap: wrap; padding-block: 0.5rem; }
  .guide-page .brand small { display: none; }
  .guide-page .guide-tools { flex: 1 1 100%; justify-content: stretch; }
  .guide-page .guide-tools .btn { flex: 1; }
  .guide-page .site-header { position: static; }
}
.guide h1 { overflow-wrap: anywhere; hyphens: auto; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: 100vw; max-height: 100vh; max-height: 100dvh;
  margin: 0; background: rgba(8, 14, 18, 0.96); color: var(--white);
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
.lightbox::backdrop { background: rgba(8, 14, 18, 0.96); }
.lightbox figure { margin: 0; display: grid; place-items: center; gap: 0.75rem; padding: 3.5rem 0 1rem; height: 100%; min-width: 0; }
.lightbox img { max-height: calc(100dvh - 8rem); max-height: calc(100vh - 8rem); width: auto; max-width: 100%; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { text-align: center; padding-inline: 1rem; color: #d8e0e4; }
.lightbox .modal-close { position: absolute; top: max(0.75rem, env(safe-area-inset-top)); right: max(0.75rem, env(safe-area-inset-right)); z-index: 2; }
.lb-nav {
  width: 52px; height: 52px; margin: 0 0.5rem; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.15); color: var(--white);
  font-size: 2rem; line-height: 1; cursor: pointer;
}
.lb-nav:hover { background: rgba(255,255,255,0.3); }
@media (max-width: 40rem) {
  .lightbox[open] { grid-template-columns: 1fr; }
  .lb-nav { position: absolute; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 2; }
  .lb-prev { left: 1rem; }
  .lb-next { right: 1rem; }
  .lightbox figure { padding-bottom: 5rem; }
}

body.has-modal { overflow: hidden; }

/* ---------- Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .btn, .access-fab, .modal-close, .lb-nav { border: 2px solid ButtonText; }
  .tbc { outline: 1px dashed CanvasText; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .access-fab, .skip-link, .site-footer, .guide-tools, .lang-switch, .page-tools { display: none !important; }
  body { background: #fff; font-size: 12pt; color: #000; }
  .guide section { break-inside: avoid-page; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  .tbc { background: none; border-bottom: 1px dotted #000; }
}
