@font-face {
  font-family: "PiPiPu Icons";
  src: url("./feature-icons-v2.ttf") format("truetype");
  font-display: block;
}

:root {
  color-scheme: light;
  --page: #fffaf3;
  --surface: #fffdfa;
  --ink: #3b2d26;
  --muted: #6e594d;
  --brand: #8b4d31;
  --accent: #f4d5ad;
  --soft: #fbeddc;
  --line: #ecdece;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 1rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
a { color: var(--brand); text-underline-offset: 0.2em; }
:is(a, button, [tabindex="0"]):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.wrap { width: min(100% - 64px, 1120px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand nav locale";
  align-items: center;
  gap: 24px;
  min-height: 76px;
}
.wordmark {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.wordmark img, .app-icon { display: block; border-radius: 12px; }
.wordmark-text { display: grid; gap: 2px; line-height: 1.16; }
.wordmark-name { font-size: 1.25rem; font-weight: 780; letter-spacing: -0.025em; }
.wordmark-subtitle { color: var(--muted); font-size: 0.74rem; }
.site-nav, .footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.site-nav { grid-area: nav; justify-self: end; }
.site-nav a, .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .footer-links a:hover { color: var(--brand); text-decoration: underline; }
.site-nav [aria-current] { color: var(--brand); text-decoration: underline; }

.language-switch {
  grid-area: locale;
  justify-self: end;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.language-switch button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
}
.language-switch button:hover { background: var(--page); }
.language-switch button[aria-pressed="true"] { background: var(--soft); color: #633c28; }

.site-footer {
  border-top: 1px solid var(--line);
  background: #fcf2e6;
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 20px;
  min-height: 80px;
  padding-block: 10px;
}

.icon { font: normal 1.25rem/1 "PiPiPu Icons"; }
.icon-tile {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--tile, #f8e6d6);
  color: var(--glyph, #8b4d31);
}
.blue { --tile: #edf3fb; --glyph: #476a98; }
.green { --tile: #edf6eb; --glyph: #4e734e; }
.mint { --tile: #ecf6f6; --glyph: #427471; }
.sand { --tile: #faf2e8; --glyph: #805d3e; }

.store-links { display: flex; flex-wrap: wrap; gap: 10px; }
.store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 145px;
  min-height: 52px;
  padding: 8px 14px;
  border-radius: 15px;
  background: var(--accent);
  color: #4b3126;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}
.store-link:hover { background: #eec79c; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(32px, 6vw, 78px);
  padding-block: 62px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.05vw, 4.35rem);
  font-weight: 770;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.hero h1 span:last-child { color: var(--brand); }
[lang="zh-CN"] .hero h1 {
  font-size: clamp(2.4rem, 4.45vw, 4rem);
  letter-spacing: -0.026em;
  line-height: 1.17;
}
.hero-intro {
  max-width: 39ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1.025rem, 1.55vw, 1.18rem);
}
.hero .store-links { margin-top: 25px; }
.voice-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin-top: 21px;
  padding: 10px 13px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.voice-highlight:hover { border-color: #d0a888; background: var(--soft); }
.voice-highlight-copy { display: grid; gap: 3px; min-width: 0; line-height: 1.35; }
.voice-highlight-copy strong { font-size: 0.92rem; }
.voice-highlight-copy span { color: var(--muted); font-size: 0.83rem; }
.voice-link-icon { margin-left: auto; color: var(--brand); font-size: 1.15rem; }

.day-preview {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  padding: clamp(26px, 4vw, 56px) clamp(16px, 3vw, 36px) 19px;
  border: 1px solid #efd7b9;
  border-radius: 34px;
  background: radial-gradient(ellipse at 24% 18%, #fff1d7, transparent 67%),
    linear-gradient(145deg, #f7dfba, #efc8a4);
}
.day-preview::before, .day-preview::after {
  position: absolute;
  z-index: -1;
  width: min(57%, 300px);
  aspect-ratio: 1;
  border: 1px solid #fff7e4;
  border-radius: 50%;
  content: "";
}
.day-preview::before { top: -26%; right: -10%; box-shadow: 0 0 0 19px #fff7e432; }
.day-preview::after { bottom: -34%; left: -17%; box-shadow: 0 0 0 18px #fff7e432; }
.day-preview figcaption { margin-top: 16px; color: #654b3c; font-size: 0.82rem; }
.day-card {
  width: min(100%, 354px);
  padding: clamp(14px, 2.45vw, 26px);
  border: 1px solid #f1e7db;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 22px 58px -17px #a8674480, 0 5px 12px #a86f3d1c;
}
.day-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.day-header h2 { font-size: clamp(1.25rem, 2.3vw, 1.65rem); letter-spacing: -0.025em; }
.day-header .icon-tile { width: 37px; height: 37px; }
.day-timeline { margin: 0; padding: 0; list-style: none; }
.day-timeline li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 12px;
  border-bottom: 1px solid #f2e8dc;
}
.day-timeline time { min-width: 5ch; color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.day-timeline .icon-tile { width: 37px; height: 37px; }
.record-content { display: grid; flex: 1; line-height: 1.35; }
.record-content strong { font-size: 0.92rem; }
.record-content span { color: var(--muted); font-size: 0.8rem; }
.day-share {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 650;
}
.day-share .icon { font-size: 1.1rem; }

.home-section { padding-block: 32px 43px; border-top: 1px solid var(--line); }
.home-section h2 {
  margin-bottom: 20px;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}
.feature h3 { margin-bottom: 5px; font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: 0.93rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.feature {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.feature .icon-tile { margin-bottom: 12px; }

.content-page { padding-block: 44px 64px; }
.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  margin-bottom: 34px;
  padding: clamp(20px, 4.5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 27px;
  background: linear-gradient(115deg, #fff7ec 15%, #faead6);
}
.page-title-line { display: flex; align-items: center; gap: 13px; }
.page-title-line .icon-tile { width: 44px; height: 44px; }
.page-title h1 {
  font-size: clamp(2.12rem, 4.8vw, 3.45rem);
  letter-spacing: -0.038em;
}
.page-title p { margin-top: 8px; color: var(--muted); }
.page-actions { min-width: min(100%, 210px); }
.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding-block: 4px;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 680;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.shortcut + .shortcut { border-top: 1px solid var(--line); }
.shortcut .icon-tile { width: 34px; height: 34px; background: var(--surface); }
.shortcut > span:last-child { margin-inline-start: auto; color: var(--brand); }
.shortcut:hover { color: var(--brand); }
.shortcut:hover > span:not([aria-hidden]) { text-decoration: underline; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.94rem; font-weight: 700; }
section[id], article[id], h3[id] { scroll-margin-top: 18px; }

.policy-page { max-width: 820px; }
.policy-voice-link { justify-self: start; }
.developer-links h2, .help-questions h2 { font-size: 1.35rem; }
.legal-copy {
  min-width: 0;
  padding: 3px clamp(0px, 2vw, 14px) 0;
}
.legal-copy h2 { margin-bottom: 16px; font-size: 1.43rem; }
.legal-copy h3 { margin-top: 26px; padding-top: 17px; border-top: 1px solid var(--line); font-size: 1.12rem; }
.legal-copy ul { margin-block: 9px 0; padding-left: 1.35em; }
.legal-copy li + li { margin-top: 7px; }
.legal-copy .disclaimer {
  padding-left: 14px;
  border-left: 2px solid #d9ad86;
  color: var(--muted);
  font-size: 0.92rem;
}

.support-layout, .developer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(25px, 4vw, 52px);
}
.help-questions h2 { margin-bottom: 12px; }
.help-topic { border-bottom: 1px solid var(--line); }
.help-topic summary {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 59px;
  padding-block: 7px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.help-topic summary::-webkit-details-marker { display: none; }
.help-topic summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.help-topic summary .icon-tile { width: 37px; height: 37px; }
.help-topic summary::after { content: ""; margin-inline: auto 4px; width: 8px; height: 8px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.help-topic[open] summary::after { transform: rotate(225deg); }
.topic-body { padding: 0 8px 13px 48px; }
.topic-body p, .account-method p, .developer-product p { color: var(--muted); font-size: 0.94rem; }
.topic-body p + p { margin-top: 8px; }
.account-card, .developer-product {
  min-width: 0;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.account-heading { display: flex; align-items: center; gap: 11px; }
.account-heading h2 { font-size: 1.15rem; }
.account-method { margin-top: 16px; }
.account-method + .account-method { padding-top: 14px; border-top: 1px solid var(--line); }
.account-method h3 { margin-bottom: 5px; font-size: 0.97rem; }
.account-method a { overflow-wrap: anywhere; }

.developer-product { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 17px; row-gap: 14px; }
.developer-product h2 { margin-bottom: 5px; font-size: 1.35rem; }
.developer-product .app-icon { width: clamp(54px, 7vw, 88px); height: auto; border-radius: 22%; }
.developer-product .store-links, .developer-website { grid-column: 1 / -1; }
.developer-website { min-height: 34px; justify-self: start; }
.developer-links h2 { margin-bottom: 12px; }
.developer-links .shortcut .icon-tile { background: var(--soft); }

@media (max-width: 880px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .site-header .wrap {
    grid-template-areas: "brand locale" "nav nav";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 10px;
    padding-top: 9px;
  }
  .site-nav { justify-self: start; gap: 16px; }
  .wordmark { gap: 8px; }
  .wordmark-name { font-size: 1.12rem; }
  .wordmark img { width: 35px; height: 35px; }
  .site-footer .wrap { min-height: 68px; padding-block: 6px; }
  .footer-links { gap: 11px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 25px; padding-block: 31px 35px; }
  .hero-intro { margin-top: 15px; }
  .hero .store-links { margin-top: 18px; }
  .day-preview { border-radius: 26px; }
  .feature { padding: 15px; border-radius: 16px; }
  .feature-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(74%, 265px);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-color: #cf9d75 var(--soft);
    scrollbar-width: thin;
  }
  .feature-grid .feature { scroll-snap-align: start; }
  .content-page { padding-block: 26px 42px; }
  .page-intro { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 23px; border-radius: 20px; }
  .support-layout, .developer-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 370px) {
  .store-link { min-width: 0; padding-inline: 11px; font-size: 0.875rem; }
  .site-nav { gap: 12px; }
  .page-title-line { gap: 9px; }
}
