/*
  Theme: "Shadowspawn Slate"
  Dark is this app's native identity, so it's the :root default; the light
  variant only kicks in via OS preference or the explicit toggle. Whichever
  the user picks with the toggle always wins (data-theme beats the media
  query, which beats the :root default).
*/
:root {
  --bg: #0b0d10;
  --bg-alt: #14171b;
  --card-bg: #1a1e23;
  --gold: #b99b5c;
  --gold-bright: #d9bd82;
  --crimson: #b23b3b;
  --crimson-bright: #d65a5a;
  --text: #e7e9ea;
  --text-dim: #8b9299;
  --border: #2b3038;
  --on-accent: #f5f2ea;
  --glow: rgba(185, 155, 92, 0.45);
  --gold-wash: rgba(185, 155, 92, 0.1);
  --crimson-glow: rgba(178, 59, 59, 0.55);
  --success: #8fd19e;
  --error: #e08a8a;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef0f2;
    --bg-alt: #e2e5e8;
    --card-bg: #ffffff;
    --gold: #8a6d3a;
    --gold-bright: #6b5227;
    --crimson: #a5312f;
    --crimson-bright: #c23f3d;
    --text: #1c2024;
    --text-dim: #5b6169;
    --border: #d3d7db;
    --on-accent: #f5f2ea;
    --glow: rgba(138, 109, 58, 0.25);
    --gold-wash: rgba(138, 109, 58, 0.08);
    --crimson-glow: rgba(165, 49, 47, 0.35);
    --success: #2f7d47;
    --error: #b23a3a;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-alt: #14171b;
  --card-bg: #1a1e23;
  --gold: #b99b5c;
  --gold-bright: #d9bd82;
  --crimson: #b23b3b;
  --crimson-bright: #d65a5a;
  --text: #e7e9ea;
  --text-dim: #8b9299;
  --border: #2b3038;
  --on-accent: #f5f2ea;
  --glow: rgba(185, 155, 92, 0.45);
  --gold-wash: rgba(185, 155, 92, 0.1);
  --crimson-glow: rgba(178, 59, 59, 0.55);
  --success: #8fd19e;
  --error: #e08a8a;
}

:root[data-theme="light"] {
  --bg: #eef0f2;
  --bg-alt: #e2e5e8;
  --card-bg: #ffffff;
  --gold: #8a6d3a;
  --gold-bright: #6b5227;
  --crimson: #a5312f;
  --crimson-bright: #c23f3d;
  --text: #1c2024;
  --text-dim: #5b6169;
  --border: #d3d7db;
  --on-accent: #f5f2ea;
  --glow: rgba(138, 109, 58, 0.25);
  --gold-wash: rgba(138, 109, 58, 0.08);
  --crimson-glow: rgba(165, 49, 47, 0.35);
  --success: #2f7d47;
  --error: #b23a3a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: radial-gradient(circle at top, var(--bg-alt), var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.masthead {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 2px solid var(--gold);
  padding: 1.25rem 1.5rem 0;
}

.masthead-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 0.75rem; }

.brand-glyph-link {
  display: inline-flex;
  text-decoration: none;
  border-radius: 50%;
  transition: transform 0.4s ease;
}

.brand-glyph-link:hover { transform: rotate(25deg); }
.brand-glyph-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.brand-glyph {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--gold);
  filter: drop-shadow(0 0 6px var(--glow));
  transition: filter 0.2s ease;
}

.brand-glyph-link:hover .brand-glyph { filter: drop-shadow(0 0 9px var(--glow)); }

.brand-text h1 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  text-transform: uppercase;
}

.brand-text h1 .accent { color: var(--crimson); }

.tagline {
  margin: 0.15rem 0 0;
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

#theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#theme-toggle-btn:hover { border-color: var(--gold); color: var(--gold-bright); }

#theme-toggle-btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.5s ease; }

#theme-toggle-btn.spin svg { transform: rotate(180deg); }

.view-toggle {
  max-width: 1200px;
  margin: 1rem auto 0;
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  background: var(--bg);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.5rem 1.25rem;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.view-btn.active {
  background: var(--gold);
  color: var(--on-accent);
  font-weight: bold;
}

.filters {
  max-width: 1200px;
  margin: 0.75rem auto 0;
  display: flex;
  gap: 0.5rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  transition: all 0.15s ease;
}

.filter-btn:hover { border-color: var(--gold); color: var(--text); }

.filter-btn.active {
  background: var(--crimson);
  border-color: var(--crimson);
  color: var(--on-accent);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Hero banner */
.hero {
  display: flex;
  gap: 1.25rem;
  background: linear-gradient(90deg, var(--bg-alt), var(--card-bg));
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.hero-thumb {
  width: 160px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.hero-thumb-placeholder {
  width: 160px;
  aspect-ratio: 16/9;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--gold);
  background: var(--bg);
  border: 1px solid var(--border);
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--crimson-bright);
  font-weight: bold;
  margin: 0 0 0.3rem;
}

.hero-title {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
}

.hero-title a { color: var(--text); text-decoration: none; }
.hero-title a:hover { color: var(--gold-bright); }

.hero-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Guide grid (TV-guide style) */
.guide-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.guide-grid {
  display: grid;
  grid-template-columns: 200px repeat(4, minmax(220px, 1fr));
  min-width: 900px;
}

.guide-corner,
.guide-col-header {
  position: sticky;
  top: 0;
  background: var(--bg-alt);
  border-bottom: 2px solid var(--gold);
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  z-index: 2;
}

.guide-corner {
  position: sticky;
  left: 0;
  z-index: 3;
}

.guide-channel {
  position: sticky;
  left: 0;
  background: var(--bg-alt);
  border-right: 2px solid var(--gold);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.6rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.3rem;
  min-height: 96px;
  z-index: 1;
}

.channel-logo {
  flex: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.channel-logo img {
  max-width: 60px;
  max-height: 60px;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--border);
  background: var(--bg);
}

.channel-icon-fallback {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 1.3rem;
}

.logo-wrap {
  position: relative;
  display: inline-flex;
}

.live-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--crimson);
  color: var(--on-accent);
  font-size: 0.55rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  padding: 0.08rem 0.4rem;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 0 0 2px var(--bg-alt);
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--bg-alt), 0 0 0 0 var(--crimson-glow); }
  50% { box-shadow: 0 0 0 2px var(--bg-alt), 0 0 6px 2px var(--crimson-glow); }
}

.channel-name {
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.channel-type {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

.guide-cell {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 96px;
}

.guide-cell .program-chip {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-cell.empty {
  color: var(--text-dim);
  font-size: 0.8rem;
  align-items: center;
  justify-content: center;
}

.program-chip {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.35rem 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.3;
  position: relative;
}

.program-chip:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.program-chip .chip-time {
  display: block;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.15rem;
}

.chip-new {
  display: inline-block;
  align-self: flex-start;
  width: auto;
  background: var(--crimson);
  color: var(--on-accent);
  font-size: 0.6rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  padding: 0.05rem 0.35rem;
  border-radius: 8px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.guide-row-group {
  grid-column: 1 / -1;
  background: var(--bg);
  color: var(--gold);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.9rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  left: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gold);
  background: linear-gradient(135deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.source-badge {
  color: var(--gold-bright);
  font-weight: bold;
}

.type-badge {
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}

.card-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

.card-title a {
  color: var(--text);
  text-decoration: none;
}

.card-title a:hover { color: var(--gold-bright); }

.card-summary {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-time {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Feed view: one card per channel */
.channel-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.2rem 0.8rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: transparent;
  border: none;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}

.channel-card-logo {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-card-logo img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--border);
  background: var(--bg);
}

.channel-card .card-body {
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

/* Creator bio modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.modal-panel {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--gold);
  border-radius: 8px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: var(--gold-bright); }

.discord-gate-panel {
  max-width: 380px;
  padding: 1.5rem;
}

.discord-gate-panel h3 {
  margin: 0 0 0.6rem;
  color: var(--gold-bright);
  font-size: 1.1rem;
}

.discord-gate-copy {
  margin: 0 0 1.1rem;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.5;
}

.discord-gate-error {
  margin: 0.9rem 0 0;
  color: var(--crimson-bright);
  font-size: 0.82rem;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-logo .logo-wrap img,
.modal-logo .channel-icon-fallback {
  width: 64px;
  height: 64px;
  max-width: 64px;
  max-height: 64px;
}

.modal-name {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  color: var(--gold-bright);
}

.modal-bio {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 1rem;
}

.modal-bio-empty {
  color: var(--text-dim);
  font-style: italic;
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.link-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
}

.link-icon-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.link-icon-btn:hover { border-color: var(--gold); color: var(--gold-bright); }

.modal-visit-btn {
  display: block;
  text-align: center;
  background: var(--gold);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: bold;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.2rem;
  letter-spacing: 0.03em;
}

.modal-visit-btn:hover { background: var(--gold-bright); }

.modal-latest h4 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.modal-latest-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
}

.modal-latest-item:last-child { border-bottom: none; }
.modal-latest-item:hover { color: var(--gold-bright); }
.modal-latest-item .chip-time {
  flex-shrink: 0;
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.75rem;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
}

.hidden { display: none !important; }

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
}

/* Compendium view */
.compendium {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.history-section {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.history-card {
  background: var(--card-bg);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 1.75rem;
  flex: 1 1 480px;
}

.author-photos {
  flex: 1 1 260px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
}

.author-figure {
  flex: 1;
  min-height: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.author-figure img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--gold);
  display: block;
}

.author-figure figcaption {
  flex-shrink: 0;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--gold-bright);
  font-weight: bold;
}

.author-figure figcaption span {
  display: block;
  font-weight: normal;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.15rem;
}

.history-card h2 {
  margin: 0 0 1rem;
  color: var(--gold-bright);
  font-size: 1.3rem;
}

.history-card p {
  margin: 0 0 1rem;
  line-height: 1.65;
  color: var(--text);
}

.history-card p:last-child { margin-bottom: 0; }

.reference-links h2 {
  margin: 0 0 0.4rem;
  color: var(--gold-bright);
  font-size: 1.3rem;
}

.reference-intro {
  margin: 0 0 1rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.reference-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.reference-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.reference-card h3 {
  margin: 0 0 0.4rem;
  color: var(--gold-bright);
  font-size: 0.98rem;
}

.reference-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* The Peddler's Pack */
.peddler {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.peddler-intro {
  margin: 0;
  max-width: 72ch;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  font-style: italic;
}

/* Calendar */
.calendar {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.calendar-intro {
  margin: 0;
  max-width: 72ch;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  font-style: italic;
}

.calendar-intro #calendar-tz {
  color: var(--gold-bright);
  font-style: normal;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.7rem;
}

.day-col {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.day-col.today {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.day-head {
  padding: 0.65rem 0.5rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.day-name {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.day-col.today .day-name {
  color: var(--gold-bright);
  font-weight: bold;
}

.day-body {
  padding: 0.55rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.event-chip {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.event-chip:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.event-time {
  display: block;
  font-size: 0.68rem;
  color: var(--gold-bright);
  font-weight: bold;
  letter-spacing: 0.02em;
  margin-bottom: 0.15rem;
}

.event-title {
  display: block;
  color: var(--text);
}

.event-creator {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.1rem;
}

.day-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.55;
}

@media (max-width: 900px) {
  .week-grid {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    overflow-x: auto;
  }
}

