.lines-course-view .course-overview-card {
  background: linear-gradient(135deg, #173e35, #245f50);
}

.line-study-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 20px 22px;
  border: 1px solid #b8c9c1;
  border-radius: 15px;
  background: #eaf3ee;
}

.line-study-intro h3 { margin: 0 0 6px; font: 500 24px Georgia, serif; }
.line-study-intro p { margin: 0; color: #5f7068; }
.line-study-intro b { font: 500 36px Georgia, serif; color: var(--forest); }

.line-study-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.line-study-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 15px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.line-study-card.viewed { border-color: #78a590; background: #f0f7f3; }
.line-code {
  display: grid;
  place-items: center;
  align-self: start;
  min-width: 62px;
  height: 62px;
  padding: 5px;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  font: 700 21px Georgia, serif;
}
.line-study-card.viewed .line-code { background: var(--green); }
.line-card-copy { display: flex; min-width: 0; flex-direction: column; align-items: start; }
.line-card-copy small { color: #718079; }
.line-card-copy p { margin: 7px 0 12px; color: #607069; }
.line-card-copy .line-route { color: var(--ink); font-weight: 750; line-height: 1.45; }
.line-card-copy .secondary { margin-top: auto; padding: 9px 12px; }
.line-state { display: inline-flex; margin-top: 4px; padding: 4px 7px; border-radius: 6px; background: #f4dfd7; color: #843a2d; font-size: 11px; font-weight: 800; }

.lines-course-view .course-session-card small { line-height: 1.4; }

@media (max-width: 720px) {
  body { padding-bottom: 66px; }
  header { justify-content: space-between; }
  header .brand { display: flex; margin-right: 0; }
  header nav {
    position: fixed;
    z-index: 12;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    height: 62px;
    margin: 0;
    padding: 7px max(5px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 -8px 24px #12211d12;
    overflow-x: auto;
    scrollbar-width: none;
  }
  header nav::-webkit-scrollbar { display: none; }
  header nav button { flex: 1 0 61px; min-width: 0; padding: 7px 2px; font-size: 11px; }
  header #logout { margin-left: auto; }
  main { padding-bottom: 45px; }
  .line-study-intro { grid-template-columns: 1fr; }
  .line-study-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .line-study-card { grid-template-columns: 58px minmax(0, 1fr); padding: 15px; }
  .line-code { min-width: 54px; height: 54px; font-size: 18px; }
}
