:root {
    --paper: #f8f3e8;
    --ink: #272d39;
    --muted: #66645f;
    --blue: #2856b2;
    --coral: #c8493e;
    --line: rgba(55, 55, 46, 0.22);
    --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    --font-title: "Iowan Old Style", "Palatino Linotype", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
    --brush-edge: polygon(0 28%, 7% 10%, 18% 18%, 28% 0, 48% 16%, 63% 5%, 80% 22%, 98% 9%, 100% 67%, 91% 84%, 73% 72%, 51% 100%, 32% 78%, 14% 91%, 2% 69%);
}

* { box-sizing: border-box; }
body { isolation: isolate; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-body); font-size: 15px; line-height: 2; letter-spacing: 0.025em; overflow-wrap: anywhere; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url("images/washi-grain.svg") repeat; opacity: 0.4; }
::selection { color: var(--ink); background: #f0d574; }
a { color: var(--blue); text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
a:hover { color: var(--coral); }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
strong { font-weight: 600; }

.legal-page { min-height: 100vh; padding: 56px 32px 96px; }
.legal-content { max-width: 820px; margin: 0 auto; }
.back-link { display: inline-block; padding: 8px 0; font-size: 12px; letter-spacing: 0.05em; }
.legal-title { position: relative; margin: 44px 0 30px; font: 400 clamp(29px, 4.5vw, 46px)/1.55 var(--font-title); color: var(--blue); letter-spacing: 0.05em; }
.legal-title::after { content: ""; position: absolute; left: 0; bottom: -10px; width: 82px; height: 7px; background: var(--coral); clip-path: var(--brush-edge); rotate: -2deg; opacity: 0.8; }
.effective-date { margin: 0 0 42px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.legal-section { padding-top: 26px; border-top: 1px solid var(--line); }
.legal-section + .legal-section { margin-top: 32px; }
.legal-section h2 { margin: 0 0 16px; font: 400 clamp(21px, 2.6vw, 25px)/1.65 var(--font-title); letter-spacing: 0.04em; }
.legal-section h3 { margin: 24px 0 10px; font-size: 16px; font-weight: 600; line-height: 1.8; }
.legal-section p { margin: 0 0 16px; }
.legal-section p:last-child, .legal-section ul:last-child { margin-bottom: 0; }
.legal-section ul { margin: 12px 0 20px; padding-left: 1.5em; }
.legal-section li { margin: 8px 0; padding-left: 0.15em; }
.legal-section li::marker { color: var(--coral); }
.copyright-notice { margin: 34px 0; padding: 20px 24px; border-left: 3px solid var(--coral); background: rgba(200, 73, 62, 0.055); }
.copyright-notice h3 { margin: 0 0 10px; font: 400 21px/1.7 var(--font-title); }
.copyright-notice p { margin: 0; }

@media (max-width: 760px) {
    body { font-size: 14px; line-height: 1.95; }
    .legal-page { padding: 24px 22px 64px; }
    .legal-title { margin-top: 30px; font-size: clamp(26px, 6.8vw, 36px); line-height: 1.6; }
    .effective-date { margin-bottom: 32px; font-size: 11px; }
    .legal-section { padding-top: 22px; }
    .legal-section + .legal-section { margin-top: 26px; }
    .legal-section h2 { font-size: 21px; }
    .legal-section h3 { font-size: 15px; }
    .copyright-notice { padding: 16px 18px; }
}

@media print {
    body { background: #fff; font-size: 11pt; }
    body::before, .legal-title::after, .back-link { display: none; }
    .legal-page { min-height: auto; padding: 0; }
    .legal-title { color: #272d39; margin-top: 0; }
    .legal-section h2, .legal-section h3 { break-after: avoid; }
    a { color: inherit; }
}
