/* LearnHub legal and help pages (/terms /privacy /tokushoho /company /help), on top of hp.css. Markup: tools/hp/legal.mjs */
.lg-main { padding-block: clamp(8px, 2vw, 24px) clamp(56px, 8vw, 96px); }
.lg-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--fg-2); }
.lg-crumbs li { display: flex; align-items: center; min-height: 44px; }
.lg-crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 12px 0 8px; border: solid var(--muted); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.lg-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg-2); }
.lg-crumbs a:hover { color: var(--fg); }
.lg-head { max-inline-size: 52rem; margin: 4px 0 clamp(24px, 4vw, 40px); }
.lg-head h1 { font-size: clamp(28px, 3.6vw, 44px); }
.lg-lead { margin-top: 14px; max-inline-size: 40em; font-size: var(--hp-lead); color: var(--fg-2); word-break: auto-phrase; }
.lg-dates { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: 14px; font-size: 14px; color: var(--fg-2); }
.lg-dates div { display: flex; gap: 8px; }
.lg-dates dt { font-weight: 700; }
.lg-dates dd { font-variant-numeric: tabular-nums; }
.lg-layout { display: grid; gap: 20px; align-items: start; }
.lg-layout:not(.has-toc) { max-width: 60rem; }
@media (min-width: 1024px) { .lg-layout.has-toc { grid-template-columns: 256px minmax(0, 1fr); gap: 32px; } }

/* 目次: sticky glass panel ≥ 1024px, disclosure below (closed only when JS runs) */
.lg-toc { min-width: 0; padding: 8px; }
.lg-toc-title { padding: 8px 12px 6px; font-size: 15px; }
.lg-toc-btn { display: none; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--fg); font-weight: 700; text-align: left; }
.lg-toc-btn::after { content: ""; width: 9px; height: 9px; margin: 0 4px 4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform var(--dur-ui) var(--ease-out); }
.lg-toc.is-open .lg-toc-btn::after { transform: translateY(4px) rotate(225deg); }
.lg-toc-btn:hover, .lg-toc-list a:hover { background: var(--hover); color: var(--fg); }
.lg-toc-list a[aria-current] { background: var(--primary-tint); color: var(--primary-text); box-shadow: inset 3px 0 0 var(--primary-soft); }
.lg-toc-list { display: grid; gap: 2px; }
.lg-toc-list a { display: flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 8px; color: var(--fg-2); font-size: 14px; line-height: 1.5; text-decoration: none; }
@media (min-width: 1024px) { .lg-toc { position: sticky; top: calc(var(--hp-header) + 20px); max-height: calc(100vh - var(--hp-header) - 40px); overflow: auto; overscroll-behavior: contain; } }
@media (max-width: 1023px) {
.lg-toc-list a { min-height: 44px; }
.js .lg-toc-title { display: none; }
.js .lg-toc-btn { display: flex; }
.js .lg-toc:not(.is-open) .lg-toc-list { display: none; }
}
@media (min-width: 640px) and (max-width: 1023px) { .lg-toc-list { display: block; columns: 2; column-gap: 8px; } .lg-toc-list li { break-inside: avoid; } }

/* document sheet */
.lg-doc { min-width: 0; padding: clamp(16px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow-1); line-height: 1.85; }
.lg-doc p, .lg-doc li { max-inline-size: 40em; }
.lg-intro > * + *, .lg-sec > * + *, .lg-closing > * + *, .lg-dl dd > * + * { margin-top: 14px; }
.lg-intro + .lg-sec, .lg-sec + .lg-sec { margin-top: clamp(32px, 4vw, 44px); }
.lg-sec h2, .lg-subhead { position: relative; padding-left: 16px; font-size: clamp(19px, 1.8vw, 22px); }
.lg-sec h2::before, .lg-subhead::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px; border-radius: 2px; background: var(--primary-grad); }
.lg-sec:target > h2 { color: var(--primary-text); }
.lg-closing { margin-top: clamp(36px, 4vw, 48px); padding-top: 24px; border-top: 1px solid var(--line); }
.lg-subhead { font-size: 18px; }
.lg-sign { text-align: right; }
.lg-doc .lg-sign { max-inline-size: none; }
@counter-style lg-paren { system: extends decimal; prefix: "("; suffix: ") "; }
.lg-ol { padding-inline-start: 1.9em; list-style: decimal; }
.lg-ol.is-paren { padding-inline-start: 2.7em; list-style: lg-paren; }
.lg-ul { padding-inline-start: 1.3em; list-style: disc; }
.lg-ul.is-sub { padding-inline-start: 1.1em; list-style: "・"; }
.lg-ol > li, .lg-ul > li { padding-inline-start: 2px; }
.lg-ol > li + li, .lg-ul > li + li { margin-top: 8px; }
.lg-ol > li::marker { color: var(--fg-2); font-variant-numeric: tabular-nums; }
.lg-ul > li::marker { color: var(--primary-text); }
li > .lg-ol, li > .lg-ul { margin-top: 8px; }
.lg-note { padding: 14px 18px; border-left: 4px solid var(--primary-soft); border-radius: 4px 12px 12px 4px; background: var(--primary-tint); font-size: 15px; }
.lg-doc a, .lg-lead a { padding-block: 3px; }
.lg-nw { white-space: nowrap; }
.lg-ext { display: inline-block; width: .85em; height: .85em; margin: 0 1px 0 3px; vertical-align: -.06em; stroke-width: 2; }

/* 表記 (dl): two columns when the sheet is wide, stacked on phones */
.lg-dl { container-type: inline-size; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lg-dl > div { padding: 14px 16px; }
.lg-dl > div + div { border-top: 1px solid var(--line); }
.lg-dl dt { font-weight: 700; }
.lg-dl dt, .lg-toc-list a, .lg-related a, .lg-crumbs li { word-break: auto-phrase; }
.lg-dl dd { margin-top: 4px; }
@container (min-width: 34em) {
.lg-dl > div { display: grid; grid-template-columns: minmax(8em, 12em) minmax(0, 1fr); padding: 0; }
.lg-dl dt { padding: 14px 16px; background: var(--surface-2); }
.lg-dl dd { margin: 0; padding: 14px 16px; }
}

/* tables: a real table when there is room, one card per row below 34em (roles keep the table semantics) */
.lg-table-wrap { container-type: inline-size; overflow-x: auto; }
.lg-table { position: relative; width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; line-height: 1.7; }
.lg-table caption { padding: 0 0 8px; text-align: left; font-weight: 700; }
.lg-table th, .lg-table td { padding: 10px 14px; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.lg-table tr > * + * { border-left: 1px solid var(--line); }
.lg-table tbody tr > * { border-top: 1px solid var(--line); }
.lg-table thead th { background: var(--surface-2); color: var(--fg-2); font-size: 14px; }
.lg-table thead th:first-child { border-top-left-radius: 11px; }
.lg-table thead th:last-child { border-top-right-radius: 11px; }
.lg-table td { font-variant-numeric: tabular-nums; }
@container (min-width: 30em) { .lg-table th { word-break: auto-phrase; } .lg-table tbody th { min-width: 7em; } }
@container (max-width: 34em) {
.is-stack .lg-table { border: 0; }
.is-stack .lg-table, .is-stack .lg-table :is(caption, tbody, tbody tr, tbody th, td) { display: block; }
.is-stack .lg-table thead { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.is-stack .lg-table thead tr { display: flex; }
.is-stack .lg-table thead th { flex: none; white-space: nowrap; }
.is-stack .lg-table tbody tr { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.is-stack .lg-table tbody tr + tr { margin-top: 10px; }
.is-stack .lg-table tbody tr > * { border: 0; }
.is-stack .lg-table tbody th { background: var(--surface-2); }
.is-stack .lg-table tbody td { border-top: 1px solid var(--line); }
.is-stack .lg-table td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
}

/* procedures and Q&A (help) */
.lg-steps > li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; padding-bottom: 22px; }
.lg-steps > li:last-child { padding-bottom: 0; }
.lg-steps > li > :not(.lg-step-n) { grid-column: 2; }
.lg-steps > li:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line-2); }
.lg-step-n { grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--hp-btn); color: var(--on-primary); font: 700 18px/1 var(--font-display); }
.lg-steps h3 { margin-top: 7px; font-size: 17px; line-height: 1.5; }
.lg-steps p { margin-top: 4px; color: var(--fg-2); }
.lg-faq { padding: 0 clamp(14px, 2.5vw, 24px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lg-faq .hp-qa summary { min-height: 52px; padding: 12px 0; }
.lg-faq .hp-qa p { padding-bottom: 16px; }

/* related pages, back to the homepage */
.lg-related { margin-top: clamp(40px, 5vw, 56px); }
.lg-related h2 { font-size: 20px; }
.lg-related ul { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.lg-related a { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px 0 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--fg); font-weight: 700; text-decoration: none; }
.lg-related a::after { content: ""; width: 7px; height: 7px; border: solid var(--primary-text); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.lg-related a:hover { border-color: var(--primary-soft); color: var(--primary-text); }
.lg-home { margin-top: 16px; }
.lg-home a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.hp-footer-nav a[aria-current="page"] { color: var(--fg); font-weight: 700; }

@media print {
:root, :root:not([data-theme="light"]), :root[data-theme="dark"] { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #f3f3f3; --fg: #000; --fg-2: #222; --muted: #444; --line: #bbb; --line-2: #999; --primary-text: #000; --primary-tint: #f3f3f3; --primary-soft: #777; --primary-grad: #777; }
body { font-size: 10.5pt; }
.lg-crumbs, .lg-toc, .lg-related, .lg-home, .hp-footer-nav, .hp-footer-bottom, .hp-drawer { display: none !important; }
.lg-main { padding: 0; }
.lg-layout { display: block; max-width: none; }
.lg-doc { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.lg-sec h2 { break-after: avoid; }
.lg-dl > div, .lg-table tr, .lg-steps > li { break-inside: avoid; }
}
