@font-face {
  font-family: "Open Sans";
  src: url("/fonts/open-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("/fonts/open-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --outer-bg: #e6e6e6;
  --sheet-bg: #ffffff;
  --sheet-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
  --tile-bg: #f1f1ef;
  --tile-hover-bg: #e8e8e4;
  --bg: #e6e6e6;
  --surface: #f1f1ef;
  --card: #ffffff;
  --card-hover: #f5f5f5;
  --text: #444444;
  --muted: #757575;
  --border: rgba(17, 17, 17, 0.14);
  --accent: #21759b;
  --accent-soft: rgba(33, 117, 155, 0.10);
  --ok: #059669;
}

[data-theme="dark"] {
  color-scheme: dark;
  --outer-bg: #111317;
  --sheet-bg: #1a1d23;
  --sheet-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  --tile-bg: #242933;
  --tile-hover-bg: #2d3442;
  --bg: #111317;
  --surface: #242933;
  --card: #1a1d23;
  --card-hover: #242933;
  --text: #d4d8df;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.22);
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.14);
  --ok: #34d399;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--outer-bg);
  color: var(--text);
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

.page-sheet {
  max-width: 980px;
  margin: 28px auto;
  padding: 28px 40px 52px;
  background-color: var(--sheet-bg);
  box-shadow: var(--sheet-shadow);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

@media (max-width: 680px) {
  .page-sheet {
    margin: 0;
    padding: 20px 18px 36px;
    box-shadow: none;
  }
}

.gallery-topbar {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  margin-bottom: 22px;
}

.gallery-title-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-back-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 140ms ease, background-color 140ms ease;
}

.gallery-back-chevron:hover {
  color: var(--accent);
  background-color: var(--tile-bg);
}

.gallery-crumb-link {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--muted);
  text-decoration: none;
  transition: color 140ms ease;
}

.gallery-crumb-link:hover {
  color: var(--accent);
}

.gallery-crumb-sep {
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}

.gallery-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.theme-dot-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #e4e6ea;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.theme-dot-btn:hover {
  background: #dadde2;
  border-color: rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

[data-theme="dark"] .theme-dot-btn {
  border-color: rgba(255, 255, 255, 0.09);
  background: #2b303a;
}

[data-theme="dark"] .theme-dot-btn:hover {
  background: #353b47;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.comic-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 12px;
  background-color: var(--tile-bg);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  transition: background-color 140ms ease, transform 140ms ease;
}

.comic-tile:hover {
  background-color: var(--tile-hover-bg);
  transform: translateY(-1px);
}

[hidden] { display: none !important; }

.comic-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.inline-viewer {
  grid-column: 1 / -1;
  background-color: var(--tile-bg);
  border-radius: 6px;
  padding: 18px 10px 16px;
}

.comic-stage-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: stretch;
  gap: 8px;
}

.comic-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 140ms ease, color 140ms ease;
}

.comic-nav-btn:hover {
  background-color: var(--tile-hover-bg);
  color: var(--text);
}

.comic-nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.carousel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.carousel-stage img {
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.comic-meta {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.inline-viewer .comic-date {
  font-size: 0.88rem;
  color: var(--muted);
}
/* Shared styles for reader (view.html) and uploader (upload.html) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--sheet-bg);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1rem;
}

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

.brand a:hover { color: var(--accent); }
.sep { color: var(--muted); }
.sub { color: var(--accent); }

.topnav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.topnav a:hover,
.topnav a.active { color: var(--accent); }

.theme-btn,
.btn {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-btn { border-radius: 999px; }
.btn:hover,
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  color: #ffffff;
  opacity: 0.92;
}

.muted { color: var(--muted); font-size: 0.9rem; }

.comic-date {
  color: var(--muted);
  font-size: 0.84rem;
}

.reader-wrap {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.reader-submeta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.reader-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.reader-head h1 { margin: 0; font-size: 1.45rem; font-weight: 400; }

.reader-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0;
}

.reader-nav-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.reader-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: var(--sheet-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  text-align: center;
}

.reader-art {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: opacity 160ms ease;
}

.reader-stage.is-loading .reader-art {
  opacity: 0.35;
}

.reader-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  pointer-events: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.reader-loading > span:last-child,
.reader-spinner {
  position: relative;
  z-index: 1;
}

.reader-loading::before {
  content: "";
  position: absolute;
  width: 132px;
  height: 40px;
  border-radius: 999px;
  background: var(--sheet-bg);
  border: 1px solid var(--border);
  box-shadow: var(--sheet-shadow);
  opacity: 0.94;
}

.reader-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: reader-spin 0.7s linear infinite;
}

@keyframes reader-spin {
  to {
    transform: rotate(360deg);
  }
}

.reader-foot {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.upload-card {
  max-width: 620px;
  margin: 1.5rem auto;
  background: var(--sheet-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field label { font-size: 0.88rem; font-weight: 600; }

.field input {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
}

.status-banner {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 0.9rem;
}

/* Comics Manager & Scheduler (/comics/admin/) */
.page-sheet-wide {
  max-width: 1180px;
}

.cm-gallery-manage-btn {
  padding: 0.22rem 0.65rem;
  font-size: 0.78rem;
  margin-left: 4px;
}

.cm-toast {
  position: sticky;
  top: 12px;
  z-index: 40;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--sheet-bg);
  border: 1px solid var(--border);
  box-shadow: var(--sheet-shadow);
}
.cm-toast.is-ok {
  border-color: var(--ok);
  color: var(--ok);
}
.cm-toast.is-error {
  border-color: #dc2626;
  color: #dc2626;
}
[data-theme="dark"] .cm-toast.is-error {
  border-color: #f87171;
  color: #f87171;
}

.cm-dropzone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--tile-bg);
  margin-bottom: 18px;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.cm-dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cm-drop-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cm-drop-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}
.cm-drop-copy {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cm-drop-copy strong {
  font-size: 0.98rem;
}
.cm-drop-copy span {
  font-size: 0.82rem;
  color: var(--muted);
}

.cm-upload-progress {
  margin-top: 12px;
}
.cm-progress-text {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.cm-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.cm-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 160ms ease;
}

.cm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cm-tabs {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cm-tab {
  background: var(--tile-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.cm-tab.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.cm-tab .cm-count {
  font-size: 0.76rem;
  opacity: 0.85;
}

.cm-filters-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cm-rank-filter,
.cm-subfilter-row {
  display: inline-flex;
  gap: 5px;
  flex-wrap: wrap;
}
.cm-subfilter-row {
  margin-bottom: 12px;
}

.cm-pill {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cm-pill.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.cm-select,
.cm-search {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.84rem;
  font-family: inherit;
}
.cm-search {
  min-width: 180px;
}

.cm-bulk-bar {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--sheet-bg);
  border: 1px solid var(--accent);
  box-shadow: var(--sheet-shadow);
}
.cm-bulk-left,
.cm-bulk-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.cm-bulk-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.cm-btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}
.cm-btn-danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.35);
}
[data-theme="dark"] .cm-btn-danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

.cm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 16px;
}

.cm-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.cm-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.cm-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--tile-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cm-select-box {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--sheet-bg);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cm-check {
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin: 0;
}

.cm-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--sheet-bg);
  border: 1px solid var(--border);
  color: var(--muted);
}
.cm-badge.is-posted {
  color: var(--ok);
  border-color: var(--ok);
}
.cm-badge.is-scheduled {
  color: var(--accent);
  border-color: var(--accent);
}
.cm-badge.is-bin {
  color: var(--muted);
}

.cm-thumb-btn {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 10px;
  background: transparent;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cm-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.cm-title-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  padding: 3px 6px;
  margin: 0 -6px;
}
.cm-title-input:hover {
  border-color: var(--border);
}
.cm-title-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.cm-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.cm-rank-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.cm-rank-btn {
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 3px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.cm-rank-btn:last-child {
  border-right: 0;
}
.cm-rank-btn.is-active {
  background: var(--accent);
  color: #ffffff;
}

.cm-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cm-mini-btn,
.cm-icon-link {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.cm-mini-btn:hover,
.cm-icon-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cm-mini-btn.is-danger:hover {
  border-color: #dc2626;
  color: #dc2626;
}

.cm-schedule-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.cm-date-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
  color: var(--muted);
}
.cm-date-input {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 0.8rem;
  font-family: inherit;
}
.cm-clear-date {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.cm-clear-date:hover {
  border-color: #dc2626;
  color: #dc2626;
}

.cm-empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--muted);
  background: var(--tile-bg);
  border-radius: 8px;
}

/* Modal & Lightbox */
.cm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.cm-modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--sheet-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: var(--sheet-shadow);
}
.cm-modal-dialog.is-wide {
  max-width: 920px;
}
.cm-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cm-modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.cm-close-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.cm-edit-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 8px;
  background: var(--tile-bg);
}
.cm-edit-preview img {
  width: 88px;
  height: 66px;
  object-fit: contain;
  border-radius: 4px;
}
.cm-edit-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}
.cm-edit-meta .cm-badge {
  position: static;
  align-self: flex-start;
}
.cm-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 560px) {
  .cm-two-col {
    grid-template-columns: 1fr;
  }
}
.field textarea {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}
.cm-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.cm-sched-preview {
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--tile-bg);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cm-sched-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.cm-lightbox-stage {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  background: var(--tile-bg);
  border-radius: 8px;
  padding: 12px 6px;
  margin-bottom: 12px;
}
.cm-lightbox-img {
  max-width: 100%;
  max-height: 66vh;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}
.cm-lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.cm-lightbox-bar .cm-date-label {
  flex: 0 1 180px;
}
