:root {
    color-scheme: dark;
    --bg-base: #0a0b0e;
    --bg-surface: #121319;
    --bg-card: #181a22;
    --bg-card-hover: #1f222c;
    --gold-primary: #d4af37;
    --gold-light: #f5e6b3;
    --text-main: #f5f6fa;
    --text-sub: #b0b5c0;
    --text-muted: #8c94a3;
    --border-subtle: #2b2e39;
    --border-gold: rgba(212, 175, 55, .35);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --max-width: 1200px;
    --header-height: 190px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "PingFang TC", "Yu Gothic", "Malgun Gothic", "Thonburi", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text-main); background: var(--bg-base); font-family: var(--font-family); line-height: 1.7; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; min-width: 0; }
a { color: var(--gold-light); text-underline-offset: 4px; }
img { max-width: 100%; }
button, input, select { font: inherit; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: 4px; border-radius: 4px; }
[id] { scroll-margin-top: calc(var(--header-height) + 16px); }
h1, h2, h3, p { margin-top: 0; }

/* Every page shares one header. The navigation grows with the viewport and
   wraps without hiding destinations or shrinking text below a readable size. */
.site-header { position: sticky; top: 0; z-index: 100; width: 100%; background: rgba(10, 11, 14, .96); border-bottom: 1px solid var(--border-subtle); backdrop-filter: blur(16px); }
.nav-container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 14px clamp(16px, 2.5vw, 32px); display: grid; grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.brand-logo { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; object-fit: cover; box-shadow: 0 4px 14px #0008; }
.brand-text { min-width: 0; display: grid; gap: 3px; }
.brand-title { font-size: 18px; font-weight: 750; letter-spacing: .5px; color: var(--gold-light); overflow-wrap: anywhere; }
.brand-subtitle { font-size: 10px; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
.primary-nav { min-width: 0; }
.nav-links { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 4px clamp(6px, 1vw, 16px); }
.nav-links li { display: flex; min-width: 0; }
.nav-links a { min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 8px 4px; color: var(--text-sub); font-size: 14px; line-height: 1.45; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.nav-links a:hover { color: var(--gold-light); }
.nav-links a[aria-current="page"] { color: var(--gold-primary); text-decoration: underline; text-underline-offset: 6px; }
.language-menu { position: relative; justify-self: end; max-width: 100%; font-size: 13px; }
.language-menu summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-card); cursor: pointer; list-style: none; white-space: nowrap; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary::after { content: "▾"; color: var(--gold-primary); }
.language-label { color: var(--text-muted); }
.language-menu nav { position: absolute; right: 0; top: calc(100% + 8px); width: max-content; min-width: 185px; max-width: calc(100vw - 32px); max-height: min(65vh, 430px); overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 8px; box-shadow: 0 12px 28px #0008; }
.language-menu nav a { display: block; padding: 10px 12px; min-height: 44px; color: var(--text-sub); text-decoration: none; }
.language-menu nav a:hover, .language-menu nav a[aria-current="true"] { color: var(--gold-light); background: var(--bg-card-hover); border-radius: 6px; }

/* Home and product pages use the same typography and card system; their
   actual sections remain specific to the purpose of each page. */
.hero { padding: clamp(44px, 7vw, 86px) 20px clamp(36px, 6vw, 64px); text-align: center; background: radial-gradient(ellipse at 50% 0, #d4af371a, transparent 70%); border-bottom: 1px solid var(--border-subtle); }
.hero-badge { display: inline-flex; justify-content: center; padding: 6px 14px; margin: 0 auto 24px; border: 1px solid var(--border-gold); border-radius: 24px; color: var(--gold-light); font-size: 13px; max-width: 100%; }
.hero-title { max-width: 1000px; margin: 0 auto 24px; font-size: clamp(28px, 4vw, 48px); line-height: 1.25; overflow-wrap: anywhere; }
.hero-title > span:last-child { color: var(--gold-light); }
.hero-title > span:first-child { color: var(--text-main); }
.hero-desc { max-width: 820px; margin: 0 auto 28px; color: var(--text-sub); font-size: clamp(15px, 1.5vw, 18px); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 24px; border: 1px solid var(--border-gold); border-radius: var(--radius-sm); font-weight: 650; line-height: 1.4; text-align: center; text-decoration: none; }
.btn-primary { color: #17140b; background: linear-gradient(135deg, #e2c458, #ba8d12); }
.btn-secondary { color: var(--gold-light); background: var(--bg-card); }
.section { width: calc(100% - 40px); max-width: var(--max-width); margin: 0 auto; padding: clamp(34px, 5vw, 64px) 0; }
.section-header { text-align: center; max-width: 880px; margin: 0 auto 30px; }
.section-title { color: var(--gold-light); font-size: clamp(24px, 3vw, 34px); line-height: 1.35; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feature-card { min-width: 0; padding: clamp(20px, 2.5vw, 28px); background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); display: flex; flex-direction: column; }
.feature-title { color: var(--gold-light); font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; margin: 0 0 14px; }
.feature-detail { color: var(--text-sub); font-size: 15px; margin-bottom: 18px; }
.text-link { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.content-panel { padding: clamp(22px, 4vw, 40px); background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.content-panel h2 { color: var(--gold-light); font-size: 24px; margin: 0 0 12px; }
.content-panel h2:not(:first-child) { margin-top: 30px; }
.content-panel p { color: var(--text-sub); margin-bottom: 0; }

/* Documents share the same visual language without repeating their content
   on product or home pages. Wide product tables scroll inside their wrapper. */
.document { width: calc(100% - 32px); max-width: 960px; margin: 36px auto 56px; padding: clamp(22px, 5vw, 48px); background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow-wrap: anywhere; }
.document h1 { color: var(--gold-light); font-size: clamp(27px, 4vw, 36px); line-height: 1.3; margin-bottom: 18px; }
.document h2 { color: var(--gold-light); font-size: 22px; line-height: 1.4; margin: 32px 0 12px; }
.document h3 { color: var(--text-main); font-size: 18px; margin: 22px 0 8px; }
.document p, .document li { color: var(--text-sub); }
.document p { margin: 12px 0; }
.document ul, .document ol { padding-left: 24px; margin: 12px 0; }
.document li { margin: 8px 0; }
.document strong { color: var(--text-main); }
.document .meta { font-size: 13px; color: var(--text-muted); }
.notice { margin: 20px 0; padding: 16px; background: #d4af3714; border-left: 3px solid var(--gold-primary); color: var(--text-sub); }
.scroll { max-width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 18px 0; }
th, td { padding: 12px; border: 1px solid var(--border-subtle); text-align: left; vertical-align: top; }
th { color: var(--gold-light); }
td { color: var(--text-sub); }
.support-faq { padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.support-faq summary { cursor: pointer; color: var(--text-main); font-weight: 600; }
.support-faq p { margin-bottom: 0; }
.support-follow-up { margin-top: 30px; }
.support-follow-up .btn-primary { margin-top: 8px; }
.contact-channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; margin: 20px 0 30px; }
.contact-channels a { display: block; padding: 18px; border: 1px solid var(--border-subtle); background: var(--bg-card); border-radius: var(--radius-sm); text-decoration: none; overflow-wrap: anywhere; }
.contact-channels span { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text-muted); }
.contact-company { padding-top: 4px; border-top: 1px solid var(--border-subtle); }
.developer-contact { line-height: 1.9; }
.language-choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 24px; }
.language-choices a { padding: 14px; border: 1px solid var(--border-subtle); border-radius: 10px; text-decoration: none; }

.site-footer { margin-top: auto; padding: 40px 20px; background: #07080a; border-top: 1px solid var(--border-subtle); }
.footer-container { max-width: var(--max-width); margin: 0 auto; display: grid; gap: 22px; text-align: center; }
.footer-brand { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; color: var(--gold-light); }
.footer-logo { width: 28px; height: 28px; border-radius: 6px; }
.footer-company { font-weight: 650; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.footer-links a { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: var(--text-sub); text-decoration: none; }
.footer-links a:hover { color: var(--gold-light); }
.footer-divider { height: 1px; background: var(--border-subtle); }
.footer-compliance { color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.footer-compliance p { margin: 7px 0; }
.icp-link { color: var(--text-sub); }

@media (max-width: 1180px) {
    .nav-container { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; }
    .primary-nav { grid-column: 1 / -1; grid-row: 2; }
    .language-menu { grid-column: 2; grid-row: 1; }
}
@media (max-width: 900px) {
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .nav-container { padding: 12px 16px 8px; gap: 8px 12px; }
    .brand { gap: 9px; }
    .brand-logo { width: 34px; height: 34px; flex-basis: 34px; }
    .brand-title { font-size: 15px; }
    .brand-subtitle { font-size: 9px; }
    .language-menu { font-size: 12px; }
    .language-label { display: none; }
    .language-menu summary { padding: 8px; }
    .nav-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 6px; }
    .nav-links li { width: 100%; }
    .nav-links a { width: 100%; font-size: 13px; padding: 7px 2px; }
    .hero { padding-left: 16px; padding-right: 16px; }
    .hero-badge { font-size: 12px; }
    .hero-actions { display: grid; max-width: 360px; margin: 0 auto; }
    .feature-grid { grid-template-columns: minmax(0, 1fr); }
    .section { width: calc(100% - 32px); }
    .document { margin-top: 24px; }
    .document h2 { font-size: 20px; }
    .footer-links { gap: 4px 16px; }
}
@media (max-width: 380px) {
    .brand-subtitle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
