/* ==========================================================================
   STELLA SERVER — LEGAL PAGES STYLESHEET
   tokushoho.html / terms.html / privacy.html
   Matches main LP (styles.css) header/footer & clean light reading design.
   ========================================================================== */

.legal-main {
  background: var(--bg-light-alt);
  min-height: calc(100vh - 78px - 240px);
  padding-bottom: 84px;
}

.legal-hero {
  position: relative;
  background: radial-gradient(circle at 18% 20%, rgba(0, 240, 255, 0.14), transparent 46%),
              radial-gradient(circle at 82% 15%, rgba(167, 139, 250, 0.16), transparent 44%),
              linear-gradient(160deg, #050a1a 0%, #0b1636 60%, #0f1f48 100%);
  color: #ffffff;
  padding: 58px 0 52px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.legal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 18px;
}
.legal-breadcrumb a {
  color: #7dd3fc;
  transition: opacity 0.2s;
}
.legal-breadcrumb a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.legal-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 10px;
}

.legal-hero h1 {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.legal-hero p {
  font-size: 15.5px;
  line-height: 1.75;
  color: rgba(226, 232, 240, 0.9);
  max-width: 760px;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.legal-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.28);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.legal-tab:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.legal-tab.is-active {
  background: #ffffff;
  color: #050a1a;
  border-color: #ffffff;
}

.legal-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-body {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.legal-card h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink-strong);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e2ecf8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-card p {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-body);
  margin-bottom: 12px;
}
.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 14px;
}
.legal-list:last-child {
  margin-bottom: 0;
}
.legal-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-body);
}
.legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan);
}
.legal-list li strong {
  color: var(--ink-strong);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
}
.legal-table tr {
  border-bottom: 1px solid #e5edf7;
}
.legal-table tr:last-child {
  border-bottom: none;
}
.legal-table th,
.legal-table td {
  padding: 18px 16px;
  text-align: left;
  vertical-align: top;
  font-size: 15px;
  line-height: 1.8;
}
.legal-table th {
  width: 28%;
  font-weight: 700;
  color: var(--ink-strong);
  background: #f8fbff;
}
.legal-table td {
  color: var(--ink-body);
}
.legal-table td strong {
  color: var(--ink-strong);
}

.legal-note-box {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  font-size: 14.5px;
  line-height: 1.8;
  color: #1e3a5f;
}

.legal-meta-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  font-size: 14px;
  color: var(--ink-muted);
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 14.5px;
}
.legal-back-link:hover {
  text-decoration: underline;
}

.legal-inline-link {
  color: var(--brand-blue);
  text-decoration: underline;
}

.legal-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.03);
}
.legal-toc-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-strong);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.legal-toc-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}
.legal-toc-grid a {
  display: block;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--brand-blue);
  padding: 3px 0;
}
.legal-toc-grid a:hover {
  text-decoration: underline;
}

.legal-card[id] {
  scroll-margin-top: 96px;
}
.legal-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-strong);
  margin: 18px 0 8px;
}

.legal-subtable-wrap {
  overflow-x: auto;
  margin: 14px 0 16px;
  border: 1px solid #dce6f5;
  border-radius: var(--radius-sm);
}
.legal-subtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.legal-subtable th,
.legal-subtable td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e5edf7;
  line-height: 1.65;
  vertical-align: top;
}
.legal-subtable tr:last-child th,
.legal-subtable tr:last-child td {
  border-bottom: none;
}
.legal-subtable thead th {
  background: #f1f6fd;
  color: var(--ink-strong);
  font-weight: 700;
}
.legal-subtable tbody th {
  width: 28%;
  background: #f8fbff;
  color: var(--ink-strong);
  font-weight: 700;
}
.legal-subtable tbody td {
  color: var(--ink-body);
}

.legal-ol {
  margin: 10px 0 14px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-ol li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-body);
}
.legal-ol li strong {
  color: var(--ink-strong);
}

@media (max-width: 768px) {
  .legal-toc {
    padding: 18px 16px;
  }
  .legal-toc-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .legal-hero {
    padding: 40px 0 36px;
  }
  .legal-container {
    padding: 0 16px;
  }
  .legal-card {
    padding: 22px 18px;
  }
  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
  }
  .legal-table tr {
    padding: 14px 0;
  }
  .legal-table th {
    background: transparent;
    padding: 0 0 6px;
    font-size: 14px;
    color: var(--brand-blue);
  }
  .legal-table td {
    padding: 0;
    font-size: 14.5px;
  }
}
