:root {
  --blue: #2b7de9;
  --blue-dark: #1c5fb8;
  --purple: #7654d8;
  --green: #22a06b;
  --red: #d64545;
  --bg: #f4f7fb;
  --panel: #fff;
  --ink: #223;
  --line: #dde5ef;
  --mono: 'Consolas', 'Menlo', 'BIZ UDGothic', monospace;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font-family: 'Hiragino Kaku Gothic ProN', 'BIZ UDPGothic', 'Yu Gothic UI', 'Meiryo', sans-serif; display: flex; flex-direction: column; }
.site-header { display: flex; align-items: center; gap: 18px; padding: 9px 20px; background: var(--panel); border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, var(--blue), var(--purple)) 1; box-shadow: 0 2px 10px rgba(34, 56, 100, .08); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.logo-mark { width: 46px; height: 46px; }
.brand-text { display: flex; flex-direction: column; }
.brand-org { color: #5c6580; font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.logo { color: var(--blue); font-size: 26px; font-weight: 800; letter-spacing: .8px; line-height: 1; }
.lab-links { display: flex; gap: 6px; margin-left: 10px; }
.lab-links a { border-radius: 999px; color: #58637b; font-size: 13px; font-weight: 700; padding: 7px 11px; text-decoration: none; }
.lab-links a:hover, .lab-links a.active { background: #e8f1ff; color: var(--blue-dark); }
.status { margin-left: auto; background: #e9e2ff; border-radius: 999px; color: #59429b; font-size: 13px; padding: 5px 12px; white-space: nowrap; }
.app { flex: 1; min-height: 0; display: grid; grid-template-columns: 210px 1fr 1.15fr; gap: 14px; padding: 14px 20px; align-items: stretch; }
.sidebar, .lesson-pane, .work-pane { min-height: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sidebar { display: flex; flex-direction: column; padding: 12px; }
.sidebar h2 { margin: 4px 4px 10px; font-size: 15px; }
.sidebar nav { min-height: 0; overflow-y: auto; padding: 0 2px; }
.course { margin-bottom: 14px; }
.course-title { display: flex; justify-content: space-between; gap: 6px; margin: 0 2px 6px; color: #556; font-size: 12px; font-weight: 700; }
.course-progress { color: #889; font-weight: 400; white-space: nowrap; }
.nav-item { display: block; width: 100%; margin-bottom: 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; font-size: 13px; text-align: left; }
.nav-item:hover { border-color: var(--blue); }
.nav-item.active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.lesson-pane { overflow-y: auto; padding: 18px 22px; font-size: 15px; line-height: 1.9; }
.crumb { margin-bottom: 2px; color: #778; font-size: 12px; }
.lesson-pane h1 { margin: 0 0 12px; color: var(--blue-dark); font-size: 21px; }
.lesson-pane pre.code { overflow-x: auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f0f4fa; font-family: var(--mono); font-size: 14px; line-height: 1.6; }
.lesson-pane .task { margin-top: 14px; padding: 12px 16px; border: 2px solid #f0c040; border-radius: 10px; background: #fff8e6; }
.lesson-pane .task h3 { margin: 0 0 6px; font-size: 15px; }
.intro-action { margin-top: 18px; }
.work-pane { display: flex; flex-direction: column; overflow: hidden; background: #202735; color: #e9eef8; }
.terminal-head { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border-bottom: 1px solid #344157; color: #c2cbdc; font-size: 13px; font-weight: 700; }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }.terminal-dot.red { background: #ff6d6d; }.terminal-dot.yellow { background: #ffd36a; }.terminal-dot.green { background: #71d99a; }
.terminal-output { flex: 1; min-height: 250px; overflow-y: auto; padding: 14px 16px; font-family: var(--mono); font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.terminal-line { min-height: 1.65em; }.terminal-line.command { color: #9fd8ff; }.terminal-line.error { color: #ff9d9d; }.terminal-line.system { color: #ffd479; }
.terminal-entry { display: flex; gap: 8px; align-items: baseline; padding: 12px 16px; border-top: 1px solid #344157; font-family: var(--mono); color: #9fd8ff; font-size: 14px; }
#terminal-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; }
.toolbar { display: flex; gap: 10px; padding: 10px 14px; background: #1a202c; }
.btn { border: 0; border-radius: 9px; padding: 8px 15px; color: #fff; cursor: pointer; font-size: 14px; font-weight: 700; }.btn.next { background: var(--blue); }.btn.subtle { background: #66758f; }.btn.danger { background: var(--red); }.btn:hover { filter: brightness(.94); }
.judge { margin: 0 14px 14px; border-radius: 10px; font-size: 14px; }.judge.pass, .judge.fail { padding: 12px 14px; }.judge.pass { border: 2px solid var(--green); background: #d9f2e5; color: #164d32; }.judge.fail { border: 2px solid var(--red); background: #fdecec; color: #7c2525; }.judge p { margin: 0 0 8px; font-weight: 700; }
.site-footer { padding: 12px; color: #778; font-size: 12px; text-align: center; }.site-footer a { color: inherit; text-decoration: none; }.site-footer a:hover { color: var(--blue-dark); text-decoration: underline; }
@media (max-width: 900px) { body { display: block; } .site-header { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }.lab-links { order: 3; width: 100%; margin: 0; }.status { margin-left: auto; font-size: 11px; padding: 4px 8px; }.app { display: block; padding: 12px; }.sidebar, .lesson-pane, .work-pane { margin-bottom: 12px; }.sidebar nav { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; }.nav-item { width: auto; margin: 0; }.lesson-pane { overflow: visible; }.work-pane { min-height: 510px; }.terminal-output { min-height: 280px; } }
