:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #17191f;
  --muted: #656977;
  --primary: #6f5cf6;
  --primary-deep: #4d3bd2;
  --soft: #eeebff;
  --line: #e7e7ef;
  --shadow: 0 14px 36px rgba(57, 45, 142, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Hiragino Kaku Gothic ProN", "Apple SD Gothic Neo", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.language-bar {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: rgba(246, 247, 251, 0.96);
  border-bottom: 1px solid rgba(231, 231, 239, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.language-switcher {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 620px);
  min-height: 42px;
  margin: 0 auto;
  padding: 4px;
  background: #eaeaf1;
  border: 1px solid #e0e0e9;
  border-radius: 13px;
}

.language-option {
  min-width: 0;
  min-height: 32px;
  padding: 5px 3px;
  overflow: hidden;
  color: #5f6270;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.language-option[aria-pressed="true"] {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 3px 9px rgba(111, 92, 246, 0.25);
}

.language-option:focus-visible {
  outline: 2px solid #9f92ff;
  outline-offset: 1px;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 18px calc(48px + env(safe-area-inset-bottom));
}

.hero {
  padding: 28px 22px;
  margin-bottom: 18px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #7866ff 0%, #5a45e8 100%);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.3; font-weight: 850; }
.meta { display: grid; gap: 3px; margin: 0; color: rgba(255,255,255,.88); font-size: 13px; line-height: 1.7; }
.content { padding: 24px 22px; background: var(--card); border: 1px solid rgba(231, 231, 239, .9); border-radius: 26px; box-shadow: var(--shadow); }
h2 { margin: 32px 0 12px; color: var(--primary-deep); font-size: 19px; line-height: 1.45; font-weight: 850; }
h2:first-child { margin-top: 0; }
h3 { margin: 21px 0 8px; font-size: 16px; line-height: 1.5; font-weight: 800; }
p { margin: 0 0 12px; font-size: 15px; line-height: 1.85; }
ul { margin: 0 0 14px; padding-left: 21px; }
li { margin: 5px 0; font-size: 15px; line-height: 1.8; }
a { color: var(--primary-deep); text-underline-offset: 2px; }

.notice { padding: 15px 16px; margin: 14px 0 20px; color: #342978; background: var(--soft); border-left: 4px solid #8474ff; border-radius: 15px; font-size: 14px; line-height: 1.8; }
.definition, .info-card { padding: 14px 16px; margin: 10px 0; background: #f7f7fa; border-radius: 16px; }
.definition strong { display: block; margin-bottom: 4px; color: var(--primary-deep); font-size: 15px; }
.definition p, .info-card p { margin-bottom: 4px; }
.definition p:last-child, .info-card p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 15px; }
table { width: 100%; min-width: 650px; border-collapse: collapse; }
th, td { padding: 12px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.65; }
th { color: #3f337e; background: #f1efff; font-weight: 800; }
tr:last-child td { border-bottom: 0; }
.footer { margin-top: 34px; color: var(--muted); font-size: 13px; text-align: center; }

@media (min-width: 768px) {
  .language-bar { padding-top: 12px; padding-bottom: 12px; }
  .page { padding-top: 44px; }
  .hero { padding: 34px 36px; }
  .content { padding: 34px 36px; }
  h1 { font-size: 32px; }
}

@media (max-width: 360px) {
  .language-bar { padding-right: 8px; padding-left: 8px; }
  .language-switcher { gap: 2px; }
  .language-option { padding-right: 1px; padding-left: 1px; font-size: 11px; }
  .page { padding-right: 12px; padding-left: 12px; }
  .hero, .content { padding-right: 17px; padding-left: 17px; border-radius: 21px; }
}
