:root {
    --purple-950: #2e1065;
    --purple-900: #4c1d95;
    --purple-700: #6d28d9;
    --purple-600: #7c3aed;
    --purple-100: #ede9fe;
    --purple-50: #f5f3ff;
    --orange-500: #f97316;
    --orange-100: #ffedd5;
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --page: #fff7e8;
    --shadow: 0 22px 60px rgba(46, 16, 101, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--slate-700);
    background: var(--page);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.75;
}

a { color: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 30px rgba(46, 16, 101, 0.06);
    backdrop-filter: blur(16px);
}

.header-inner,
.hero-inner,
.page-shell,
.footer-inner {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--slate-900);
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--purple-700);
    border-radius: 14px;
    box-shadow: 0 9px 24px rgba(109, 40, 217, 0.25);
    transition: transform 280ms ease, background 280ms ease;
}

.brand:hover .brand-mark { transform: rotate(10deg) scale(1.04); background: var(--orange-500); }

.brand-copy { display: flex; flex-direction: column; }
.brand-name { color: var(--slate-900); font-size: 20px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.brand-subtitle { color: var(--purple-700); font-size: 9px; font-weight: 800; letter-spacing: 0.28em; line-height: 1; margin-top: 5px; text-transform: uppercase; }

.desktop-nav { display: flex; align-items: center; gap: 24px; }
.desktop-nav a {
    color: var(--slate-600);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 220ms ease, transform 220ms ease;
}
.desktop-nav a:hover { color: var(--purple-700); transform: translateY(-2px); }
.desktop-nav .support-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    background: var(--purple-700);
    border-radius: 14px;
    padding: 10px 15px;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.2);
}
.desktop-nav .support-link:hover { color: var(--white); background: var(--orange-500); }

.legal-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--purple-950), var(--purple-900) 55%, var(--purple-700));
    padding: 68px 0 82px;
}

.legal-hero::before,
.legal-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}
.legal-hero::before { width: 360px; height: 360px; right: -100px; top: -190px; background: rgba(249, 115, 22, 0.2); filter: blur(8px); }
.legal-hero::after { width: 270px; height: 270px; left: -120px; bottom: -210px; background: rgba(167, 139, 250, 0.2); }
.hero-inner { position: relative; z-index: 1; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 12px;
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.legal-hero h1 { max-width: 860px; margin: 0; font-size: clamp(34px, 5vw, 60px); line-height: 1.08; letter-spacing: -0.04em; }
.hero-summary { max-width: 720px; margin: 20px 0 0; color: #ddd6fe; font-size: clamp(15px, 2vw, 18px); line-height: 1.7; }
.updated { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: #c4b5fd; font-size: 12px; font-weight: 700; }

.page-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    margin-top: -36px;
    padding-bottom: 84px;
    position: relative;
    z-index: 3;
}

.policy-nav {
    position: sticky;
    top: 96px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    box-shadow: var(--shadow);
}
.policy-nav h2 { margin: 0 0 14px; color: var(--slate-900); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.policy-nav ul { margin: 0; padding: 0; list-style: none; }
.policy-nav li + li { margin-top: 5px; }
.policy-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    color: var(--slate-500);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    transition: color 220ms ease, background 220ms ease, transform 220ms ease;
}
.policy-nav a::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 99px; background: var(--slate-300); transition: background 220ms ease, transform 220ms ease; }
.policy-nav a:hover { color: var(--purple-700); background: var(--purple-50); transform: translateX(3px); }
.policy-nav a:hover::before { background: var(--orange-500); transform: scale(1.35); }
.policy-nav a[aria-current="page"] { color: var(--white); background: var(--purple-700); box-shadow: 0 8px 18px rgba(109, 40, 217, 0.22); }
.policy-nav a[aria-current="page"]::before { background: #fdba74; }

.policy-card {
    padding: clamp(28px, 5vw, 60px);
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.policy-card > p:first-child { margin-top: 0; }
.policy-card p { margin: 0 0 17px; color: var(--slate-600); font-size: 15px; }
.policy-card h2 { margin: 38px 0 12px; color: var(--purple-900); font-size: clamp(20px, 3vw, 25px); line-height: 1.3; letter-spacing: -0.02em; }
.policy-card h2:first-child { margin-top: 0; }
.policy-card h3 { margin: 24px 0 9px; color: var(--slate-900); font-size: 16px; }
.policy-card ul { margin: 8px 0 20px; padding: 0; list-style: none; }
.policy-card li { position: relative; margin: 8px 0; padding-left: 25px; color: var(--slate-600); font-size: 15px; }
.policy-card li::before { content: ""; position: absolute; left: 3px; top: 0.72em; width: 7px; height: 7px; background: var(--orange-500); border-radius: 999px; box-shadow: 0 0 0 4px var(--orange-100); }
.policy-card strong { color: var(--slate-900); }
.policy-card a { color: var(--purple-700); font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.policy-card a:hover { color: var(--orange-500); }

.notice-box,
.contact-box {
    margin-top: 30px;
    padding: 24px;
    background: var(--purple-50);
    border: 1px solid #ddd6fe;
    border-radius: 22px;
    transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.notice-box:hover,
.contact-box:hover { transform: translateY(-3px); border-color: #c4b5fd; box-shadow: 0 14px 32px rgba(109, 40, 217, 0.1); }
.notice-box p:last-child,
.contact-box p:last-child { margin-bottom: 0; }
.contact-box h2 { margin-top: 0; }
.contact-line { display: grid; grid-template-columns: 105px 1fr; gap: 12px; margin: 6px 0; font-size: 14px; }
.contact-line span:first-child { color: var(--slate-900); font-weight: 800; }

.site-footer { position: relative; overflow: hidden; background: #e9d5ff; padding: 64px 0 28px; }
.site-footer::before { content: ""; position: absolute; width: 370px; height: 370px; right: -160px; top: -220px; background: rgba(255, 255, 255, 0.5); border-radius: 999px; filter: blur(10px); }
.footer-inner { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1.15fr; gap: 34px; }
.footer-title { margin: 0 0 18px; color: var(--slate-900); font-size: 11px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
.footer-copy { max-width: 310px; margin: 18px 0 0; color: var(--slate-600); font-size: 13px; line-height: 1.7; }
.footer-links { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--slate-600); font-size: 12px; font-weight: 700; line-height: 1.35; text-decoration: none; transition: color 220ms ease, transform 220ms ease; display: inline-block; }
.footer-links a:hover { color: var(--purple-700); transform: translateX(3px); }
.footer-contact { padding: 22px; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 24px; }
.footer-contact a { display: flex; align-items: center; gap: 12px; color: var(--slate-900); font-size: 14px; font-weight: 800; text-decoration: none; }
.contact-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; color: var(--purple-700); background: var(--white); border-radius: 14px; transition: color 220ms ease, background 220ms ease, transform 220ms ease; }
.footer-contact a:hover .contact-icon { color: var(--white); background: var(--orange-500); transform: scale(1.08); }
.footer-label { display: block; color: var(--purple-700); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 42px; padding-top: 24px; border-top: 1px solid rgba(148, 163, 184, 0.25); color: var(--slate-500); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-bottom-links { display: flex; align-items: center; gap: 24px; }
.footer-bottom-links a { color: var(--slate-500); text-decoration: none; transition: color 220ms ease; }
.footer-bottom-links a:hover { color: var(--purple-700); }

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--purple-700);
    border: 0;
    border-radius: 15px;
    box-shadow: 0 12px 26px rgba(46, 16, 101, 0.25);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 220ms ease, transform 220ms ease, background 220ms ease;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--orange-500); transform: translateY(-3px); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
    .desktop-nav a:not(.support-link) { display: none; }
    .page-shell { grid-template-columns: 1fr; margin-top: -28px; }
    .policy-nav { position: relative; top: auto; padding: 14px; overflow: hidden; }
    .policy-nav h2 { padding-left: 7px; }
    .policy-nav ul { display: flex; width: 100%; max-width: 100%; gap: 7px; overflow-x: auto; scrollbar-width: none; }
    .policy-nav ul::-webkit-scrollbar { display: none; }
    .policy-nav li { flex: 0 0 auto; }
    .policy-nav li + li { margin-top: 0; }
    .policy-nav a { max-width: 220px; height: 100%; }
    .policy-nav a:hover { transform: translateY(-2px); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .header-inner,
    .hero-inner,
    .page-shell,
    .footer-inner { width: min(100% - 28px, 1180px); }
    .header-inner { min-height: 68px; }
    .brand-mark { width: 36px; height: 36px; border-radius: 12px; }
    .brand-name { font-size: 17px; }
    .desktop-nav .support-link { width: 40px; height: 40px; justify-content: center; padding: 0; border-radius: 13px; }
    .desktop-nav .support-link span { display: none; }
    .legal-hero { padding: 50px 0 64px; }
    .legal-hero h1 { font-size: 34px; }
    .page-shell { gap: 18px; padding-bottom: 56px; }
    .policy-card { padding: 26px 21px; border-radius: 25px; }
    .policy-card p,
    .policy-card li { font-size: 14px; }
    .contact-line { grid-template-columns: 1fr; gap: 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-bottom-links { flex-wrap: wrap; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .reveal { opacity: 1; transform: none; }
}
