@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("./assets/fonts/fraunces-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("./assets/fonts/fraunces-latin-ext-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("./assets/fonts/fraunces-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("./assets/fonts/fraunces-latin-ext-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./assets/fonts/outfit-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./assets/fonts/outfit-latin-ext-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("./assets/fonts/outfit-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("./assets/fonts/outfit-latin-ext-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("./assets/fonts/outfit-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("./assets/fonts/outfit-latin-ext-600-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --paper: #efeae2;
  --paper-2: #f7f4ee;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: rgba(28, 25, 21, 0.12);
  --copper: #7a3b1e;
  --sea: #1a333c;
  --sea-2: #234652;
  --cream: #f6f3ec;
  --warn: #f3e6d4;
  --bad: #f6e4dc;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Songti SC", "Noto Serif SC", "PMingLiU", "Yu Mincho", "Noto Serif JP", "Noto Serif KR", "Noto Naskh Arabic", "Noto Serif Thai", Georgia, serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", "PingFang SC", "Noto Sans SC", "PingFang TC", "Hiragino Sans", "Noto Sans JP", "Noto Sans KR", "Noto Sans Thai", "Noto Naskh Arabic", "Helvetica Neue", sans-serif;
  --shadow: 0 24px 50px rgba(22, 28, 32, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(166, 92, 58, 0.08), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.55;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; line-height: 1.08; }
h1 { font-size: clamp(2.35rem, 10vw, 4.4rem); max-width: 11ch; text-wrap: pretty; }
html[lang|="zh"] h1,
html[lang="ja"] h1,
html[lang="ko"] h1 { max-width: 100%; }
h2 { font-size: clamp(1.7rem, 6vw, 2.5rem); max-width: 16ch; }
h3 { font-size: 1.25rem; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -48px;
  z-index: 80;
  background: var(--cream);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
}
.skip:focus { top: calc(10px + env(safe-area-inset-top)); }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  min-height: 44px;
}
.mark { width: 26px; height: 26px; color: var(--sea); flex: none; }
.top-links { display: none; }
.lang { position: relative; margin-inline-start: auto; }
.lang summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  max-width: 46vw;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}
.lang summary::-webkit-details-marker { display: none; }
.lang-current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}
.lang-panel {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  width: min(260px, 78vw);
  max-height: min(64vh, 440px);
  overflow: auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 30;
}
.lang-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
}
.lang-panel a[aria-current="page"] { background: var(--sea); color: var(--cream); }

.hero { display: flex; flex-direction: column; padding-top: 8px; }
.hero-copy { display: contents; }
.hero-lead { order: 1; padding: 12px 20px 0; }
.hero-cta { margin-top: 16px; width: 100%; }
.cover { order: 2; }
.hero-rest { order: 3; padding: 18px 20px 0; }
.eyebrow, .kicker, .feed-label, .try-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 600;
}
.eyebrow { margin-bottom: 10px; }
.lede { margin-top: 14px; max-width: 38rem; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: grid; gap: 10px; margin-top: 20px; }
.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0;
  margin: 22px 0 0;
}
.stats li {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 10px 12px;
}
.stats strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stats span { display: block; margin-top: 6px; color: var(--muted); font-size: 0.78rem; line-height: 1.3; }

.cover { margin: 22px 0 0; }
.cover img {
  width: 100%;
  height: auto;
  display: block;
}
.cover figcaption {
  padding: 10px 20px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.feed-label { padding: 22px 20px 8px; }
.ticker {
  overflow: hidden;
  margin: 0 0 8px;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: flex;
  gap: 8px;
  width: max-content;
  animation: ticker 32s linear infinite;
  padding-inline: 20px;
}
.tick {
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
  white-space: nowrap;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

section[id] { scroll-margin-top: 76px; scroll-margin-bottom: 96px; }
.block { padding: 28px 20px 8px; }
.kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.kicker span {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}
.block h2 + p, .sea p { margin-top: 12px; color: var(--muted); max-width: 40rem; }
.sea p { color: rgba(246, 243, 236, 0.86); }

.check-row { display: grid; gap: 10px; margin-top: 16px; }
input, select, textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(28, 25, 21, 0.18);
  background: #fffdf9;
  padding: 14px;
  font-size: 16px;
  min-height: 52px;
}
textarea { min-height: 128px; resize: vertical; }
select {
  padding-inline-end: 36px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
html[dir="rtl"] select {
  background-position: 18px 22px, 12px 22px;
}
#note-form { display: grid; gap: 12px; margin-top: 16px; }
#note-form label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
.hint { color: var(--muted); font-size: 0.88rem; }
.form-error { color: #7a2e24; font-size: 0.95rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: var(--sea); color: var(--cream); }
.btn-primary:hover { background: var(--sea-2); }
.btn-ghost { background: transparent; border-color: var(--ink); }
.hero-actions .btn, .ad-copy .btn, #note-form .btn, .saved .btn { width: 100%; }

.result, .saved {
  margin-top: 14px;
  border-radius: 18px;
  padding: 16px;
}
.result.hit, .saved { background: var(--sea); color: var(--cream); }
.result.miss { background: var(--warn); }
.result.bad { background: var(--bad); }
.result-stop {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 8px;
}
.result-title { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -0.03em; margin-bottom: 6px; }
.result .path-row { display: grid; gap: 8px; margin-top: 14px; }
@media (min-width: 720px) {
  .result .path-row { grid-template-columns: 1fr 1fr; }
}
.result .path-row .btn { width: 100%; }
.result.hit .btn-primary { background: var(--cream); color: var(--sea); }
.result.hit .btn-primary:hover { background: #fff; color: var(--sea); }
.result.hit .btn-ghost { color: var(--cream); border-color: rgba(246, 243, 236, 0.7); }
#still, #moved { scroll-margin-top: 84px; scroll-margin-bottom: 96px; }
.channel-intro { margin: 12px 0 0; }
.channels { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.channels a { font-weight: 650; color: var(--sea); }
.result code {
  display: block;
  margin-top: 10px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  word-break: break-all;
}
.try-label { margin: 16px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 999px;
  min-height: 44px;
  padding: 8px 12px;
  cursor: pointer;
}
.chip code { font-size: 0.82rem; }
.sample-list { padding-inline-start: 18px; }

.steps, .brief { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.steps li, .brief li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.num, .brief li span {
  font-family: var(--serif);
  color: var(--copper);
  font-size: 1.2rem;
  min-width: 1.8rem;
}
.steps h3 { margin-bottom: 4px; }
.steps p, .brief p, .card p { color: var(--muted); }
.side-fig { margin: 18px 0 0; }
.side-fig img { width: 100%; height: auto; border-radius: 24px; display: block; }

.cards { display: grid; gap: 10px; margin-top: 16px; }
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}
.card h3 { margin-bottom: 6px; }
.privacy-extra {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f3e7dc;
}

.sea {
  margin: 28px 16px 8px;
  padding: 22px 18px 24px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 30%),
    var(--sea);
  color: var(--cream);
}
.sea .kicker, .sea h2 { color: var(--cream); }
.sea .kicker { color: #e4b89a; }

.saved dl { margin: 12px 0; display: grid; gap: 8px; }
.saved dt { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: #e4b89a; }
.saved dd { margin: 0; white-space: pre-wrap; }

.foot { padding: 28px 20px 12px; color: var(--muted); font-size: 0.92rem; }
.foot .fine { margin-top: 8px; font-size: 0.8rem; }
.foot .desk { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.foot .desk a { color: var(--ink); }
.legal {
  width: min(720px, calc(100% - 32px));
  margin: 28px auto 64px;
}
.legal h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 8px 0;
}
.legal .jump { display: flex; flex-wrap: wrap; gap: 12px 16px; margin: 8px 0 12px; }
.legal h2 { margin-top: 28px; }
.legal p { color: var(--muted); }
.legal a { color: var(--sea); }

.dock {
  position: fixed;
  z-index: 25;
  inset-inline: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-2) 92%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.dock a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
}
.dock a[aria-current="true"] { background: var(--sea); color: var(--cream); }

.ad-pop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 16px 12px calc(20px + env(safe-area-inset-bottom));
  background: rgba(18, 16, 14, 0.5);
}
.ad-pop[hidden] { display: none; }
.ad-card {
  width: min(440px, 100%);
  max-height: min(92dvh, 720px);
  overflow: auto;
  background: var(--paper-2);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  animation: rise 280ms ease;
}
.ad-media { position: relative; }
.ad-media img { width: 100%; height: 210px; object-fit: cover; object-position: 50% 42%; display: block; }
.ad-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: var(--copper);
  color: var(--cream);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.ad-x {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f6f3ec;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
.stamp { margin-top: 8px; color: rgba(246, 243, 236, 0.75); font-size: 0.85rem; }
.ad-copy { padding: 16px 16px 18px; display: grid; gap: 8px; }
.ad-copy .kicker { margin: 0; }
@keyframes rise {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
body.ad-open { overflow: hidden; }
body.ad-open .dock { visibility: hidden; }

:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
::selection { background: #e7c2ae; }

@media (min-width: 720px) {
  .check-row { grid-template-columns: 1fr auto; align-items: center; }
  .check-row .btn { width: auto; min-width: 140px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .hero-actions { grid-template-columns: auto auto; justify-content: start; }
  .hero-actions .btn { width: auto; min-width: 180px; }
}

@media (min-width: 960px) {
  body { padding-bottom: 48px; }
  .top { display: grid; grid-template-columns: auto 1fr auto; padding-inline: 28px; }
  .top-links { display: flex; justify-content: center; gap: 22px; }
  .top-links a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
  .lang summary { max-width: none; }
  .hero {
    width: min(1120px, calc(100% - 56px));
    margin: 12px auto 0;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 42px;
    align-items: start;
  }
  .hero-copy { display: block; }
  .hero-lead, .hero-rest { padding: 0; order: 0; }
  .hero-cta { width: auto; min-width: 180px; }
  .cover { order: 0; }
  .cover { margin: 0; }
  .cover img {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    height: auto;
    border-radius: 28px;
    box-shadow: var(--shadow);
  }
  .cover figcaption { padding-inline: 4px; }
  .feed-label, .block, .foot { width: min(1120px, calc(100% - 56px)); margin-inline: auto; padding-inline: 0; }
  .ticker { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }
  .steps-block { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: center; }
  .side-fig { margin: 0; }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .sea { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }
  .dock { display: none; }
  #note-form { max-width: 640px; }
  #note-form .btn, .saved .btn { width: auto; min-width: 220px; }
  .ad-pop { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; }
  .ticker { mask-image: none; overflow: visible; }
  .ad-card { animation: none; }
}
