@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;700&family=Caveat:wght@500;700&display=swap");

/* ============ Slug Planner — poster brutalist styles ============ */

:root{
  --oat: #ede9dc;
  --surface: #f4f1e6;
  --ink: #11170d;
  --lime: #cfd026;
  --muted: #4a4a37;
  --border: #11170d;
  --red: #c81e1e;

  --display: "Archivo Black", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --peek: 40px;

  --hour-px: 32px;
  --cal-hours: 15;
  --cal-height: 480px;
  --cal-tail: 8px; /* room for the 10P label below the last hour line */
  --topbar-h: 73px;
}

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

html, body{
  height: 100%;
  margin: 0;
}

body{
  background: var(--oat);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.4;
  overflow-x: hidden;
}

h1, h2, h3{
  font-family: var(--display);
  margin: 0;
}

button, select, input{
  font-family: var(--body);
  color: inherit;
}

.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

:focus-visible{
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- full screen states ---------- */

.full-screen-state{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
  background: var(--oat);
}

.error-text{
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(18px, 4vw, 28px);
  max-width: 42ch;
}

.loading-text{
  font-family: var(--display);
  letter-spacing: 0.01em;
  font-size: clamp(18px, 4vw, 28px);
  max-width: 42ch;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.18s ease;
}

.loading-text-fade{
  opacity: 0;
}

/* ---------- buttons / inputs ---------- */

.btn{
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  padding: 10px 16px;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover{
  background: var(--ink);
  color: var(--lime);
}

.btn-primary{
  background: var(--ink);
  color: var(--lime);
}

.btn-primary:hover{
  background: transparent;
  color: var(--ink);
}

.icon-btn{
  background: transparent;
  border: 2px solid var(--ink);
  width: 36px;
  height: 36px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.icon-btn:hover{ background: var(--ink); color: var(--lime); }

.select, .input{
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
  padding: 9px 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.input::placeholder{ color: var(--muted); }

/* ---------- top bar ---------- */

.topbar{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 2px solid var(--ink);
  background: var(--oat);
}

.topbar-side{
  font-family: var(--display);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.topbar-left{ text-align: left; }

.topbar-center{
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ---------- layout ---------- */

#app{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout{
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
}

.plan-area{
  flex: 1;
  min-width: 0;
  height: calc(100vh - var(--topbar-h));
  display: flex;
  align-items: stretch;
  position: relative;
}

.plan-nav{
  flex-shrink: 0;
  width: 48px;
  background: transparent;
  border: none;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--display);
}
.plan-nav:hover{ background: var(--ink); color: var(--lime); }
.plan-nav.plan-nav-off{ visibility: hidden; pointer-events: none; }

.plan-content{
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  gap: 14px;
}

.plan-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.plan-name{
  font-size: clamp(24px, 4vw, 38px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: text;
  outline-offset: 4px;
  word-break: break-word;
}
.plan-name:empty::before{
  content: "UNTITLED PLAN";
  color: var(--muted);
}

.plan-summary{
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- calendar ---------- */

.calendar{
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.calendar-frame{
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.calendar-header{
  display: grid;
  grid-template-columns: 54px repeat(7, 1fr);
  background: var(--ink);
  border-bottom: 2px solid var(--ink);
  flex-shrink: 0;
}

.calendar-gutter-header{ }

.calendar-day-header{
  font-family: var(--display);
  color: var(--lime);
  text-align: center;
  padding: 10px 4px;
  font-size: 13px;
  letter-spacing: 0.06em;
  border-left: 2px solid #2a3323;
}
.calendar-day-header:first-of-type{ border-left: none; }

.calendar-body{
  flex: 1;
  min-height: 0;
  max-height: calc(var(--cal-height) + var(--cal-tail));
  overflow-y: auto;
  display: grid;
  grid-template-columns: 54px repeat(7, 1fr);
  align-items: start;
  position: relative;
}

#calendar-grid, .calendar-grid{
  display: contents;
}

.calendar-gutter{
  position: relative;
  height: calc(var(--cal-height) + var(--cal-tail));
  width: 54px;
  border-right: 2px solid var(--ink);
}

.gutter-label{
  position: absolute;
  left: 0;
  right: 4px;
  transform: translateY(-50%);
  font-size: 10px;
  text-align: right;
  color: var(--muted);
  font-family: var(--display);
  letter-spacing: 0.02em;
}

.calendar-col{
  position: relative;
  height: calc(var(--cal-height) + var(--cal-tail));
  border-left: 2px solid var(--ink);
  background: var(--surface);
}

.calendar.armed .calendar-col{
  background: #e2ddc4;
  outline: 2px dashed var(--muted);
  outline-offset: -2px;
}

.hour-line{
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(17,23,13,0.14);
}

.calendar-block{
  position: absolute;
  left: 2px;
  right: 2px;
  border: 2px solid var(--ink);
  padding: 4px 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  font-size: 11px;
  line-height: 1.25;
  z-index: 2;
}
.calendar-block::-webkit-scrollbar{ width: 5px; }
.calendar-block::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.35); }
.calendar-block::-webkit-scrollbar-track{ background: transparent; }

.calendar-block-section{
  border-style: dashed;
  z-index: 3;
}

.calendar-block-conflict{
  border-color: var(--red);
  outline: 3px solid var(--red);
  outline-offset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(200,30,30,.45) 0 5px, transparent 5px 12px);
  z-index: 4;
}
.block-conflict-tag{
  display: inline-block;
  vertical-align: 1px;
  margin: 0 2px 0 0;
  padding: 0 4px;
  background: var(--red);
  color: #fff;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

.block-remove{
  position: sticky;
  float: right;
  top: 0;
  margin: -2px -4px 0 4px;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}

.block-course{
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-right: 14px;
}

.block-section{
  font-family: var(--display);
  font-size: 10px;
  text-transform: uppercase;
  opacity: 1;
}

.block-time{
  font-size: 10px;
}

.block-chip{
  margin-top: 3px;
  background: rgba(255,255,255,0.85);
  color: var(--ink);
  border: 1px solid var(--ink);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 4px;
  cursor: pointer;
}

/* ---------- plan bar ---------- */

.plan-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.plan-bar-left{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-counter{
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
}

.plan-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- reorder panel ---------- */

.reorder-panel{
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(300px, 88vw);
  max-height: 320px;
  overflow-y: auto;
  border: 2px solid var(--ink);
  background: var(--oat);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 10px;
  z-index: 30;
}

.reorder-header{
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.reorder-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reorder-row{
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  background: var(--surface);
  padding: 8px;
  cursor: grab;
}
.reorder-row:active{ cursor: grabbing; }
.reorder-row.dragging{ opacity: 0.4; }

.reorder-grip{
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
  user-select: none;
}

.reorder-row-main{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.reorder-row-name{
  font-family: var(--display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.reorder-row-count{
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- class bank ---------- */

.class-bank{
  width: 340px;
  flex-shrink: 0;
  border-left: 2px solid var(--ink);
  background: var(--oat);
  padding: 18px 16px 40px;
  position: sticky;
  top: 0;
  height: calc(100vh - var(--topbar-h));
  max-height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}

.bank-header h2{
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bank-hint{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 4px 0 12px;
}

.bank-legend{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: -6px 0 12px;
}
.bank-legend .card-badge{
  position: static;
  transform: none;
  margin: 0;
  flex-shrink: 0;
}

.bank-header{
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.bank-course{
  margin-bottom: 20px;
}

.bank-course-head{
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.swatch{
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  flex-shrink: 0;
  margin-top: 3px;
}

.bank-course-info{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.bank-course-key{
  font-family: var(--display);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bank-course-title{
  font-size: 12px;
  color: var(--muted);
}

.bank-remove{
  background: none;
  border: none;
  color: var(--ink);
  font-size: 11px;
  text-decoration: underline;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}

.bank-note{
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.lecture-cards{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.lecture-card{
  position: relative;
  width: 148px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 8px 8px 7px;
  cursor: grab;
}

.lecture-card-static{
  cursor: not-allowed;
  opacity: 0.92;
}

.lecture-card:active{ cursor: grabbing; }

.card-badge{
  position: absolute;
  top: -8px;
  left: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--oat);
  color: var(--ink);
  font-family: var(--display);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-badge-active{
  background: var(--ink);
  color: var(--lime);
}

.card-label{
  font-family: var(--display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-time{
  font-size: 11px;
  margin-top: 3px;
}

.card-meta{
  font-size: 10px;
  margin-top: 3px;
  opacity: 0.95;
}

.empty-state{
  font-size: 13px;
  color: var(--muted);
  border: 2px dashed var(--border);
  padding: 14px;
  text-align: center;
}

/* ---------- drawer ---------- */

.drawer-dim{
  position: fixed;
  inset: 0;
  background: rgba(17,23,13,0.4);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.drawer-dim.open{ opacity: 1; }

.drawer{
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--oat);
  border-right: 2px solid var(--ink);
  z-index: 41;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
}
.drawer.open{ transform: translateX(0); }

.drawer-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 2px solid var(--ink);
}
.drawer-header h2{
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drawer-controls{
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--ink);
  flex-wrap: wrap;
}
.drawer-controls .select{ flex: 0 0 auto; }
.drawer-controls .input{ flex: 1; min-width: 140px; }

.drawer-list{
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.drawer-course{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(17,23,13,0.18);
  padding: 12px 16px;
  cursor: pointer;
}
.drawer-course:hover:not(:disabled){ background: rgba(17,23,13,0.06); }
.drawer-course:disabled{ cursor: default; }

.drawer-course-info{
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.drawer-course-key{
  font-family: var(--display);
  font-size: 13px;
  text-transform: uppercase;
}
.drawer-course-title{
  font-size: 12px;
  color: var(--muted);
}

.drawer-course-meta{
  font-family: var(--display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}
.drawer-course-added .drawer-course-meta{ color: var(--muted); }
.drawer-course-added .drawer-course-key,
.drawer-course-added .drawer-course-title{ color: var(--muted); }

/* ---------- popover ---------- */

#popover-layer{
  position: fixed;
  inset: 0;
  z-index: 60;
}
#popover-layer[hidden]{ display: none; }

.popover-backdrop{
  position: fixed;
  inset: 0;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: default;
}

.popover{
  position: fixed;
  width: 300px;
  max-width: 92vw;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--oat);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 12px;
  z-index: 61;
}

.popover-head{
  font-family: var(--display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.popover-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popover-option{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
}
.popover-option:hover{ background: var(--ink); color: var(--lime); }

.popover-option-code{
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 12px;
}

.conflict-tag{
  color: var(--red);
  font-weight: bold;
}
.popover-option:hover .conflict-tag{ color: #ff9a9a; }

.popover-later{
  margin-top: 10px;
  width: 100%;
  background: transparent;
  border: 2px solid var(--ink);
  padding: 8px;
  font-family: var(--display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.popover-later:hover{ background: var(--ink); color: var(--lime); }

/* ---------- responsive ---------- */

@media (max-width: 900px){
  #app{ height: auto; min-height: 100vh; }
  .layout{ flex-direction: column; height: auto; }
  .plan-area{ height: auto; min-height: 70vh; }
  .plan-content{ min-height: 60vh; }
  .class-bank{
    width: 100%;
    border-left: none;
    border-top: 2px solid var(--ink);
    position: static;
    top: auto;
    height: auto;
    max-height: none;
    overflow-y: visible;
  }
  body{ overflow-y: auto; }
}

@media (max-width: 560px){
  .topbar{ grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .topbar-left{ text-align: center; }
  .topbar-center{ justify-content: center; }
  .plan-nav{ width: 34px; font-size: 26px; }
}

@media (prefers-reduced-motion: reduce){
  .drawer, .drawer-dim{ transition: none; }
  .loading-text{ transition: none; }
}

/* ---------- Sammy the banana slug ---------- */

.sammy-strip{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 35;
}

.sammy{
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 64px;
  height: 40px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  pointer-events: auto;
  transform: translateX(-80px);
  animation: sammy-crawl 70s linear infinite;
}

.sammy:focus-visible{
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

@keyframes sammy-crawl{
  0%{ transform: translateX(-80px); }
  100%{ transform: translateX(calc(100vw + 80px)); }
}

.sammy-squish{
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
  animation: sammy-squish 1.4s ease-in-out infinite;
}

@keyframes sammy-squish{
  0%, 100%{ transform: scaleX(1) scaleY(1); }
  50%{ transform: scaleX(0.92) scaleY(1.06); }
}

.sammy.sammy-poked .sammy-squish{
  animation: sammy-flinch 0.4s ease;
}

@keyframes sammy-flinch{
  0%{ transform: scale(1); }
  30%{ transform: scale(0.82, 1.15) translateY(-2px); }
  60%{ transform: scale(1.05, 0.92); }
  100%{ transform: scale(1); }
}

.sammy-svg{
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sammy-eyestalks{
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: sammy-peek 6.5s ease-in-out infinite;
}

@keyframes sammy-peek{
  0%, 82%, 100%{ transform: rotate(0deg); }
  88%{ transform: rotate(10deg); }
  94%{ transform: rotate(-8deg); }
}

.sammy-bubble{
  position: absolute;
  left: 70px;
  bottom: 8px;
  min-width: 120px;
  max-width: 180px;
  background: var(--oat);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.3;
  padding: 6px 9px;
  box-shadow: 3px 3px 0 var(--ink);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce){
  .sammy-strip{ display: none; }
}

/* Knowi platform accessibility invariant */
[hidden] { display: none !important; }

/* ---------- plan carousel ---------- */

.plan-track{
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
}
.plan-track > .plan-content{
  flex: 1;
  min-width: 0;
  transform: translateX(0) scale(1);
  opacity: 1;
  filter: grayscale(0);
  transform-origin: center center;
  transition: transform .3s ease, opacity .3s ease, filter .3s ease;
}
.plan-ghost{
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: none;
  opacity: .45;
  transition: transform .3s ease, opacity .3s ease, filter .3s ease;
}
.plan-ghost[hidden]{ display: none; }
.plan-ghost-prev{
  transform: translateX(-100%) scale(.94);
  transform-origin: right center;
  filter: grayscale(.25);
  opacity: 0;
}
.plan-ghost-next{
  transform: translateX(100%) scale(.94);
  transform-origin: left center;
  filter: grayscale(.65);
  opacity: 0;
}
/* neighbors peek in only while a card is being dragged, so they can be drop targets */
body.dragging .plan-ghost-prev{ transform: translateX(calc(-100% + var(--peek))) scale(.94); opacity: .45; }
body.dragging .plan-ghost-next{ transform: translateX(calc(100% - var(--peek))) scale(.94); opacity: .45; }
.plan-ghost .plan-name{ cursor: default; }
.plan-ghost .plan-bar{ visibility: hidden; }

.plan-track.slide-next > .plan-content{
  transform: translateX(-100%) scale(.94);
  transform-origin: right center;
  opacity: 0;
  filter: grayscale(.25);
}
.plan-track.slide-next .plan-ghost-next{
  transform: translateX(0) scale(1);
  opacity: 1;
  filter: none;
}
.plan-track.slide-prev > .plan-content{
  transform: translateX(100%) scale(.94);
  transform-origin: left center;
  opacity: 0;
  filter: grayscale(.65);
}
.plan-track.slide-prev .plan-ghost-prev{
  transform: translateX(0) scale(1);
  opacity: 1;
  filter: none;
}
.plan-track.no-anim, .plan-track.no-anim > *{ transition: none !important; }

body.dragging .plan-ghost{ pointer-events: auto; }
body.dragging .plan-ghost .calendar-col{
  background: #e2ddc4;
  outline: 2px dashed var(--muted);
  outline-offset: -2px;
}
body.dragging .plan-ghost:hover{ opacity: .85 !important; filter: none; }

@media (max-width: 900px){
  .plan-ghost{ display: none; }
}
@media (prefers-reduced-motion: reduce){
  .plan-track > .plan-content, .plan-ghost{ transition: none; }
}

/* ---------- first-time guide ---------- */

.guide{
  position: relative;
  margin: 0 0 16px;
  padding: 10px 30px 10px 14px;
  border: 2px solid var(--ink);
  background: #f7f3e3;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-1deg);
  font-family: "Caveat", "Bradley Hand", "Segoe Script", "Comic Sans MS", cursive;
  color: var(--ink);
}
.guide[hidden]{ display: none; }
.guide-title{
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 4px;
}
.guide-steps{
  margin: 0;
  padding-left: 22px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
}
.guide-close{
  position: absolute;
  top: 4px;
  right: 6px;
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  padding: 2px 4px;
}
.guide-close:hover{ background: var(--ink); color: var(--lime); }

/* ---------- Time TBA note ---------- */

.lecture-card-static{ cursor: not-allowed; }
.lecture-card-shake{ animation: card-shake .35s ease; }
@keyframes card-shake{
  0%{ transform: translateX(0); }
  25%{ transform: translateX(-3px); }
  50%{ transform: translateX(3px); }
  75%{ transform: translateX(-2px); }
  100%{ transform: translateX(0); }
}
.tba-note{
  position: fixed;
  z-index: 60;
  max-width: 250px;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  background: var(--oat);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--body);
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
}
.tba-note[hidden]{ display: none; }
.tba-note-title{
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
@media (prefers-reduced-motion: reduce){ .lecture-card-shake{ animation: none; } }

/* ---------- subject picker stands out in the drawer ---------- */

#subject-select{
  background: var(--lime);
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: 0.04em;
}
#subject-select:hover, #subject-select:focus{ background: #dfe04a; }
