:root {
  color-scheme: light dark;
  --bg: #f8f9fb;
  --surface: #ffffff;
  --text: #1a1d26;
  --text-muted: #5c6370;
  --border: #e4e7ec;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
  --max-width: 42rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #171a22;
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --border: #2a2f3a;
    --accent: #60a5fa;
    --accent-soft: #1e293b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    "Apple SD Gothic Neo",
    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;
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.header {
  padding:
    calc(20px + var(--safe-top))
    calc(16px + var(--safe-right))
    20px
    calc(16px + var(--safe-left));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding:
    20px
    calc(16px + var(--safe-right))
    calc(24px + var(--safe-bottom))
    calc(16px + var(--safe-left));
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}

.product-card:last-child {
  margin-bottom: 0;
}

.product-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.product-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.product-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.product-desc {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.doc-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 50%, var(--surface));
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.doc-link:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: var(--accent-soft);
}

.doc-link-arrow {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
}

.lang-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding:
    0
    calc(16px + var(--safe-right))
    calc(20px + var(--safe-bottom))
    calc(16px + var(--safe-left));
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 14px;
}
