/* ===== StudyLive shared light theme (subpages) ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #5B4FE8;
  --primary-dark: #463BD1;
  --accent: #06B6C9;
  --gradient-start: #7E44E3;
  --gradient-end: #5B4FE8;

  --bg-base: #FFFFFF;
  --bg-soft: #F5F7FB;

  --text-primary: #0F1729;
  --text-secondary: #4B5573;
  --text-muted: #6B7389;

  --success: #0FB98A;
  --warning: #E6A800;
  --danger: #E55A74;

  --border: #E6EAF2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 41, 0.04), 0 1px 3px rgba(15, 23, 41, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 41, 0.05), 0 2px 4px rgba(15, 23, 41, 0.04);
  --shadow-lg: 0 20px 40px rgba(15, 23, 41, 0.08), 0 4px 12px rgba(15, 23, 41, 0.04);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: inherit; }

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 0;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img { height: 32px; width: auto; display: block; }

.nav-back {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  transition: opacity 0.2s ease;
}
.nav-back:hover { opacity: 0.7; }

/* ===== Content ===== */
.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.content h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--gradient-start), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content .lead {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 680px;
  line-height: 1.9;
}

.content h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 56px;
  margin-bottom: 18px;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}

.content h3 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.content p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.9;
}

.content p a, .content a.inline {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(91, 79, 232, 0.3);
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.content p a:hover { color: var(--primary-dark); }

.content ul, .content ol {
  list-style: none;
  padding-left: 0;
  margin-bottom: 16px;
}

.content ul li {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 22px;
  position: relative;
  line-height: 1.85;
}

.content ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.content ol { counter-reset: sl-ol; }
.content ol li {
  counter-increment: sl-ol;
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 28px;
  position: relative;
  line-height: 1.85;
}
.content ol li::before {
  content: counter(sl-ol);
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(91, 79, 232, 0.10);
  border-radius: 50%;
}

.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Panel / card */
.panel {
  padding: 28px 32px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

/* Category cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 16px;
}

.category-card {
  padding: 28px;
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 79, 232, 0.28);
  box-shadow: var(--shadow-md);
}

.category-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(91, 79, 232, 0.10);
  color: var(--primary);
  margin-bottom: 14px;
}

.category-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }

.category-icon.cyan { background: rgba(6, 182, 201, 0.12); color: var(--accent); }
.category-icon.yellow { background: rgba(230, 168, 0, 0.14); color: #B87F00; }
.category-icon.green { background: rgba(15, 185, 138, 0.12); color: var(--success); }
.category-icon.red { background: rgba(229, 90, 116, 0.12); color: var(--danger); }

.category-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text-primary);
}

.category-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.85;
}

.category-list {
  list-style: none;
  padding: 14px 0 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.category-list li {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  padding-left: 14px;
  position: relative;
  line-height: 1.75;
}

.category-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
  opacity: 0.65;
}

/* Contact card */
.contact-card {
  padding: 32px;
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(91, 79, 232, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(6, 182, 201, 0.06) 0%, transparent 60%),
    #FFFFFF;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.contact-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 700;
}

.contact-email {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  display: inline-block;
  word-break: break-all;
  transition: opacity 0.2s ease;
}
.contact-email:hover { opacity: 0.75; }

.contact-meta {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.contact-meta strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

/* Template */
.template-card {
  padding: 24px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.template-card pre {
  font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif;
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-soft);
  padding: 22px;
  border-radius: 12px;
  border-left: 3px solid var(--primary);
}

/* FAQ */
.faq-item {
  padding: 22px 24px;
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(91, 79, 232, 0.2);
  box-shadow: var(--shadow-sm);
}

.faq-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.7;
}

.faq-q::before {
  content: 'Q';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(91, 79, 232, 0.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.faq-a {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.9;
  padding-left: 32px;
}

.faq-a a { color: var(--primary); font-weight: 500; }

/* Footer */
.footer {
  background: var(--bg-soft);
  padding: 56px 24px 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo img { height: 28px; width: auto; display: block; }

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  font-weight: 500;
}
.footer-link:hover { color: var(--primary); }

.footer-copy {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Feature list (support) */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.feature-item {
  padding: 20px;
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature-item:hover { border-color: rgba(91, 79, 232, 0.2); box-shadow: var(--shadow-sm); }
.feature-item-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(6, 182, 201, 0.12);
  color: var(--accent);
  margin-bottom: 10px;
}
.feature-item-icon svg { width: 20px; height: 20px; stroke-width: 1.8; }
.feature-item-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.feature-item-desc { font-size: 13px; color: var(--text-secondary); }

.faq-category {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 36px;
  margin-bottom: 14px;
  padding: 4px 10px;
  background: rgba(91, 79, 232, 0.08);
  border-radius: 50px;
  display: inline-block;
}

.link-cards {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.link-card {
  flex: 1;
  min-width: 200px;
  padding: 20px;
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
}
.link-card:hover {
  border-color: rgba(91, 79, 232, 0.3);
  background: rgba(91, 79, 232, 0.04);
  transform: translateY(-2px);
}

.contact-info-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0 8px;
}

/* Definition table (tokushoho) */
table.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.info-table th, table.info-table td {
  font-size: 14.5px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.85;
}
table.info-table tr:last-child th,
table.info-table tr:last-child td { border-bottom: none; }
table.info-table th {
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
  width: 200px;
  background: var(--bg-soft);
}
table.info-table td { color: var(--text-secondary); }
table.info-table a { color: var(--primary); font-weight: 500; }

.doc-title {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  margin-bottom: 32px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  background: none;
  -webkit-text-fill-color: initial;
}

.date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  table.info-table th, table.info-table td { font-size: 13px; padding: 12px 10px; }
  table.info-table th { width: 110px; }
}

@media (max-width: 768px) {
  .category-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .link-cards { flex-direction: column; }
  .contact-card { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .template-card pre { padding: 16px; font-size: 12.5px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-links { justify-content: center; }
  .content { padding: 100px 20px 64px; }
  .panel { padding: 22px; }
}
