/* ═══════════════════════════════════════════
   Kyle's Road to Boston — Styles v5
   Landing page: course map + PRs visible immediately
   Light theme (Claude-esque) + Boston blue/gold
   ═══════════════════════════════════════════ */

:root {
  --cream:     #f7f3ee;
  --cream2:    #ede8e0;
  --warm-bg:   #faf8f5;
  --white:     #ffffff;
  --ink:       #1a1a2e;
  --ink-soft:  #3b3b52;
  --muted:     #8c8a9a;
  --border:    #e4dfd7;
  --border2:   #d5cfc4;

  --bos-blue:   #0033a0;
  --bos-blue-l: #e8eef8;
  --bos-gold:   #d4a017;
  --bos-gold-l: #fef8e8;
  --bos-green:  #1b7340;
  --bos-green-l:#eaf5ef;

  --radius: 14px;
  --sidebar-w: 310px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--warm-bg);
  color: var(--ink-soft);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ═══ Social Bar ═══ */
.social-bar {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  gap: 0.75rem;
}
.social-bar a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}
.social-bar a:hover {
  color: #fff;
  transform: scale(1.15);
}

/* ═══ Hero ═══ */
.hero {
  text-align: center;
  padding: 4rem 2rem 3rem;
  background: linear-gradient(180deg, var(--bos-blue) 0%, #001a5c 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 420px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(212,160,23,0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Polaroid photos */
.hero-polaroid-slot {
  flex-shrink: 0;
  z-index: 2;
  perspective: 600px;
}
.polaroid {
  background: #fff;
  padding: 6px 6px 26px;
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 1px 4px rgba(0,0,0,0.15);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.3s ease;
  width: 170px;
}
.polaroid:hover {
  transform: rotate(0deg) scale(1.05);
  z-index: 10;
}
.polaroid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 1px;
  transition: opacity 0.6s ease-in-out;
}
.polaroid img.fade-out {
  opacity: 0;
}

.hero-inner {
  position: relative;
  max-width: 500px;
  margin: 0;
  z-index: 3;
  flex-shrink: 1;
}

/* Responsive polaroids */
@media (max-width: 1100px) {
  .hero {
    flex-direction: column;
    padding: 3rem 2rem 2rem;
  }
  .hero-inner { order: 1; }
  .hero-polaroid-slot:first-child { order: 2; }
  .hero-polaroid-slot:last-child { order: 3; }
  .hero-scroll-hint { order: 4; }
  .hero {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-inner { width: 100%; }
  .polaroid { width: 140px; }
  .polaroid img { height: 160px; }
}
@media (max-width: 640px) {
  .polaroid { width: 110px; padding: 4px 4px 18px; }
  .polaroid img { height: 120px; }
}
.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--bos-gold);
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 700; line-height: 1.08;
  color: #fff;
  margin-bottom: 0.5rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
}
.hero .countdown {
  margin-top: 2rem;
  display: flex; gap: 2rem;
  justify-content: center; flex-wrap: wrap;
}
.hero .countdown-num {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 700;
  color: #fff; line-height: 1;
}
.hero .countdown-label {
  font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  margin-top: 0.3rem;
}
.hero-scroll-hint {
  position: relative;
  z-index: 3;
  margin-top: 1.5rem;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.35);
  animation: bobDown 2s ease-in-out infinite;
}
@keyframes bobDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ═══ Main Layout ═══ */
.main-layout {
  display: flex; min-height: 100vh; position: relative;
}

/* ═══ Sticky Sidebar ═══ */
.course-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  z-index: 20; overflow: hidden;
}

.sidebar-inner {
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 1.5rem 0.75rem;
}

.sidebar-progress {
  text-align: center; margin-bottom: 0.5rem; flex-shrink: 0;
}
.sidebar-pct {
  font-family: var(--font-display);
  font-size: 2.6rem; font-weight: 700;
  color: var(--bos-blue); line-height: 1;
}
.sidebar-pct-sign {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 600;
  color: var(--bos-blue);
}
.sidebar-progress-label {
  font-size: 0.7rem; color: var(--muted); margin-top: 0.1rem;
}

.sidebar-course {
  flex: 1; width: 100%; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#course-svg { width: 100%; height: 100%; max-height: 100%; }

.sidebar-dates {
  display: flex; gap: 0.4rem; align-items: center;
  font-family: var(--font-display);
  font-size: 0.65rem; font-weight: 600;
  color: var(--muted); letter-spacing: 0.05em;
  margin-top: 0.5rem; flex-shrink: 0;
}
.sidebar-dates-arrow { color: var(--bos-gold); }

/* SVG landmarks */
.landmark-label {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 9px; font-weight: 600;
  fill: #aaa69d; transition: fill 0.5s ease;
}
.landmark-label.passed { fill: var(--ink-soft); }

.landmark-sublabel {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 7px; fill: #c8c3b8;
  transition: fill 0.5s ease;
}
.landmark-sublabel.passed { fill: #8c8a9a; }

.landmark-dot { transition: all 0.5s ease; }

/* ═══ Mobile Course Bar ═══ */
/* ═══ Mobile Horizontal Course Map ═══ */
.mobile-course-map {
  display: none;
  position: sticky; top: 0; z-index: 30;
  background: rgba(250,248,245,0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.3rem 0.5rem 0.1rem;
}
.mobile-map-header {
  display: flex; justify-content: space-between;
  align-items: center;
  font-size: 0.55rem; color: var(--muted);
  font-family: var(--font-display); font-weight: 600;
  padding: 0 0.25rem;
  margin-bottom: 0.1rem;
}
.mobile-map-pct {
  font-size: 1.6rem; color: var(--bos-blue); font-weight: 700;
  font-family: var(--font-display);
  line-height: 1;
}
.mobile-map-svg-wrap {
  width: 100%;
  overflow: hidden;
}
#course-svg-h {
  width: 100%;
  height: auto;
  max-height: 100px;
  display: block;
}
.landmark-label-h {
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 600;
  fill: var(--muted);
  transition: fill 0.5s ease;
}
.landmark-label-h.passed {
  fill: var(--ink);
}
.landmark-dot-h {
  transition: all 0.5s ease;
}

/* ═══ Content Main ═══ */
.content-main { flex: 1; min-width: 0; }

.section {
  max-width: 760px; margin: 0 auto;
  padding: 3rem 2rem;
}
.section + .section {
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: 1.2rem; color: var(--ink);
}
.section-subtitle {
  font-size: 0.8rem; font-weight: 400;
  color: var(--muted); margin-left: 0.4rem;
}

/* ═══ Landing Section ═══ */
.landing-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: none;
}

.landing-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.landing-eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--bos-blue); margin-bottom: 0.75rem;
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; line-height: 1.1;
  color: var(--ink);
}

.landing-sub {
  font-size: 1.05rem; color: var(--muted); margin-top: 0.5rem;
}

.countdown {
  margin-top: 1.5rem;
  display: flex; gap: 1.5rem;
  justify-content: center; flex-wrap: wrap;
}
.countdown-unit { text-align: center; }
.countdown-num {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 700;
  color: var(--bos-blue); line-height: 1;
}
.countdown-label {
  font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted);
  margin-top: 0.25rem;
}

/* ═══ PR Cards ═══ */
.pr-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}
.pr-card {
  flex: 0 1 calc(25% - 0.5rem);
  min-width: 150px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}
.pr-card:hover { transform: translateY(-2px); }

.pr-card.pr-featured {
  background: var(--bos-blue-l);
  border-color: #c4d4ea;
}

.pr-card.pr-throwback {
  background: var(--cream);
  border-style: dashed;
}

.pr-event {
  font-family: var(--font-display);
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.pr-tag {
  display: inline-block;
  font-size: 0.55rem;
  background: var(--border);
  color: var(--muted);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  letter-spacing: 0.06em;
  vertical-align: middle;
  margin-left: 0.15rem;
}

.pr-time {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
  color: var(--ink); line-height: 1.1;
}

.pr-featured .pr-time { color: var(--bos-blue); }

.pr-detail {
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 0.3rem;
  line-height: 1.3;
}

/* ═══ Stats Grid ═══ */
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.stat-card {
  flex: 0 1 calc(33.333% - 0.5rem);
  min-width: 210px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.run::before  { background: var(--bos-green); }
.stat-card.bike::before { background: var(--bos-blue); }
.stat-card.swim::before { background: var(--bos-gold); }
.stat-card.cal::before  { background: #e05a33; }

.stat-header {
  display: flex; align-items: center;
  gap: 0.5rem; margin-bottom: 0.75rem;
}
.stat-icon { font-size: 1.2rem; }
.stat-type {
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
}
.stat-sessions {
  font-size: 0.65rem; color: var(--muted); margin-left: auto;
}

.stat-values { display: flex; gap: 1.2rem; margin-bottom: 0.75rem; }
.stat-value { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700;
  color: var(--ink); line-height: 1;
}
.stat-unit {
  font-size: 0.6rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

.stat-bar-track {
  height: 5px; background: var(--cream2);
  border-radius: 3px; overflow: hidden;
}
.stat-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.stat-card.run .stat-bar-fill  { background: var(--bos-green); }
.stat-card.bike .stat-bar-fill { background: var(--bos-blue); }
.stat-card.swim .stat-bar-fill { background: var(--bos-gold); }
.stat-card.cal .stat-bar-fill  { background: #e05a33; }

/* Fun-fact tap hint */
.stat-tap-hint {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: right;
  margin-top: 0.4rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.stat-card:hover .stat-tap-hint { opacity: 1; }
@media (max-width: 900px) {
  .stat-tap-hint { opacity: 0.6; }
}

/* Flip animation for cycling fun facts */
.stat-values {
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.stat-values.stat-flip {
  opacity: 0;
  transform: translateY(6px);
}
.stat-values.stat-flip-in {
  animation: statFlipIn 0.3s ease forwards;
}
@keyframes statFlipIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Active tap feedback */
.stat-card[data-funfact] {
  transition: transform 0.1s ease, box-shadow 0.2s;
  user-select: none; -webkit-user-select: none;
}
.stat-card[data-funfact]:active {
  transform: scale(0.97);
}

/* ═══ Activities ═══ */
#strava-status { margin-bottom: 0.75rem; }

.strava-connect-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: #fc4c02; color: #fff;
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.8rem;
  border: none; border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.strava-connect-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(252,76,2,0.25);
}

/* Activities layout: list + floating photo rail */
.activities-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.activities-list { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; min-width: 0; }

.activity-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.activity-card:hover {
  transform: translateX(2px);
  box-shadow: var(--shadow-md);
}

.activity-emoji {
  font-size: 1.5rem; flex-shrink: 0;
  width: 2rem; text-align: center;
}
.activity-info { flex: 1; min-width: 0; }
.activity-name {
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.85rem; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.activity-meta {
  font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem;
}

.activity-stats { display: flex; gap: 0.75rem; flex-shrink: 0; }
.activity-stat { text-align: right; }
.activity-stat-val {
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.85rem; color: var(--ink);
}
.activity-stat-label {
  font-size: 0.55rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
}

.activity-intensity {
  font-size: 0.95rem; flex-shrink: 0; letter-spacing: -0.06em;
}

/* Expandable activity detail */
.activity-card { cursor: pointer; }
.activity-detail {
  display: none;
  width: 100%;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.activity-card.expanded {
  flex-wrap: wrap;
}
.activity-card.expanded .activity-detail {
  display: block;
}
.activity-detail-date {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.activity-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.6rem;
}
.detail-item {
  display: flex;
  flex-direction: column;
  text-align: center;
}
.detail-val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
}
.detail-lbl {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.1rem;
}
.activity-strava-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--bos-blue);
  text-decoration: none;
}
.activity-strava-link:hover {
  text-decoration: underline;
}

/* Photo Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  object-fit: contain;
}
.lightbox-caption {
  color: rgba(255,255,255,0.8);
  font-family: var(--font-display);
  font-size: 0.85rem;
  margin-top: 1rem;
  text-align: center;
}

/* Postcards rail — floating photos alongside activities */
.postcards-rail {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding-top: 0.5rem;
}
.postcard {
  width: 170px;
  padding: 5px 5px 22px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.06);
  transform: rotate(var(--rotation, -2deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.postcard:hover {
  transform: rotate(0deg) scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  z-index: 10;
}
.postcard img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}
.postcard-caption {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.postcard-date {
  font-family: var(--font-body);
  font-size: 0.5rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1px;
}
@media (max-width: 800px) {
  .activities-layout { flex-direction: column; }
  .postcards-rail {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.8rem;
    padding: 0.5rem 0;
  }
  .postcard { width: 140px; flex-shrink: 0; }
}

.show-more-btn {
  display: block; width: 100%;
  margin-top: 0.5rem; padding: 0.7rem 1rem;
  background: var(--white);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 600;
  color: var(--bos-blue); cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.show-more-btn:hover {
  background: var(--bos-blue-l);
  transform: translateY(-1px);
}

/* ═══ Workouts ═══ */
.workouts-strip {
  display: flex; gap: 0.6rem;
  overflow-x: auto; padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}
.workouts-strip::-webkit-scrollbar { height: 3px; }
.workouts-strip::-webkit-scrollbar-track { background: transparent; }
.workouts-strip::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.workout-card {
  flex-shrink: 0; width: 125px;
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}
.workout-card:hover { transform: translateY(-2px); }
.workout-card.today { border-color: var(--bos-gold); background: var(--bos-gold-l); }

.workout-day {
  font-family: var(--font-display);
  font-size: 0.6rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 0.4rem;
}
.workout-card.today .workout-day { color: var(--bos-gold); }
.workout-icon { font-size: 1.2rem; margin-bottom: 0.3rem; }
.workout-label {
  font-family: var(--font-display);
  font-size: 0.72rem; font-weight: 600;
  color: var(--ink); line-height: 1.3;
}

/* ═══ Diary ═══ */
.diary-form {
  display: flex; gap: 0.6rem;
  margin-bottom: 1.2rem; align-items: flex-end;
  flex-wrap: wrap;
}
.diary-form input[type="text"] {
  width: 160px; background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  color: var(--ink-soft);
  font-family: var(--font-body); font-size: 0.85rem;
  transition: border-color 0.2s, outline 0.2s;
}
.diary-form input[type="text"]:focus { outline: none; border-color: var(--bos-blue); }
.diary-form input[type="text"]::placeholder { color: var(--muted); }
.diary-form textarea {
  flex: 1; min-width: 200px; background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  color: var(--ink-soft);
  font-family: var(--font-body); font-size: 0.85rem;
  resize: none; transition: border-color 0.2s;
}
.diary-form textarea:focus { outline: none; border-color: var(--bos-blue); }
.diary-form textarea::placeholder { color: var(--muted); }

.btn-primary {
  padding: 0.6rem 1.2rem;
  background: var(--bos-blue); color: #fff;
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.78rem;
  border: none; border-radius: var(--radius);
  cursor: pointer; white-space: nowrap;
  transition: transform 0.15s, background 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); background: #0040c0; }

.diary-entries { display: flex; flex-direction: column; gap: 0.6rem; }
.diary-entry {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.diary-meta { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.25rem; }
.diary-name { font-size: 0.8rem; font-weight: 600; color: var(--bos-blue); }
.diary-date { font-size: 0.68rem; color: var(--muted); }
.diary-text { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; }

.diary-delete {
  position: absolute; top: 0.6rem; right: 0.6rem;
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 0.85rem; opacity: 0; transition: opacity 0.2s;
}
.diary-entry:hover .diary-delete { opacity: 1; }
.diary-delete:hover { color: #d44; }

/* ═══ Footer ═══ */
.footer {
  text-align: center; padding: 2.5rem 1.5rem;
  color: var(--muted); font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* ═══ Utilities ═══ */
.empty-state { text-align: center; padding: 2rem; color: var(--muted); font-size: 0.85rem; }
.loading-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--bos-blue);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
  .course-sidebar { display: none; }
  .mobile-course-map { display: block; }
  .main-layout { display: block; }
  .content-main { width: 100%; }
  .section { padding: 2rem 1rem; }
  .landing-section { min-height: auto; padding-top: 1.5rem; }
  .landing-title { font-size: 2rem; }
}
@media (max-width: 640px) {
  .landing-title { font-size: 1.7rem; }
  .countdown { gap: 1rem; }
  .countdown-num { font-size: 1.8rem; }
  .diary-form { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
}
