/* Pinyin Finder — 单页样式（浅色系 / 教育类） */

:root {
  --bg: #f5f8fc;
  --bg-card: #ffffff;
  --text: #1c2834;
  --text-muted: #5a6b7a;
  --accent: #3b82c4;
  --accent-soft: #e8f2fa;
  --border: #dde6ef;
  --shadow: 0 8px 28px rgba(28, 40, 52, 0.08);
  --radius: 14px;
  --nav-h: 64px;
  --maxw: 1040px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  z-index: 100;
  font: inherit;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.skip-link:focus {
  left: 0;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

button.brand {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.brand-name:hover {
  text-decoration: none;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a,
.nav-links button.nav-jump {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links button.nav-jump:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links button.nav-jump {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

/* Sections */
main {
  padding-bottom: 3rem;
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.section--tight-top {
  padding-top: 1.5rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.section-lead {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 42rem;
}

/* Hero */
.hero {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  background: linear-gradient(180deg, #eef5fb 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr 320px;
  }
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.hero-app-icon-wrap {
  flex-shrink: 0;
}

.hero-app-icon-frame {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(28, 40, 52, 0.1);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.hero-app-icon-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-app-icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  background: linear-gradient(145deg, #e0ebf5, #eef2f6);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.hero-app-icon-placeholder span:first-child {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.hero-app-icon-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.65rem;
}

.hero-app-icon-hint code {
  font-size: 0.85em;
}

.hero-shot-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--bg-card);
  aspect-ratio: 9 / 19.5;
  max-height: 520px;
  margin: 0 auto;
}

.hero-shot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(145deg, var(--accent-soft), #f0f4f8);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.screen-placeholder strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: 0 2px 12px rgba(28, 40, 52, 0.04);
}

.card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.card p,
.card ul {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card ul {
  padding-left: 1.2rem;
}

.card li + li {
  margin-top: 0.35rem;
}

.two-col {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* Promo strip */
.promo-cards {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .promo-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.promo-card .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Feature grid */
.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-muted);
}

/* Screens row */
.screens-row {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .screens-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.screen-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(28, 40, 52, 0.04);
}

.screen-card figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border-top: 1px solid var(--border);
  background: #fafbfd;
}

.screen-frame {
  aspect-ratio: 9 / 16;
  background: #eef2f6;
}

.screen-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Support / Privacy */
.support-email {
  font-weight: 600;
  word-break: break-all;
}

.privacy-note {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.privacy-note p + p {
  margin-top: 0.85rem;
}

/* Privacy: collapsible full notice (native <details>) */
.privacy-expand {
  margin-top: 0.65rem;
  border: 0;
}

.privacy-expand-summary,
button.disclaimer-open-btn {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0.2rem 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-bottom: 1px solid transparent;
}

.privacy-expand-summary {
  color: var(--text-muted);
}

button.disclaimer-open-btn {
  margin-top: 0.65rem;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--accent);
  border-bottom-color: rgba(59, 130, 196, 0.35);
}

.privacy-expand-summary:hover {
  color: var(--accent);
  border-bottom-color: rgba(59, 130, 196, 0.35);
}

button.disclaimer-open-btn:hover {
  color: #2a6aad;
  border-bottom-color: rgba(42, 106, 173, 0.55);
}

.privacy-expand-summary::-webkit-details-marker {
  display: none;
}

.privacy-expand-summary::marker {
  content: "";
}

.privacy-expand-body {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.privacy-expand-body p {
  margin: 0;
}

.privacy-expand-body p + p {
  margin-top: 0.85rem;
}

.privacy-expand-link {
  margin-top: 1rem !important;
}

/* Disclaimer modal */
.disclaimer-dialog {
  max-width: min(640px, 96vw);
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.disclaimer-dialog::backdrop {
  background: rgba(28, 40, 52, 0.45);
}

.disclaimer-dialog-surface {
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 720px);
}

.disclaimer-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
  flex-shrink: 0;
}

.disclaimer-dialog-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.disclaimer-dialog-close {
  margin: 0;
  padding: 0.15rem 0.45rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.disclaimer-dialog-close:hover {
  color: var(--text);
  background: var(--border);
}

.disclaimer-dialog-body {
  overflow: auto;
  padding: 1rem 1.25rem 1.25rem;
  flex: 1;
  min-height: 0;
}

/* Embedded privacy policy (from privacy_policy.md) */
.privacy-full-doc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.privacy-full-doc .policy-h3 {
  margin: 1.35rem 0 0.65rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.privacy-full-doc .policy-h3:first-child {
  margin-top: 0;
}

.privacy-full-doc .policy-lang-label {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.privacy-full-doc .policy-lang-label:first-of-type {
  margin-top: 0;
}

.privacy-full-doc p {
  margin: 0 0 0.65rem;
}

.privacy-full-doc ul {
  margin: 0 0 0.65rem;
  padding-left: 1.2rem;
}

.privacy-full-doc li + li {
  margin-top: 0.25rem;
}

.privacy-full-doc .policy-sep {
  margin: 1.1rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.privacy-include-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.privacy-include-error {
  margin: 0;
  font-size: 0.9rem;
  color: #b45309;
  line-height: 1.5;
}

.privacy-include-error code {
  font-size: 0.85em;
}

.fragment-fallback-iframe {
  display: block;
  width: 100%;
  min-height: min(480px, 55vh);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.disclaimer-dialog-body .fragment-fallback-iframe {
  min-height: min(420px, 50vh);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #eef3f8;
  padding: 2rem 1.25rem;
  margin-top: 1rem;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-brand {
  font-weight: 700;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-links button.footer-jump {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}

.footer-links button.footer-jump:hover {
  text-decoration: underline;
}

.privacy-url-text {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  font-size: 0.88rem;
  color: var(--text);
}

.footer-meta {
  font-size: 0.85rem;
}
