/*
  noibi web — landing, privacy, support.
  Colours mirror src/design-system/tokens (palette.ts / colors.ts, light mode:
  the app is fixed to light while the brand system settles, so is the site).
  Type follows D8: Hiragino / Noto Sans JP, never italic, generous line-height.
  Page transitions, reveals and scroll effects are CSS-only progressive
  enhancements. The only script is the わが家 demo on the landing
  (room-demo.js + the app's room engine), same-origin, so the CSP in _headers
  allows script-src 'self' and nothing else. Without it the page still reads
  completely: the demo falls back to a still of the room.
*/

:root {
  color-scheme: light;
  interpolate-size: allow-keywords;
  --paper: #f6f3f2;
  --canvas: #fffaf8;
  --surface: #ffffff;
  --surface-raised: #fbf8f6;
  --ink: #2f2a2a;
  --ink-2: #625b5b;
  --ink-3: #8a8282;
  --plum-900: #49302f;
  --plum-700: #7a4e4e;
  --plum-500: #9c7777;
  --taupe-300: #b5a0a0;
  --peach-100: #ffddd0;
  --coral-300: #ffa07a;
  --terracotta: #c97d5f;
  --warm-soft: #fbe9e2;
  --border: #ded2ce;
  --border-subtle: #e9deda;
  --radius-control: 12px;
  --radius-card: 20px;
  --header-h: 64px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow-soft: 0 18px 40px -28px rgba(73, 48, 47, 0.45);
  /* Section colours: SECTION_COLORS in src/design-system/ThemeProvider.tsx (Today stays plum). */
  --calendar: #4f78a2;
  --calendar-soft: #eaf3fc;
  --shopping: #b75d47;
  --shopping-soft: #fdf0ea;
  --quests: #397463;
  --quests-soft: #eaf5f0;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

/* ---------- Page transitions (cross-document View Transitions) ---------- */

@view-transition { navigation: auto; }

::view-transition-old(root) { animation: vt-out 180ms ease-in both; }
::view-transition-new(root) { animation: vt-in 360ms var(--ease-out) both; }

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  font-style: normal;
  line-break: strict;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

em, i, cite, address { font-style: normal; }

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

a {
  color: var(--plum-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 200ms ease, transform 200ms var(--ease-out);
}
a:hover { color: var(--plum-900); }
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--coral-300);
  outline-offset: 3px;
  border-radius: 6px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 8px 14px;
  background: var(--plum-700);
  color: #fff;
  border-radius: var(--radius-control);
}
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
  margin: 0;
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  view-transition-name: site-header;
  background: rgba(255, 250, 248, 0.78);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
}
.doc-page .site-header { background: rgba(246, 243, 242, 0.8); }

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 4px;
  margin-left: -4px;
  border-radius: 14px;
  text-decoration: none;
}
.brand:hover { background: rgba(251, 233, 226, 0.7); }
.brand-mark { width: 30px; height: 30px; }
.brand-word { width: 62px; height: auto; margin-top: 2px; }

.header-nav {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.header-nav a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 559px) { .header-nav .nav-wide { display: none; } }
@media (max-width: 374px) {
  .site-header .inner { gap: 8px; padding: 0 12px; }
  .brand-word { width: 54px; }
  .header-nav { font-size: 12px; }
  .header-nav a { padding: 7px 10px; }
}
.header-nav a:hover { background: var(--warm-soft); color: var(--plum-900); }
.header-nav a[aria-current="page"] {
  background: var(--plum-700);
  color: #fff;
}

.read-progress { display: none; }

@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-lift linear both;
    animation-timeline: scroll();
    animation-range: 0 120px;
  }
  @keyframes header-lift {
    to {
      border-bottom-color: var(--border-subtle);
      box-shadow: 0 10px 30px -24px rgba(73, 48, 47, 0.5);
    }
  }

  .read-progress {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--coral-300), var(--terracotta));
    transform-origin: 0 50%;
    animation: read-progress linear both;
    animation-timeline: scroll();
  }
  @keyframes read-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
}

/* ---------- Back to top ---------- */

.to-top { display: none; }

@supports (animation-timeline: scroll()) {
  .to-top {
    position: fixed;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 25;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    color: var(--plum-700);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    animation: to-top-in linear both;
    animation-timeline: scroll();
    animation-range: 300px 420px;
  }
  .to-top:hover { color: var(--plum-900); transform: translateY(-2px); }
  @keyframes to-top-in {
    from { opacity: 0; visibility: hidden; transform: translateY(12px); }
    to { opacity: 1; visibility: visible; transform: none; }
  }
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 16px;
  background: var(--plum-700);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: 0 12px 24px -16px rgba(122, 78, 78, 0.9);
}
.button:hover { background: var(--plum-900); color: #fff; transform: translateY(-1px); }
.button:active { transform: scale(0.98); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--paper);
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.7;
}
.site-footer .inner {
  display: grid;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 16px calc(32px + env(safe-area-inset-bottom));
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-weight: 500;
}
.footer-brand img { width: 26px; height: 26px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer nav a { color: var(--ink-2); text-decoration: none; }
.site-footer nav a:hover { color: var(--plum-700); text-decoration: underline; }
.site-footer .copy { margin: 0; }

@media (min-width: 760px) {
  .site-footer .inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
  }
  .site-footer nav { justify-content: center; }
}

/* ---------- Entry & reveal motion ---------- */

.enter { animation: rise 0.8s var(--ease-out) both; }
.enter-2 { animation-delay: 0.07s; }
.enter-3 { animation-delay: 0.14s; }
.enter-4 { animation-delay: 0.21s; }
.enter-5 { animation-delay: 0.28s; }
.enter-6 { animation-delay: 0.35s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@supports (animation-timeline: view()) {
  .reveal {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 45%;
  }
}

/* ---------- Landing ---------- */

.landing {
  background:
    radial-gradient(60% 45% at 80% 18%, rgba(255, 160, 122, 0.2), transparent 70%),
    radial-gradient(50% 35% at 5% 60%, rgba(255, 221, 208, 0.5), transparent 70%),
    var(--canvas);
}

.hero-wrap { overflow-x: clip; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

.hero-copy { max-width: 540px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--plum-700);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral-300);
  animation: breathe 2.8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 160, 122, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(255, 160, 122, 0); }
}

.hero h1 {
  margin: 20px 0 0;
  color: var(--plum-900);
  font-size: clamp(32px, 8vw, 50px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.01em;
}
.hero h1 .phrase { display: inline-block; }
.hero h1 .accent { color: var(--terracotta); }

.hero .lead {
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.9;
}
.hero .lead-en {
  margin: 10px 0 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 28px 0 0;
}
.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}
.hero-note .icon { width: 18px; height: 18px; color: var(--plum-500); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--plum-700);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.scroll-cue .icon { width: 18px; height: 18px; transition: transform 200ms var(--ease-out); }
.scroll-cue:hover .icon { transform: translateY(3px); }

/* Illustration with floating "in-app" cards */

.hero-visual {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 580px);
  padding: 8% 0 6%;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 16% 8% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 180, 130, 0.45), transparent);
  filter: blur(20px);
  animation: glow 6s ease-in-out infinite;
}
.hero-visual > .phone-hero {
  position: relative;
  width: var(--pw);
  margin: 0 auto;
  animation: rise 1.1s var(--ease-out) both;
}
@keyframes glow {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 60%;
  padding: 9px 14px 9px 9px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 34px -20px rgba(73, 48, 47, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  line-height: 1.35;
  animation:
    rise 0.8s var(--ease-out) both,
    bob 7s ease-in-out infinite;
}
.float-card strong { display: block; color: var(--ink); font-weight: 600; }
.float-card .meta { display: block; color: var(--ink-3); font-size: 11.5px; }

/* Very narrow phones (≤360px): smaller cards so they never cover the house. */
@media (max-width: 360px) {
  .float-card { gap: 8px; padding: 7px 10px 7px 7px; font-size: 12px; border-radius: 14px; }
  .float-card .chip-icon { width: 26px; height: 26px; border-radius: 9px; }
  .float-card .meta { font-size: 10.5px; }
}
.float-card .chip-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  flex: none;
}
.float-card .chip-icon .icon { width: 16px; height: 16px; }

/* Pills hung on the edges of the Today screen's quick-action row
   (予定 · 買い物 · クエスト, 44–55% of the figure's height): shopping sits on the
   weather card's bottom edge above its card; calendar and quests sit on the
   room card's top edge under theirs, hanging a little past the phone so they never touch each other.
   They use the app's tab icons and section colours. --pw is the phone's
   width (see .phone-hero). */
.hero-visual { --pw: min(66%, 320px); }
.fc-pill {
  gap: 8px;
  max-width: none;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  white-space: nowrap;
}
.fc-pill .chip-icon { width: 28px; height: 28px; border-radius: 50%; }
.fc-pill .chip-icon .icon { width: 15px; height: 15px; }
.pill-text { display: inline-flex; align-items: baseline; gap: 8px; }
.pill-text strong { display: inline; }
.pill-text .meta { display: inline; }

.fc-calendar { top: calc(56.9% - 8px); left: calc(50% - var(--pw) * 0.58); animation-delay: 0.4s, 0.6s; }
.fc-calendar .chip-icon { background: var(--calendar-soft); color: var(--calendar); }

.fc-quest { top: calc(56.9% - 8px); right: calc(50% - var(--pw) * 0.58); animation-delay: 0.6s, 2.4s; }
.fc-quest .chip-icon { background: var(--quests-soft); color: var(--quests); }
.fc-quest .xp { color: var(--quests); font-weight: 700; }

.fc-shop { top: calc(42.6% - 30px); left: 0; right: 0; width: max-content; margin: 0 auto; animation-delay: 0.5s, 1.8s; }
.fc-shop .chip-icon { background: var(--shopping-soft); color: var(--shopping); }
/* Phones: the phone is too narrow for both pills under the row, so they move to the figure's edges. */
@media (max-width: 899px) {
  .fc-calendar { left: 0; }
  .fc-quest { right: 0; }
}
.fc-shop strong { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--taupe-300); }


/* Just above the screenshot's tab bar (≈85% of the figure), centred on the room card. */
.fc-room { top: calc(84% - 46px); left: 0; right: 0; width: max-content; margin: 0 auto; animation-delay: 0.75s, 3.6s; }
.fc-room strong { color: var(--plum-700); }
.fc-room .chip-icon { background: var(--peach-100); color: var(--plum-700); }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1.05fr;
    gap: 40px;
    min-height: min(760px, calc(100svh - var(--header-h)));
    padding: 24px 16px 56px;
  }
  .float-card { font-size: 14px; }
}

/* Features */

.features {
  padding: 56px 16px 72px;
  background: linear-gradient(to bottom, transparent, rgba(246, 243, 242, 0.9) 30%);
}
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-title {
  margin: 8px 0 0;
  max-width: 620px;
  color: var(--plum-900);
  font-size: clamp(24px, 5.4vw, 32px);
  font-weight: 700;
  line-height: 1.45;
}

.feature-grid {
  display: grid;
  gap: 14px;
  margin: 32px 0 0;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.feature {
  padding: 22px 20px 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  transition: transform 260ms var(--ease-out), box-shadow 260ms ease, border-color 200ms ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}
.feature .chip-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
}
.feature h3 {
  margin: 16px 0 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
.feature p { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }

.tone-coral { background: #fff0e8; color: var(--terracotta); }
.tone-plum { background: #f3e9e8; color: var(--plum-700); }
.tone-peach { background: var(--peach-100); color: var(--plum-900); }
.tone-taupe { background: #efe7e6; color: var(--plum-500); }

.closing {
  margin: 40px 0 0;
  padding: 28px 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.9;
  text-align: center;
}
.closing strong { display: block; color: var(--plum-900); font-size: 18px; font-weight: 700; }

.room,
.style,
.values,
.start { padding: 56px 16px 72px; }
.room { background: linear-gradient(to bottom, rgba(246, 243, 242, 0.9), #fdf1ec 40%, rgba(253, 241, 236, 0.6)); }
.values { background: var(--paper); }

.section-lead {
  margin: 12px 0 0;
  max-width: 660px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.9;
}

/* Phone frame around real app screenshots (iPhone 16 Pro captures, 1206x2622).
   Everything is in percentages of the frame, so it scales with any width:
   - bezel: 3% of the frame width on each side;
   - screen corners: the display radius measured on the captures (186px of
     1206, i.e. 15.4% of the width = 7.08% of the height), so sheets whose
     bottom corners follow the display fit without gaps;
   - Dynamic Island: a touch smaller than the real 125x37pt, on the same centre line. */

.phone {
  position: relative;
  display: flow-root; /* keeps the screen's vertical margin inside the frame */
  border-radius: 17.5% / 8.3%;
  background: linear-gradient(145deg, #2a2a2e, #1f1f22 50%, #252528);
  box-shadow:
    inset 0 0 0 1px #151517,
    0 30px 60px -32px rgba(73, 48, 47, 0.6),
    0 2px 6px rgba(0, 0, 0, 0.12);
}
.phone img {
  width: 94%;
  margin: 3%;
  border-radius: 15.4% / 7.08%;
}
.phone::after {
  content: "";
  position: absolute;
  top: 2.95%;
  left: 50%;
  width: 25%;
  aspect-ratio: 125 / 37;
  border-radius: 999px;
  background: #0b0b0c;
  transform: translateX(-50%);
}

/* Four tabs tour. Without tour.js the steps stack, each with its own phone;
   with it (.is-live) one tilted phone stays pinned and follows the step being read. */

.tour-step,
.tour-tabs a { --tone: var(--plum-700); --tone-soft: #f3e9e8; }
.tone-calendar,
.tour-tabs [data-step="calendar"] { --tone: var(--calendar); --tone-soft: var(--calendar-soft); }
.tone-shopping,
.tour-tabs [data-step="shopping"] { --tone: var(--shopping); --tone-soft: var(--shopping-soft); }
.tone-quests,
.tour-tabs [data-step="quests"] { --tone: var(--quests); --tone-soft: var(--quests-soft); }

.tour-body { margin: 32px 0 0; }
.tour-stage { display: none; }

.tour-step {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 28px 20px;
  border-radius: 28px;
  background:
    radial-gradient(70% 60% at 100% 100%, var(--tone-soft), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-subtle);
}
.tour-step:focus { outline: none; }
.tour-step:focus-visible { outline: 2px solid var(--coral-300); outline-offset: 6px; border-radius: 16px; }
.step-phone { width: min(78%, 280px); justify-self: center; margin: 28px 0 0; }

.tour-step .tag {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 14px 5px 10px;
  border-radius: 999px;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.tour-step .tag .icon { width: 17px; height: 17px; }
.tour-step h3 {
  margin: 16px 0 0;
  color: var(--plum-900);
  font-size: clamp(21px, 4.6vw, 28px);
  font-weight: 700;
  line-height: 1.5;
}
.tour-step > p:not(.tag) { margin: 10px 0 0; color: var(--ink-2); font-size: 15.5px; }

.checks { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.65; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat,
    var(--tone);
}

/* Live: pinned stage */

.tour.is-live {
  /* Height of the pinned phone; its width follows the capture's 1206x2622 ratio plus the bezel. */
  --tour-device-h: clamp(250px, 44svh, 420px);
}
.is-live .step-phone { display: none; }
.is-live .tour-stage { display: block; }
.is-live .tour-step {
  margin: 0;
  padding: 28px 4px 44px;
  background: none;
  border: 0;
  border-radius: 0;
  min-height: 58svh;
  /* Added to html's scroll-padding-top (header + 20px): lands the text just under the pinned stage. */
  scroll-margin-top: calc(var(--tour-device-h) + 80px);
}

.tour-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  max-width: 460px;
  margin: 0 auto;
  padding: 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 24px -20px rgba(73, 48, 47, 0.5);
}
.tour-tabs a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 4px 2px;
  border-radius: 14px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.tour-tabs a .icon { width: 18px; height: 18px; }
.tour-tabs a:hover { color: var(--tone); }
.tour-tabs a[aria-current="step"] { background: var(--tone-soft); color: var(--tone); }
.tour-tabs a:focus-visible { outline: 2px solid var(--coral-300); outline-offset: 2px; border-radius: 14px; }

.tour-device {
  display: grid;
  place-items: center;
  height: var(--tour-device-h);
  margin: 14px 0 0;
  perspective: 1400px;
}

/* 3/4 view: the phone turns a little between steps, alternating sides. */
.tour-phone {
  width: calc(var(--tour-device-h) / 2.104);
  transform: rotateY(-12deg) rotateX(5deg) rotateZ(1.5deg);
  box-shadow:
    inset 0 0 0 1px #151517,
    /* Side of the phone: 1px steps of the same shape, so the edge reads as one solid piece. */
    0 0 0 0.6px #1f1f22,
    0.9px 0.45px 0 #1f1f22,
    1.8px 0.90px 0 #1c1c1f,
    2.7px 1.35px 0 #1a1a1c,
    3.6px 1.80px 0 #171719,
    4.5px 2.25px 0 #151517,
    5.4px 2.70px 0 #131315,
    6.3px 3.15px 0 #111113,
    34px 40px 50px -30px rgba(73, 48, 47, 0.6);
  transition: transform 0.9s var(--ease-out), box-shadow 0.9s var(--ease-out);
}
.tour[data-active="calendar"] .tour-phone,
.tour[data-active="quests"] .tour-phone {
  transform: rotateY(12deg) rotateX(5deg) rotateZ(-1.5deg);
  box-shadow:
    inset 0 0 0 1px #151517,
    0 0 0 0.6px #1f1f22,
    -0.9px 0.45px 0 #1f1f22,
    -1.8px 0.90px 0 #1c1c1f,
    -2.7px 1.35px 0 #1a1a1c,
    -3.6px 1.80px 0 #171719,
    -4.5px 2.25px 0 #151517,
    -5.4px 2.70px 0 #131315,
    -6.3px 3.15px 0 #111113,
    -34px 40px 50px -30px rgba(73, 48, 47, 0.6);
}

.tour-phone .screens {
  position: relative;
  display: grid;
  width: 94%;
  margin: 3%;
  overflow: hidden;
  border-radius: 15.4% / 7.08%;
  background: #f6f3f2;
}
.tour-phone .screens img {
  grid-area: 1 / 1;
  width: 100%;
  margin: 0;
  border-radius: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.45s ease, transform 0.7s var(--ease-out);
}
.tour-phone .screens img.is-active { opacity: 1; transform: none; }
/* A soft reflection on the glass, kept light so the screen stays readable. */
.tour-phone .screens::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 32%);
  pointer-events: none;
}

/* Phones: stage pinned under the header, the text scrolls beneath it. */
@media (max-width: 899px) {
  .is-live .tour-stage {
    position: sticky;
    top: var(--header-h);
    z-index: 4;
    margin: 0 -16px;
    padding: 10px 16px 18px;
    background: linear-gradient(to bottom, rgba(247, 244, 243, 0.97) 88%, rgba(247, 244, 243, 0));
  }
}

/* Desktop: text on the left, stage pinned on the right. */
@media (min-width: 900px) {
  .tour.is-live { --tour-device-h: min(600px, calc(100svh - var(--header-h) - 150px)); }
  .is-live .tour-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: 56px;
  }
  .is-live .tour-stage {
    order: 2;
    position: sticky;
    top: calc(var(--header-h) + 16px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: calc(100svh - var(--header-h) - 32px);
  }
  .tour-tabs a { flex-direction: row; gap: 6px; font-size: 13px; }
  .is-live .tour-step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100svh - var(--header-h) - 32px);
    /* Extra top padding = the tabs above the phone, so the text centres on the phone, not on the stage. */
    padding: 112px 0 40px;
    scroll-margin-top: 0;
  }
  .tour-phone { transform: rotateY(-16deg) rotateX(6deg) rotateZ(2deg); }
  .tour[data-active="calendar"] .tour-phone,
  .tour[data-active="quests"] .tour-phone { transform: rotateY(16deg) rotateX(6deg) rotateZ(-2deg); }
}

/* わが家 demo */

.room-lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin: 32px 0 0;
}
@media (min-width: 900px) {
  .is-live .room-lab { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; }
  .is-live .room-card { position: sticky; top: calc(var(--header-h) + 20px); }
}
.room:not(.is-live) .room-card { max-width: 640px; }
/* Phones: the room stays pinned under the header while the controls scroll,
   like the fixed preview of the app's もよう替え sheet. */
@media (max-width: 899px) {
  .is-live .room-card { position: sticky; top: calc(var(--header-h) + 6px); z-index: 5; }
  .is-live .room-progress { display: none; }
  .is-live .room-scene { padding-bottom: 10px; }
}

.room-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(170deg, #fdf1ec, #f7e6df);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}
.room-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.room-eyebrow { margin: 0; color: var(--plum-700); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; }
.room-name { margin: 2px 0 0; color: var(--plum-900); font-size: 21px; font-weight: 700; line-height: 1.4; }
.room-pill {
  margin: 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--plum-700);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.room-scene { padding: 6px 12px 4px; }
.room-scene svg { display: block; width: 100%; height: auto; }
.room-scene img { width: 100%; margin: 8px 0 12px; border-radius: 18px; }
.room-progress { padding: 0 22px 20px; }
.room-progress-row { color: var(--ink-2); font-size: 13px; }
.room-progress-row b { color: var(--plum-700); font-variant-numeric: tabular-nums; }
.room-unlocks { margin: 2px 0 0; color: var(--plum-900); font-size: 15px; font-weight: 600; line-height: 1.6; min-height: 1.6em; }
.room-bar { height: 10px; margin: 12px 0 0; overflow: hidden; border-radius: 99px; background: var(--surface); border: 1px solid var(--border-subtle); }
.room-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--coral-300), var(--terracotta)); transition: width 0.7s var(--ease-out); }

.room-toast {
  position: absolute;
  left: 50%;
  top: 70px;
  width: max-content;
  max-width: 88%;
  margin: 0;
  padding: 8px 16px;
  border-radius: 14px;
  background: var(--plum-900);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
}
.room-toast.show { animation: toast 2.8s var(--ease-out) both; }
@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, -8px); }
  12%, 80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* Items that appear on a level-up drop in, like RoomScene's PopGroup. */
.room-scene .pop { animation: pop 0.65s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes pop {
  from { opacity: 0; transform: translateY(-18px); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}

.room-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.panel {
  padding: 18px 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
}
.panel h3 { margin: 0 0 10px; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.5; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; }
.panel-note { margin-bottom: 10px; color: var(--ink-3); font-size: 12px; }
.panel-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 560px) { .panel-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.level-control { display: flex; align-items: center; gap: 12px; }
.level-control input { flex: 1; min-width: 0; accent-color: var(--plum-700); }
.step {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--plum-700);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.step:disabled { opacity: 0.4; cursor: default; }

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
}
.seg-scroll { grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}
.seg button:hover { color: var(--plum-900); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--plum-700); font-weight: 700; box-shadow: 0 1px 4px rgba(73, 48, 47, 0.14); }

.choices { margin: 14px 0 0; }
.choice-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.choice-head strong { color: var(--ink); font-size: 16px; }
.choice-head span { color: var(--ink-3); font-size: 12.5px; }
.choice-head.is-sub { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border-subtle); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.choice-grid.is-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 480px) { .choice-grid.is-colors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.choice-grid.is-locked { opacity: 0.6; }
.choice-grid button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.choice-grid button:hover:not(:disabled) { border-color: var(--plum-500); }
.choice-grid button[aria-checked="true"] { border: 1.5px solid var(--plum-700); background: var(--peach-100); color: var(--plum-900); font-weight: 600; }
.choice-grid button:disabled { opacity: 0.5; cursor: not-allowed; }
.swatch { flex: none; width: 28px; height: 28px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.12); }
.is-colors .swatch { width: 22px; height: 22px; border-radius: 50%; }
.swatch.is-none {
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), var(--taupe-300) calc(50% - 1px), var(--taupe-300) calc(50% + 1px), transparent calc(50% + 1px)),
    var(--surface-raised);
}
.choice-grid .name { min-width: 0; }
.choice-grid small { display: block; color: var(--plum-700); font-size: 11px; font-weight: 500; }
.choice-grid small.lock { color: var(--ink-3); }
.choice-foot { margin: 14px 0 0; color: var(--ink-3); font-size: 12.5px; }

.seg button:focus-visible,
.choice-grid button:focus-visible,
.step:focus-visible,
.ladder button:focus-visible,
.level-control input:focus-visible { outline: 2px solid var(--coral-300); outline-offset: 2px; }

.ladder-wrap { margin: 36px 0 0; }
.ladder-title { margin: 0; color: var(--plum-900); font-size: 18px; font-weight: 700; }
.ladder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) { .ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ladder button {
  display: grid;
  gap: 2px;
  align-content: start;
  width: 100%;
  height: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ladder button:hover { border-color: var(--border); box-shadow: var(--shadow-soft); }
.ladder button[aria-current="step"] { border-color: var(--plum-700); background: var(--peach-100); }
.ladder .n { color: var(--plum-700); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.ladder .t { font-size: 14px; font-weight: 700; line-height: 1.5; }
.ladder .u { color: var(--ink-2); font-size: 12px; line-height: 1.6; }
.ladder-note { margin: 14px 0 0; max-width: 720px; color: var(--ink-3); font-size: 13px; line-height: 1.8; }

/* Member card screenshots */

.phone-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(64%, 260px);
  gap: 16px;
  margin: 32px -16px 0;
  padding: 4px 16px 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.phone-row::-webkit-scrollbar { display: none; }
.phone-row figure { margin: 0; scroll-snap-align: center; }
.phone-row figcaption { margin: 12px 0 0; color: var(--ink-2); font-size: 14px; font-weight: 600; text-align: center; }
@media (min-width: 860px) {
  .phone-row { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 280px)); justify-content: center; gap: 32px; overflow: visible; margin: 36px 0 0; padding: 0; }
}

/* Getting started + closing call to action */

.steps {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 22px 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
}
.step-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--plum-700);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.steps strong { color: var(--ink); font-size: 16.5px; }
.steps li > span:last-child { color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }

.cta {
  display: grid;
  gap: 8px;
  align-items: center;
  margin: 48px 0 0;
  padding: 28px 24px 32px;
  border-radius: 28px;
  background:
    radial-gradient(60% 80% at 0% 100%, rgba(255, 160, 122, 0.25), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-subtle);
  text-align: center;
}
.cta-room { width: min(88%, 340px); margin: 0 auto; }
.cta-room svg, .cta-room img { display: block; width: 100%; height: auto; }
.cta-room img { border-radius: 18px; }
.cta h2 { margin: 0; color: var(--plum-900); font-size: clamp(22px, 5vw, 28px); font-weight: 700; line-height: 1.5; }
.cta p { margin: 8px auto 20px; max-width: 460px; color: var(--ink-2); }
@media (min-width: 760px) {
  .cta { grid-template-columns: 340px 1fr; gap: 32px; padding: 36px 48px; text-align: left; }
  .cta-room { width: 100%; }
  .cta p { margin-left: 0; }
}

/* ---------- Document pages (privacy, support) ---------- */

.doc-page { background: var(--paper); }

.doc {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

.doc-hero { max-width: 760px; padding: 36px 0 4px; }
.doc-hero h1 {
  margin: 6px 0 0;
  color: var(--plum-900);
  font-size: clamp(28px, 6.4vw, 38px);
  font-weight: 700;
  line-height: 1.35;
}
.doc-hero .lede { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; }
.doc-hero .meta { margin: 10px 0 0; color: var(--ink-3); font-size: 13px; }

.lang-switch {
  display: inline-flex;
  gap: 2px;
  margin: 20px 0 0;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  line-height: 1.4;
}
.lang-switch a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
}
.lang-switch a:hover { background: var(--warm-soft); color: var(--plum-700); }

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin: 24px 0 0;
}
.doc-body { min-width: 0; max-width: 780px; }

.toc-desktop { display: none; }
.toc-mobile {
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
}
.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 15px;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary .icon { color: var(--plum-500); transition: transform 240ms var(--ease-out); }
.toc-mobile[open] summary .icon { transform: rotate(180deg); }
.toc-mobile ol { margin: 0; padding: 0 18px 16px 36px; }

.toc-list { font-size: 14px; line-height: 1.6; }
.toc-list li { margin: 0; padding: 5px 0; color: var(--ink-3); }
.toc-list a { color: var(--ink-2); text-decoration: none; }
.toc-list a:hover { color: var(--plum-700); text-decoration: underline; }
.toc-list .toc-lang { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border-subtle); list-style: none; }

@media (min-width: 1000px) {
  .doc-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }
  .toc-mobile { display: none; }
  .toc-desktop {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow: auto;
  }
  .toc-desktop .toc-title {
    margin: 0 0 8px;
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
  }
  .toc-desktop ol { margin: 0; padding-left: 0; list-style: none; }
  .toc-desktop li a {
    display: block;
    margin-left: -12px;
    padding: 3px 12px;
    border-left: 2px solid transparent;
  }
  .toc-desktop li a:hover { border-left-color: var(--coral-300); text-decoration: none; }
  .toc-desktop .toc-lang { margin-left: -12px; padding-left: 12px; }
}

/* Key points */

.highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) { .highlights { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.highlights li {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.highlights .chip-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  border-radius: 11px;
}
.highlights .chip-icon .icon { width: 18px; height: 18px; }
.highlights strong { color: var(--ink); font-size: 14.5px; font-weight: 700; }

/* Cards and prose */

.card {
  margin: 0;
  padding: 24px 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
}
.card + .card { margin-top: 20px; }
@media (min-width: 640px) { .card { padding: 36px 40px; } }

.card > :first-child { margin-top: 0; }

.card h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 40px 0 0;
  color: var(--plum-900);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
}
.card h2:first-child { margin-top: 0; }
.card h2 .num {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--warm-soft);
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-2px);
}
.card h3 {
  margin: 24px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}
.card p,
.card ul,
.card ol,
.card dl { margin: 12px 0 0; color: var(--ink); }
.card ul,
.card ol { padding-left: 1.3em; }
.card li + li { margin-top: 6px; }
.card li::marker { color: var(--plum-500); }
.card .muted { color: var(--ink-2); font-size: 14px; }

.card dl {
  display: grid;
  gap: 2px 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface-raised);
}
.card dt { color: var(--ink-3); font-size: 12.5px; }
.card dd { margin: 0 0 10px; }
.card dd:last-child { margin-bottom: 0; }
@media (min-width: 640px) {
  .card dl { grid-template-columns: 8.5em 1fr; gap: 8px 20px; }
  .card dd { margin: 0; }
}

.vendor-table {
  width: 100%;
  margin: 16px 0 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.65;
}
.vendor-table th,
.vendor-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}
.vendor-table th { color: var(--ink-3); font-weight: 600; font-size: 12px; border-top: 0; }
.vendor-table td:first-child { font-weight: 600; white-space: nowrap; }
@media (max-width: 559px) {
  .vendor-table thead { display: none; }
  .vendor-table tr { display: block; padding: 12px 0; border-top: 1px solid var(--border-subtle); }
  .vendor-table td { display: block; padding: 2px 0; border: 0; }
  .vendor-table td[data-label] { color: var(--ink-2); font-size: 13px; }
  .vendor-table td[data-label]::before { content: attr(data-label); color: var(--ink-3); }
}

.contact-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 16px 0 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--warm-soft);
}
.contact-box .label { display: block; color: var(--ink-2); font-size: 13px; }
.contact-box .email {
  color: var(--plum-700);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}
.contact-box .email:hover { text-decoration: underline; }

.notice {
  display: flex;
  gap: 12px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff4ef;
  border: 1px solid #f6ddd2;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.75;
}
.notice .icon { margin-top: 3px; color: var(--terracotta); }

.back-top { margin: 28px 0 0; font-size: 13px; }
.back-top a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.back-top .icon { width: 16px; height: 16px; }

/* Support: contact hero and quick links */

.contact-hero {
  display: grid;
  gap: 18px;
  padding: 24px 20px;
  border-radius: 24px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(255, 160, 122, 0.22), transparent 60%),
    var(--surface);
  border: 1px solid var(--border-subtle);
}
@media (min-width: 640px) { .contact-hero { padding: 32px 36px; } }
@media (min-width: 820px) {
  .contact-hero { grid-template-columns: 1fr auto; align-items: center; gap: 24px 40px; }
}
.contact-hero h2 { margin: 0; color: var(--plum-900); font-size: 20px; font-weight: 700; line-height: 1.5; }
.contact-hero p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.contact-hero .contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}
.contact-hero .contact-meta span { display: inline-flex; align-items: center; gap: 6px; }
.contact-hero .contact-meta .icon { width: 15px; height: 15px; }

.quick-links {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) { .quick-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.quick-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.5;
}
.quick-links a:hover { transform: translateY(-2px); border-color: var(--border); box-shadow: var(--shadow-soft); color: var(--ink); }
.quick-links .chip-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex: none;
}
.quick-links strong { display: block; font-size: 14.5px; font-weight: 600; }
.quick-links small { display: block; color: var(--ink-3); font-size: 12.5px; }
.quick-links .chevron { margin-left: auto; color: var(--taupe-300); transition: transform 200ms var(--ease-out); }
.quick-links a:hover .chevron { transform: translateX(3px); color: var(--plum-500); }

.support-sections { margin: 20px 0 0; }

/* FAQ */

.faq { margin: 12px 0 0; }
.faq details {
  border-top: 1px solid var(--border-subtle);
}
.faq details:last-child { border-bottom: 1px solid var(--border-subtle); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  line-height: 1.6;
  transition: color 160ms ease;
}
.faq summary:hover { color: var(--plum-700); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--plum-500);
  flex: none;
  transition: transform 260ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.faq summary .plus .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--plum-700); border-color: var(--plum-700); color: #fff; }
.faq details > p { margin: 0 0 18px; padding-right: 40px; color: var(--ink-2); }

.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  opacity: 0;
  transition: block-size 320ms var(--ease-out), opacity 240ms ease, content-visibility 320ms allow-discrete;
}
.faq details[open]::details-content { block-size: auto; opacity: 1; }

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: calc(100svh - var(--header-h) - 140px);
  padding: 48px 16px;
  text-align: center;
}
.not-found h1 { margin: 20px 0 0; color: var(--plum-900); font-size: 24px; }
.not-found p { margin: 8px 0 0; color: var(--ink-2); }
.not-found .mark { margin: 0 auto; width: 72px; height: 72px; }
.not-found .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 24px 0 0; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
  /* Scroll-driven pieces fall back to their static end state. */
  .site-header { border-bottom-color: var(--border-subtle); }
  .to-top { opacity: 1; visibility: visible; }
}

.spaced { margin-top: 20px; }
