:root {
  --navy: #062b5c;
  --blue: #0876df;
  --cyan: #18b8ee;
  --ink: #132640;
  --muted: #60718a;
  --line: #d9e7f3;
  --pale: #eff8ff;
  --white: #fff;
  color-scheme: light;
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: #f6faff;
  font-size: 16px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

a { color: var(--blue); }

a:hover { text-decoration-thickness: 2px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--white);
  background: var(--navy);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.terms-container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.terms-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.brand { display: inline-flex; flex: 0 0 auto; align-items: center; }
.brand img { display: block; width: 164px; height: auto; }

.back-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 44px;
  padding: 7px 16px;
  color: var(--navy);
  border: 1px solid #b9d5e9;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.terms-hero {
  padding: 78px 0 70px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 16%, rgba(24,184,238,.35), transparent 26%),
    linear-gradient(135deg, #052753, #0a4f92);
}

.eyebrow {
  margin: 0 0 12px;
  color: #70d9ff;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .18em;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.2;
  letter-spacing: .02em;
}

.mobile-break { display: none; }
.terms-hero p:last-child { margin: 0; color: #d5eaff; }

.terms-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-block: 64px 90px;
}

.terms-summary {
  position: sticky;
  top: 104px;
  padding: 24px;
  background: var(--pale);
  border: 1px solid #cfe5f5;
  border-radius: 18px;
}

.summary-title {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 800;
}

.terms-summary ul { margin: 0; padding-left: 1.25em; }
.terms-summary li + li { margin-top: 7px; }

.terms-content {
  min-width: 0;
  padding: 46px 54px;
  background: var(--white);
  border: 1px solid #e2edf6;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(12,54,94,.08);
}

.lead {
  margin: 0 0 42px;
  padding: 22px 24px;
  background: #f4faff;
  border-left: 4px solid var(--cyan);
  border-radius: 0 12px 12px 0;
}

.terms-content section + section {
  margin-top: 42px;
  padding-top: 38px;
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  line-height: 1.5;
}

p { margin: 0; }
p + p { margin-top: 12px; }
ul, ol { margin: 14px 0 0; padding-left: 1.5em; }
li + li { margin-top: 7px; }

code {
  padding: 2px 6px;
  font-family: Consolas, monospace;
  background: #eaf4fc;
  border-radius: 5px;
}

address { margin-top: 14px; font-style: normal; }

.terms-footer {
  padding: 48px 0;
  color: #d7e6f5;
  background: #041f43;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 40px;
  align-items: center;
}

.footer-brand img { display: block; width: 170px; height: auto; }
.terms-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 24px; }
.terms-footer a { color: var(--white); }
.terms-footer p { grid-column: 1 / -1; color: #94aac2; font-size: .86rem; }

@media (max-width: 860px) {
  .terms-layout { grid-template-columns: 1fr; gap: 28px; }
  .terms-summary { position: static; }
  .terms-content { padding: 38px 34px; }
}

@media (max-width: 600px) {
  body { font-size: 15px; line-height: 1.85; }
  .terms-container { width: min(100% - 30px, 1120px); }
  .header-inner { min-height: 68px; gap: 10px; }
  .brand img { width: 128px; }
  .back-link { padding-inline: 10px; font-size: .82rem; }
  .terms-hero { padding: 56px 0 50px; }
  .mobile-break { display: block; }
  .terms-layout { padding-block: 34px 62px; }
  .terms-summary { padding: 20px; border-radius: 14px; }
  .terms-content { padding: 30px 20px; border-radius: 16px; }
  .lead { padding: 18px; margin-bottom: 34px; }
  .terms-content section + section { margin-top: 34px; padding-top: 30px; }
  .footer-inner { grid-template-columns: 1fr; }
  .terms-footer nav { justify-content: flex-start; }
}
