:root {
  color-scheme: light;
  --terms-ink: #252b2b;
  --terms-muted: #626c66;
  --terms-green: #245442;
  --terms-line: #dfe5e0;
}

* { box-sizing: border-box; letter-spacing: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }
body { margin: 0; color: var(--terms-ink); background: #fff; font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; font-size: 16px; line-height: 1.95; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible, summary:focus-visible { outline: 3px solid #a44f3c; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
::selection { color: #193d2c; background: #d8e9dc; }
.terms-wrap { width: min(calc(100% - 64px), 860px); margin-inline: auto; }
.terms-icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.terms-icon { display: block; width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.terms-back-arrow { transform: rotate(180deg); }
.terms-up-arrow { transform: rotate(-90deg); }
.terms-skip-link { position: fixed; z-index: 30; top: 12px; left: 12px; padding: 10px 18px; transform: translateY(-160%); color: #fff; background: var(--terms-green); }
.terms-skip-link:focus { transform: translateY(0); }

.terms-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--terms-line); background: #fff; }
.terms-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.terms-brand { display: flex; flex: 0 0 160px; align-items: center; min-height: 44px; }
.terms-brand img { width: 160px; }
.terms-login-link, .terms-top-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--terms-green); font-size: 13px; line-height: 1.7; }
.terms-login-link { flex-shrink: 0; }
.terms-login-link > span, .terms-top-link > span { white-space: nowrap; }
.terms-login-link:hover > span, .terms-top-link:hover > span { text-decoration: underline; text-underline-offset: 4px; }

.terms-main { padding-block: 48px 64px; }
.terms-title { padding-bottom: 28px; border-bottom: 1px solid var(--terms-line); }
.terms-shop-name { margin-bottom: 9px; color: var(--terms-green); font-size: 14px; font-weight: 500; line-height: 1.7; }
.terms-title h1 { font-size: 32px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.terms-updated { margin-top: 14px; color: var(--terms-muted); font-size: 13px; line-height: 1.8; }
.terms-intro { margin-top: 28px; overflow-wrap: anywhere; }
.terms-intro p + p { margin-top: 14px; }

.terms-contents { margin-block: 32px; border-block: 1px solid var(--terms-line); }
.terms-contents summary { min-height: 52px; padding-block: 12px; color: var(--terms-green); font-size: 15px; font-weight: 600; cursor: pointer; }
.terms-contents summary::marker { font-size: 11px; }
.terms-contents nav { padding-bottom: 18px; }
.terms-contents ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.terms-contents li { min-width: 0; }
.terms-contents a { display: flex; align-items: center; min-height: 44px; padding-block: 8px; color: var(--terms-green); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.terms-contents a:hover { text-decoration: underline; text-underline-offset: 4px; }

.terms-clause { overflow-wrap: anywhere; }
.terms-clause + .terms-clause { margin-top: 34px; }
.terms-clause h2 { margin-bottom: 12px; font-size: 19px; font-weight: 600; line-height: 1.7; }
.terms-clause > p + p, .terms-clause > p + ol { margin-top: 12px; }
.terms-clause ol { margin: 0; padding-left: 1.65em; list-style-type: decimal; }
.terms-clause li { padding-left: 0.2em; }
.terms-clause li + li { margin-top: 10px; }
.terms-clause li::marker { color: #53665a; font-variant-numeric: tabular-nums; }
.terms-clause li p + p { margin-top: 10px; }
.terms-end { margin-top: 24px; text-align: right; }
.terms-history { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--terms-line); overflow-wrap: anywhere; }
.terms-history h2 { margin-bottom: 14px; font-size: 16px; font-weight: 600; line-height: 1.8; }
.terms-history p { color: var(--terms-muted); font-size: 14px; line-height: 2; }

.terms-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--terms-line); }
.terms-return { display: inline-flex; align-items: center; justify-content: center; gap: 12px; max-width: 100%; min-height: 48px; padding: 10px 20px; border: 1px solid #a4b7aa; border-radius: 4px; color: var(--terms-green); background: #fff; font-size: 14px; font-weight: 500; line-height: 1.8; transition: background 160ms; }
.terms-return:hover { background: #f2f6f3; }
.terms-return > span { min-width: 0; overflow-wrap: anywhere; }
.terms-footer { border-top: 1px solid var(--terms-line); }
.terms-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 24px; font-size: 13px; }
.terms-copyright { color: var(--terms-muted); font-size: 11px; }

@media (max-width: 640px) {
  .terms-wrap { width: calc(100% - 40px); }
  .terms-header-inner { gap: 12px; min-height: 72px; }
  .terms-brand { flex-basis: 128px; }
  .terms-brand img { width: 128px; }
  .terms-login-link { gap: 6px; font-size: 12px; }
  .terms-login-link .terms-icon { width: 16px; height: 16px; flex-basis: 16px; }
  .terms-main { padding-block: 32px 44px; }
  .terms-title { padding-bottom: 22px; }
  .terms-shop-name { margin-bottom: 8px; font-size: 13px; }
  .terms-title h1 { font-size: 26px; line-height: 1.6; }
  .terms-updated { margin-top: 12px; }
  .terms-intro { margin-top: 24px; }
  .terms-contents { margin-block: 26px; }
  .terms-contents ul { grid-template-columns: minmax(0, 1fr); }
  .terms-clause + .terms-clause { margin-top: 28px; }
  .terms-clause h2 { font-size: 18px; }
  .terms-history { margin-top: 28px; padding-top: 24px; }
  .terms-actions { align-items: flex-start; margin-top: 32px; padding-top: 24px; }
  .terms-footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; padding-block: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .terms-return { transition: none; }
}

@media print {
  html { scroll-behavior: auto; scroll-padding-top: 0; }
  body { font-size: 11pt; line-height: 1.8; }
  .terms-wrap { width: 100%; }
  .terms-header, .terms-skip-link, .terms-contents, .terms-actions { display: none; }
  .terms-main { padding-block: 0; }
  .terms-title h1 { font-size: 22pt; }
  .terms-clause h2 { break-after: avoid; }
  .terms-clause p, .terms-clause li { orphans: 2; widows: 2; }
  .terms-footer-inner { padding-top: 16px; }
}
