@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #111217;
  --surface: #1b1c24;
  --ink: #eeeef4;
  --muted: #a0a1b3;
  --accent: #ffdae7;
  --accent-hover: #ffe6ee;
  --accent-ink: #2b1c23;
  --border: #30313d;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  scrollbar-color: #55515d var(--background);
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); -webkit-font-smoothing: antialiased; }
::selection { color: var(--accent-ink); background: var(--accent); }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color 160ms ease-out, background-color 160ms ease-out; }
a:hover { color: var(--accent-hover); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
main:focus { outline: none; }
svg { flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.skip-link { position: fixed; top: 12px; left: 12px; transform: translateY(-180%); z-index: 10; padding: 12px 18px; background: var(--accent); color: var(--accent-ink); border-radius: 7px; font-weight: 600; }
.skip-link:focus { transform: translateY(0); }
.skip-link:focus, .skip-link:hover { color: var(--accent-ink); }
.site-header { border-bottom: 1px solid var(--border); }
.header-inner, .footer-inner { max-width: 1184px; margin: 0 auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.header-inner { min-height: 94px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-size: 21px; letter-spacing: -.03em; font-weight: 600; }
.brand img { display: block; width: 32px; height: 32px; }
.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav > a { padding: 12px 0; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.primary-nav > a:hover, .primary-nav > a[aria-current="page"] { color: var(--accent); }
.primary-nav > a[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; }
.primary-nav .app-link { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); margin-left: 8px; }
.legal-layout { max-width: 1184px; margin: 0 auto; display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 64px; padding: 72px 40px 96px; }
.contents-desktop { align-self: start; position: sticky; top: 32px; max-height: calc(100vh - 64px); overflow-y: auto; padding: 8px 8px 16px 0; scrollbar-width: thin; }
.contents-desktop h2 { color: var(--muted); font-size: 13px; line-height: 1.5; font-weight: 600; margin-bottom: 16px; }
.contents-desktop ol, .contents-mobile ol { padding: 0; margin: 0; list-style: none; }
.contents-desktop a { display: block; font-size: 13px; line-height: 1.5; padding: 6px 0; text-decoration: none; color: var(--muted); }
.contents-desktop a:hover { color: var(--accent); }
.legal-article { min-width: 0; max-width: 72ch; }
.article-header { padding-bottom: 36px; border-bottom: 1px solid var(--border); margin-bottom: 34px; }
.article-header h1 { font-size: clamp(34px, 3.8vw, 46px); line-height: 1.16; letter-spacing: -.035em; font-weight: 600; }
.effective-date { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 17px; font-variant-numeric: tabular-nums; }
.article-body { font-size: 16px; line-height: 1.8; overflow-wrap: break-word; }
.article-body p + p { margin-top: 18px; }
.article-body h2 { font-size: 23px; font-weight: 600; line-height: 1.4; letter-spacing: -.022em; margin: 48px 0 16px; scroll-margin-top: 32px; }
.article-body h3 { font-size: 18px; font-weight: 600; line-height: 1.5; margin: 28px 0 12px; scroll-margin-top: 32px; }
.article-body strong { font-weight: 600; }
.article-body ul, .article-body ol { padding-left: 23px; margin: 18px 0; }
.article-body li { padding-left: 5px; margin: 10px 0; }
.article-body li::marker { color: var(--muted); }
.article-body a { overflow-wrap: anywhere; }
.article-end { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 56px; border-top: 1px solid var(--border); padding-top: 24px; font-size: 14px; }
.article-end a { text-decoration: none; padding: 8px 0; }
.article-end a:last-child { color: var(--muted); }
.contents-mobile { display: none; }
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { min-height: 100px; font-size: 13px; color: var(--muted); }
.footer-inner > span { font-weight: 500; }
.footer-inner nav { display: flex; align-items: center; gap: 28px; }
.footer-inner a { color: var(--muted); text-decoration: none; padding: 12px 0; }
.footer-inner a:hover { color: var(--accent); }
.home-content { max-width: 840px; margin: 0 auto; padding: 86px 40px 92px; min-height: calc(100vh - 196px); }
.home-content h1 { font-size: clamp(36px, 4.8vw, 52px); line-height: 1.15; letter-spacing: -.035em; font-weight: 600; max-width: 21ch; }
.home-intro { max-width: 61ch; margin-top: 28px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.primary-action { min-height: 46px; margin-top: 28px; display: inline-flex; align-items: center; gap: 16px; padding: 12px 18px; background: var(--accent); color: var(--accent-ink); text-decoration: none; border-radius: 7px; font-size: 14px; font-weight: 600; }
.primary-action:hover { background: var(--accent-hover); color: var(--accent-ink); }
.policy-index { margin-top: 72px; }
.policy-index h2 { font-weight: 500; font-size: 18px; margin-bottom: 18px; letter-spacing: -.015em; }
.policy-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; border-top: 1px solid var(--border); text-decoration: none; }
.policy-row:last-child { border-bottom: 1px solid var(--border); }
.policy-row strong { display: block; color: var(--ink); font-size: 19px; line-height: 1.4; font-weight: 500; letter-spacing: -.015em; }
.policy-row span > span { display: block; color: var(--muted); font-size: 15px; line-height: 1.6; margin-top: 5px; }
.policy-row:hover strong { color: var(--accent); }
.not-found { padding-top: 110px; }

@media (max-width: 1000px) {
  .legal-layout { grid-template-columns: 186px minmax(0, 1fr); gap: 40px; padding-left: 28px; padding-right: 28px; }
  .header-inner, .footer-inner { padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 760px) {
  :root { scroll-padding-top: 20px; }
  .header-inner { padding: 18px 22px; min-height: 82px; gap: 20px; flex-wrap: wrap; }
  .brand { font-size: 19px; gap: 10px; }
  .brand img { width: 29px; height: 29px; }
  .primary-nav { gap: 22px; }
  .primary-nav > a { font-size: 13px; }
  .primary-nav .app-link { margin-left: 0; gap: 7px; }
  .legal-layout { display: block; padding: 45px 24px 64px; }
  .legal-article { margin: 0 auto; }
  .contents-desktop { display: none; }
  .article-header { padding-bottom: 25px; margin-bottom: 24px; }
  .effective-date { margin-top: 14px; font-size: 13px; }
  .contents-mobile { display: block; border-bottom: 1px solid var(--border); padding-bottom: 22px; margin-bottom: 28px; }
  .contents-mobile summary { font-size: 14px; color: var(--accent); cursor: pointer; width: fit-content; padding: 4px 2px; }
  .contents-mobile ol { padding-top: 13px; }
  .contents-mobile a { display: block; font-size: 14px; line-height: 1.5; padding: 8px 0; text-decoration: none; color: var(--muted); }
  .contents-mobile a:hover { color: var(--accent); }
  .article-body { font-size: 16px; line-height: 1.75; }
  .article-body h2 { font-size: 21px; margin-top: 38px; scroll-margin-top: 20px; }
  .article-body h3 { scroll-margin-top: 20px; }
  .footer-inner { padding: 28px 24px; flex-wrap: wrap; gap: 12px; }
  .footer-inner nav { gap: 24px; flex-wrap: wrap; }
  .home-content { padding: 58px 24px 64px; }
  .home-intro { font-size: 17px; }
  .policy-index { margin-top: 56px; }
}

@media (max-width: 470px) {
  .header-inner { gap: 7px; padding: 18px 24px 10px; }
  .primary-nav { width: 100%; justify-content: space-between; gap: 14px; }
  .primary-nav .app-link { margin-left: auto; }
  .legal-layout { padding-top: 36px; }
  .article-header h1 { font-size: 34px; }
  .home-content h1 { font-size: 36px; }
  .home-content h1 br { display: none; }
  .article-end { margin-top: 42px; }
  .footer-inner { display: block; }
  .footer-inner nav { margin-top: 12px; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  :root { color-scheme: light; --ink: #171717; --muted: #454545; --accent: #171717; --accent-hover: #171717; --border: #aaa; }
  body { color: #171717; background: #fff; }
  .site-header, .site-footer, .contents-desktop, .contents-mobile, .article-end, .skip-link, .primary-action { display: none; }
  .legal-layout, .home-content { display: block; max-width: none; padding: 0; }
  .legal-article { max-width: none; }
  .article-header { border-color: #aaa; }
  .article-header h1 { font-size: 28pt; }
  .effective-date, .home-intro { color: #454545; }
  .article-body { font-size: 10.5pt; line-height: 1.6; }
  .article-body h2 { font-size: 15pt; margin-top: 22pt; break-after: avoid; }
  .article-body h3 { break-after: avoid; }
  .article-body p, .article-body li { orphans: 3; widows: 3; }
  a { color: #171717; text-decoration: underline; }
}
