:root {
  --bg: #080614;
  --surface: #120D28;
  --surface-elevated: #150E2E;
  --gold: #F3D382;
  --gold-warm: #D9A441;
  --gold-soft: rgba(243, 211, 130, 0.14);
  --cyan: #6FE3FF;
  --cyan-soft: rgba(111, 227, 255, 0.12);
  --cyan-border: rgba(111, 227, 255, 0.34);
  --hairline: rgba(243, 211, 130, 0.24);
  --text: #F5F3FF;
  --muted: #A5A1B8;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --danger-border: rgba(248, 113, 113, 0.38);
  --radius: 16px;
  --radius-sm: 10px;
}

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

html, body {
  overflow-x: clip;
}

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans KR", "Noto Sans TC", "Noto Sans Arabic", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(243, 211, 130, 0.10), transparent 52%),
    radial-gradient(circle at 85% 20%, rgba(111, 227, 255, 0.08), transparent 45%),
    radial-gradient(circle at 15% 40%, rgba(167, 139, 250, 0.12), transparent 48%),
    var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  opacity: 0.88;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(243, 211, 130, 0.10);
  border: 1px solid rgba(243, 211, 130, 0.22);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--gold);
}

.site-header {
  border-bottom: 1px solid var(--hairline);
  background: rgba(8, 6, 20, 0.90);
  position: static;
}

.header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 16px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.menu-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 12px;
  background: rgba(21, 14, 46, 0.88);
  border: 1px solid rgba(243, 211, 130, 0.34);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.menu-toggle:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

.menu-toggle:focus-visible,
.drawer-close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.menu-toggle svg,
.drawer-close svg {
  width: 20px;
  height: 20px;
  display: block;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  object-fit: cover;
  flex-shrink: 0;
}

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

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

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

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 10, 0.72);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.site-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(320px, 86vw);
  background: var(--surface-elevated);
  border-left: 1px solid var(--hairline);
  z-index: 100;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: translateX(105%);
  transition: transform 0.22s ease;
  overflow-y: auto;
}

[dir="rtl"] .site-drawer {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--hairline);
  transform: translateX(-105%);
}

.site-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}

.drawer-title {
  font-weight: 700;
  color: var(--gold);
}

.drawer-close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(18, 13, 40, 0.9);
  border: 1px solid var(--hairline);
  color: var(--text);
  cursor: pointer;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: var(--gold-soft);
  border-color: var(--hairline);
  color: var(--gold);
}

.lang-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.lang-btn {
  appearance: none;
  padding: 8px 6px;
  border-radius: 9px;
  background: rgba(18, 13, 40, 0.88);
  border: 1px solid rgba(243, 211, 130, 0.24);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  background: var(--gold);
  color: #080614;
  border-color: var(--gold);
}

/* Main */
main {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.hero {
  margin-bottom: 24px;
  padding: 24px 22px;
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(21, 14, 46, 0.94), rgba(18, 13, 40, 0.88));
  border: 1px solid var(--hairline);
}

.hero-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-border);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.3;
  color: var(--gold);
}

.hero-subtitle {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.98rem;
}

.legal-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-visual {
  margin-top: 18px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  position: relative;
  max-height: 300px;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-warm));
  color: #080614;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(21, 14, 46, 0.9);
  border: 1px solid var(--hairline);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.trust-pill {
  font-size: 0.8rem;
  color: var(--text);
  background: rgba(243, 211, 130, 0.08);
  border: 1px solid var(--hairline);
  padding: 4px 11px;
  border-radius: 999px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

section[id] {
  scroll-margin-top: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--gold);
}

.card h3 {
  margin: 16px 0 6px;
  font-size: 1rem;
  color: var(--cyan);
}

.card p {
  margin: 0 0 10px;
}

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

.card ul,
.card ol {
  margin: 6px 0 10px;
  padding-inline-start: 22px;
}

.card li {
  margin-bottom: 6px;
}

.callout {
  background: rgba(243, 211, 130, 0.08);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.callout h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--gold);
}

.callout-info {
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.callout-info h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--cyan);
}

.callout-danger {
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.callout-danger p {
  color: #FCA5A5;
  font-weight: 600;
}

.toc {
  background: var(--surface-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.toc h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--gold);
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 6px 16px;
}

.toc-link {
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--text);
}

.toc-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

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

th {
  background: rgba(21, 14, 46, 0.9);
  color: var(--gold);
  font-weight: 600;
  width: 34%;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--hairline);
  background: rgba(8, 6, 20, 0.95);
  padding: 20px 16px;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 600px) {
  .hero,
  section[id] {
  scroll-margin-top: 24px;
}

.card {
    padding: 16px;
  }
  th {
    width: auto;
  }
}
