* { box-sizing: border-box; }
body { margin: 0; background: #eaf4f8; color: #10263a; font-family: Arial, "Yu Gothic", "Meiryo", sans-serif; }
.shell { max-width: 1420px; margin: 0 auto; padding: 32px 22px 48px; }
.topbar { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; color: #47708c; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 0; color: #0d4267; }
.stats { display: flex; gap: 10px; }
.stats div { min-width: 96px; padding: 12px 16px; background: #fff; border: 1px solid #c7dce8; border-radius: 8px; text-align: center; }
.stats strong { display: block; font-size: 26px; color: #0d6fb0; }
.stats span { color: #607789; font-size: 13px; }
.workspace { display: grid; grid-template-columns: 330px 1fr; gap: 18px; align-items: start; }
.workspace > *, .lesson-head > *, .topic-card { min-width: 0; }
.topic-card span, #selectedTitle { overflow-wrap: anywhere; }
.topic-panel, .player-panel { background: #fff; border: 1px solid #c7dce8; border-radius: 8px; padding: 18px; }
.panel-heading, .lesson-head, .actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-heading h2, .lesson-head h2 { margin-bottom: 0; }
select, button { font: inherit; font-weight: 700; }
select { padding: 10px 12px; border-radius: 8px; border: 1px solid #b7cfdd; background: #f8fcfe; }
.topic-list { display: grid; gap: 10px; margin-top: 16px; }
.topic-card { width: 100%; text-align: left; border: 1px solid #c7dce8; background: #f7fbfd; border-radius: 8px; padding: 14px; cursor: pointer; color: #10263a; }
.topic-card strong, .topic-card span { display: block; }
.topic-card strong { font-size: 18px; }
.topic-card span { color: #506b7d; margin-top: 4px; }
.topic-card.active { background: #dff0fa; border-color: #2477b3; box-shadow: inset 4px 0 0 #2477b3; }
.topic-meta { margin-top: 8px; color: #2477b3; font-size: 13px; font-weight: 700; }
.mode-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.mode-button, .actions button { border: 1px solid #2477b3; background: #fff; color: #0d4f7c; border-radius: 8px; padding: 12px 16px; cursor: pointer; }
.mode-button.active, .actions button { background: #2477b3; color: #fff; }
.actions .secondary { background: #f8fcfe; color: #0d4f7c; }
.actions a.secondary { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #2477b3; border-radius: 8px; padding: 12px 16px; font-weight: 700; text-decoration: none; }
.actions a[hidden] { display: none; }
.video-player { width: 100%; display: block; margin: 18px 0; border-radius: 8px; background: #0e1722; aspect-ratio: 16 / 9; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.details > div, .history { padding: 16px; background: #f7fbfd; border: 1px solid #d5e6ef; border-radius: 8px; }
.details a { color: #0d4f7c; overflow-wrap: anywhere; }
.history { margin-top: 14px; }
.history-list { display: grid; gap: 8px; }
.history-row { display: grid; grid-template-columns: 110px 1fr 140px; gap: 10px; padding: 10px; background: #fff; border-radius: 6px; border: 1px solid #dceaf1; }
.empty { color: #607789; }
@media (max-width: 900px) {
  .workspace, .details { grid-template-columns: 1fr; }
  .workspace { width: 100%; min-width: 0; }
  .topic-panel, .player-panel { width: 100%; min-width: 0; }
  .topbar, .lesson-head, .actions { align-items: stretch; flex-direction: column; }
  .stats { width: 100%; }
  .stats div { flex: 1; }
}
