:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #5d6a7c;
  --soft: #f5f7fb;
  --line: #d9e0ea;
  --panel: #ffffff;
  --blue: #1d6ed5;
  --blue-dark: #174f9c;
  --green: #15803d;
  --green-soft: #e8f7ee;
  --red: #b42318;
  --red-soft: #fff1f0;
  --amber: #a16207;
  --amber-soft: #fff7dd;
  --teal: #087f8c;
  --shadow: 0 18px 50px rgba(24, 33, 47, 0.12);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
}

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

a:hover {
  text-decoration: underline;
}

button,
input,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(29, 110, 213, 0.3);
  outline-offset: 2px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.carousel-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 4vw, 56px);
  color: #fff;
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.88), rgba(8, 12, 20, 0));
}

.topbar h1,
.admin-header h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.1;
}

.carousel-header h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1;
}

.campaign-mark {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.campaign-mark span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.carousel-header .campaign-mark span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.wall-layout {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 40px) 48px;
}

.wall-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  min-height: 210px;
  padding: clamp(22px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(29, 110, 213, 0.94), rgba(8, 127, 140, 0.88)),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.34), transparent 36%);
  color: #fff;
}

.wall-hero .eyebrow {
  color: #d8fbff;
}

.hero-copy h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1;
}

.hero-steps {
  display: grid;
  gap: 8px;
  min-width: 250px;
}

.hero-steps span {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.wall-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.wall-status span {
  color: var(--muted);
}

.error-state {
  border-color: #ffd1cc;
  background: var(--red-soft);
}

.empty-state {
  border-color: #f5df9e;
  background: var(--amber-soft);
}

.embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
  gap: 18px;
}

.embed-card,
.panel,
.post-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(24, 33, 47, 0.06);
}

.embed-card {
  min-height: 520px;
  overflow: hidden;
}

.embed-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.instagram-media {
  min-width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
}

.embed-card iframe {
  width: 100% !important;
  max-width: 100% !important;
}

.carousel-shell {
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 12, 20, 0.96), rgba(17, 45, 58, 0.96)),
    #080c14;
}

.embed-shell {
  height: 100vh;
  background: transparent;
}

.carousel-stage {
  position: relative;
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 100vh;
  overflow: hidden;
  padding: 108px 0 44px;
}

.carousel-track {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-inline: clamp(18px, 4vw, 54px);
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(255, 255, 255, 0.42) transparent;
  scrollbar-width: thin;
  will-change: scroll-position;
}

.embed-shell .carousel-stage {
  align-content: stretch;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
}

.embed-shell .carousel-track {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  --embed-gap: clamp(4px, 0.8vw, 8px);
  gap: var(--embed-gap);
  height: 100vh;
  padding: 0;
  overflow: hidden;
  scroll-snap-type: none;
  scrollbar-width: none;
  isolation: isolate;
}

.embed-shell .carousel-track::-webkit-scrollbar {
  display: none;
}

.mural-actions {
  position: fixed;
  top: 92px;
  right: clamp(12px, 2vw, 22px);
  z-index: 30;
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(5, 7, 12, 0.42);
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

.embed-shell .mural-actions {
  top: 10px;
  right: 10px;
  background: rgba(5, 7, 12, 0.36);
}

.mural-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: currentColor;
  cursor: pointer;
  padding: 0;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.mural-action:hover,
.mural-action:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.34);
}

.mural-action:active {
  transform: translateY(1px);
}

.mural-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.mural-action.active {
  background: rgba(29, 110, 213, 0.68);
  border-color: rgba(255, 255, 255, 0.48);
}

.mural-action-error {
  background: rgba(180, 35, 24, 0.78);
}

.mural-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.mural-action[aria-busy="true"] svg {
  animation: mural-spin 900ms linear infinite;
}

.photo-row {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  contain: paint;
}

.photo-row-track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: embed-marquee 132s linear infinite;
  will-change: transform;
}

.photo-row:nth-child(2) .photo-row-track {
  animation-duration: 146s;
  animation-name: embed-marquee-reverse;
}

.photo-row:nth-child(3) .photo-row-track {
  animation-duration: 158s;
}

.photo-row-set {
  display: flex;
  flex: 0 0 auto;
  gap: var(--embed-gap);
  height: 100%;
  padding-right: var(--embed-gap);
}

.embed-shell.embed-paused .photo-row-track {
  animation-play-state: paused;
}

.carousel-controls {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-inline: clamp(18px, 4vw, 54px);
}

.embed-shell .carousel-controls {
  display: none;
}

.carousel-control {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 8px 12px;
}

.carousel-control:hover {
  background: rgba(255, 255, 255, 0.2);
}

.photo-slide {
  --media-aspect-ratio: 4 / 5;
  position: relative;
  flex: 0 0 clamp(280px, 29vw, 430px);
  overflow: hidden;
  scroll-snap-align: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #080c14;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.embed-shell .photo-slide {
  width: auto;
  height: 100%;
  aspect-ratio: var(--media-aspect-ratio);
  flex: 0 0 auto;
  border: 1px solid #05070c;
  border-radius: 0;
  box-shadow: none;
  outline: 0;
  contain: paint;
}

.embed-shell .photo-crop {
  border-radius: 0;
}

.photo-slide.aspect-square {
  --media-aspect-ratio: 1 / 1;
}

.photo-slide.aspect-landscape {
  --media-aspect-ratio: 4 / 3;
  flex-basis: clamp(340px, 38vw, 560px);
}

.photo-slide.aspect-reel {
  --media-aspect-ratio: 9 / 16;
  flex-basis: clamp(220px, 22vw, 340px);
}

.embed-shell .photo-slide.aspect-landscape,
.embed-shell .photo-slide.aspect-reel {
  flex-basis: auto;
}

.photo-crop {
  position: relative;
  width: 100%;
  aspect-ratio: var(--media-aspect-ratio);
  overflow: hidden;
  background: #05070c;
}

.embed-shell .photo-crop {
  height: 100%;
}

.photo-crop .instagram-media {
  min-width: 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  background: #05070c !important;
}

.photo-crop iframe {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 760px !important;
  transform: translateY(-58px);
  transform-origin: top center;
}

.embed-shell .photo-crop iframe {
  transform: translateY(-58px) scale(1.01);
}

.photo-crop img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  object-fit: contain !important;
  display: block;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.photo-overlay:hover {
  text-decoration: none;
}

.carousel-state {
  width: min(520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.post-modal {
  width: min(560px, calc(100vw - 28px));
  max-height: min(86vh, 920px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0;
  overflow: visible;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.post-modal::backdrop {
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(8px);
}

.post-modal-shell {
  position: relative;
  display: grid;
  max-height: inherit;
}

.post-modal-close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.post-modal-close:hover {
  background: #f2f2f2;
}

.post-modal-content {
  overflow: auto;
  border-radius: var(--radius);
  padding: 0;
}

.post-modal-content .instagram-media {
  min-width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

@keyframes embed-marquee {
  from {
    transform: translateX(var(--wheel-offset, 0px));
  }
  to {
    transform: translateX(calc(var(--wheel-offset, 0px) - 50%));
  }
}

@keyframes embed-marquee-reverse {
  from {
    transform: translateX(calc(var(--wheel-offset, 0px) - 50%));
  }
  to {
    transform: translateX(var(--wheel-offset, 0px));
  }
}

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

.admin-shell {
  min-height: 100vh;
}

.header-actions,
.button-row,
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 32px) 48px;
}

.selection-layout {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 32px) 48px;
}

.selection-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 20px;
  align-items: end;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(24, 33, 47, 0.94), rgba(8, 127, 140, 0.86)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent);
  color: #fff;
}

.selection-hero .eyebrow {
  color: #d8fbff;
}

.selection-hero h2 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.body-copy {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.bookmarklet-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px dashed #b8c4d6;
  border-radius: var(--radius);
  background: #f8fafc;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}

.compact-item:hover {
  background: #fbfcff;
  text-decoration: none;
}

.compact-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item small,
.compact-empty span {
  color: var(--muted);
  font-weight: 700;
}

.compact-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.panel {
  padding: 18px;
}

.stats-panel {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-self: start;
}

.queue-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.stacked-form,
.post-list {
  display: grid;
  gap: 14px;
}

.stacked-form label {
  display: grid;
  gap: 6px;
}

.stacked-form span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

input,
textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 13px;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.button.primary {
  background: var(--blue);
  color: #fff;
}

.button.primary:hover {
  background: var(--blue-dark);
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button.compact {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 0.84rem;
}

.success-action {
  background: var(--green);
  color: #fff;
}

.danger-action {
  background: var(--red);
  color: #fff;
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.helper-text {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.helper-text[data-tone="success"] {
  color: var(--green);
}

.helper-text[data-tone="warning"] {
  color: var(--amber);
}

.helper-text[data-tone="error"] {
  color: var(--red);
}

.status-pill.success {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.danger {
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.neutral {
  background: #edf2f7;
  color: var(--muted);
}

.stat {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcff;
}

.stat span {
  display: block;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
}

.stat p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.segment {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  font-weight: 850;
  cursor: pointer;
}

.segment.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(24, 33, 47, 0.08);
}

.date-ruler-block {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.date-ruler-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.date-ruler-header strong {
  color: var(--ink);
}

.date-ruler {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}

.date-tick {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 9px 10px 8px;
  text-align: left;
}

.date-tick::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 12px;
  width: 2px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

.date-tick span {
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.date-tick strong {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1;
}

.date-tick.active {
  border-color: rgba(29, 110, 213, 0.45);
  background: #eef4ff;
  color: var(--blue-dark);
}

.date-tick.active::before {
  background: var(--blue);
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.bulk-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
}

.bulk-select-all input {
  width: auto;
}

.post-card {
  padding: 14px;
}

.post-card.selected {
  border-color: rgba(29, 110, 213, 0.5);
  box-shadow: 0 0 0 2px rgba(29, 110, 213, 0.18);
}

.post-main {
  display: grid;
  grid-template-columns: auto clamp(82px, 9vw, 112px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.post-select {
  display: flex;
  padding-top: 2px;
}

.post-select input {
  width: auto;
}

.post-main > * {
  min-width: 0;
}

.post-thumb {
  --thumb-aspect-ratio: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: var(--thumb-aspect-ratio);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef2f7;
  color: var(--muted);
  text-decoration: none;
}

.post-thumb:hover {
  text-decoration: none;
  border-color: rgba(29, 110, 213, 0.36);
}

.post-thumb.aspect-portrait {
  --thumb-aspect-ratio: 4 / 5;
}

.post-thumb.aspect-square {
  --thumb-aspect-ratio: 1 / 1;
}

.post-thumb.aspect-landscape {
  --thumb-aspect-ratio: 4 / 3;
}

.post-thumb.aspect-reel {
  --thumb-aspect-ratio: 9 / 16;
}

.post-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.post-thumb-empty {
  border-style: dashed;
  background:
    linear-gradient(135deg, #f8fafc, #edf2f7);
}

.post-thumb-empty span {
  padding: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
}

.post-main h3 {
  margin: 10px 0 4px;
  font-size: 1rem;
}

.post-main a {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-author {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.post-times {
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: end;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--muted);
}

.post-actions {
  margin-top: 12px;
}

.empty-card,
.error-card {
  color: var(--muted);
}

.empty-card strong,
.error-card strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.skeleton-line {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8edf5, #f8fafc, #e8edf5);
  background-size: 200% 100%;
  animation: shimmer 1.25s infinite linear;
}

.skeleton-line.short {
  width: 42%;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 900px) {
  .topbar,
  .admin-header,
  .carousel-header,
  .wall-hero,
  .selection-hero,
  .wall-status,
  .section-heading,
  .post-main {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .selection-grid,
  .selection-hero {
    grid-template-columns: 1fr;
  }

  .stats-panel,
  .queue-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .post-times {
    justify-items: start;
  }

  .post-thumb {
    width: min(140px, 42vw);
  }

  .date-ruler-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .carousel-stage {
    padding-top: 138px;
  }

  .mural-actions {
    top: 118px;
  }

  .embed-shell .mural-actions {
    top: 8px;
    right: 8px;
  }

  .embed-shell .carousel-stage {
    padding: 0;
  }

  .photo-slide {
    flex-basis: min(78vw, 380px);
  }
}

@media (max-width: 560px) {
  .form-row,
  .stats-panel {
    grid-template-columns: 1fr;
  }

  .hero-steps {
    min-width: 0;
  }

  .compact-item {
    grid-template-columns: 1fr;
  }
}
