/* Keyfolio — soft white, warm gray, juniper. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f6f4f0;
  --bg-deep: #efebe4;
  --surface: #ffffff;
  --surface-2: #fbfaf8;
  --fill: #f0ede7;
  --fill-strong: #e6e1d8;
  --ink: #1d1c1a;
  --ink-2: #5d5951;
  --ink-3: #8b867d;
  --hair: rgba(56, 46, 30, 0.1);
  --hair-strong: rgba(56, 46, 30, 0.16);
  --accent: #3d6b57;
  --accent-strong: #2c5242;
  --accent-soft: #e5eee8;
  --accent-wash: #f1f5f2;
  --brass: #a8854f;
  --alert: #a3472f;
  --alert-strong: #8b3a25;
  --alert-soft: #f8ece5;
  --alert-wash: #fcf5f1;
  --ok: #3d8a5f;

  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-1: 0 1px 1px rgba(40, 30, 15, 0.03), 0 2px 8px rgba(40, 30, 15, 0.04);
  --shadow-2: 0 1px 2px rgba(40, 30, 15, 0.04), 0 10px 30px -8px rgba(40, 30, 15, 0.1);
  --shadow-3: 0 2px 6px rgba(40, 30, 15, 0.05), 0 30px 70px -20px rgba(40, 30, 15, 0.25);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --tap: 44px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 620px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60% 70% at 8% 0%, rgba(214, 200, 172, 0.32), transparent 70%),
    radial-gradient(50% 60% at 92% 4%, rgba(190, 210, 198, 0.3), transparent 70%);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

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

.icon { width: 20px; height: 20px; flex: none; }
.mono { font-family: var(--mono); font-size: 0.94em; letter-spacing: 0; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ------------------------------------------------------------- Buttons */

.btn {
  --btn-h: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-h);
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }

.btn-primary {
  background: var(--ink);
  color: #fbfaf7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-primary:hover { background: #33312d; }

.btn-secondary {
  background: var(--surface);
  border-color: var(--hair-strong);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.btn-secondary:hover { border-color: rgba(56, 46, 30, 0.28); }

.btn-ghost { background: transparent; color: var(--ink-2); padding: 0 14px; }
.btn-ghost:hover { background: rgba(56, 46, 30, 0.05); color: var(--ink); }

.btn-tinted { background: var(--accent-soft); color: var(--accent-strong); }
.btn-tinted:hover { background: #d9e7de; }

.btn-alert { background: var(--alert); color: #fff; box-shadow: 0 1px 2px rgba(120, 40, 20, 0.2); }
.btn-alert:hover { background: var(--alert-strong); }

.btn-icon {
  width: var(--tap);
  min-width: var(--tap);
  padding: 0;
  background: transparent;
  color: var(--ink-2);
}
.btn-icon:hover { background: rgba(56, 46, 30, 0.06); color: var(--ink); }
.btn-icon.is-danger:hover { color: var(--alert); background: var(--alert-soft); }

.btn-sm { --btn-h: 36px; padding: 0 14px; font-size: 14px; gap: 6px; }
.btn-sm .icon { width: 16px; height: 16px; }
/* small buttons keep a 44px hit area */
.btn-sm { position: relative; }
.btn-sm::after { content: ""; position: absolute; inset: -4px -2px; }
.btn-lg { --btn-h: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }

.btn.is-busy { pointer-events: none; opacity: 0.7; }
.btn.is-busy::before {
  content: "";
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

.link-btn {
  border: 0; background: none; padding: 0;
  color: var(--accent-strong); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* -------------------------------------------------------------- Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 240, 0.78);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--hair);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-height: var(--tap);
}
.brand-mark { width: 28px; height: 28px; color: var(--ink); }
.brand-name { font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--hair);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.chip-dot, .g-stamp-dot, .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(61, 138, 95, 0.16);
  flex: none;
}

/* --------------------------------------------------------------- Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  border-radius: 999px;
  background: rgba(29, 28, 26, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fbfaf7;
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-3);
  transform: translate(-50%, 16px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}
.toast .icon { width: 18px; height: 18px; color: #a9d4bb; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.page-editor .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .page-editor .toast { bottom: 28px; } }

/* ---------------------------------------------------------- Segmented */

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--fill);
  border: 1px solid var(--hair);
}
.segment {
  min-height: 38px;
  min-width: 56px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.segment[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(40, 30, 15, 0.1), 0 2px 6px rgba(40, 30, 15, 0.06);
}
.segmented-sm .segment { min-height: 32px; min-width: 48px; padding: 0 12px; font-size: 13px; }
.segmented-wide { display: flex; width: 100%; }
.segmented-wide .segment { flex: 1; min-height: 40px; }

/* ------------------------------------------------------ Grouped rows */

.group {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
}
.row + .row::before,
.disclosure + .disclosure::before,
.group > li + li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 60px;
  right: 0;
  height: 1px;
  background: var(--hair);
}
.disclosure { position: relative; }
.row-icon {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  align-self: flex-start;
  margin-top: 1px;
}
.row-icon .icon { width: 18px; height: 18px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-label { font-size: 16px; font-weight: 550; letter-spacing: -0.014em; line-height: 1.35; }
.row-value { font-size: 16px; color: var(--ink); word-break: break-word; }
.row-detail { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.row-trailing { flex: none; display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 15px; }
.row-time { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.row-chevron .icon { width: 18px; height: 18px; color: var(--ink-3); }
@media (hover: hover) { a.row:hover, button.row:hover, .row-check:hover { background: var(--surface-2); } }
button.row { cursor: pointer; font: inherit; }

.row:has(.row-label + .row-value) .row-label,
.row:has(.row-label + .row-value .mono) .row-label {
  font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0;
}

/* ------------------------------------------------------------- Inputs */

.input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--hair-strong);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: #b0aaa0; }
.input:hover { border-color: rgba(56, 46, 30, 0.26); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(61, 107, 87, 0.14);
}
.textarea { resize: vertical; min-height: 92px; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.field-req { font-weight: 450; color: var(--ink-3); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; }
.field-hint { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.field-count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; } }

.toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--hair);
}
.toggle-label { font-size: 15px; font-weight: 600; cursor: pointer; }
.toggle-text { display: flex; flex-direction: column; gap: 3px; }
.switch { position: relative; flex: none; width: 52px; height: 32px; margin-top: 2px; }
.switch-input { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-track {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: var(--fill-strong);
  transition: background-color 0.25s var(--ease);
}
.switch-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s var(--ease);
}
.switch-input:checked + .switch-track { background: var(--accent); }
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.spinner {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2.5px solid var(--fill-strong);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================= GUIDE */

.page-guide body, body.page-guide { background: var(--bg); }

.guide-shell { padding: 0 0 72px; }

.guide {
  container: guide / inline-size;
  position: relative;
}

.g-layout {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

.g-rail { padding-top: 28px; }

.g-hero { display: flex; flex-direction: column; gap: 22px; padding-bottom: 8px; }
.g-monogram {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 32% 26%, #ffffff 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(circle at 70% 80%, #dfe7df 0%, #f2efe7 60%, #e9e2d4 100%);
  box-shadow: inset 0 -6px 14px rgba(120, 100, 60, 0.12), inset 0 1px 0 #fff, 0 10px 28px -10px rgba(70, 60, 40, 0.35), 0 0 0 1px rgba(56, 46, 30, 0.06);
}
.g-monogram span {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  color: var(--accent-strong);
  letter-spacing: -0.02em;
  transform: translateY(1px);
}
.g-cover {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--fill);
  box-shadow: var(--shadow-2);
}
.g-cover img { width: 100%; height: 100%; object-fit: cover; }

.g-hero-text { display: flex; flex-direction: column; gap: 10px; }
.g-stamp {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--hair);
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
}
.g-eyebrow {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
  margin-top: 6px;
}
.g-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 52px;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

.g-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.g-fact { padding: 14px 12px 14px 0; min-width: 0; }
.g-fact + .g-fact { padding-left: 14px; border-left: 1px solid var(--hair); }
.g-fact dt { font-size: 12.5px; color: var(--ink-3); margin-bottom: 3px; }
.g-fact dd { font-size: 15.5px; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

.fact-copy {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 28px; margin: -4px 0; padding: 0;
  border: 0; background: none; cursor: pointer;
  font-size: 15.5px; font-weight: 600; letter-spacing: -0.015em;
  color: var(--accent-strong);
  position: relative;
}
.fact-copy::after { content: ""; position: absolute; inset: -10px -8px; }
.fact-copy .icon { width: 16px; height: 16px; }
.fact-copy:hover { color: var(--accent); }

.g-actions { display: flex; gap: 10px; }
.g-actions .btn { flex: 1; }

.g-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 18px -20px 0;
  padding: 10px 0;
  background: rgba(246, 244, 240, 0.86);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--hair);
}
.g-nav ul {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 20px;
  scroll-padding: 0 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.g-nav ul::-webkit-scrollbar { display: none; }
.g-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.g-nav-link .icon { display: none; width: 17px; height: 17px; }
.g-nav-link:hover { color: var(--ink); }
.g-nav-link.is-active { background: var(--ink); color: #fbfaf7; }

.g-body { display: flex; flex-direction: column; gap: 36px; padding-top: 28px; }

.g-welcome {
  position: relative;
  padding: 24px 22px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-1);
}
.g-welcome-text {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.32;
  letter-spacing: -0.005em;
  color: var(--ink);
  white-space: pre-line;
  text-wrap: pretty;
}
.g-welcome-text::before { content: "“"; color: var(--brass); margin-right: 2px; }
.g-welcome-text::after { content: "”"; color: var(--brass); margin-left: 1px; }
.g-host {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
}
.g-host-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--serif);
  font-size: 20px;
}
.g-host-name { display: flex; flex-direction: column; line-height: 1.25; font-weight: 600; flex: 1; min-width: 90px; }
.g-host-role { font-size: 13px; font-weight: 450; color: var(--ink-3); }
.g-host-contact { display: flex; gap: 6px; flex-wrap: wrap; }

.g-section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 80px; }
.g-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px; }
.g-section-title { font-size: 13px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.g-section-meta { font-size: 13.5px; color: var(--ink-3); text-align: right; }

/* Door code */
.row-code { cursor: pointer; }
.code-value { font-size: 20px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.code-dots { letter-spacing: 0.2em; color: var(--ink-2); }
.code-digits {
  font-weight: 650;
  letter-spacing: 0.24em;
  color: var(--ink);
  animation: reveal 0.35s var(--ease);
}
.code-hint { font-size: 13.5px; color: var(--accent-strong); font-weight: 550; }
.row-code .row-trailing .icon { width: 18px; height: 18px; color: var(--accent); }
.row-code.is-revealed { background: var(--accent-wash); }
@keyframes reveal { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: none; } }

.row-request .row-trailing { align-self: center; }
.row-password .row-value .mono { font-size: 16px; }

/* Rules */
.row-rule { align-items: flex-start; }
.row-num {
  width: 32px; flex: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.05;
  color: var(--brass);
  text-align: center;
}

/* Appliances */
.row-disclosure .row-main { align-self: center; }
.row-disclosure .row-icon { align-self: center; margin-top: 0; }
.row-disclosure .row-chevron .icon { transition: transform 0.3s var(--ease); }
.row-disclosure[aria-expanded="true"] .row-chevron .icon { transform: rotate(180deg); }
.row-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}
.row-panel > p {
  overflow: hidden;
  padding: 0 18px 0 62px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
  transition: padding 0.35s var(--ease);
}
.disclosure.is-open .row-panel { grid-template-rows: 1fr; }
.disclosure.is-open .row-panel > p { padding-bottom: 16px; }

/* Local */
.g-section-local .segmented { align-self: flex-start; }
.row-local { align-items: flex-start; transition: opacity 0.2s; }
.row-local.is-filtered { display: none; }
.row-icon.tag-see { background: #efe8dc; color: #7d6136; }
.row-icon.tag-do { background: #e3ebf0; color: #3c5d70; }
.tag {
  font-size: 12px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink-2);
}
.group-local .row-trailing { align-self: flex-start; margin-top: 4px; }

/* Checkout */
.progress { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.progress-track { flex: 1; height: 4px; border-radius: 999px; background: var(--fill-strong); overflow: hidden; }
.progress-fill {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.45s var(--ease);
}
.progress-text { font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.row-check { cursor: pointer; align-items: flex-start; -webkit-tap-highlight-color: transparent; }
.check-input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
  width: 26px; height: 26px;
  flex: none;
  margin: 2px 3px 0;
  border-radius: 50%;
  border: 1.5px solid var(--hair-strong);
  display: grid; place-items: center;
  color: #fff;
  background: var(--surface);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.check-box .icon { width: 16px; height: 16px; stroke-width: 2.2; opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.3s var(--ease); }
.check-input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check-input:checked + .check-box .icon { opacity: 1; transform: none; }
.check-input:checked ~ .row-main .row-label { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(56, 46, 30, 0.3); }
.check-input:focus-visible + .check-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.group-check .row + .row::before { left: 60px; }

/* Emergency */
.g-emergency { padding-top: 4px; }
.emergency-card {
  padding: 22px 20px 20px;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--alert-soft), var(--alert-wash));
  border: 1px solid rgba(163, 71, 47, 0.14);
  display: flex; flex-direction: column; gap: 18px;
}
.emergency-head { display: flex; gap: 14px; align-items: flex-start; }
.emergency-icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(163, 71, 47, 0.12);
  color: var(--alert);
}
.emergency-title { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.05; letter-spacing: -0.015em; color: #4a2318; }
.emergency-lede { margin-top: 4px; font-size: 14.5px; color: #7a4a3c; }
.emergency-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.emergency-actions .btn { flex: 1; min-height: 50px; }
.group-emergency { background: rgba(255, 255, 255, 0.72); border-color: rgba(163, 71, 47, 0.12); box-shadow: none; }
.group-emergency .row-icon { background: rgba(163, 71, 47, 0.1); color: var(--alert); }

.g-footer { padding: 8px 4px 0; }
.g-footer-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-3); }
.g-footer-meta a { color: var(--ink-2); text-underline-offset: 3px; }
.g-print-qr { display: none; }

/* Guide at desktop width */
@container guide (min-width: 940px) {
  .g-layout {
    max-width: 1160px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 640px);
    justify-content: space-between;
    gap: 72px;
    align-items: start;
  }
  .g-rail { position: sticky; top: 0; padding-top: 56px; padding-bottom: 32px; max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
  .g-title { font-size: 64px; }
  .g-nav {
    position: static;
    margin: 26px 0 0;
    padding: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 0;
  }
  .g-nav ul { flex-direction: column; padding: 0; gap: 2px; overflow: visible; }
  .g-nav-link { width: 100%; padding: 0 14px; border-radius: 12px; min-height: 42px; }
  .g-nav-link .icon { display: block; }
  .g-nav-link.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
  .g-nav-link.is-active .icon { color: var(--accent); }
  .g-body { padding-top: 56px; gap: 44px; }
  .g-welcome { padding: 30px 30px 22px; }
  .g-welcome-text { font-size: 26px; }
  .g-section { scroll-margin-top: 32px; }
  .emergency-card { padding: 28px; }
}

@container guide (max-width: 360px) {
  .g-title { font-size: 44px; }
  .g-fact dd { font-size: 14.5px; }
}

/* Mini guide on the landing phone */
.guide-mini { pointer-events: none; }

/* ============================================================ LANDING */

.landing { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0 88px;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 92px;
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero-title em, .closing-title em { font-style: italic; color: var(--accent-strong); }
.hero-lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 560px; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--ink-2); }
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points .icon { width: 16px; height: 16px; color: var(--accent); stroke-width: 2; }

.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero-visual-caption {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap);
  font-size: 14px; color: var(--ink-3);
  text-decoration: none;
}
.hero-visual-caption:hover { color: var(--ink); }
.hero-visual-caption .icon { width: 16px; height: 16px; }

.phone {
  position: relative;
  width: 390px;
  height: 780px;
  max-width: 100%;
  border-radius: 54px;
  padding: 12px;
  background: linear-gradient(160deg, #2a2926, #121211);
  box-shadow: var(--shadow-3), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.phone-notch {
  position: absolute;
  top: 22px; left: 50%;
  width: 104px; height: 30px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0b0b0a;
  z-index: 30;
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 43px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  scrollbar-width: none;
  isolation: isolate;
}
.phone-screen::-webkit-scrollbar { display: none; }
.phone-screen .g-rail { padding-top: 64px; }
.phone-screen .g-nav { top: 0; }

.phone-landing { width: 360px; height: 720px; transform: rotate(-1.5deg); }
.phone-landing .phone-screen { overflow: hidden; }
.phone-landing .guide { animation: drift 26s ease-in-out 1.5s infinite alternate; }
@keyframes drift { 0%, 8% { transform: translateY(0); } 92%, 100% { transform: translateY(calc(-100% + 696px)); } }

.phone-skeleton { padding: 72px 22px; display: flex; flex-direction: column; gap: 16px; }
.sk { display: block; background: var(--fill); border-radius: 10px; animation: pulse 1.6s ease-in-out infinite; }
.sk-circle { width: 76px; height: 76px; border-radius: 50%; }
.sk-line { height: 14px; width: 60%; }
.sk-short { width: 40%; }
.sk-title { height: 44px; width: 85%; }
.sk-block { height: 150px; border-radius: 18px; }
@keyframes pulse { 50% { opacity: 0.55; } }

.band {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 56px;
  padding: 56px 0;
  border-top: 1px solid var(--hair);
}
.band-label { display: flex; flex-direction: column; gap: 10px; }
.band-title { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; }
.band-note { font-size: 15px; color: var(--ink-3); max-width: 280px; }
.band-body { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.band-body > .group { width: 100%; }
.feature-list .row { padding: 16px 20px; }
.feature-list .row-detail { font-size: 15px; }
.feature-list > li + li::before { left: 66px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hair); box-shadow: var(--shadow-1); }
.step { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 8px; }
.step + .step { border-left: 1px solid var(--hair); }
.step-num { font-family: var(--serif); font-style: italic; font-size: 28px; color: var(--brass); line-height: 1; margin-bottom: 18px; }
.step-title { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.step-text { font-size: 15px; color: var(--ink-2); }

.compare { width: 100%; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hair); box-shadow: var(--shadow-1); overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; }
.compare-row > span { padding: 15px 18px; font-size: 14.5px; color: var(--ink-2); }
.compare-row + .compare-row { border-top: 1px solid var(--hair); }
.compare-row > [role="rowheader"] { font-weight: 600; color: var(--ink); }
.compare-head > span { font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding-top: 18px; }
.compare .is-us { background: var(--accent-wash); color: var(--accent-strong); font-weight: 600; }
.compare-head .is-us { color: var(--accent); }

.my-guides-list { width: 100%; }
.my-guide { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; }
.my-guide-mono { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--serif); font-size: 21px; }
.my-guide-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.my-guide-name { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-guide-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.my-guide-meta { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-guide-actions { display: flex; align-items: center; gap: 2px; }
.my-guides-list > li + li::before { left: 70px; }

.closing { padding: 40px 0 72px; }
.closing-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(70% 120% at 0% 0%, rgba(214, 200, 172, 0.35), transparent 60%),
    radial-gradient(60% 100% at 100% 100%, rgba(190, 210, 198, 0.45), transparent 60%),
    var(--surface);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-2);
}
.closing-title { font-family: var(--serif); font-weight: 400; font-size: 58px; line-height: 1; letter-spacing: -0.025em; }
.closing-side { display: flex; flex-direction: column; gap: 20px; color: var(--ink-2); font-size: 16px; }
.closing-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 28px 40px;
  border-top: 1px solid var(--hair);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13.5px; color: var(--ink-3);
}
.site-footer em { font-family: var(--serif); font-size: 17px; color: var(--ink-2); }
.site-footer-links { display: flex; gap: 20px; }
.site-footer-links a { text-decoration: none; color: var(--ink-2); }
.site-footer-links a:hover { color: var(--ink); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 40px 0 56px; gap: 44px; }
  .hero-title { font-size: 68px; }
  .band { grid-template-columns: 1fr; gap: 22px; padding: 44px 0; }
  .band-note { max-width: none; }
  .closing-card { grid-template-columns: 1fr; padding: 36px 28px; }
}
@media (max-width: 640px) {
  .landing { padding: 0 20px; }
  .topbar-inner { padding: 0 16px 0 20px; height: 60px; }
  .hide-sm { display: none !important; }
  .hero { padding-top: 28px; }
  .hero-title { font-size: 54px; }
  .hero-lede { font-size: 17px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 100%; }
  .phone-landing { width: 320px; height: 640px; transform: none; }
  @keyframes drift { 0%, 8% { transform: translateY(0); } 92%, 100% { transform: translateY(calc(-100% + 616px)); } }
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; border-top: 1px solid var(--hair); }
  .step-num { margin-bottom: 6px; }
  .band > * { min-width: 0; }
  .compare-head { display: none; }
  .compare-row { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 0 6px; }
  .compare-row > span { padding: 0 12px 12px; font-size: 13.5px; line-height: 1.4; }
  .compare-row > [role="rowheader"] { grid-column: 1 / -1; padding: 0 14px 10px; font-size: 14.5px; }
  .compare-row > [role="cell"]::before { content: attr(data-col); display: block; margin-bottom: 4px; font-size: 10.5px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
  .compare-row > .is-us { background: transparent; }
  .compare-row > .is-us::before { color: var(--accent); }
  .closing-title { font-size: 46px; }
  .closing-actions .btn { flex: 1 1 100%; }
  .site-footer { padding: 24px 20px 36px; flex-direction: column; }
  .my-guide-actions .btn-icon:not(.is-danger) { display: none; }
}

/* ============================================================= EDITOR */

.ed-bar .topbar-inner { max-width: 1320px; }
.ed-status { font-size: 13.5px; color: var(--ink-3); margin-right: 8px; white-space: nowrap; }

.ed-tabs { display: none; }

.ed-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 56px;
  align-items: start;
}

.ed-form { display: flex; flex-direction: column; gap: 20px; padding-top: 44px; max-width: 720px; width: 100%; justify-self: end; }
.ed-intro { display: flex; flex-direction: column; gap: 10px; padding: 0 4px 12px; }
.ed-title { font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 1; letter-spacing: -0.025em; }
.ed-lede { color: var(--ink-2); font-size: 16.5px; max-width: 560px; }
.ed-restored {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 6px;
  font-size: 14px; color: var(--ink-2);
}
.ed-restored .icon { width: 16px; height: 16px; color: var(--accent); }
.ed-error {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--alert-soft);
  border: 1px solid rgba(163, 71, 47, 0.18);
  color: #6c2c1b;
  font-size: 15px; font-weight: 500;
}
.ed-error .icon { color: var(--alert); margin-top: 1px; }

.ed-card {
  display: flex; flex-direction: column; gap: 18px;
  padding: 26px 26px 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-1);
  scroll-margin-top: 90px;
}
.ed-card-head { display: flex; flex-direction: column; gap: 4px; }
.ed-card-title { font-size: 19px; font-weight: 650; letter-spacing: -0.025em; }
.ed-card-desc { font-size: 14.5px; color: var(--ink-3); }

.cover-field {
  display: flex; gap: 16px; align-items: center;
  padding: 14px;
  border-radius: var(--r);
  border: 1px dashed var(--hair-strong);
  background: var(--surface-2);
}
.cover-field.is-busy { opacity: 0.6; pointer-events: none; }
.cover-thumb {
  width: 96px; height: 64px; flex: none;
  border-radius: 10px; overflow: hidden;
  background: var(--fill);
  display: grid; place-items: center;
  color: var(--ink-3);
}
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.cover-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cover-actions label { cursor: pointer; }

.rows-editor { display: flex; flex-direction: column; gap: 10px; }
.rows-heading { font-size: 14px; font-weight: 600; margin-top: 4px; }
.rows-empty { font-size: 14px; color: var(--ink-3); padding: 14px 16px; border-radius: var(--r); border: 1px dashed var(--hair-strong); text-align: center; }
.rows-list { display: flex; flex-direction: column; gap: 10px; }
.rows-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 8px 12px 14px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--hair);
  animation: rise 0.35s var(--ease);
}
.rows-index { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--brass); padding-top: 9px; text-align: center; }
.rows-fields { display: flex; flex-direction: column; gap: 8px; }
.row-title-input { font-weight: 550; }
.row-text-input { min-height: 64px; font-size: 15px; }
.rows-fields .segmented { align-self: flex-start; }
.row-tools { display: flex; flex-direction: column; gap: 0; }
.row-tools .btn-icon { width: 40px; min-width: 40px; min-height: 40px; }
.row-tools .icon { width: 18px; height: 18px; }
.rows-add { display: flex; align-items: center; gap: 14px; }

.slug-field {
  display: flex; align-items: stretch;
  border-radius: 12px;
  border: 1px solid var(--hair-strong);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.slug-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(61, 107, 87, 0.14); }
.slug-prefix {
  display: flex; align-items: center;
  padding: 0 4px 0 14px;
  color: var(--ink-3);
  font-size: 15px;
  background: var(--surface-2);
  border-right: 1px solid var(--hair);
  padding-right: 10px;
  white-space: nowrap;
}
.slug-input { border: 0; border-radius: 0; box-shadow: none !important; font-weight: 550; }
.slug-status { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-3); min-height: 20px; }
.slug-status .icon { width: 16px; height: 16px; }
.slug-status.is-good { color: var(--ok); }
.slug-status.is-bad { color: var(--alert); }

.link-row {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 12px 12px 14px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--hair);
}
.link-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.link-row-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.link-row-url { font-size: 14.5px; font-family: var(--mono); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.private-pill { font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--alert-soft); color: var(--alert); }
.link-row .row-icon { align-self: center; margin: 0; }
.ed-link-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ed-form-end { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 4px 0; }

.ed-preview { position: relative; height: 100%; }
.ed-preview-sticky { position: sticky; top: 64px; padding: 28px 0 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ed-preview-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); width: 390px; }
.ed-preview-size { margin-left: auto; font-weight: 450; color: var(--ink-3); }
.ed-preview .phone { width: 414px; height: min(820px, calc(100vh - 140px)); min-height: 560px; }

.ed-mobile-bar { display: none; }

@media (max-width: 1100px) {
  .ed-layout { grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; }
  .ed-preview .phone { width: 400px; }
  .ed-preview-label { width: 376px; }
}

@media (max-width: 900px) {
  .ed-status { display: none; }
  .ed-bar .topbar-actions > .btn-primary { display: none; }
  .ed-tabs {
    display: block;
    position: sticky; top: 60px; z-index: 30;
    padding: 10px 16px;
    background: rgba(246, 244, 240, 0.86);
    -webkit-backdrop-filter: saturate(1.5) blur(16px);
    backdrop-filter: saturate(1.5) blur(16px);
    border-bottom: 1px solid var(--hair);
  }
  .ed-layout { display: block; padding: 0 16px 120px; }
  .ed-layout[data-tab="preview"] .ed-form { display: none; }
  .ed-layout[data-tab="edit"] .ed-preview { display: none; }
  .ed-form { padding-top: 24px; gap: 16px; }
  .ed-title { font-size: 44px; }
  .ed-card { padding: 20px 18px 22px; gap: 16px; }
  .ed-form-end { display: none; }
  .ed-preview-sticky { position: static; padding: 0; align-items: stretch; }
  .ed-preview-label { display: none; }
  .ed-preview .phone {
    width: auto; max-width: none; height: auto; min-height: 0;
    margin: 0 -16px;
    padding: 0; border-radius: 0;
    background: none; box-shadow: none;
  }
  .ed-preview .phone-notch { display: none; }
  .ed-preview .phone-screen { border-radius: 0; overflow: visible; height: auto; background: transparent; }
  .ed-preview .phone-screen .g-rail { padding-top: 20px; }
  .ed-preview .phone-screen .g-nav { top: 121px; }
  .ed-mobile-bar {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(246, 244, 240, 0.9);
    -webkit-backdrop-filter: saturate(1.5) blur(16px);
    backdrop-filter: saturate(1.5) blur(16px);
    border-top: 1px solid var(--hair);
  }
  .ed-mobile-bar .btn { min-height: 52px; }
  .slug-prefix { font-size: 13px; padding-left: 12px; }
  .rows-item { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 6px 12px 12px; }
  .rows-index { display: none; }
}

/* Sheet dialog */
.sheet {
  width: min(520px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-3);
  animation: sheet-in 0.45s var(--ease);
}
.sheet::backdrop { background: rgba(29, 28, 26, 0.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade 0.3s var(--ease); }
.sheet-body { padding: 32px 28px 22px; display: flex; flex-direction: column; gap: 14px; }
.sheet-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 4px; }
.sheet-icon .icon { width: 26px; height: 26px; stroke-width: 2; }
.sheet-title { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.02; letter-spacing: -0.02em; }
.sheet-text { color: var(--ink-2); font-size: 15px; margin-bottom: 6px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 8px; }
.sheet-actions .btn { flex: 1; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 520px) {
  .sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 28px 28px 0 0; }
  .sheet-body { padding: 28px 20px calc(20px + env(safe-area-inset-bottom)); }
  .sheet-actions { flex-direction: column; }
}

/* Status pages */
.status-main { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 20px; }
.status-card {
  width: min(520px, 100%);
  padding: 40px 32px 32px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
}
.status-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); }
.status-icon .icon { width: 26px; height: 26px; }
.status-title { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
.status-text { color: var(--ink-2); max-width: 400px; }
.status-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ======================================================== FRIDGE CARD */

.card-stage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px 80px;
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.card-intro { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 14px; }
.card-intro-title { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1; letter-spacing: -0.025em; }
.card-intro-text { color: var(--ink-2); }
.card-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 10px; }
.card-size-note { font-size: 13px; color: var(--ink-3); }
.card-frame { display: flex; justify-content: center; }

.card-sheet {
  container: card / inline-size;
  width: min(100%, 560px);
  aspect-ratio: 148 / 210;
  background: #fffdf9;
  color: var(--ink);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(40, 30, 15, 0.08), 0 24px 60px -18px rgba(40, 30, 15, 0.3), 0 0 0 1px rgba(56, 46, 30, 0.06);
  overflow: hidden;
  transition: aspect-ratio 0.3s var(--ease);
}
.card-sheet.size-letter { aspect-ratio: 8.5 / 11; width: min(100%, 600px); }

.card-face {
  height: 100%;
  padding: 8cqw 8.5cqw 5.5cqw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.4cqw;
  background:
    radial-gradient(80% 40% at 0% 0%, rgba(214, 200, 172, 0.22), transparent 70%),
    radial-gradient(70% 35% at 100% 100%, rgba(190, 210, 198, 0.28), transparent 70%);
}
.card-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.card-mono {
  width: 5.4cqw; height: 5.4cqw;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 0.2cqw solid rgba(61, 107, 87, 0.4);
  color: var(--accent-strong);
  font-family: var(--serif);
  font-style: normal;
  font-size: 2.3cqw;
  letter-spacing: 0;
}
.card-welcome { font-size: 2.3cqw; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.card-name { font-family: var(--serif); font-weight: 400; font-size: 10cqw; line-height: 0.98; letter-spacing: -0.025em; margin-top: 1.6cqw; text-wrap: balance; }
.card-location { margin-top: 1.2cqw; font-size: 2.8cqw; color: var(--ink-2); }

.card-qr-block { display: flex; flex-direction: column; align-items: center; text-align: center; }
.card-qr {
  width: 36cqw;
  padding: 1.6cqw;
  border-radius: 4cqw;
  background: #fff;
  border: 0.2cqw solid var(--hair);
  color: #141413;
}
.card-qr svg { width: 100%; height: auto; }
.card-qr-title { margin-top: 2.6cqw; font-size: 3.6cqw; font-weight: 650; letter-spacing: -0.02em; }
.card-qr-sub { margin-top: 0.6cqw; font-size: 2.45cqw; color: var(--ink-2); }
.card-url { margin-top: 1.4cqw; font-family: var(--mono); font-size: 2.3cqw; color: var(--ink-3); letter-spacing: 0; }

.card-wifi {
  display: flex; align-items: center; gap: 4cqw;
  padding: 3cqw 3.4cqw;
  border-radius: 3.2cqw;
  background: #fff;
  border: 0.2cqw solid var(--hair);
}
.card-wifi-text { flex: 1; min-width: 0; }
.card-wifi-label { display: flex; align-items: center; gap: 1.4cqw; font-size: 2.2cqw; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.card-wifi-label .icon { width: 3.4cqw; height: 3.4cqw; }
.card-wifi dl { display: flex; flex-direction: column; gap: 1cqw; margin-top: 1.4cqw; }
.card-wifi dt { font-size: 2.1cqw; color: var(--ink-3); }
.card-wifi dd { font-size: 3.5cqw; font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; line-height: 1.2; }
.card-wifi dd.mono { font-size: 3.2cqw; }
.card-wifi-qr { width: 15.5cqw; flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.8cqw; color: #141413; }
.card-wifi-qr svg { width: 100%; height: auto; }
.card-wifi-qr span { font-size: 1.9cqw; color: var(--ink-3); }

.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 3cqw; border-top: 0.2cqw solid var(--hair); padding-top: 2.4cqw; }
.card-facts { display: flex; gap: 5cqw; }
.card-facts dt { font-size: 1.9cqw; color: var(--ink-3); }
.card-facts dd { font-size: 2.6cqw; font-weight: 600; font-variant-numeric: tabular-nums; }
.card-brand { display: flex; align-items: center; gap: 1.6cqw; font-family: var(--serif); font-style: italic; font-size: 2.8cqw; color: var(--ink-3); }

@media (max-width: 860px) {
  .card-stage { grid-template-columns: 1fr; gap: 28px; padding: 28px 16px 64px; }
  .card-intro { position: static; }
  .card-intro-title { font-size: 40px; }
}

/* ============================================================== MOTION */

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.guide-page .g-hero, .guide-page .g-body > * { animation: rise 0.6s var(--ease) both; }
.guide-page .g-body > *:nth-child(2) { animation-delay: 0.05s; }
.guide-page .g-body > *:nth-child(3) { animation-delay: 0.1s; }
.guide-page .g-body > *:nth-child(4) { animation-delay: 0.15s; }
.hero-copy > *, .hero-visual { animation: rise 0.7s var(--ease) both; }
.hero-copy > *:nth-child(2) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.1s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.15s; }
.hero-visual { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .phone-landing .guide { animation: none !important; }
}

/* =============================================================== PRINT */

@media print {
  @page { margin: 13mm 14mm; }
  html, body { background: #fff !important; }
  body { font-size: 10pt; line-height: 1.4; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body::before, .toast, .topbar, .g-nav, .g-actions, .segmented, .g-footer-card, .ed-mobile-bar { display: none !important; }
  .btn-icon, .row-password .btn, .code-hint, .row-code .row-trailing { display: none !important; }

  .page-guide .guide-shell { padding: 0; }
  .page-guide .g-layout { display: block !important; max-width: none; padding: 0 !important; }
  .page-guide .g-rail { position: static !important; padding: 0 !important; max-height: none; overflow: visible; }
  .page-guide .g-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    row-gap: 10px;
    align-items: center;
  }
  .page-guide .g-monogram { width: 54px; height: 54px; box-shadow: inset 0 0 0 1px rgba(56, 46, 30, 0.15); }
  .page-guide .g-monogram span { font-size: 24px; }
  .page-guide .g-cover { display: none; }
  .page-guide .g-hero-text { gap: 2px; }
  .page-guide .g-stamp { padding: 0; border: 0; background: none; font-size: 8.5pt; order: 3; }
  .page-guide .g-stamp-dot { display: none; }
  .page-guide .g-eyebrow { margin: 0; font-size: 8pt; }
  .page-guide .g-title { font-size: 30pt !important; }
  .page-guide .g-facts { grid-column: 1 / -1; }
  .page-guide .g-fact { padding: 7px 10px 7px 0; }
  .page-guide .g-fact + .g-fact { padding-left: 12px; }
  .page-guide .g-fact dd { font-size: 10.5pt; }

  .page-guide .g-body {
    display: block !important;
    padding-top: 12px !important;
    columns: 2;
    column-gap: 22px;
  }
  .page-guide .g-body > * { margin-bottom: 12px; break-inside: avoid; animation: none !important; }
  .page-guide .g-section { gap: 6px; break-inside: auto; }
  .page-guide .g-section-head { break-after: avoid; }
  .page-guide .g-section-title { font-size: 8pt; }
  .page-guide .g-section-meta { font-size: 8pt; }
  .page-guide .g-welcome { padding: 12px 14px; box-shadow: none; }
  .page-guide .g-welcome-text { font-size: 11.5pt; }
  .fact-copy { display: none; }
  .g-fact-wifi dd::after { content: attr(data-print); }
  .page-guide .g-host { margin-top: 8px; padding-top: 8px; }
  .page-guide .g-host-contact { display: none; }
  .page-guide .g-host-avatar { width: 26px; height: 26px; font-size: 13px; }

  .group { box-shadow: none !important; border-radius: 10px; break-inside: auto; }
  .row { min-height: 0; padding: 5px 10px; gap: 9px; break-inside: avoid; }
  .row + .row::before, .disclosure + .disclosure::before, .group > li + li::before { left: 10px; }
  .row-icon { width: 20px; height: 20px; border-radius: 6px; }
  .row-icon .icon { width: 13px; height: 13px; }
  .row-label { font-size: 9.5pt; }
  .row-time { font-size: 9.5pt; }
  .g-section-appliances .g-section-meta { display: none; }
  .row-value { font-size: 9.5pt; }
  .row-detail { font-size: 8.5pt; }
  .row-num { width: 20px; font-size: 12pt; }
  .code-value { font-size: 10pt; }
  .row-chevron { display: none !important; }
  .row-panel { display: block !important; }
  .row-panel > p { overflow: visible; padding: 0 10px 7px 39px !important; font-size: 8.5pt; }
  .disclosure { break-inside: avoid; }
  .row-local.is-filtered { display: flex !important; }
  .tag { font-size: 7pt; padding: 1px 6px; }
  .progress { display: none; }
  .check-box { width: 14px; height: 14px; margin: 1px 3px 0; border-width: 1px; }
  .check-input:checked ~ .row-main .row-label { text-decoration: none; color: inherit; }
  .check-input:checked + .check-box { background: #fff; border-color: var(--hair-strong); }
  .check-input:checked + .check-box .icon { opacity: 0; }

  .page-guide .g-emergency { margin-top: 4px; }
  .emergency-card { padding: 12px 14px; gap: 8px; border-radius: 12px; break-inside: avoid; }
  .emergency-head { gap: 10px; }
  .emergency-icon { width: 26px; height: 26px; border-radius: 8px; }
  .emergency-title { font-size: 15pt; }
  .emergency-lede { font-size: 8.5pt; margin-top: 1px; }
  .emergency-actions { display: none; }

  .page-guide .g-footer { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 0; }
  .page-guide .g-print-qr { display: flex; align-items: center; gap: 10px; }
  .page-guide .g-print-qr svg { width: 22mm; height: 22mm; color: #111; }
  .page-guide .g-print-qr p { display: flex; flex-direction: column; font-size: 8.5pt; color: var(--ink-2); }
  .page-guide .g-print-qr strong { color: var(--ink); font-size: 9.5pt; }
  .g-footer-meta { font-size: 8pt; }
  a { text-decoration: none !important; }

  /* Fridge card */
  body.page-card { margin: 0; }
  .page-card .card-stage { display: block; padding: 0; margin: 0; max-width: none; }
  .page-card .card-intro { display: none; }
  .page-card .card-frame { display: block; }
  .page-card .card-sheet {
    width: 148mm;
    height: 210mm;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
    overflow: hidden;
  }
}
