:root {
  --cream: #F4F3EE;
  --cream-warm: #F4ECDF;
  --peach: #E5E3E8;
  --yellow: #684D95;
  --brown: #6A6D78;
  --heading: #26211C;
  --hot: #26211C;
  --hot-ink: #F4F3EE;
  --ink: #1F1F2C;
  --line: rgb(107 114 128 / 0.3);
  --white: #FFFFFF;
  --peach-deep: #563F7B;
  --yellow-deep: #563F7B;
  --rust: #991B1B;
  --primary: #684D95;
  --primary-hover: #563F7B;
  --hover: #DFDED9;
  --danger-bg: #FCECEC;
  --success-bg: #E3E8E4;
  --warn-bg: #F0EAD8;
  --tint-api: #DCE6F0;
  --tint-image: #F0E3DB;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 2px 8px rgb(0 0 0 / 0.04);
  --font: "Plus Jakarta Sans", Arial, ui-sans-serif, system-ui, sans-serif;
  --side: 16.75rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.03em; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus {
  left: 12px; top: 12px; z-index: 90;
  background: var(--primary); color: #fff;
  padding: 8px 12px; border-radius: 999px; font-weight: 700;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(40px, 10vh, 96px) clamp(20px, 6vw, 88px) clamp(56px, 10vh, 112px);
  overflow: hidden;
  background: var(--cream);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(8px);
}
.hero::before {
  width: min(52vmin, 420px);
  height: min(52vmin, 420px);
  right: -6%;
  top: 8%;
  background: none;
  opacity: 0;
}
.hero::after {
  width: min(36vmin, 280px);
  height: min(36vmin, 280px);
  left: -8%;
  bottom: 6%;
  background: none;
  opacity: 0;
}
.hero-inner {
  position: relative;
  width: min(760px, 100%);
}
.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  animation: rise 0.7s ease both;
}
.hero-logo, .brand-mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--heading);
}
.brand-mark { width: 32px; height: 32px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); }
.brand-text em {
  font-style: normal; font-size: 0.7rem; font-weight: 600;
  color: var(--brown); letter-spacing: -0.01em; font-weight: 500;
}
.hero .brand-text strong { font-size: 1.05rem; }
.hero .brand-text em { font-size: 0.75rem; }
.hero h1 {
  margin: 36px 0 0;
  font-size: clamp(2.85rem, 8vw, 5.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--heading);
  text-wrap: balance;
  animation: rise 0.7s ease 0.08s both;
}
.hero-sub {
  margin: 22px 0 0;
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.8vw, 1.125rem);
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--brown);
  font-weight: 400;
  animation: rise 0.7s ease 0.16s both;
}
.hero-cta {
  display: inline-flex;
  margin-top: 32px;
  min-height: 56px;
  padding: 0 26px;
  font-size: 1.08rem;
  animation: rise 0.7s ease 0.24s both;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  animation: rise 0.7s ease 0.32s both;
  color: var(--brown);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.hero-stats li {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.hero-stats li + li::before {
  content: "";
  width: 4px; height: 4px;
  margin: 0 14px 0 10px;
  border-radius: 50%;
  background: var(--peach-deep);
  transform: translateY(-1px);
}
.hero-stats strong, .hero-stats [data-hero-date] {
  color: var(--heading);
  font-weight: 600;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ----- App shell ----- */
.app {
  display: flex;
  align-items: stretch;
  min-height: 100svh;
  background: var(--cream);
  border-top: 1px solid var(--line);
  scroll-margin-top: 0;
}
.sidebar {
  display: none;
  flex-direction: column;
  width: var(--side);
  flex: 0 0 var(--side);
  background: var(--cream);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100svh;
  z-index: 40;
}
.sidebar.open { display: flex; z-index: 80; }
@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .menu-btn, .close-side { display: none !important; }
}
@media (max-width: 1023px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100svh;
    flex: none;
  }
}
.scrim {
  position: fixed; inset: 0;
  background: rgb(31 31 44 / 0.4);
  z-index: 70;
}
.brand-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 14px 12px;
  flex: 0 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; min-width: 0;
}
.side-nav {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 10px calc(16px + env(safe-area-inset-bottom, 0px));
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.nav-label {
  margin: 14px 8px 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--heading);
  opacity: 0.72;
}
.side-nav .nav-label:first-child { margin-top: 4px; }
.side-divider {
  height: 1px;
  background: var(--line);
  margin: 12px 8px 4px;
  flex: 0 0 auto;
}
.nav-item {
  display: flex; align-items: center;
  min-height: 38px;
  border: 0; background: transparent;
  border-radius: 999px; padding: 0 12px;
  text-align: left; text-decoration: none;
  color: var(--ink);
  font-weight: 600; font-size: 0.92rem;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item.on { background: var(--peach); color: var(--heading); font-weight: 600; }
.sidebar .nav-item.hot-item,
.sidebar .nav-item.hot-item.on {
  background: var(--hot);
  color: var(--hot-ink);
  font-weight: 600;
  opacity: 1;
}
.sidebar .nav-item.hot-item:hover,
.sidebar .nav-item.hot-item.on:hover {
  background: #1A1714;
  color: var(--hot-ink);
}
.nav-item.muted-link {
  min-height: 30px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--brown);
}
.nav-item.muted-link:hover { color: var(--ink); }
.side-foot {
  border-top: 1px solid var(--line);
  margin: 8px 2px 0;
  padding: 8px 8px 4px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.78rem;
}
.side-foot a { font-weight: 500; text-decoration: none; color: var(--brown); }
.side-foot a:hover { text-decoration: underline; color: var(--ink); }
.checked-note { margin: 4px 0 0; color: var(--brown); font-size: 0.72rem; font-weight: 500; }

.frame { display: flex; flex-direction: column; min-height: 100svh; flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  background: var(--cream);
}
.search { flex: 1; min-width: 0; }
.search input {
  width: 100%; border: 1px solid var(--line); background: var(--white);
  border-radius: var(--radius-md); padding: 10px 12px; font-size: 0.9rem;
  color: var(--ink);
}
.search input::placeholder { color: var(--brown); }
.search input:focus { outline: 2px solid rgb(104 77 149 / 0.4); outline-offset: 1px; border-color: var(--primary); }
.icon-only {
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white);
  display: grid; place-items: center; cursor: pointer;
  color: var(--ink);
}
.close-side { border: 0; font-size: 1.4rem; line-height: 1; background: transparent; }
.burger, .burger::before, .burger::after {
  display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative;
}
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; }
.burger::after { top: 5px; }

.main { width: min(1120px, 100%); margin: 0 auto; padding: 20px 16px 48px; }
.main-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 16px; }
.main-head h2 { margin: 0; font-size: 1.5rem; letter-spacing: -0.03em; font-weight: 600; color: var(--heading); line-height: 1.1; }
.sub, .count { margin: 4px 0 0; color: var(--brown); font-size: 0.88rem; font-weight: 500; }
.banner {
  background: var(--cream-warm); color: var(--ink);
  border-radius: 12px; padding: 10px 14px; margin: 0 0 16px;
  font-size: 0.9rem; font-weight: 600;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.card {
  container-type: inline-size;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgb(31 31 44 / 0.12); }
.card:target, .card.flash { outline: 2px solid var(--primary); outline-offset: 2px; }
.card-top { display: grid; grid-template-columns: 36px 1fr; gap: 8px 10px; align-items: start; }
.logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--cream); object-fit: contain;
}
.titles { min-width: 0; }
.name { margin: 0; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; color: var(--heading); line-height: 1.25; }
.vendor { margin: 0; color: var(--brown); font-size: 0.78rem; font-weight: 500; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: start; grid-column: 2; }
.badge {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; border-radius: 999px;
  padding: 2px 7px; border: 1px solid var(--line); color: var(--heading);
  background: var(--cream); height: fit-content;
}
.badge.yes { color: var(--heading); border-color: #C9D4CC; background: var(--success-bg); }
.badge.warn { color: var(--heading); border-color: #E4D8C0; background: var(--warn-bg); }
.badge.no, .badge.trial { color: var(--rust); border-color: #E8C9C9; background: var(--danger-bg); }
.limit-short {
  margin: 10px 0 0; color: var(--brown); font-size: 0.88rem; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; border-radius: 999px; padding: 4px 12px;
  border: 1px solid var(--line); background: var(--white);
  font-size: 0.8rem; font-weight: 700; cursor: pointer; text-decoration: none;
  color: var(--ink);
}
.btn:hover { background: var(--peach); border-color: var(--peach); }
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-text { border: 0; font-weight: 600; color: var(--heading); padding-left: 6px; background: transparent; }
.btn-text:hover { background: var(--hover); }
.star-btn { background: var(--white); border-color: var(--line); color: var(--ink); }
.star-btn:hover { background: var(--cream); border-color: var(--line); }
.star-btn .star-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 0.72rem; line-height: 1;
}
.star-btn[aria-pressed="true"] {
  background: var(--heading); color: var(--cream); border-color: var(--heading);
}
.star-btn[aria-pressed="true"] .star-icon { background: #fff; color: var(--primary); }
.btn[aria-pressed="true"]:not(.star-btn) { background: var(--heading); color: var(--cream); border-color: var(--heading); }
.star-btn.pop .star-icon { animation: pop 0.35s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.drawer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
  transition: grid-template-rows 0.35s ease, opacity 0.28s ease, margin-top 0.35s ease;
}
.drawer.open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 12px;
  pointer-events: auto;
}
.drawer-inner { overflow: hidden; min-height: 0; }
.details {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  font-size: 0.9rem;
}
.details-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.details-logo, .details-logo-fallback {
  width: 64px; height: 64px; border-radius: 16px;
  object-fit: contain; background: var(--white);
  box-shadow: var(--shadow);
}
.details-logo-fallback {
  display: grid; place-items: center;
  background: var(--peach); color: var(--heading);
  font-weight: 600; font-size: 1.1rem;
}
.details-head h3 { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--heading); line-height: 1.2; }
.details-head p { margin: 2px 0 0; color: var(--brown); font-size: 0.85rem; }
.details-official { margin-top: 8px; display: inline-flex; }
.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.details-official { grid-column: 1 / -1; justify-self: start; }
@container (min-width: 520px) {
  .details-grid { grid-template-columns: repeat(3, 1fr); }
  .details-head { grid-template-columns: 64px 1fr auto; }
  .details-official { grid-column: auto; margin-top: 0; }
}
.d-card {
  background: var(--white);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--line);
}
.d-card h4 {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--heading);
}
.d-card p { margin: 0; color: var(--ink); }
.d-free { background: var(--cream-warm); border-color: var(--line); }
.d-limits { background: var(--white); }
.d-cardneed { background: var(--warn-bg); border-color: var(--line); }
.d-cardneed .pill {
  display: inline-block; margin-top: 6px;
  background: var(--heading); color: var(--cream);
  font-weight: 800; font-size: 0.75rem;
  border-radius: 999px; padding: 3px 8px;
}
.d-start { margin-top: 0; }
.d-start ol { margin: 0; padding-left: 18px; }
.d-start li { margin: 0 0 10px; }
.d-start li:last-child { margin-bottom: 0; }
.copy-row {
  display: flex; align-items: stretch; gap: 6px;
  margin-top: 6px;
}
.copy-row pre {
  flex: 1; margin: 0; background: var(--cream);
  border-radius: 10px; padding: 8px 10px;
  font-size: 0.78rem; overflow: auto; white-space: pre-wrap;
}
.copy-row .btn { flex: 0 0 auto; background: var(--white); border-color: var(--line); color: var(--ink); font-weight: 500; }
.d-note { margin: 8px 0 0; color: var(--brown); font-size: 0.84rem; }
.d-note a { font-weight: 600; color: var(--primary); }
.models { margin: 0 0 10px; padding: 0; list-style: none; }
.models li { padding: 4px 0; border-bottom: 1px solid var(--cream); }
.models li:last-child { border: 0; }
.empty { color: var(--brown); }
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--heading); color: var(--cream); padding: 8px 14px; border-radius: 999px;
  font-size: 0.85rem; z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.toast.on { opacity: 1; }
.hot-rank {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--primary); color: #fff;
  border-radius: 999px; padding: 2px 7px;
}
@media (max-width: 1023px) {
  .hero { min-height: 100svh; padding-top: 48px; padding-bottom: 64px; }
  .hero h1 { margin-top: 28px; }
  .main { padding-top: 16px; }
  .hero-stats { flex-direction: column; gap: 8px; }
  .hero-stats li + li::before { display: none; }
  .brand-row { padding: 12px 14px 8px; }
  .side-nav { padding: 0 10px calc(18px + env(safe-area-inset-bottom, 0px)); gap: 1px; }
  .nav-label { margin: 12px 8px 4px; font-size: 0.75rem; color: var(--heading); }
  .side-nav .nav-label:first-child { margin-top: 2px; }
  .nav-item { min-height: 36px; font-size: 0.9rem; }
  .nav-item.muted-link { min-height: 28px; }
  .actions { gap: 4px; }
  .btn { padding: 4px 10px; }
  .btn-text { padding-left: 4px; padding-right: 4px; }
  .helper-fab { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* ----- Helper (on-device catalog search) ----- */
.helper { position: relative; z-index: 55; }
.helper-fab {
  position: fixed; right: 16px; bottom: 16px;
  z-index: 55;
  min-width: 56px; height: 56px; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: var(--hot); color: var(--hot-ink);
  font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 28px rgb(31 31 44 / 0.22);
}
.helper-fab:hover { background: #1A1714; }
.helper-fab[aria-expanded="true"] { display: none; }
.helper-panel[hidden] { display: none !important; }
.helper-panel {
  position: fixed; right: 16px; bottom: 16px;
  z-index: 56;
  width: min(380px, calc(100vw - 24px));
  max-height: min(560px, calc(100svh - 24px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgb(31 31 44 / 0.18);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.helper-head {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 14px 14px 10px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.helper-head strong { display: block; color: var(--heading); font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.helper-head p { margin: 4px 0 0; color: var(--brown); font-size: 0.75rem; line-height: 1.4; }
.helper-log {
  flex: 1; overflow: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 160px;
}
.helper-msg { max-width: 100%; font-size: 0.88rem; }
.helper-msg.user {
  align-self: flex-end;
  background: var(--hot); color: var(--hot-ink);
  border-radius: 14px 14px 4px 14px;
  padding: 8px 11px;
}
.helper-msg.bot {
  background: var(--cream);
  border-radius: 14px 14px 14px 4px;
  padding: 8px 11px;
  color: var(--ink);
}
.helper-hit {
  display: block; margin-top: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px;
  text-decoration: none; color: inherit;
}
.helper-hit strong { color: var(--heading); font-weight: 600; }
.helper-hit span { display: block; color: var(--brown); font-size: 0.78rem; margin-top: 2px; }
.helper-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.helper-chips button {
  border: 1px solid var(--line); background: var(--cream);
  border-radius: 999px; padding: 4px 10px;
  font-size: 0.75rem; font-weight: 600; color: var(--heading); cursor: pointer;
}
.helper-chips button:hover { background: var(--hover); }
.helper-form {
  display: flex; gap: 6px; padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}
.helper-form input {
  flex: 1; border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 10px; background: var(--cream); min-width: 0;
}
@media (max-width: 1023px) {
  .helper-panel { right: 12px; left: 12px; width: auto; bottom: 12px; }
}

/* ----- First-visit guide (Skillings-style; does not change existing layout) ----- */
.guide-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
}
.guide-btn:hover { color: var(--primary-hover); }
.tour {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.tour-catcher { position: absolute; inset: 0; }
.tour-dim {
  position: absolute;
  inset: 0;
  background: rgb(31 31 44 / 0.4);
  backdrop-filter: blur(2px);
}
.tour-spot {
  pointer-events: none;
  position: absolute;
  border-radius: 16px;
  outline: 3px solid var(--primary);
  outline-offset: 0;
  box-shadow: 0 0 0 9999px rgb(31 31 44 / 0.62), 0 0 28px 6px rgb(104 77 149 / 0.55);
  transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
}
.tour-spot.round { border-radius: 999px; }
.tour-card {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px rgb(31 31 44 / 0.16);
  transition: top 0.3s ease, left 0.3s ease, width 0.3s ease;
}
.tour-card-center {
  left: 50%;
  top: 50%;
  width: min(28rem, calc(100vw - 2rem));
  transform: translate(-50%, -50%);
}
.tour-sheet-bottom {
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.tour-sheet-top {
  left: 12px;
  right: 12px;
  top: calc(12px + env(safe-area-inset-top, 0px));
}
.tour-arrow {
  display: none;
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}
.tour-card.has-arrow-up .tour-arrow {
  display: block;
  top: -7px;
  border-right: 0;
  border-bottom: 0;
}
.tour-card.has-arrow-down .tour-arrow {
  display: block;
  bottom: -7px;
  border-left: 0;
  border-top: 0;
}
.tour-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tour-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
}
.tour-dots { display: flex; gap: 4px; }
.tour-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  transition: width 0.2s ease, background-color 0.2s ease;
}
.tour-dot.on { width: 16px; background: var(--primary); }
.tour-title {
  margin: 8px 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--heading);
  line-height: 1.2;
}
.tour-body {
  margin: 8px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--brown);
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.tour-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  width: 100%;
}
.tour-actions .tour-skip,
.tour-actions .tour-nav,
.tour-actions .btn {
  flex-shrink: 0;
}
.tour-skip {
  border: 0;
  background: transparent;
  color: var(--brown);
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 34px;
  padding: 0 4px;
  cursor: pointer;
}
.tour-skip:hover { color: var(--ink); }
.tour-nav { display: flex; gap: 8px; }
.tour [hidden] { display: none !important; }
