:root {
  --bg: #faf6ef;
  --bg-alt: #f3ece0;
  --surface: #ffffff;
  --ink: #1e242b;
  --ink-muted: #52606d;
  --border: #e6dccb;
  --accent: #c93b2b;
  --accent-dark: #a32c1f;
  --accent-soft: #fceeea;
  --navy: #1e3a5f;
  --navy-soft: #edf2f8;
  --green: #3b6e52;
  --green-soft: #eaf4ee;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(30, 58, 95, 0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pattern-seigaiha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill='none' stroke='%231e3a5f' stroke-opacity='0.055' stroke-width='1.1'%3E%3Ccircle cx='40' cy='40' r='36'/%3E%3Ccircle cx='40' cy='40' r='26'/%3E%3Ccircle cx='40' cy='40' r='16'/%3E%3Ccircle cx='0' cy='20' r='36'/%3E%3Ccircle cx='0' cy='20' r='26'/%3E%3Ccircle cx='0' cy='20' r='16'/%3E%3Ccircle cx='80' cy='20' r='36'/%3E%3Ccircle cx='80' cy='20' r='26'/%3E%3Ccircle cx='80' cy='20' r='16'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-asanoha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z M30 0 L30 60 M0 30 L60 30' fill='none' stroke='%23ffffff' stroke-opacity='0.065' stroke-width='1'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

jpn {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 246, 239, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.hanko {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  background: rgba(201, 59, 43, 0.05);
  box-shadow: inset 0 0 0 2px rgba(201, 59, 43, 0.14);
}
.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}
.topnav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 500;
}
.topnav a:hover { color: var(--ink); }
.topnav-cta {
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff !important;
}
.topnav-cta:hover { background: #132847; }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 28px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.section-intro { margin: 0; color: var(--ink-muted); max-width: 720px; }
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero */
.hero {
  padding: 58px 0 52px;
  background-color: var(--bg);
  background-image: var(--pattern-seigaiha);
  border-bottom: 1px solid var(--border);
}
.hero-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.meta-note { font-size: 13px; color: var(--ink-muted); }
.hero-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 820px;
}
.hero-sub {
  margin: 0 0 18px;
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 740px;
}
.hero-proof {
  margin: 0 0 24px;
  font-weight: 600;
  color: var(--navy);
  font-size: 15px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.microcopy { font-size: 13px; color: var(--ink-muted); margin: 8px 0 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.btn-sm { padding: 8px 13px; font-size: 13.5px; }
.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Self-check */
.selfcheck-card { padding: 28px; }
.sc-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-muted);
}
.sc-bar {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 22px;
}
.sc-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}
.sc-question {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 18px;
}
.sc-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.sc-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 0.12s, background 0.12s;
}
.sc-option:hover { border-color: var(--navy); }
.sc-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.sc-pts {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--ink-muted);
}
.sc-option.selected .sc-pts { background: var(--accent); color: #fff; }
.sc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.sc-nav { display: flex; gap: 10px; }

/* Result */
.sc-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.sc-result-head h3 { margin: 0; font-size: 24px; color: var(--navy); }
.sc-result-lead { font-size: 16px; margin: 0 0 18px; }
.sc-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.sc-result-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.sc-result-box h4 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); }
.sc-result-box ol { margin: 0; padding-left: 18px; }
.sc-result-box li { margin-bottom: 6px; font-size: 14.5px; }
.email-banner {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 8px;
  background: var(--navy-soft);
  border: 1px solid #c9d8ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.email-banner form { display: flex; gap: 8px; flex-wrap: wrap; }
.email-banner input[type="email"] {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  min-width: 220px;
}

/* Level Cards */
.lead-quote {
  margin: 10px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--ink-muted);
  max-width: 760px;
  border-radius: 0 6px 6px 0;
}
.level-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-muted);
}
.pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.level-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.level-card {
  padding: 24px;
  position: relative;
  border-radius: 14px;
  border-top: 3px solid var(--navy);
}
.level-card.is-current {
  border: 2px solid var(--accent);
  box-shadow: 0 6px 24px rgba(184, 50, 39, 0.10);
}
.level-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.level-badge-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.level-code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--navy);
  color: #fff;
}
.chip-current {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.chip-gap {
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 12.5px;
  padding: 3px 9px;
  border-radius: 6px;
}
.level-title { margin: 0; font-size: 21px; }
.level-tagline { margin: 4px 0 0; color: var(--ink-muted); font-size: 14.5px; }
.level-kpis {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.kpi {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 150px;
}
.kpi-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); }
.kpi-val { font-weight: 700; font-size: 15px; color: var(--ink); }
.kpi-note { font-size: 12px; color: var(--ink-muted); }
.chip-onsite {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  background: var(--green-soft);
  color: var(--green);
  padding: 2px 7px;
  border-radius: 4px;
}
.level-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.level-col h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.level-col ul { margin: 0; padding-left: 18px; }
.level-col li { margin-bottom: 8px; font-size: 14px; }
.ec-meta { display: block; font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.course-list { list-style: none; padding-left: 0 !important; }
.course-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  margin-bottom: 8px;
}
.course-item.is-clickable { cursor: pointer; }
.course-item.is-clickable:hover { border-color: var(--navy); background: var(--surface); }
.course-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.tag-new { background: var(--accent-soft); color: var(--accent); }
.tag-reuse { background: var(--navy-soft); color: var(--navy); }
.level-card-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.salary-footnote { margin-top: 16px; font-size: 13px; color: var(--ink-muted); }

/* Matrix */
.matrix-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.toggle-only-me { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  font-size: 13.5px;
}
.matrix-table th, .matrix-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}
.matrix-table th:last-child, .matrix-table td:last-child { border-right: none; }
.matrix-table tr:last-child td { border-bottom: none; }
.matrix-table thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}
.matrix-table thead th.col-level { cursor: pointer; }
.matrix-table thead th.col-level:hover { background: #264878; }
.matrix-table thead th.col-current { background: var(--accent); }
.matrix-table td.col-current { background: var(--accent-soft); }
.matrix-table th:first-child, .matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  font-weight: 700;
  min-width: 150px;
}
.matrix-table thead th:first-child { background: var(--navy); z-index: 3; }
.matrix-hint { margin-top: 14px; font-size: 14px; color: var(--ink-muted); }

/* Proof files */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.proof-card {
  padding: 20px;
  border-radius: 14px;
  border-top: 3px solid var(--green);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.proof-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chip-sanitized {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--green-soft);
  color: var(--green);
  padding: 3px 8px;
  border-radius: 999px;
}
.proof-title { margin: 8px 0 6px; font-size: 16.5px; }
.proof-desc { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-muted); }
.proof-files-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.proof-file-link {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  text-decoration: none;
  color: var(--navy);
  background: var(--bg);
}
.proof-file-link:hover { border-color: var(--navy); background: var(--navy-soft); }

/* Bottom CTA & Badges */
.section-cta {
  background-color: var(--navy);
  background-image: var(--pattern-asanoha);
  color: #fff;
}
.cta-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}
.cta-copy h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 32px); }
.cta-copy p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.86); }
.price-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.price-main { display: block; font-size: 17px; }
.price-sub { font-size: 13.5px; color: rgba(255, 255, 255, 0.78); }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cta-fallback a { color: rgba(255, 255, 255, 0.86); font-size: 14px; }
.badges-panel {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 20px;
}
.badges-panel h3 { margin: 0 0 14px; font-size: 18px; }
.badge-item {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 10px;
}
.badge-item:last-child { margin-bottom: 0; }
.badge-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.badge-cond { font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.badge-disp { font-size: 12px; color: rgba(255, 255, 255, 0.65); margin-top: 4px; }

/* Footer */
.footer { padding: 22px 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-muted); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 32, 42, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal-dialog {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 780px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-close {
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-muted);
}
.modal-body { padding: 20px; overflow-y: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.compare-table th { background: var(--bg-alt); }
.rubric-list { padding-left: 20px; margin: 12px 0; }
.rubric-list li { margin-bottom: 8px; }

/* Floating Daily Question Widget */
.dq-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: calc(100vw - 32px);
}
.dq-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.24);
}
.dq-fab:hover { background: #132847; }
.dq-fab-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28);
}
.dq-fab-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}
.dq-card {
  width: 390px;
  max-width: calc(100vw - 32px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(23, 32, 42, 0.22);
  overflow: hidden;
}
.dq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--navy);
  color: #fff;
}
.dq-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}
.dq-head-stats {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.8);
}
.dq-close {
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.dq-close:hover { background: rgba(255, 255, 255, 0.24); }
.dq-filters {
  display: flex;
  gap: 5px;
  padding: 8px 12px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.dq-filter-btn {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.dq-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.dq-body {
  padding: 14px;
  overflow-y: auto;
}
.dq-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.dq-source {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--navy-soft);
  color: var(--navy);
}
.dq-day-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}
.dq-prompt {
  margin: 0 0 8px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
}
.dq-prompt-jp {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13.5px;
}
.dq-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-bottom: 10px;
}
.dq-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.dq-opt:hover:not(:disabled) { border-color: var(--navy); background: var(--bg); }
.dq-opt:disabled { cursor: default; }
.dq-opt-key {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dq-opt.is-correct {
  border-color: var(--green);
  background: var(--green-soft);
}
.dq-opt.is-correct .dq-opt-key { background: var(--green); color: #fff; }
.dq-opt.is-wrong {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dq-opt.is-wrong .dq-opt-key { background: var(--accent); color: #fff; }
.dq-explain {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 12.5px;
  line-height: 1.5;
  background: var(--bg);
  border-left: 3px solid var(--navy);
}
.dq-explain.ok { border-left-color: var(--green); background: var(--green-soft); }
.dq-explain.bad { border-left-color: var(--accent); background: var(--accent-soft); }
.dq-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

@media (max-width: 820px) {
  .topnav { display: none; }
  .cta-panel { grid-template-columns: 1fr; }
  .selfcheck-card { padding: 20px; }
  .dq-widget { right: 12px; bottom: 12px; }
}

/* ---------------------------------------------------------------- Unified Topbar & Command Palette (⌘K) */
.topnav a.is-active { color: var(--accent); font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 13.5px;
  cursor: pointer;
}
.cmdk-trigger:hover { border-color: var(--navy); color: var(--ink); }
.cmdk-trigger kbd, .cmdk-hints kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--ink);
}
.cmdk-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 32, 42, 0.56);
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 24px;
}
.cmdk-backdrop[hidden] { display: none; }
.cmdk-dialog {
  width: 640px;
  max-width: 100%;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 1px solid var(--border);
}
.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.cmdk-input-row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--ink);
}
.cmdk-esc {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
}
.cmdk-results { max-height: 56vh; overflow-y: auto; padding: 8px; }
.cmdk-empty { padding: 24px 12px; text-align: center; color: var(--ink-muted); font-size: 14px; }
.cmdk-group { margin-bottom: 10px; }
.cmdk-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding: 4px 10px;
}
.cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--ink);
}
.cmdk-item:hover, .cmdk-item.is-active { background: var(--navy-soft); }
.cmdk-item-title { font-size: 14px; font-weight: 600; }
.cmdk-item-sub { font-size: 12.5px; color: var(--ink-muted); }
.cmdk-badge {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--navy);
}
.cmdk-hints {
  display: flex;
  gap: 16px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  font-size: 12px;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------- <jpn> Interactive Popover */
jpn.is-lookup {
  cursor: pointer;
  border-bottom: 1.5px dashed var(--accent);
  padding: 0 2px;
  border-radius: 3px;
}
jpn.is-lookup:hover { background: var(--accent-soft); }
.jpn-popover {
  position: fixed;
  z-index: 130;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(23, 32, 42, 0.25);
  overflow: hidden;
}
.jpn-popover[hidden] { display: none; }
.jpn-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.jpn-pop-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.jpn-pop-close {
  border: none; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-muted);
}
.jpn-pop-body { padding: 12px; max-height: 280px; overflow-y: auto; }
.jpn-term-hit { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.jpn-term-hit:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.jpn-term-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.jpn-term-jp { font-weight: 700; font-size: 15px; color: var(--navy); }
.jpn-term-kana { font-size: 12.5px; color: var(--ink-muted); }
.jpn-term-vn { font-size: 13.5px; }
.jpn-term-trap {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12.5px;
}
.btn-xs { padding: 4px 9px; font-size: 12px; }

/* ---------------------------------------------------------------- Catalog (/courses/) */
.hero-compact {
  padding: 42px 0 34px;
  background-color: var(--bg);
  background-image: var(--pattern-seigaiha);
  border-bottom: 1px solid var(--border);
}
.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.catalog-search {
  flex: 1;
  min-width: 240px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14.5px;
  background: var(--surface);
}
.catalog-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.view-toggle { display: flex; gap: 4px; }
.catalog-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.course-card {
  padding: 22px;
  border-radius: 14px;
  border-top: 3px solid var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(30, 58, 95, 0.10);
}
.catalog-grid .course-card { flex-direction: column; align-items: stretch; }
.course-card-main { flex: 1; min-width: 260px; }
.course-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.course-index { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.course-card-title { margin: 0 0 4px; font-size: 19px; }
.course-card-title a { color: var(--ink); text-decoration: none; }
.course-card-title a:hover { color: var(--accent); text-decoration: underline; }
.course-card-jp { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-muted); }
.course-prog-row { display: flex; align-items: center; gap: 10px; }
.course-prog-text { font-size: 12.5px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.course-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Lesson Player (2-Column) */
.lesson-banner {
  background-color: var(--navy);
  background-image: var(--pattern-asanoha);
  color: #fff;
  padding: 34px 0 0;
}
.lesson-breadcrumb { font-size: 13px; color: rgba(255, 255, 255, 0.72); margin-bottom: 10px; }
.lesson-breadcrumb a { color: rgba(255, 255, 255, 0.9); }
.lesson-h1 { margin: 0 0 6px; font-size: clamp(22px, 3.2vw, 32px); line-height: 1.25; }
.lesson-jp-sub { margin: 0 0 20px; color: rgba(255, 255, 255, 0.75); font-size: 15px; }
.lesson-banner-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ltab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.ltab:hover { color: #fff; }
.ltab.active { color: #fff; border-bottom-color: var(--accent); }

.lesson-main { padding-top: 28px; }
.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.lesson-sidebar { position: sticky; top: 76px; }
.sidebar-card { overflow: hidden; }
.sidebar-head { padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--bg-alt); font-size: 13.5px; }
.sidebar-list { list-style: none; margin: 0; padding: 8px; max-height: 62vh; overflow-y: auto; }
.sidebar-link {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13.5px;
  margin-bottom: 3px;
}
.sidebar-link:hover { background: var(--bg-alt); }
.sidebar-link.is-current { background: var(--navy); color: #fff; font-weight: 600; }
.sb-num {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-link.is-current .sb-num { background: var(--accent); color: #fff; }
.sidebar-link.is-done .sb-num { background: var(--green); color: #fff; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.sidebar-foot a { color: var(--navy); font-weight: 600; text-decoration: none; }

.reading-tracker { padding: 14px 18px; margin-bottom: 16px; }
.rt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 600; }
.rt-explain { margin: 10px 0 0; font-size: 13px; color: var(--ink-muted); }

.lesson-obj-box { padding: 18px 22px; margin-bottom: 16px; background: var(--navy-soft); border-color: #c9d8ec; }
.lesson-obj-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.lesson-obj-box ul { margin: 0; padding-left: 18px; font-size: 14px; }

.lesson-body { padding: 26px 28px; margin-bottom: 20px; }
.lesson-body p { margin: 0 0 14px; }
.lesson-body h3 { margin: 22px 0 10px; font-size: 17px; color: var(--navy); }
.lesson-h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 12px;
  padding-top: 10px;
  font-size: 21px;
  line-height: 1.3;
}
.sec-ring {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.sec-ring.is-read { border-color: var(--green); background: var(--green); }
.lesson-hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.lesson-quote {
  margin: 14px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--navy);
  background: var(--bg);
  border-radius: 0 8px 8px 0;
  font-size: 14.5px;
}
.lesson-quote.is-trap {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: #5b1812;
}
.lesson-table-wrap { overflow-x: auto; margin: 14px 0; }
.lesson-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lesson-table th, .lesson-table td { padding: 9px 11px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.lesson-table th { background: var(--bg-alt); font-weight: 700; }
.lesson-ul, .lesson-ol { margin: 0 0 14px; padding-left: 22px; }
.lesson-ul li, .lesson-ol li { margin-bottom: 6px; }
.lesson-checklist { list-style: none; padding-left: 0; margin: 0 0 14px; }
.chk-item label { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; cursor: pointer; font-size: 14.5px; }
.code-block { margin: 14px 0; border-radius: 8px; overflow: hidden; border: 1px solid #2b3642; background: #17202a; color: #eef2f6; }
.code-block-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px; background: #212d3b; font-family: var(--font-mono); font-size: 12px; color: #9fb3c8;
}
.btn-copy-code {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 5px;
  cursor: pointer;
}
.btn-copy-code:hover { background: rgba(255, 255, 255, 0.18); }
.code-block pre { margin: 0; padding: 14px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.5; }

.lesson-quiz { padding: 24px 28px; margin-bottom: 20px; }
.quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.quiz-item { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.quiz-item:last-child { border-bottom: none; margin-bottom: 0; }
.quiz-q { margin: 0 0 10px; font-size: 15px; }
.quiz-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.quiz-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.quiz-score-banner { font-size: 15px; color: var(--navy); }

.lesson-prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pn-box {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--ink);
}
.pn-box:hover { border-color: var(--navy); }
.pn-next { text-align: right; }
.pn-dir { font-size: 12.5px; color: var(--ink-muted); }

/* ---------------------------------------------------------------- A4 Glossary & 120 Exercises */
.a4-mode-tabs { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 14px; }
.glossary-card {
  padding: 18px;
  border-radius: 14px;
  border-top: 3px solid var(--navy);
}
.gl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.gl-term { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.gl-jp { font-size: 19px; font-weight: 700; color: var(--navy); }
.gl-kana { font-size: 13px; color: var(--ink-muted); }
.gl-mean { font-size: 14.5px; margin-bottom: 8px; }
.gl-ex { padding: 8px 10px; border-radius: 6px; background: var(--bg); font-size: 13px; }
.gl-ex-vn { color: var(--ink-muted); margin-top: 2px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; }

.gate-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-top: 14px; }
.gate-g {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 7px; background: var(--bg); border: 1px solid var(--border); font-size: 12.5px;
}
.gate-g.is-pass { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.pairs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pairs-col { display: flex; flex-direction: column; gap: 8px; }
.ex-textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--font-sans); font-size: 14.5px; margin-top: 8px;
}

/* ---------------------------------------------------------------- Progress Dashboard */
.progress-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi-card {
  padding: 20px;
  border-radius: 14px;
  border-top: 3px solid var(--accent);
}
.kpi-big { font-size: 32px; font-weight: 800; color: var(--navy); line-height: 1.2; margin: 4px 0; }

@media (max-width: 900px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-sidebar { position: static; }
  .lesson-prev-next, .pairs-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Japanese Warm Landing Page (和モダン) */
.jp-landing {
  background: #faf6ef;
}
.jp-hero {
  position: relative;
  padding: 58px 0 60px;
  background-color: #faf6ef;
  /* Subtle traditional Seigaiha (wave) motif in warm indigo at ~3.5% opacity */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill='none' stroke='%231e3a5f' stroke-opacity='0.055' stroke-width='1.1'%3E%3Ccircle cx='40' cy='40' r='36'/%3E%3Ccircle cx='40' cy='40' r='26'/%3E%3Ccircle cx='40' cy='40' r='16'/%3E%3Ccircle cx='0' cy='20' r='36'/%3E%3Ccircle cx='0' cy='20' r='26'/%3E%3Ccircle cx='0' cy='20' r='16'/%3E%3Ccircle cx='80' cy='20' r='36'/%3E%3Ccircle cx='80' cy='20' r='26'/%3E%3Ccircle cx='80' cy='20' r='16'/%3E%3C/g%3E%3C/svg%3E");
  border-bottom: 1px solid #e6dccb;
}
.jp-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.jp-hero-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.jp-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid #c93b2b;
  border-radius: 7px;
  color: #c93b2b;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: rgba(201, 59, 43, 0.05);
  box-shadow: inset 0 0 0 2px rgba(201, 59, 43, 0.14);
}
.jp-seal-light {
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
  margin-bottom: 10px;
}
.jp-hero-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.3vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: #1e242b;
}
.jp-underline {
  background: linear-gradient(transparent 68%, rgba(201, 59, 43, 0.22) 68%);
  padding: 0 3px;
}
.jp-hero-sub {
  margin: 0 0 24px;
  font-size: 17px;
  color: #4a5562;
  line-height: 1.7;
}
.jp-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.btn-lg { padding: 13px 22px; font-size: 15.5px; border-radius: 9px; }

.jp-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed #d8ccb8;
}
.jp-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #1e3a5f;
}
.jp-stat span {
  font-size: 12px;
  color: #5a6572;
  line-height: 1.35;
  display: block;
}

.jp-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.jp-tategaki {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #1e3a5f;
  opacity: 0.65;
  padding: 12px 6px;
  border-right: 1px solid #dfd3bf;
  user-select: none;
}
.jp-art-frame {
  flex: 1;
  background: #fff;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid #e3d8c6;
  box-shadow: 0 14px 36px rgba(30, 58, 95, 0.10);
}
.jp-hero-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.jp-band-washi {
  background: #f3ece0;
  border-top: 1px solid #e6dccb;
  border-bottom: 1px solid #e6dccb;
}
.jp-section-head { margin-bottom: 26px; }
.jp-section-head h2 {
  margin: 6px 0 8px;
  font-size: clamp(22px, 3vw, 30px);
  color: #1e242b;
}
.jp-kanji-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #c93b2b;
  background: #fceeea;
  padding: 3px 10px;
  border-radius: 999px;
}

.jp-persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.jp-persona-card {
  padding: 24px;
  border-radius: 14px;
  border-top: 3px solid #1e3a5f;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.jp-persona-num {
  font-size: 12.5px;
  font-weight: 700;
  color: #c93b2b;
  letter-spacing: 0.04em;
}
.jp-persona-card h3 { margin: 0; font-size: 18px; color: #1e242b; }
.jp-persona-card p { margin: 0; font-size: 14.5px; color: #52606d; }
.jp-card-link {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  text-decoration: none;
}
.jp-card-link:hover { color: #c93b2b; text-decoration: underline; }

.jp-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 16px;
}
.jp-pillar-card {
  padding: 22px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.jp-pillar-card:hover {
  transform: translateY(-3px);
  border-color: #1e3a5f;
  box-shadow: 0 10px 26px rgba(30, 58, 95, 0.10);
}
.jp-pillar-badge {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: #edf2f8;
  color: #1e3a5f;
}
.jp-pillar-card h3 { margin: 0; font-size: 17.5px; }
.jp-pillar-card p { margin: 0; font-size: 14px; color: #52606d; flex: 1; }
.jp-pillar-cta { font-size: 13.5px; font-weight: 700; color: #c93b2b; }

.jp-traps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.jp-trap-card { padding: 18px; border-radius: 12px; }

.jp-stones {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.jp-stone {
  padding: 16px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.jp-stone:hover { transform: translateY(-3px); border-color: #c93b2b; }
.jp-stone-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.jp-stone-salary { font-size: 11.5px; font-weight: 700; color: #3b6e52; }
.jp-stone h3 { margin: 0 0 2px; font-size: 15.5px; }
.jp-stone-jp { font-size: 12px; color: #1e3a5f; margin-bottom: 6px; }
.jp-stone p { margin: 0; font-size: 12.5px; color: #52606d; line-height: 1.45; }

.jp-closing {
  background-color: #1e3a5f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z M30 0 L30 60 M0 30 L60 30' fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1'/%3E%3C/svg%3E");
  color: #fff;
}
.jp-closing-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.jp-closing h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); }
.jp-closing p { margin: 0; color: rgba(255, 255, 255, 0.85); max-width: 560px; }
.jp-closing-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .jp-hero-grid { grid-template-columns: 1fr; }
  .jp-tategaki { display: none; }
  .jp-stats-strip { grid-template-columns: repeat(2, 1fr); }
  .jp-stones { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

/* ---------------------------------------------------------------- Daily Quiz Soft Gate & Local Auth Form */
.dq-gate-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 9px;
  background: var(--navy-soft);
  border: 1px solid #c9d8ec;
}
.dq-gate-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.dq-gate-desc {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.45;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
}
.auth-form input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14.5px;
  font-family: var(--font-sans);
}
