:root {
  --navy: #003a73;
  --navy-dark: #002a54;
  --blue: #009fe6;
  --blue-soft: #e3f4fd;
  --ink: #1c2b36;
  --gray: #5b6b78;
  --line: #dde5ec;
  --bg: #f5f8fa;
  --white: #ffffff;
  --accent: #ff7a45;
  --green: #2bb673;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0, 42, 84, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
}

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

/* ---------- header / hero (シリーズ共通) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header-inner {
  max-width: 980px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.logo { color: #fff; font-weight: 900; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 16px;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #cfe3f5; text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px; transition: .15s;
}
.nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav { align-items: center; }
.nav .nav-home { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; border: 1px solid rgba(255,255,255,.25); }
.nav .nav-home:hover { background: var(--blue); border-color: var(--blue); }

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #00518f 70%, #0070b8 100%);
  color: #fff; padding: 64px 0 56px;
}
.hero-eyebrow {
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 12px;
  letter-spacing: .22em; color: #7fd0f5; margin: 0 0 10px;
}
.hero h1 { font-size: 40px; font-weight: 900; margin: 0 0 16px; letter-spacing: .02em; }
.hero-lead { font-size: 15px; color: #d7e7f5; margin: 0 0 28px; }
.hero-lead strong { color: #fff; }
.hero-steps { display: flex; gap: 10px; flex-wrap: wrap; }
.step-chip {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3);
  color: #fff; text-decoration: none; font-size: 13px; font-weight: 700;
  padding: 8px 16px; border-radius: 999px; transition: .15s;
}
.step-chip:hover { background: var(--blue); border-color: var(--blue); }

/* ---------- lesson ---------- */
.lesson {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px 36px 32px; margin: 36px 0;
}
.lesson-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.step-badge {
  background: var(--blue); color: #fff;
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 12px;
  letter-spacing: .08em; padding: 4px 12px; border-radius: 999px;
}
.lesson h2 { font-size: 24px; font-weight: 900; color: var(--navy); margin: 0; }
.lesson-desc { color: var(--gray); font-size: 14.5px; margin: 10px 0 20px; }
.lesson-desc strong { color: var(--navy); }
.sub-head { color: var(--navy); font-size: 17px; margin: 32px 0 12px; }

/* ---------- STEP1 mock desktop ---------- */
.mock-desktop {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(160deg, #7db8e8 0%, #a8cef0 55%, #d6e7f7 100%);
  position: relative;
}
.mock-menubar {
  background: rgba(255,255,255,.85); backdrop-filter: blur(4px);
  display: flex; align-items: center; gap: 16px;
  padding: 6px 16px; font-size: 12.5px; color: #333; position: relative;
}
.mock-menubar strong { font-weight: 700; }
.mock-clock { margin-left: auto; }
.mock-body { position: relative; padding: 20px; min-height: 280px; }
.mock-deskicons { position: absolute; right: 20px; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.mock-icon {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 30px; width: 86px; text-align: center;
}
.mock-icon span { font-size: 11px; color: #1c2b36; background: rgba(255,255,255,.65); border-radius: 4px; padding: 0 5px; line-height: 1.5; }
.mock-window {
  position: relative; width: min(420px, 62%); margin: 14px 0 0 6px;
  background: #f6f6f6; border-radius: 10px; overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,30,60,.25);
}
.mock-titlebar, .sim-titlebar {
  display: flex; align-items: center; gap: 7px;
  background: #e8e8e8; padding: 8px 12px; font-size: 12.5px;
}
.tl-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.tl-dot.red { background: #ff5f57; } .tl-dot.yellow { background: #febc2e; } .tl-dot.green { background: #28c840; }
.tl-title { font-weight: 700; color: #444; margin-left: 6px; }
.mock-wincontent { display: flex; gap: 10px; padding: 18px 16px 22px; background: #fff; }
.mock-wincontent .mock-icon span { background: none; }
.mock-dock {
  position: relative;
  display: flex; align-items: center; gap: 14px; justify-content: center;
  background: rgba(255,255,255,.5); backdrop-filter: blur(6px);
  padding: 8px 18px; margin: 0 auto 14px; width: fit-content; border-radius: 14px;
}
.dock-icon { font-size: 30px; line-height: 1; position: relative; }
.dock-sep { width: 1px; height: 30px; background: rgba(0,0,0,.18); }
.mock-badge {
  position: absolute; left: -7px; top: -7px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff;
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); z-index: 5;
}
.mock-menubar .mock-badge { position: static; flex-shrink: 0; }
.mock-dock > .mock-badge { left: -9px; top: -9px; }
.badge-desktop { left: auto; right: 130px; top: 70px; }
.badge-trash { left: auto; right: -10px; top: -10px; }
.map-legend { font-size: 13.5px; color: var(--gray); margin: 18px 0 0; padding-left: 24px; }
.map-legend li { margin: 5px 0; }
.map-legend li::marker { color: var(--accent); font-weight: 800; }
.map-legend strong { color: var(--navy); }

/* ---------- term / tips cards ---------- */
.term-grid, .tips-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-top: 20px;
}
.term-card, .tip-card {
  background: var(--bg); border-radius: 10px; padding: 18px 18px 14px;
  border: 1px solid var(--line);
}
.term-card h3, .tip-card h3 { font-size: 14.5px; color: var(--navy); margin: 6px 0 6px; }
.term-card p, .tip-card p { font-size: 13px; color: var(--gray); margin: 0; line-height: 1.7; }
.term-icon { font-size: 20px; }

/* ---------- STEP2 practice ---------- */
.practice-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.practice-card {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px;
  transition: border-color .2s, background .2s;
}
.practice-card.is-done { border-color: var(--green); background: #f2fbf6; }
.practice-head { display: flex; align-items: center; gap: 9px; }
.practice-head h3 { font-size: 15px; color: var(--navy); margin: 0; }
.practice-check {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--line); color: #fff; font-weight: 800; font-size: 14px;
}
.is-done .practice-check { background: var(--green); }
.practice-card p { font-size: 12.5px; color: var(--gray); margin: 8px 0 12px; line-height: 1.7; }
.practice-area {
  background: var(--bg); border: 1px dashed var(--line); border-radius: 10px;
  min-height: 110px; display: flex; align-items: center; justify-content: center; gap: 14px;
  position: relative; touch-action: none;
}
.drag-area { justify-content: space-around; }
.drop-zone {
  width: 110px; height: 84px; border: 2px dashed var(--blue); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; color: var(--blue); font-weight: 700; text-align: center;
  background: var(--blue-soft);
}
.drop-zone.is-over { background: #c9ecff; }
.practice-done {
  margin-top: 16px; background: #f2fbf6; border: 1.5px solid var(--green);
  border-radius: 10px; padding: 14px 20px; font-size: 14.5px; font-weight: 700; color: #1d7a4d;
}
.practice-done[hidden] { display: none; }
.practice-done a { color: var(--navy); }

/* ---------- ファイルアイコン(共通) ---------- */
.file-icon {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 96px; padding: 10px 4px 7px; border-radius: 10px;
  font-size: 38px; line-height: 1.1; text-align: center;
  cursor: default; user-select: none; -webkit-user-select: none;
  border: 2px solid transparent;
}
.file-icon span {
  font-size: 11.5px; font-weight: 500; color: var(--ink);
  line-height: 1.4; border-radius: 4px; padding: 0 5px;
  word-break: break-all;
}
.file-icon.is-selected { background: var(--blue-soft); border-color: var(--blue); }
.file-icon.is-selected span { background: var(--blue); color: #fff; }
.file-icon.is-dropover { background: #ffe9dc; border-color: var(--accent); }
.file-icon input {
  font: inherit; font-size: 11.5px; width: 90px; text-align: center;
  border: 1.5px solid var(--blue); border-radius: 4px; padding: 0 2px;
}

/* ---------- STEP3 simulator ---------- */
.mission-list {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px;
}
.mission {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--gray);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px;
}
.mission.is-done { color: #1d7a4d; background: #f2fbf6; border-color: #bfe8d2; }
.mission.is-current { border-color: var(--blue); background: var(--blue-soft); color: var(--navy); font-weight: 700; }
.mission-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--line); color: #fff; font-size: 12px; font-weight: 800;
  font-family: 'Inter', sans-serif;
}
.mission.is-current .mission-num { background: var(--blue); }
.mission.is-done .mission-num { background: var(--green); }

.sim {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(160deg, #7db8e8 0%, #a8cef0 55%, #d6e7f7 100%);
  padding: 18px 18px 10px;
}
.sim-window {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,30,60,.25);
}
.sim-titlebar { position: relative; }
.sim-back {
  margin-left: 8px; border: none; background: #d6d6d6; border-radius: 6px;
  font-size: 12px; font-weight: 700; color: #444; padding: 3px 10px; cursor: pointer;
}
.sim-back:hover { background: #c4c4c4; }
.sim-newfolder {
  margin-left: auto; border: none; background: var(--navy); color: #fff;
  border-radius: 6px; font-size: 12px; font-weight: 700; padding: 4px 12px; cursor: pointer;
}
.sim-newfolder:hover { background: var(--navy-dark); }
.sim-body {
  min-height: 280px; padding: 16px;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px;
  touch-action: none;
}
.sim-empty { width: 100%; text-align: center; color: #b5c2cc; font-size: 13px; margin-top: 90px; }
.sim-dock {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  background: rgba(255,255,255,.5); backdrop-filter: blur(6px);
  padding: 8px 18px; margin: 14px auto 4px; width: fit-content; border-radius: 14px;
}
.sim-trash { cursor: pointer; }
.sim-trash.is-dropover { transform: scale(1.25); }
.trash-badge {
  position: absolute; right: -8px; top: -6px;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 10px; font-weight: 800; font-family: 'Inter', sans-serif;
  padding: 1px 6px; line-height: 1.4;
}
.drag-ghost {
  position: fixed; z-index: 999; pointer-events: none; opacity: .8;
  transform: translate(-50%, -50%);
}

/* ---------- STEP4 カラム表示 ---------- */
.howto-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.howto {
  background: var(--blue-soft); border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: var(--navy); font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.howto .kbd { flex-shrink: 0; }
.quest-box {
  background: #fff8f0; border: 1.5px solid #ffd9bd; border-radius: 10px;
  padding: 13px 18px; font-size: 13.5px; color: #6b4a2f; margin-bottom: 16px;
}
.quest-box strong { color: #b34a14; }
.col-sim { padding-bottom: 18px; }
.view-switch {
  margin-left: auto; display: flex; gap: 2px;
  background: #d6d6d6; border-radius: 7px; padding: 2px;
}
.view-btn {
  border: none; background: none; font-size: 12px; font-weight: 800;
  color: #555; border-radius: 5px; padding: 3px 12px; cursor: pointer;
  letter-spacing: -1px;
}
.view-btn.is-active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.col-body { background: #fff; min-height: 280px; }
.col-body.mode-icon {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 16px;
}
.col-body.mode-column { display: flex; align-items: stretch; overflow-x: auto; padding: 0; }
.col {
  min-width: 170px; max-width: 200px; flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 6px; overflow-y: auto; max-height: 280px;
}
.col-row {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 8px; border-radius: 6px; font-size: 12.5px;
  cursor: default; user-select: none; -webkit-user-select: none;
  white-space: nowrap; overflow: hidden;
}
.col-row .col-name { overflow: hidden; text-overflow: ellipsis; }
.col-row .chev { margin-left: auto; color: #b5c2cc; font-size: 11px; }
.col-row:hover { background: var(--bg); }
.col-row.is-path { background: #dcebf5; }
.col-row.is-selected { background: var(--blue); color: #fff; }
.col-row.is-selected .chev { color: #fff; }
.col-preview {
  min-width: 190px; flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; padding: 16px;
}
.col-preview .pv-icon { font-size: 64px; line-height: 1.2; }
.col-preview .pv-name { font-size: 13px; font-weight: 700; color: var(--ink); text-align: center; word-break: break-all; }
.col-preview .pv-meta { font-size: 11.5px; color: var(--gray); }
.col-breadcrumb {
  background: #f0f0f0; border-top: 1px solid var(--line);
  padding: 6px 14px; font-size: 12px; color: var(--gray); font-weight: 500;
}

/* ---------- toolbar / result / table / note(共通) ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn {
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--navy); transition: .15s;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost { border-color: transparent; color: var(--gray); }
.status { font-size: 13px; color: var(--gray); margin-left: auto; }

.result[hidden] { display: none; }
.result {
  margin-top: 16px; display: flex; align-items: center; gap: 24px;
  background: #f2fbf6; border: 1.5px solid var(--green);
  border-radius: var(--radius); padding: 20px 28px;
}
.result-body p { margin: 0; font-weight: 900; color: var(--navy); font-size: 17px; }
.result-detail { font-size: 13px !important; color: var(--gray) !important; margin-top: 4px !important; font-weight: 500 !important; }

.kbd {
  display: inline-block; background: var(--navy); color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 6px; white-space: nowrap;
}
.shortcut-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.shortcut-table th, .shortcut-table td {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.shortcut-table th { background: var(--bg); color: var(--navy); font-size: 12.5px; }
.shortcut-table td:first-child, .shortcut-table td:nth-child(2) { width: 150px; }

.note {
  margin-top: 18px; background: #fff8f0; border: 1px solid #ffd9bd;
  border-radius: 10px; padding: 16px 20px; font-size: 13.5px; color: #6b4a2f;
}
.note .kbd { background: var(--accent); }

/* ---------- toast / context menu ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--navy); color: #fff; font-size: 13.5px; font-weight: 700;
  padding: 10px 22px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  z-index: 1000; transition: opacity .3s;
}
.toast[hidden] { display: none; }
.ctx-menu {
  position: fixed; z-index: 1001; min-width: 170px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 5px;
}
.ctx-menu[hidden] { display: none; }
.ctx-item {
  display: block; width: 100%; text-align: left; border: none; background: none;
  font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 5px; cursor: pointer;
}
.ctx-item:hover { background: var(--blue); color: #fff; }
.ctx-item.danger:hover { background: #e0443a; }

.site-footer {
  background: var(--navy); color: #9fc0dd; text-align: center;
  padding: 24px 20px; font-size: 12.5px; margin-top: 48px;
}
.site-footer p { margin: 0; }

@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  .lesson { padding: 24px 18px; }
  .header-inner { flex-direction: column; height: auto; padding: 10px 20px; gap: 4px; }
  .status { margin-left: 0; width: 100%; }
  .mock-window { width: 90%; }
  .badge-desktop { right: 30px; top: 120px; }
  .file-icon { width: 82px; font-size: 32px; }
}

/* ---------- ページ送りナビ ---------- */
.page-nav { display: flex; gap: 12px; align-items: stretch; margin: 44px auto 0; }
.pgnav { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px;
  text-decoration: none; background: #fff; border: 1.5px solid #dde5ec;
  border-radius: 12px; padding: 14px 18px; transition: .15s; box-shadow: 0 2px 12px rgba(0,42,84,.08); }
.pgnav:hover { border-color: #009fe6; transform: translateY(-2px); }
.pgnav.prev { text-align: left; }
.pgnav.next { text-align: right; }
.pgnav.top { flex: 0 0 130px; text-align: center; background: #003a73; border-color: #003a73; }
.pgnav.top .pgnav-dir, .pgnav.top .pgnav-name { color: #fff; }
.pgnav.top:hover { background: #002a54; border-color: #002a54; }
.pgnav-dir { font-size: 12px; font-weight: 700; color: #ff7a45; }
.pgnav-name { font-size: 14px; font-weight: 900; color: #003a73; }
.pgnav.is-disabled { visibility: hidden; }
@media (max-width: 560px) {
  .page-nav { flex-wrap: wrap; }
  .pgnav.top { order: -1; flex-basis: 100%; }
}
