/* Scoped to the static homepage. Removed with #public-home when the app boots,
   so these rules do not restyle the meal log. */

#public-home {
  color-scheme: light;
  --bg: #f8f7f3;
  --surface: #fffdf9;
  --ink: #242927;
  --secondary: #626963;
  --border: #e8eae4;
  --accent: #326b88;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Source Han Sans SC", "Apple SD Gothic Neo", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

#public-home,
#public-home * { box-sizing: border-box; }

#public-home main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

#public-home header p,
#public-home footer p { margin: 0; }

#public-home .brand {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.25rem;
}

#public-home .subtitle,
#public-home .updated,
#public-home footer { color: var(--secondary); }

#public-home h1 {
  font-size: 1.35rem;
  line-height: 1.4;
  margin: 1.5rem 0 0.75rem;
}

#public-home h2 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.5rem;
}

#public-home .faq h3 {
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 700;
  margin: 1.25rem 0 0.25rem;
}

#public-home .faq p { margin: 0; }

#public-home a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

#public-home a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#public-home ul,
#public-home ol { padding-left: 1.2rem; }

#public-home li + li { margin-top: 0.45rem; }

#public-home .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.2rem 1rem 0.4rem;
  margin-top: 1rem;
}

#public-home footer {
  margin-top: 2.5rem;
  font-size: 0.95rem;
}

#public-home footer .beian {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

#public-home footer .beian a { color: inherit; }

#public-home .credit { margin-top: 0.35rem; }

#public-home .open-app {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.35rem;
  padding: 0 1rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  font-weight: 700;
}

html[data-public-home="stay"] #root { display: none; }

html[data-public-home="stay"],
html[data-public-home="stay"] body {
  height: auto;
  overflow: auto;
}

#public-home .lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.25rem;
}

#public-home .lang-switch a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.85rem;
  border-radius: 12px;
  background: var(--border);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
}

html[data-lang="zh"] #public-home .lang-switch a[data-store-lang="zh"],
html[data-lang="zh-Hant"] #public-home .lang-switch a[data-store-lang="zh-Hant"],
html[data-lang="en"] #public-home .lang-switch a[data-store-lang="en"],
html[data-lang="ja"] #public-home .lang-switch a[data-store-lang="ja"],
html[data-lang="ko"] #public-home .lang-switch a[data-store-lang="ko"] {
  background: var(--accent);
  color: var(--surface);
}

html:not([data-lang]) #public-home [data-locale]:not([data-locale="zh"]),
html[data-lang="zh"] #public-home [data-locale]:not([data-locale="zh"]),
html[data-lang="zh-Hant"] #public-home [data-locale]:not([data-locale="zh-Hant"]),
html[data-lang="en"] #public-home [data-locale]:not([data-locale="en"]),
html[data-lang="ja"] #public-home [data-locale]:not([data-locale="ja"]),
html[data-lang="ko"] #public-home [data-locale]:not([data-locale="ko"]) {
  display: none;
}
