/* Guest guide, Lamplight. Dark-first ("arriving at a cabin after dark and finding the lamp already on"),
   with a light daytime variant for phones set to light mode. Mobile first, self-hosted fonts (fonts.css).

   Colour mode: the dark tokens are the default. A light system preference switches to the day tokens,
   unless <html data-theme="dark">; <html data-theme="light"> forces them. js/mode.js sets data-theme from
   the guest's System / Light / Dark choice (in the footer). Print always uses the day tokens.
   Host themes only change the accent: render.js sets --a-day and --a-eve on .guide (schema.js THEMES). */
:root {
  --bg: #121715; --card: #1B2220; --card2: #232C29; --line: #2E3A36; --line2: #3A4843;
  --ink: #F1EDE4; --muted: #A9B2AD; --moss: #8FB79B;
  --accent: #F0B45A; --on-accent: #1E1508;
  --shadow: 0 24px 40px -28px rgba(0, 0, 0, .7);
  --danger-bg: #3A2023; --danger: #FF9A90;
  --r: 18px;
  color-scheme: dark;
}
.guide { --accent: var(--a-eve, #F0B45A); --on-accent: #121715; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #EEF0EC; --card: #FFFFFF; --card2: #F3F5F2; --line: #D9DED9; --line2: #C6CEC8;
    --ink: #16201D; --muted: #56625D; --moss: #2D6A4F;
    --accent: #9A5B00; --on-accent: #FFFFFF;
    --shadow: 0 10px 24px -16px rgba(35, 70, 60, .35);
    --danger-bg: #FBE9E7; --danger: #B3261E;
    color-scheme: light;
  }
  :root:not([data-theme="dark"]) .guide { --accent: var(--a-day, #9A5B00); --on-accent: #FFFFFF; }
}
:root[data-theme="light"] {
  --bg: #EEF0EC; --card: #FFFFFF; --card2: #F3F5F2; --line: #D9DED9; --line2: #C6CEC8;
  --ink: #16201D; --muted: #56625D; --moss: #2D6A4F;
  --accent: #9A5B00; --on-accent: #FFFFFF;
  --shadow: 0 10px 24px -16px rgba(35, 70, 60, .35);
  --danger-bg: #FBE9E7; --danger: #B3261E;
  color-scheme: light;
}
:root[data-theme="light"] .guide { --accent: var(--a-day, #9A5B00); --on-accent: #FFFFFF; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
.i { width: 20px; height: 20px; flex: none; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 400; }

.guide { max-width: 640px; margin: 0 auto; padding: 0 0 36px; }
.guide.has-dock { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }

/* Header: a soft lamp glow, or the host's cover photo fading into the page (Pro) */
.hero {
  position: relative; padding: calc(env(safe-area-inset-top) + 48px) 20px 10px;
  background: radial-gradient(ellipse 75% 90% at 88% -10%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%);
}
/* Wider than the 640px column, the glow becomes a full-width layer behind the page,
   so it fades out softly instead of stopping at the column's right edge */
@media (min-width: 641px) {
  body { overflow-x: clip; }
  .guide { position: relative; isolation: isolate; }
  .hero:not(.has-cover) { background: none; }
  .hero:not(.has-cover)::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    top: -16px; left: 50%; width: 100vw; height: 476px; transform: translateX(-50%); /* -16px: covers .guide's top padding too */
    background: radial-gradient(ellipse 640px 440px at calc(50% + 250px) -84px, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%);
  }
}
.hero.has-cover {
  min-height: 300px; display: flex; align-items: flex-end; padding-top: calc(env(safe-area-inset-top) + 120px);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 28%, transparent 42%, var(--bg) 96%), var(--cover);
  background-size: cover; background-position: center;
}
.hero-in { position: relative; z-index: 1; width: 100%; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0; font-size: clamp(42px, 12vw, 58px); line-height: .98; letter-spacing: -.015em; overflow-wrap: anywhere; }
.hero h1 em { font-style: italic; color: var(--accent); }
.has-cover h1 { text-shadow: 0 1px 20px color-mix(in srgb, var(--bg) 70%, transparent); }
.intro { margin: 10px 20px 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); max-width: 34em; }
.intro b { color: var(--ink); font-weight: 800; white-space: nowrap; }

/* Quick facts */
.quick { margin: 18px 14px 0; display: grid; gap: 10px; }
.wifi {
  border-radius: 20px; padding: 16px 16px 14px;
  background: var(--card);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 17%, var(--card)), color-mix(in srgb, var(--accent) 7%, var(--bg)));
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--card));
  box-shadow: 0 24px 50px -30px color-mix(in srgb, var(--accent) 55%, transparent);
}
.wifi-h { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.wifi-h .i { width: 18px; height: 18px; }
.wifi-h h2 { margin: 0; font: 900 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.wifi-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: baseline; margin: 10px 0 14px; }
.k { font-size: 13px; font-weight: 700; color: var(--muted); }
.v { font-size: 20px; font-weight: 800; line-height: 1.25; letter-spacing: .01em; overflow-wrap: anywhere; min-width: 0; }
.wifi-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.wifi-acts .copy { flex: 1 1 40%; }
.wifiqr { flex: 1 1 40%; min-width: 0; }
.wifiqr[open] { flex-basis: 100%; }
.wifiqr summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 12px; border-radius: 14px; text-align: center; line-height: 1.2;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--card)); color: var(--ink); font-weight: 800; font-size: 14.5px;
}
.wifiqr summary::-webkit-details-marker { display: none; }
.wifiqr summary .i { width: 18px; height: 18px; color: var(--accent); }
.qrbox { background: #fff; padding: 10px; border-radius: 14px; width: 210px; margin: 12px auto 2px; }
.qrbox svg { display: block; width: 100%; height: auto; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px 12px; box-shadow: var(--shadow); min-width: 0; }
.tile .k { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; line-height: 1.25; }
.tile .k .i { width: 16px; height: 16px; color: var(--moss); }
.tile .v { display: block; font: 400 44px/1 var(--serif); letter-spacing: 0; margin-top: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 10px 16px; border-radius: 14px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--on-accent) !important; font: 800 15px/1.2 var(--sans);
  transition: transform .12s cubic-bezier(.2, .8, .2, 1), filter .2s;
}
.btn .i { width: 18px; height: 18px; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.done { background: var(--moss); color: var(--bg) !important; }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 14px; border-radius: 12px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btns .btn { flex: 1 1 auto; background: var(--card2); border-color: var(--line); color: var(--ink) !important; }
.btns .btn .i { color: var(--accent); }

/* Section chips */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 16px 14px 8px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; position: sticky; top: 0; z-index: 3;
  background: linear-gradient(var(--bg) 78%, transparent);
}
.chips::-webkit-scrollbar { display: none; }
/* Wider than the column, the chips wrap onto a second row instead of being cut off at the edge */
@media (min-width: 641px) { .chips { flex-wrap: wrap; overflow: visible; } }
.chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; flex: none; min-height: 44px;
  padding: 8px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink) !important; text-decoration: none; font-size: 14px; font-weight: 800;
}
.chip .i { width: 16px; height: 16px; color: var(--accent); }

/* Cards */
.card {
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 16px 18px 18px; margin: 10px 14px 0; border: 1px solid var(--line);
}
.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-h h2 { margin: 0; font-size: 28px; line-height: 1.05; letter-spacing: -.005em; }
.ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); color: var(--accent); flex: none; }
.ic .i { width: 19px; height: 19px; }
.ic.big { width: 64px; height: 64px; margin: 0 auto 16px; }
.ic.big .i { width: 30px; height: 30px; }

.body { overflow-wrap: anywhere; }
.body p { margin: 0 0 10px; }
.body p:last-child { margin-bottom: 0; }
.body strong { font-weight: 800; }
.body ul, .body ol { margin: 0 0 10px; padding-left: 22px; }
.body li { margin: 5px 0; }
.body li::marker { color: var(--accent); }
.body ul.check { list-style: none; padding: 0; }
.body ul.check li { margin: 0; border-bottom: 1px solid var(--line); }
.body ul.check li:last-child { border-bottom: 0; }
.body ul.check label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; min-height: 44px; }
.body ul.check input {
  appearance: none; -webkit-appearance: none; width: 24px; height: 24px; flex: none; margin: 0;
  border: 2px solid var(--line2); border-radius: 8px; display: grid; place-items: center; transition: .15s;
}
.body ul.check input:checked { background: var(--accent); border-color: var(--accent); }
.body ul.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.body ul.check input:checked + span { color: var(--muted); text-decoration: line-through; }
.sec-emergency .ic { background: var(--danger-bg); color: var(--danger); }

.addr { margin: 0 0 12px; font-weight: 700; }
.hostname { margin: 0; font: 400 26px/1.15 var(--serif); }
.tel { margin: 2px 0 0; font-weight: 700; letter-spacing: .02em; }
.muted { color: var(--muted); }

/* Translation bar */
.txbar {
  margin: 12px 14px 0; padding: 10px 12px 10px 14px; border-radius: 14px; background: var(--card);
  border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow);
  position: relative; z-index: 2;
}
.txbar .i { color: var(--accent); }
.txbar.hint { font-size: 14px; color: var(--muted); }
.txbar.hint span { flex: 1; }
.txbar .x { background: none; border: 0; color: var(--muted); width: 44px; height: 44px; margin: -8px -8px -8px 0; cursor: pointer; display: grid; place-items: center; border-radius: 12px; }
.txbar .txl { flex: 1; font-size: 14px; color: var(--muted); }

/* Call dock: within thumb reach */
.dock {
  position: fixed; z-index: 6; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom)); width: min(612px, calc(100% - 24px));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px;
}
.dock a {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 14px;
  text-decoration: none; font-weight: 800; font-size: 15.5px; box-shadow: 0 12px 30px -6px rgba(0, 0, 0, .55);
}
.dock-call { background: var(--ink); color: var(--bg) !important; padding: 0 16px; min-width: 0; }
.dock-call > span, .dock-who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-who { font-weight: 700; opacity: .75; }
.dock-who::before { content: "·"; margin-right: 8px; }
.dock-msg { width: 52px; background: var(--card2); border: 1px solid var(--line2); color: var(--ink) !important; }

.foot { text-align: center; padding: 30px 16px 8px; font-size: 13.5px; color: var(--muted); }
.foot a { color: var(--muted); text-decoration: none; display: inline-flex; gap: 6px; min-height: 44px; align-items: center; }
.foot .wm { font: 400 20px/1 var(--serif); color: var(--ink); letter-spacing: -.01em; }
.foot .wm em { color: var(--accent); }

.loading { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.broken { max-width: 420px; margin: 0 auto; padding: 22vh 24px; text-align: center; color: var(--muted); }

.preview body { overflow-x: hidden; }
@media (min-width: 700px) {
  .guide { padding-top: 16px; }
  .hero.has-cover { border-radius: 28px 28px 0 0; margin: 0 14px; }
}
@media print {
  /* The :not() selector outranks the light-mode rule above, so every mode prints on white. */
  :root, :root:not([data-theme="dark"]), :root[data-theme] {
    --bg: #FFFFFF; --card: #FFFFFF; --card2: #F3F5F2; --line: #D9DED9; --line2: #C6CEC8;
    --ink: #16201D; --muted: #56625D; --moss: #2D6A4F; --accent: #9A5B00; --on-accent: #FFFFFF;
    --danger-bg: #FBE9E7; --danger: #B3261E; color-scheme: light;
  }
  :root .guide, :root[data-theme] .guide { --accent: var(--a-day, #9A5B00); --on-accent: #FFFFFF; }
  .chips, .txbar, .btn, .wifiqr, .dock, .mode-menu { display: none !important; }
  .card, .tile, .wifi { box-shadow: none; break-inside: avoid; }
}

/* Colour mode (js/mode.js): a round button at the top right of the header with a small menu */
.mode-menu { position: absolute; z-index: 4; top: calc(env(safe-area-inset-top) + 10px); right: 14px; }
.mode-btn {
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; padding: 0;
  background: color-mix(in srgb, var(--card) 82%, transparent); border: 1px solid var(--line); color: var(--ink);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mode-btn:hover { border-color: var(--line2); }
.mode-btn .i { width: 19px; height: 19px; }
.mode-pop {
  position: absolute; right: 0; top: calc(100% + 8px); padding: 12px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .45);
}
.mode-pop[hidden] { display: none; }
.mode-l { display: block; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 4px; }
.mode-seg { white-space: nowrap; }
.mode-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 15px; background: var(--card); border: 1px solid var(--line); }
.mode-seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px;
  padding: 6px 11px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: 700 13px/1.2 var(--sans); cursor: pointer;
}
.mode-seg button .i { width: 16px; height: 16px; }
.mode-seg button[aria-checked="true"] { background: var(--card2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.mode-seg button[aria-checked="true"] .i { color: var(--accent); }
.preview .mode-menu { display: none; }

/* Focus and motion (Qloovi signature 1.7, 1.8). Hosts pick the accent, so the ring uses the ink
   with a page-coloured gap: it stays visible on the page, on cards and on the Wi-Fi card. */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 2px var(--bg); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .spinner { animation: spin 1.5s linear infinite !important; }
  .btn:active, .btn:hover { transform: none; }
}
@media (max-width: 359px) { .mode-seg button { padding: 6px 8px; gap: 4px; } }
