/* ==========================================================
   特定技能 受け入れチェックリスト  —  JOL Design System 踏襲
   tokens: orange #ff6b1a / Noto Sans JP + DM Sans
   記事×診断×記入チェックリストの1ページ完結レイアウト
   ========================================================== */
:root {
  --bg: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --border: #e8e8f0;
  --border-2: #dde6ef;
  --primary: #ff6b1a;
  --primary-btn: #ff7020;
  --primary-soft: #ffece2;
  --primary-soft-border: rgba(255, 107, 26, 0.22);
  --ok: #00b85e;
  --ok-soft: #e5f9ed;
  --danger: #f6182f;
  --danger-soft: #ffe9e9;
  --warn: #f59e0b;
  --warn-soft: #fff5e6;
  --info: #2f6df6;
  --info-soft: #eaf1ff;
  --text: #1b1b1b;
  --text-dark: #1a1a2e;
  --text-muted: #8a8a99;
  --text-soft: #5b5b6b;
  --track: rgba(0, 0, 0, 0.07);
  --orange-shadow: 0 6px 20px 0 rgba(255, 107, 26, 0.3);
  --card-shadow: 0 2px 14px rgba(20, 20, 50, 0.05);

  --font-ja: "Noto Sans JP", sans-serif;
  --font-en: "DM Sans", "Noto Sans JP", sans-serif;

  --r-card: 16px;
  --r-option: 12px;
  --r-badge: 8px;
  --r-button: 10px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h: 46px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ja);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  scroll-behavior: smooth;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.en { font-family: var(--font-en); }

.app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 20px 18px calc(40px + env(safe-area-inset-bottom));
  background: var(--bg);
  position: relative;
  z-index: 1;
}

/* PC背景 */
@media (min-width: 1000px) {
  body { background: url("assets/bg-desktop.jpg") center top / cover no-repeat fixed #ff6b1a; }
  .app { background: var(--bg); box-shadow: 0 0 48px rgba(0, 0, 0, 0.16); }
}

/* ---------- header ---------- */
.top-header {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 40px; margin-bottom: 16px;
}
.header-logo { height: 22px; width: auto; }
.header-basis { font-size: 10.5px; color: var(--text-muted); text-align: right; line-height: 1.5; }
.header-basis b { color: var(--primary); font-weight: 700; }

/* ---------- hero ---------- */
.hero {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 26px 22px 22px;
  box-shadow: var(--card-shadow); margin-bottom: 14px;
}
.eyebrow {
  font-family: var(--font-en); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--primary); text-transform: uppercase;
}
.h1 { font-size: 27px; font-weight: 700; line-height: 1.35; margin: 8px 0 12px; color: var(--text-dark); }
.h1 .accent { color: var(--primary); }
.lead { font-size: 14px; line-height: 1.9; color: var(--text-soft); }
.lead b { color: var(--text); font-weight: 700; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.ibadge {
  font-size: 12px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border: 1px solid var(--primary-soft-border);
  padding: 6px 11px; border-radius: 999px;
}
.ibadge.ghost { color: var(--text-muted); background: var(--surface-2); border-color: var(--border); font-weight: 500; }
.hero-note { margin-top: 16px; font-size: 11px; color: var(--text-muted); line-height: 1.7; }

/* ---------- section nav (sticky) ---------- */
.secnav {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 7px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 9px 2px; margin: 0 -18px 8px; padding-left: 18px; padding-right: 18px;
  background: rgba(244, 244, 246, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.secnav::-webkit-scrollbar { display: none; }
.navchip {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--text-soft);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 13px; border-radius: 999px; white-space: nowrap; transition: all 0.2s var(--ease-out);
}
.navchip.on { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: var(--orange-shadow); }

/* ---------- section common ---------- */
.sec { scroll-margin-top: calc(var(--nav-h) + 12px); padding-top: 30px; }
.sec-head { margin-bottom: 14px; }
.sec-eyebrow {
  font-family: var(--font-en); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--primary); text-transform: uppercase;
}
.sec-title {
  font-size: 21px; font-weight: 700; line-height: 1.4; color: var(--text-dark); margin-top: 3px;
  padding-left: 12px; border-left: 4px solid var(--primary);
}
.body-text { font-size: 13.5px; line-height: 1.95; color: var(--text-soft); margin-bottom: 14px; }
.body-text b { color: var(--text); font-weight: 700; }

/* ---------- duo cards (1号/2号) ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 18px; }
@media (max-width: 480px) { .duo { grid-template-columns: 1fr; } }
.duo-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 16px 15px; box-shadow: var(--card-shadow); border-top: 4px solid var(--primary);
}
.duo-card.info { border-top-color: var(--info); }
.duo-head { margin-bottom: 12px; }
.duo-name { display: block; font-size: 16px; font-weight: 700; color: var(--text-dark); }
.duo-tag { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.duo-row {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 7px 0; border-top: 1px dashed var(--border); font-size: 12.5px;
}
.duo-row span { color: var(--text-muted); flex: 0 0 auto; }
.duo-row b { color: var(--text); font-weight: 700; text-align: right; }

/* ---------- ladder ---------- */
.ladder {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 16px 15px;
}
.ladder-title { font-size: 12.5px; font-weight: 700; color: var(--text-soft); margin-bottom: 12px; }
.ladder-flow { display: flex; align-items: stretch; gap: 6px; }
@media (max-width: 520px) { .ladder-flow { flex-direction: column; } }
.lstep {
  flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 10px; text-align: center; border-bottom: 3px solid var(--text-muted);
}
.lstep.warn { border-bottom-color: var(--warn); }
.lstep.primary { border-bottom-color: var(--primary); }
.lstep.info { border-bottom-color: var(--info); }
.lstep b { display: block; font-size: 13px; font-weight: 700; color: var(--text-dark); }
.lstep span { display: block; font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.larrow { display: flex; align-items: center; color: var(--text-muted); font-weight: 700; }
@media (max-width: 520px) { .larrow { justify-content: center; transform: rotate(90deg); } }
.ladder-note { font-size: 11px; color: var(--text-muted); margin-top: 12px; line-height: 1.7; }

/* ---------- 診断 ---------- */
.diag-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 6px 16px 18px; box-shadow: var(--card-shadow);
}
.diag-q { padding: 16px 0; border-bottom: 1px solid var(--border); }
.diag-qh { font-size: 14px; font-weight: 700; color: var(--text-dark); line-height: 1.6; margin-bottom: 11px; display: flex; gap: 8px; align-items: baseline; }
.diag-num {
  flex: 0 0 auto; font-family: var(--font-en); font-size: 12px; font-weight: 700; color: #fff;
  background: var(--primary); border-radius: 6px; padding: 2px 7px;
}
.diag-opts { display: flex; flex-direction: column; gap: 8px; }
.diag-opt {
  text-align: left; font-size: 13px; font-weight: 500; color: var(--text);
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--r-option);
  padding: 12px 14px; transition: all 0.18s var(--ease-out);
}
.diag-opt:hover { border-color: var(--primary-soft-border); }
.diag-opt.on { background: var(--primary-soft); border-color: var(--primary); color: var(--text-dark); font-weight: 700; }

.diag-result { margin-top: 18px; }
.diag-pending {
  background: var(--surface-2); border: 1px dashed var(--border-2); border-radius: 12px;
  padding: 16px; text-align: center; font-size: 13px; color: var(--text-muted);
}
.diag-pending b { color: var(--primary); font-size: 15px; }
.diag-done {
  background: linear-gradient(180deg, #fff, var(--surface-2));
  border: 1.5px solid var(--primary-soft-border); border-radius: 14px; padding: 18px 16px;
  animation: pop 0.4s var(--ease-spring) both;
}
@keyframes pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.diag-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); text-transform: uppercase; }
.diag-primary {
  display: flex; flex-direction: column; gap: 2px; margin: 8px 0 12px;
  background: var(--primary-soft); border-radius: 12px; padding: 14px 16px; border-left: 5px solid var(--primary);
}
.diag-primary.info { background: var(--info-soft); border-left-color: var(--info); }
.diag-primary.ok { background: var(--ok-soft); border-left-color: var(--ok); }
.diag-primary.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.diag-primary.muted { background: var(--surface-2); border-left-color: var(--text-muted); }
.dp-cap { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.dp-name { font-size: 19px; font-weight: 700; color: var(--text-dark); }
.dp-tag { font-size: 12px; color: var(--text-soft); }
.diag-reason { font-size: 13px; line-height: 1.9; color: var(--text-soft); }
.diag-also { margin-top: 12px; font-size: 12.5px; color: var(--text-muted); }
.diag-also b { color: var(--primary); font-weight: 700; }
.btn-reset {
  margin-top: 14px; font-size: 12.5px; font-weight: 700; color: var(--text-soft);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px;
}

/* ---------- 比較 (横スクロールカード) ---------- */
.cmp-scroll {
  display: flex; gap: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 2px 14px; margin: 0 -18px; padding-left: 18px; padding-right: 18px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.cmp-card {
  flex: 0 0 260px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 16px 15px; box-shadow: var(--card-shadow); border-top: 4px solid var(--primary);
}
.cmp-card.info { border-top-color: var(--info); }
.cmp-card.muted { border-top-color: var(--text-muted); }
.cmp-card.warn { border-top-color: var(--warn); }
.cmp-card.ok { border-top-color: var(--ok); }
.cmp-head { margin-bottom: 10px; }
.cmp-name { display: block; font-size: 15.5px; font-weight: 700; color: var(--text-dark); }
.cmp-tag { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.cmp-row { padding: 7px 0; border-top: 1px dashed var(--border); font-size: 12px; }
.cmp-k { display: block; font-size: 10.5px; color: var(--text-muted); font-weight: 700; margin-bottom: 1px; }
.cmp-v { display: block; color: var(--text); line-height: 1.55; }
.cmp-best {
  margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--text);
  background: var(--primary-soft); border-radius: 9px; padding: 10px 11px;
}
.cmp-best-l { display: block; font-size: 10px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.cmp-caution { margin-top: 8px; font-size: 11px; line-height: 1.6; color: var(--text-soft); }

/* ---------- toolbar ---------- */
.toolbar {
  position: sticky; top: calc(var(--nav-h) + 8px); z-index: 15;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--text-dark); color: #fff; border-radius: 12px; padding: 10px 14px;
  margin: 26px 0 6px; box-shadow: 0 6px 20px rgba(20, 20, 50, 0.18);
}
.tb-prog { font-size: 12.5px; font-weight: 500; }
.tb-prog b { font-family: var(--font-en); font-size: 14px; font-weight: 700; color: #ffd0b3; }
.tb-actions { display: flex; gap: 8px; }
.tb-btn {
  font-size: 12px; font-weight: 700; color: var(--text-dark); background: #fff;
  border: none; border-radius: 8px; padding: 8px 12px;
}
.tb-btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }

/* ---------- checklist ---------- */
.chk-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 8px 16px 12px; box-shadow: var(--card-shadow);
}
.chk-prog {
  display: flex; align-items: center; gap: 12px; padding: 12px 0 10px;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.chk-prog-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.chk-prog-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #ff9a5a); border-radius: 999px; transition: width 0.4s var(--ease-out); }
.chk-prog-num { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: var(--text-soft); }

.chk-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 4px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s;
}
.chk-item:last-child { border-bottom: none; }
.chk-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk-box {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; margin-top: 1px;
  border: 2px solid var(--border-2); background: var(--surface); position: relative;
  transition: all 0.18s var(--ease-out);
}
.chk-box::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0);
  transition: transform 0.18s var(--ease-spring);
}
.chk-item.on .chk-box { background: var(--primary); border-color: var(--primary); }
.chk-item.on .chk-box::after { transform: rotate(45deg) scale(1); }
.chk-body { flex: 1; }
.chk-label { display: block; font-size: 14px; font-weight: 700; color: var(--text-dark); line-height: 1.55; }
.chk-item.on .chk-label { color: var(--text-soft); }
.chk-help { display: block; font-size: 11.5px; color: var(--text-muted); line-height: 1.7; margin-top: 4px; }

/* ---------- flow ---------- */
.flow { position: relative; }
.flow-step { display: flex; gap: 14px; padding-bottom: 6px; }
.flow-num {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff; font-family: var(--font-en); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px; z-index: 1;
}
.flow-step:not(:last-child) .flow-num { position: relative; }
.flow-step:not(:last-child)::after {
  content: none;
}
.flow-body {
  flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 14px; margin-bottom: 12px; box-shadow: var(--card-shadow);
}
.flow-title { font-size: 14.5px; font-weight: 700; color: var(--text-dark); }
.flow-desc { font-size: 12.5px; color: var(--text-soft); line-height: 1.75; margin-top: 4px; }
.flow-point {
  margin-top: 9px; font-size: 12px; color: var(--text); line-height: 1.65;
  background: var(--warn-soft); border-radius: 8px; padding: 8px 10px;
}
.flow-point span {
  display: inline-block; font-size: 10px; font-weight: 700; color: #b5730a;
  margin-right: 6px; background: #ffe6bf; border-radius: 5px; padding: 1px 6px;
}
/* connector line */
.flow { padding-left: 0; }
.flow-step { position: relative; }
.flow-step::before {
  content: ""; position: absolute; left: 14px; top: 30px; bottom: -2px; width: 2px;
  background: var(--border-2);
}
.flow-step:last-child::before { display: none; }

/* ---------- 分野別 ---------- */
.field-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.field-tab {
  font-size: 12.5px; font-weight: 700; color: var(--text-soft);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 12px 7px 10px; display: inline-flex; align-items: center; gap: 5px;
  transition: all 0.18s var(--ease-out);
}
.field-ico { font-size: 14px; }
.field-tab.on { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: var(--orange-shadow); }

.field-detail {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 18px 16px; box-shadow: var(--card-shadow); border-top: 4px solid var(--primary);
  animation: fadeIn 0.3s ease both;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.fd-ico { font-size: 30px; }
.fd-name { font-size: 18px; font-weight: 700; color: var(--text-dark); }
.fd-badges { margin-top: 4px; }
.fd-badge { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 3px 9px; }
.fd-badge.ok { color: var(--ok); background: var(--ok-soft); }
.fd-badge.muted { color: var(--text-muted); background: var(--surface-2); }
.fd-row { padding: 11px 0; border-top: 1px dashed var(--border); }
.fd-k {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border-radius: 6px; padding: 2px 9px; margin-bottom: 6px;
}
.fd-v { display: block; font-size: 13px; color: var(--text); line-height: 1.8; }
.fd-note {
  margin-top: 12px; font-size: 12px; line-height: 1.75; color: var(--text-soft);
  background: var(--surface-2); border-radius: 10px; padding: 12px 13px; border-left: 3px solid var(--primary);
}

/* ---------- CTA ---------- */
.cta {
  margin-top: 34px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(135deg, #ff7a2e, #ff5a00);
  box-shadow: var(--orange-shadow);
}
.cta-inner { padding: 30px 24px; text-align: center; color: #fff; }
.cta-eyebrow { font-family: var(--font-en); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; opacity: 0.9; }
.cta-title { font-size: 22px; font-weight: 700; margin: 8px 0 10px; line-height: 1.4; }
.cta-lead { font-size: 13px; line-height: 1.9; opacity: 0.95; margin-bottom: 20px; }
.cta-btn {
  display: inline-block; font-size: 15px; font-weight: 700; color: var(--primary);
  background: #fff; border-radius: 12px; padding: 14px 34px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s var(--ease-spring);
}
.cta-btn:hover { transform: translateY(-2px); }
.cta-sub { display: block; margin-top: 14px; font-size: 12.5px; color: #fff; text-decoration: underline; opacity: 0.9; }

/* ---------- footer ---------- */
.foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.foot-note { font-size: 11px; color: var(--text-muted); line-height: 1.8; }
.foot-brand { font-size: 11px; color: var(--text-muted); margin-top: 10px; font-family: var(--font-en); }

/* ---------- 印刷 ---------- */
@media print {
  body { background: #fff; }
  .app { box-shadow: none; max-width: 100%; padding: 0; }
  .no-print { display: none !important; }
  .sec { padding-top: 18px; page-break-inside: avoid; }
  .chk-card, .field-detail, .duo-card, .flow-body { box-shadow: none; }
  .cmp-scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .cmp-card { flex: 1 1 45%; }
  .chk-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
