:root {
  color-scheme: light;
  --paper: #f6f3eb;
  --surface: #fffdf8;
  --ink: #242620;
  --muted: #77776d;
  --line: #dcd8cc;
  --line-dark: #c8c3b6;
  --moss: #566b4f;
  --moss-dark: #354832;
  --moss-pale: #dfe7d9;
  --yellow: #f3e8ad;
  --lilac: #e5dded;
  --peach: #f0d9cb;
  --blue: #d9e7e5;
  --rose: #ecd8d8;
  --shadow: 0 18px 55px rgb(55 52 43 / 8%);
  --radius: 20px;
  --font: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select,
label {
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(86 107 79 / 28%);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.topbar {
  display: flex;
  width: min(100% - 2rem, 92rem);
  min-height: 4.75rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--line-dark);
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  gap: 0.65rem;
  align-items: center;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem 0.55rem 0.55rem 0.18rem;
  background: var(--moss);
  color: white;
  font-family: Georgia, serif;
  font-size: 1rem;
  place-items: center;
}

.term {
  display: flex;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  gap: 0.45rem;
  align-items: center;
}

.term span {
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 50%;
  background: #7f9c72;
  box-shadow: 0 0 0 4px rgb(127 156 114 / 13%);
}

.page-shell {
  width: min(100% - 2rem, 92rem);
  margin: 0 auto;
  padding: clamp(2.75rem, 6vw, 5.5rem) 0 5rem;
}

.intro {
  max-width: 47rem;
  margin-bottom: clamp(2rem, 4vw, 3.75rem);
}

.hello,
.week-kicker {
  margin: 0 0 0.7rem;
  color: var(--moss);
  font-size: 0.77rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hello span {
  display: inline-block;
  margin-left: 0.25rem;
}

h1,
h2,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.3rem, 7vw, 7rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.intro > p:last-child {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.workspace {
  display: grid;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
  grid-template-columns: minmax(19rem, 0.68fr) minmax(34rem, 1.32fr);
  align-items: start;
}

.picker,
.week-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 253 248 / 88%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.picker {
  position: sticky;
  top: 1rem;
  overflow: hidden;
  padding: 1rem;
}

.search-box {
  display: grid;
  height: 3.15rem;
  border: 1px solid var(--line-dark);
  border-radius: 0.9rem;
  background: var(--surface);
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0 0.75rem;
}

.search-box:focus-within {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgb(86 107 79 / 10%);
}

.search-icon {
  width: 0.9rem;
  height: 0.9rem;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  position: absolute;
  width: 0.42rem;
  height: 1.5px;
  right: -0.32rem;
  bottom: -0.14rem;
  background: var(--muted);
  content: "";
  transform: rotate(45deg);
}

.search-box input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: #97968d;
}

kbd {
  padding: 0.18rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: #f1eee6;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.67rem;
}

.filter-drawer {
  margin: 1rem 0 0;
}

.filter-drawer summary {
  display: none;
}

.filters {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 0.65rem 0.55rem;
}

.control-field,
.program-field,
.batch-field,
.section-field {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 0.36rem;
}

.control-field legend,
.program-field > span,
.batch-field > span,
.section-field > span {
  padding: 0;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.program-field select,
.batch-field select,
.section-select {
  width: 100%;
  min-width: 0;
  height: 2.45rem;
  padding: 0 1.75rem 0 0.62rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--surface);
  font-size: 0.75rem;
  text-overflow: ellipsis;
}

.batch-field[hidden] {
  display: none;
}

.batch-field[hidden] + .section-field {
  grid-column: 1 / -1;
}

.segmented-control {
  display: grid;
  min-width: 0;
  height: 2.45rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #efede6;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 0.2rem;
}

.segmented-control label {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label > span {
  display: grid;
  height: 100%;
  padding: 0 0.65rem;
  border-radius: 0.48rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  place-items: center;
  white-space: nowrap;
}

.segmented-control input:checked + span {
  background: var(--surface);
  box-shadow: 0 1px 4px rgb(36 38 32 / 12%);
  color: var(--moss-dark);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid rgb(86 107 79 / 22%);
  outline-offset: 1px;
}

.single-section {
  display: flex;
  height: 2.45rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--moss-pale);
  color: var(--moss-dark);
  font-size: 0.75rem;
  font-weight: 750;
  align-items: center;
}

.auto-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.45;
}

.course-heading {
  display: flex;
  margin: 1.35rem 0 0.65rem;
  align-items: end;
  justify-content: space-between;
}

.course-heading h2,
.week-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.course-heading h2 {
  font-size: 1.28rem;
}

.course-heading p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.text-button {
  padding: 0.28rem;
  border: 0;
  background: transparent;
  color: var(--moss);
  font-size: 0.75rem;
  font-weight: 700;
}

.text-button:disabled {
  color: #aaa79e;
  cursor: not-allowed;
}

.course-list {
  display: grid;
  max-height: 30rem;
  overflow: auto;
  border-block: 1px solid var(--line);
  scrollbar-color: var(--line-dark) transparent;
}

.course-group-label {
  display: flex;
  min-height: 2.9rem;
  padding: 0.75rem 0.35rem 0.55rem;
  border-bottom: 1px solid var(--line);
  background: rgb(246 243 235 / 72%);
  gap: 0.7rem;
  align-items: baseline;
  justify-content: space-between;
}

.course-group-label strong {
  color: var(--moss-dark);
  font-size: 0.69rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.course-group-label span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-option {
  display: grid;
  min-height: 4.3rem;
  padding: 0.75rem 0.35rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.course-option:last-child {
  border-bottom: 0;
}

.course-option:hover {
  background: rgb(86 107 79 / 4%);
}

.course-option:has(input:checked) {
  background: var(--moss-pale);
}

.course-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

.course-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-check {
  display: grid;
  width: 1.16rem;
  height: 1.16rem;
  margin-top: 0.08rem;
  border: 1px solid var(--line-dark);
  border-radius: 0.35rem;
  background: white;
  place-items: center;
}

.course-option input:focus-visible + .custom-check {
  outline: 3px solid rgb(86 107 79 / 22%);
  outline-offset: 2px;
}

.course-option input:checked + .custom-check {
  border-color: var(--moss);
  background: var(--moss);
}

.course-option input:checked + .custom-check::after {
  width: 0.28rem;
  height: 0.53rem;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  content: "";
  transform: translateY(-0.04rem) rotate(45deg);
}

.course-copy {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.course-name {
  overflow: hidden;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-type {
  padding: 0.22rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.empty-list {
  padding: 2.2rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.show-more {
  width: 100%;
  margin-top: 0.7rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--surface);
  color: var(--moss);
  font-size: 0.75rem;
  font-weight: 700;
}

.week-panel {
  min-height: 44rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.week-heading {
  display: flex;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.week-kicker {
  margin-bottom: 0.25rem;
  font-size: 0.63rem;
}

.week-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.week-heading h2 span {
  display: inline-block;
  margin-left: 0.45rem;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: middle;
}

.week-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.download-button {
  display: inline-flex;
  min-height: 2.7rem;
  padding: 0.65rem 0.9rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--moss);
  color: white;
  font-size: 0.76rem;
  font-weight: 750;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
}

.download-button:hover:not(:disabled) {
  background: var(--moss-dark);
}

.download-button:disabled {
  background: #b9b9af;
  cursor: not-allowed;
}

.download-icon {
  width: 0.8rem;
  height: 0.85rem;
  border-bottom: 1.5px solid currentColor;
  position: relative;
}

.download-icon::before,
.download-icon::after {
  position: absolute;
  content: "";
}

.download-icon::before {
  width: 1.5px;
  height: 0.62rem;
  top: -0.13rem;
  left: calc(50% - 0.75px);
  background: currentColor;
}

.download-icon::after {
  width: 0.34rem;
  height: 0.34rem;
  top: 0.1rem;
  left: 50%;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateX(-50%) rotate(45deg);
}

.selected-strip {
  display: flex;
  min-height: 1.75rem;
  margin: 1rem 0;
  overflow-x: auto;
  gap: 0.45rem;
  scrollbar-width: none;
}

.selected-strip:empty::after {
  color: var(--muted);
  content: "Pick a class to begin — your choices stay on this device.";
  font-size: 0.72rem;
  line-height: 1.75rem;
}

.selected-chip {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 650;
  gap: 0.35rem;
  align-items: center;
}

.selected-chip button {
  display: grid;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e9e5dc;
  color: var(--muted);
  font-size: 0.72rem;
  place-items: center;
}

.selected-chip-core {
  border-color: #ccd7c6;
  background: var(--moss-pale);
}

.selected-chip-tag {
  color: var(--moss);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.conflict-note {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d7a7a2;
  border-radius: 0.75rem;
  background: #f7e5e2;
  color: #763f3a;
  font-size: 0.72rem;
  font-weight: 650;
}

.week-grid {
  display: grid;
  gap: 0.55rem;
}

.day-row {
  display: grid;
  min-height: 5.3rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  grid-template-columns: 6.2rem minmax(0, 1fr);
  gap: 0.9rem;
}

.day-row:first-child {
  border-top: 0;
}

.day-label {
  padding-top: 0.45rem;
}

.day-label strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 400;
}

.day-label span {
  display: block;
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.day-events {
  display: grid;
  gap: 0.45rem;
}

.free-day {
  display: flex;
  min-height: 3.6rem;
  border: 1px dashed var(--line-dark);
  border-radius: 0.8rem;
  color: #aaa69b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.85rem;
  font-style: italic;
  align-items: center;
  justify-content: center;
}

.class-block {
  display: grid;
  min-height: 3.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgb(36 38 32 / 8%);
  border-radius: 0.8rem;
  grid-template-columns: 6.4rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.class-block.tone-0 { background: var(--moss-pale); }
.class-block.tone-1 { background: var(--yellow); }
.class-block.tone-2 { background: var(--lilac); }
.class-block.tone-3 { background: var(--peach); }
.class-block.tone-4 { background: var(--blue); }

.class-block.is-conflict {
  border-color: #b75f56;
  box-shadow: inset 3px 0 #b75f56;
}

.class-time {
  font-size: 0.67rem;
  font-weight: 750;
}

.class-title {
  min-width: 0;
}

.class-title strong {
  display: block;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-title span,
.class-room {
  color: rgb(36 38 32 / 62%);
  font-size: 0.62rem;
}

.class-title span {
  display: block;
  margin-top: 0.2rem;
}

.class-room {
  padding: 0.25rem 0.4rem;
  border: 1px solid rgb(36 38 32 / 13%);
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.source-note {
  display: flex;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.67rem;
  justify-content: space-between;
}

.source-note a {
  color: var(--moss);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.mobile-download {
  display: none;
}

.mobile-stepper,
.mobile-step-heading,
.mobile-primary-action,
.mobile-edit-button {
  display: none;
}

@media (max-width: 64rem) {
  .workspace {
    grid-template-columns: minmax(17rem, 0.75fr) minmax(26rem, 1.25fr);
  }

  .class-block {
    grid-template-columns: 5.8rem minmax(0, 1fr) auto;
  }
}

@media (max-width: 48rem) {
  html[data-mobile-step="week"] body {
    padding-bottom: 5.6rem;
  }

  .topbar,
  .page-shell {
    width: min(100% - 1.1rem, 42rem);
  }

  .topbar {
    min-height: 4rem;
  }

  .brand {
    font-size: 0.87rem;
  }

  .term {
    max-width: 7.8rem;
    font-size: 0.68rem;
    line-height: 1.25;
    text-align: right;
  }

  .page-shell {
    padding-top: 1.1rem;
    padding-bottom: 2.5rem;
  }

  .intro {
    display: none;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .mobile-stepper {
    position: relative;
    display: grid;
    width: min(100%, 25rem);
    margin: 0 auto 0.25rem;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .mobile-stepper::before {
    position: absolute;
    z-index: 0;
    top: 1rem;
    right: 16.6%;
    left: 16.6%;
    height: 1px;
    background: var(--line-dark);
    content: "";
  }

  .mobile-stepper button {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 3.4rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 700;
    gap: 0.3rem;
    place-items: start center;
  }

  .mobile-stepper button > span {
    display: grid;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    background: var(--paper);
    color: var(--muted);
    font-size: 0.7rem;
    place-items: center;
  }

  .mobile-stepper button[aria-current="step"] {
    color: var(--moss-dark);
  }

  .mobile-stepper button[aria-current="step"] > span {
    border-color: var(--moss);
    background: var(--moss);
    box-shadow: 0 0 0 4px rgb(86 107 79 / 10%);
    color: white;
  }

  .picker {
    position: static;
    padding: 1rem;
    overflow: visible;
  }

  .mobile-step-heading {
    margin-bottom: 1.1rem;
  }

  .mobile-step-heading > p:first-child {
    margin: 0 0 0.35rem;
    color: var(--moss);
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-step-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.85rem, 9vw, 2.35rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.045em;
  }

  .mobile-step-heading.subject-step-content {
    position: relative;
    padding-top: 1.9rem;
  }

  .mobile-step-heading.subject-step-content p {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.72rem;
  }

  .mobile-back-button {
    position: absolute;
    top: -0.2rem;
    left: -0.25rem;
    min-height: 2rem;
    padding: 0.25rem;
    border: 0;
    background: transparent;
    color: var(--moss);
    font-size: 0.7rem;
    font-weight: 750;
  }

  html[data-mobile-step="program"] .subject-step-content,
  html[data-mobile-step="program"] .week-panel,
  html[data-mobile-step="subjects"] .profile-step-content,
  html[data-mobile-step="subjects"] .week-panel,
  html[data-mobile-step="week"] .picker {
    display: none !important;
  }

  html[data-mobile-step="program"] .profile-step-content.mobile-step-heading,
  html[data-mobile-step="subjects"] .subject-step-content.mobile-step-heading {
    display: block;
  }

  .filter-drawer {
    margin-top: 0;
  }

  .filter-drawer summary {
    display: none;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .degree-field,
  .program-field,
  .batch-field,
  .section-field,
  .batch-field[hidden] + .section-field {
    grid-column: 1;
  }

  .program-field select,
  .batch-field select,
  .section-select,
  .single-section,
  .segmented-control {
    height: 3rem;
    border-radius: 0.8rem;
    font-size: 0.82rem;
  }

  .segmented-control label > span {
    font-size: 0.82rem;
  }

  .auto-note {
    margin-top: 0.9rem;
    padding: 0.8rem 0.85rem;
    border-radius: 0.75rem;
    background: rgb(223 231 217 / 52%);
    color: var(--moss-dark);
    font-size: 0.7rem;
  }

  .mobile-primary-action {
    display: flex;
    width: 100%;
    min-height: 3.45rem;
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 0.85rem;
    background: var(--moss);
    box-shadow: 0 9px 22px rgb(53 72 50 / 16%);
    color: white;
    font-size: 0.82rem;
    font-weight: 800;
    gap: 0.3rem;
    align-items: center;
    justify-content: center;
  }

  .mobile-primary-action:hover {
    background: var(--moss-dark);
  }

  .search-box {
    height: 3.35rem;
  }

  .course-heading {
    margin-top: 1.15rem;
  }

  .course-heading h2 {
    font-size: 1.4rem;
  }

  .course-list {
    max-height: none;
    overflow: visible;
  }

  .course-group-label {
    display: grid;
    min-height: 3.25rem;
    gap: 0.18rem;
    align-content: center;
  }

  .course-group-label span,
  .course-name,
  .course-meta {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .course-option {
    min-height: 4.7rem;
    padding: 0.85rem 0.25rem;
    gap: 0.65rem;
  }

  .course-type {
    align-self: start;
  }

  #mobile-view-week {
    position: sticky;
    z-index: 12;
    bottom: max(0.7rem, env(safe-area-inset-bottom));
    margin-bottom: 0.15rem;
  }

  .week-panel {
    min-height: 0;
    padding: 1.1rem;
  }

  .week-heading {
    position: relative;
    padding-bottom: 1rem;
    align-items: start;
  }

  .week-heading h2 {
    font-size: 2rem;
  }

  .mobile-edit-button {
    display: inline-flex;
    min-height: 2.5rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--line-dark);
    border-radius: 0.7rem;
    background: var(--surface);
    color: var(--moss);
    font-size: 0.68rem;
    font-weight: 750;
    align-items: center;
  }

  .week-actions {
    display: none;
  }

  .selected-strip {
    margin: 0.8rem 0;
  }

  .day-row {
    grid-template-columns: 4.8rem minmax(0, 1fr);
    gap: 0.55rem;
  }

  .class-block {
    padding: 0.65rem;
    grid-template-columns: 1fr auto;
    gap: 0.2rem 0.65rem;
  }

  .class-time {
    grid-column: 1 / -1;
    color: rgb(36 38 32 / 64%);
  }

  .class-title strong {
    white-space: normal;
  }

  .mobile-download {
    position: fixed;
    z-index: 30;
    right: 0.65rem;
    bottom: max(0.65rem, env(safe-area-inset-bottom));
    left: 0.65rem;
    display: none;
    min-height: 4.1rem;
    padding: 0.55rem;
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 1rem;
    background: rgb(36 38 32 / 94%);
    box-shadow: 0 12px 35px rgb(0 0 0 / 22%);
    color: white;
    font-size: 0.72rem;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(14px);
  }

  html[data-mobile-step="week"] .mobile-download:not([hidden]) {
    display: flex;
  }

  .mobile-download-count {
    display: none;
  }

  .mobile-download .download-button {
    width: 100%;
    min-height: 2.8rem;
    background: #72896a;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
