: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%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    "Apple SD Gothic Neo",
    "Hiragino Sans",
    "PingFang SC",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
  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 {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding:
    calc(12px + var(--safe-top))
    calc(16px + var(--safe-right))
    12px
    calc(16px + var(--safe-left));
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

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

.lang-switcher {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.lang-switcher::-webkit-scrollbar {
  display: none;
}

.lang-btn {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.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));
}

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
}

@media (min-width: 480px) {
  .article {
    padding: 28px 24px;
  }
}

.article h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.effective-date {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.intro {
  margin: 0 0 24px;
  font-size: 15px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.article h2 {
  margin: 28px 0 12px;
  font-size: 1.05rem;
  line-height: 1.4;
}

.article h2:first-of-type {
  margin-top: 0;
}

.article h3 {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.article p {
  margin: 0 0 12px;
  font-size: 15px;
}

.article ol,
.article ul {
  margin: 0 0 12px;
  padding-left: 1.25rem;
}

.article li {
  margin-bottom: 6px;
  font-size: 15px;
}

.article li:last-child {
  margin-bottom: 0;
}

.note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 14px;
  color: var(--text-muted);
}

.table-wrap {
  margin: 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

th {
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin-bottom: 4px;
}

.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));
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: center;
  font-size: 14px;
}

.footer-copy {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.closing {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}
