:root {
  --ink: #1b211e;
  --muted: #6c736e;
  --line: #dedfd9;
  --paper: #f6f4ef;
  --surface: #fffefa;
  --sidebar: #1e2a26;
  --sidebar-muted: #99a59f;
  --clay: #a26446;
  --clay-dark: #805038;
  --green: #304b46;
  --danger: #a1433e;
  --shadow: 0 20px 60px rgba(33, 42, 37, 0.11);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

/* Stage 5: isolated Instagram-style temporal preview surface */

.instagram-preview-shell {
  margin: 0 auto;
  max-width: 760px;
  position: relative;
}

.instagram-profile {
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 17px;
  box-shadow: 0 18px 55px rgba(28, 31, 29, 0.08);
  color: #0c1013;
  overflow: hidden;
  position: relative;
  width: min(100%, 700px);
}

.instagram-profile button,
.instagram-post-modal button,
.instagram-story-modal button {
  font: inherit;
}

.instagram-profile__nav {
  align-items: center;
  border-bottom: 1px solid #efefef;
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  min-height: 58px;
  padding: 0 18px;
}

.instagram-profile__nav strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.instagram-profile__nav > svg {
  margin-left: 5px;
}

.instagram-profile__nav button {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  justify-self: end;
  padding: 7px;
}

.instagram-profile__summary {
  align-items: center;
  display: grid;
  gap: clamp(30px, 8vw, 76px);
  grid-template-columns: auto 1fr;
  padding: 31px 42px 17px;
}

.instagram-avatar {
  align-items: center;
  border: 1px solid #d4d4d4;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  height: 106px;
  justify-content: center;
  object-fit: cover;
  width: 106px;
}

.instagram-avatar--initials {
  border: 4px solid #f6f6f6;
  box-shadow: 0 0 0 1px #d1d1d1;
  color: white;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 27px;
}

.instagram-avatar--compact {
  border-width: 1px;
  box-shadow: none;
  font-family: inherit;
  font-size: 10px;
  height: 34px;
  width: 34px;
}

.instagram-profile__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
}

.instagram-profile__stats > span {
  align-items: center;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: center;
}

.instagram-profile__stats strong {
  font-size: 18px;
  font-weight: 700;
}

.instagram-profile__stats small {
  font-size: 14px;
  margin-top: 2px;
}

.instagram-profile__bio {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.38;
  padding: 0 42px 18px;
}

.instagram-profile__bio > strong {
  font-weight: 650;
}

.instagram-profile__bio > span:not(.instagram-profile__link) {
  color: #737373;
}

.instagram-profile__bio p {
  margin: 2px 0 4px;
  white-space: pre-line;
}

.instagram-profile__link {
  align-items: center;
  color: #00376b;
  display: flex;
  font-weight: 650;
  gap: 5px;
}

.instagram-profile__actions {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 42px 22px;
}

.instagram-profile__actions span {
  background: #efefef;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  padding: 8px;
  text-align: center;
}

.instagram-stories {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 42px 20px;
  scrollbar-width: none;
}

.instagram-stories::-webkit-scrollbar {
  display: none;
}

.instagram-stories button {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  flex: 0 0 69px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 0;
}

.instagram-stories small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instagram-story-ring {
  align-items: center;
  background: linear-gradient(145deg, #feda75, #d62976 60%, #4f5bd5);
  border-radius: 50%;
  display: flex;
  height: 67px;
  justify-content: center;
  padding: 3px;
  width: 67px;
}

.instagram-story-ring > img,
.instagram-story-ring > .instagram-avatar {
  background: white;
  border: 2px solid white;
  border-radius: 50%;
  height: 61px;
  object-fit: cover;
  width: 61px;
}

.instagram-profile__tabs {
  border-top: 1px solid #dbdbdb;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 52px;
}

.instagram-profile__tabs span {
  align-items: center;
  color: #737373;
  display: flex;
  justify-content: center;
  position: relative;
}

.instagram-profile__tabs .is-active {
  color: #0c1013;
}

.instagram-profile__tabs .is-active::before {
  background: #0c1013;
  content: "";
  height: 1px;
  left: 18%;
  position: absolute;
  right: 18%;
  top: -1px;
}

.instagram-grid {
  background: #fff;
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.instagram-grid__tile {
  aspect-ratio: 3 / 4;
  background: #f0f0f0;
  border: 0;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.instagram-grid__tile::after {
  background: rgba(0, 0, 0, 0.12);
  content: "";
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity 140ms ease;
}

.instagram-grid__tile:hover::after,
.instagram-grid__tile:focus-visible::after {
  opacity: 1;
}

.instagram-grid__tile img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.instagram-grid-crop {
  display: block;
  height: 100%;
  width: 100%;
}

.instagram-grid__placeholder {
  align-items: center;
  color: #999;
  display: flex;
  height: 100%;
  justify-content: center;
}

.instagram-grid__kind,
.instagram-grid__pin {
  color: white;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.62));
  position: absolute;
  top: 10px;
  z-index: 2;
}

.instagram-grid__kind {
  right: 10px;
}

.instagram-grid__pin {
  left: 10px;
}

.instagram-grid--loading span {
  animation: instagram-pulse 1.3s ease-in-out infinite alternate;
  aspect-ratio: 3 / 4;
  background: #ececec;
}

.instagram-grid--loading span:nth-child(3n + 2) {
  animation-delay: 180ms;
}

@keyframes instagram-pulse {
  to { background: #f7f7f7; }
}

.instagram-grid-empty {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 70px 25px;
  text-align: center;
}

.instagram-grid-empty > span {
  align-items: center;
  border: 2px solid #111;
  border-radius: 50%;
  display: flex;
  height: 66px;
  justify-content: center;
  width: 66px;
}

.instagram-grid-empty strong {
  font-size: 23px;
  margin-top: 15px;
}

.instagram-grid-empty p {
  color: #737373;
  font-size: 13px;
  margin: 7px 0 16px;
}

.instagram-grid-empty button {
  background: transparent;
  border: 0;
  color: #0095f6;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.instagram-profile__refresh {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 4px 17px rgba(0, 0, 0, 0.12);
  display: flex;
  font-size: 11px;
  gap: 6px;
  left: 50%;
  padding: 7px 10px;
  position: absolute;
  top: 67px;
  transform: translateX(-50%);
  z-index: 3;
}

.instagram-profile__error {
  background: #fff0ee;
  color: #9a3e35;
  font-size: 12px;
  margin: 0;
  padding: 10px 18px;
  text-align: center;
}

.temporal-control__date {
  align-items: center;
  background: color-mix(in srgb, var(--account-accent) 11%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--account-accent) 82%, black);
  cursor: pointer;
  display: flex;
  font-size: 18px;
  font-weight: 700;
  gap: 6px;
  min-height: 44px;
  min-width: 110px;
  justify-content: center;
  padding: 8px 16px;
  position: relative;
}

.temporal-control__date input {
  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
  font-size: 16px;
}

.temporal-control__date:focus-within {
  outline: 2px solid var(--account-accent);
  outline-offset: 3px;
}

.instagram-modal-backdrop {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(5, 7, 6, 0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 70;
}

.instagram-post-modal {
  background: white;
  border-radius: 13px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  width: min(500px, 100%);
}

.instagram-post-modal > header {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr auto;
  min-height: 58px;
  padding: 8px 13px;
}

.instagram-post-modal > header > span {
  display: flex;
  flex-direction: column;
  font-size: 12px;
}

.instagram-post-modal > header small {
  font-size: 10px;
}

.instagram-post-modal > header button,
.instagram-post-modal > footer button,
.instagram-story-modal header button {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
}

.instagram-post-media {
  align-items: center;
  background: #ececea;
  display: flex;
  justify-content: center;
  max-height: 62vh;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.instagram-post-media > img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.instagram-post-media > span {
  align-items: center;
  color: #7a7a78;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.instagram-post-media > button,
.instagram-story-modal > button {
  align-items: center;
  background: rgba(15, 15, 15, 0.58);
  border: 0;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  z-index: 3;
}

.instagram-post-media > button:disabled {
  opacity: 0;
  pointer-events: none;
}

.instagram-post-media__previous,
.instagram-story-previous {
  left: 11px;
}

.instagram-post-media__next,
.instagram-story-next {
  right: 11px;
}

.instagram-carousel-dots {
  bottom: 12px;
  display: flex;
  gap: 4px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  z-index: 2;
}

.instagram-carousel-dots i {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.instagram-carousel-dots .is-active {
  background: #0095f6;
}

.instagram-post-copy {
  font-size: 13px;
  padding: 11px 14px 15px;
}

.instagram-post-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
}

.instagram-post-actions svg:last-child {
  margin-left: auto;
}

.instagram-post-copy p {
  line-height: 1.42;
  margin: 5px 0;
  white-space: pre-line;
}

.instagram-post-copy em {
  color: #737373;
}

.instagram-post-tags {
  color: #00376b;
}

.instagram-post-audio {
  align-items: center;
  display: flex;
  font-size: 11px;
  font-weight: 600;
  gap: 5px;
  margin: 8px 0;
}

.instagram-post-copy > small {
  color: #737373;
  display: block;
  font-size: 9px;
  margin-top: 9px;
  text-transform: uppercase;
}

.instagram-post-modal > footer {
  align-items: center;
  background: #f7f7f7;
  border-top: 1px solid #e7e7e7;
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  padding: 10px 14px;
  text-transform: capitalize;
}

.instagram-post-modal > footer button {
  color: var(--account-accent);
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
}

.instagram-modal-backdrop--story {
  background: rgba(0, 0, 0, 0.9);
}

.instagram-story-modal {
  aspect-ratio: 9 / 16;
  background: linear-gradient(145deg, #2d2c2b, #111);
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  color: white;
  max-height: calc(100vh - 34px);
  overflow: hidden;
  position: relative;
  width: min(390px, calc((100vh - 34px) * 9 / 16), 100%);
}

.instagram-story-progress {
  display: flex;
  gap: 3px;
  left: 9px;
  position: absolute;
  right: 9px;
  top: 9px;
  z-index: 4;
}

.instagram-story-progress i {
  background: rgba(255, 255, 255, 0.38);
  border-radius: 99px;
  flex: 1;
  height: 2px;
}

.instagram-story-progress .is-active {
  background: white;
}

.instagram-story-modal > header {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto auto 1fr auto;
  left: 0;
  padding: 18px 12px 9px;
  position: absolute;
  right: 0;
  text-shadow: 0 1px 4px black;
  top: 0;
  z-index: 3;
}

.instagram-story-modal > header small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
}

.instagram-story-modal > header button {
  color: white;
}

.instagram-story-modal > img,
.instagram-story-modal__empty {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.instagram-story-modal__empty {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.instagram-story-modal > p {
  background: rgba(0, 0, 0, 0.42);
  border-radius: 7px;
  left: 16%;
  line-height: 1.35;
  margin: 0;
  padding: 9px 12px;
  position: absolute;
  right: 16%;
  text-align: center;
  text-shadow: 0 1px 4px black;
  top: 48%;
}

.instagram-story-cta {
  background: white;
  border-radius: 999px;
  bottom: 38px;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  left: 50%;
  padding: 9px 18px;
  position: absolute;
  transform: translateX(-50%);
}

@media (max-width: 700px) {
  .instagram-profile {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    margin-left: -18px;
    margin-right: -18px;
    width: calc(100% + 36px);
  }

  .instagram-profile__nav {
    min-height: 51px;
    padding: 0 13px;
  }

  .instagram-profile__summary {
    gap: 18px;
    padding: 23px 18px 13px;
  }

  .instagram-avatar {
    height: 82px;
    width: 82px;
  }

  .instagram-avatar--compact {
    height: 32px;
    width: 32px;
  }

  .instagram-profile__stats strong {
    font-size: 16px;
  }

  .instagram-profile__stats small {
    font-size: 12px;
  }

  .instagram-profile__bio,
  .instagram-profile__actions,
  .instagram-stories {
    padding-left: 18px;
    padding-right: 18px;
  }

  .instagram-profile__bio {
    font-size: 13px;
  }

  .instagram-profile__actions {
    padding-bottom: 18px;
  }

  .instagram-profile__actions span {
    font-size: 12px;
    padding: 7px 5px;
  }

  .instagram-grid-empty {
    min-height: 330px;
  }

  .instagram-modal-backdrop {
    padding: 0;
  }

  .instagram-post-modal {
    border-radius: 0;
    max-height: 100vh;
    width: 100%;
  }

  .instagram-story-modal {
    border-radius: 0;
    max-height: 100vh;
    width: min(100%, calc(100vh * 9 / 16));
  }

  .temporal-control__date {
    min-width: 78px;
  }
}

@media (max-width: 430px) {
  .instagram-profile__summary {
    gap: 12px;
  }

  .instagram-avatar {
    height: 72px;
    width: 72px;
  }

  .instagram-profile__stats strong {
    font-size: 15px;
  }

  .instagram-profile__stats small {
    font-size: 11px;
  }

  .instagram-story-ring {
    height: 59px;
    width: 59px;
  }

  .instagram-story-ring > img,
  .instagram-story-ring > .instagram-avatar {
    height: 53px;
    width: 53px;
  }

  .instagram-stories button {
    flex-basis: 61px;
  }
}

/* Stage 8: reproducible reference snapshots and side-by-side comparison */

.compare-workspace {
  margin: 0 auto;
  max-width: none;
  min-width: 0;
  padding: 38px clamp(18px, 3vw, 46px) 54px;
}

.compare-heading {
  align-items: flex-end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 27px;
}

.compare-heading h1 {
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0 0 12px;
}

.compare-heading h1 em {
  color: var(--account-accent);
  font-style: italic;
  font-weight: 500;
}

.compare-heading > div > p:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-width: 720px;
}

.compare-notice {
  align-items: center;
  background: #edf3ef;
  border: 1px solid #d3e3d9;
  border-radius: 9px;
  color: #3c6657;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  gap: 8px;
  margin: 0 0 13px auto;
  padding: 8px 10px;
}

.compare-notice svg:last-child {
  margin-left: 5px;
}

.compare-error {
  margin-bottom: 14px;
}

.meta-connection-card {
  align-items: center;
  background: color-mix(in srgb, var(--account-accent) 5%, white);
  border: 1px solid color-mix(in srgb, var(--account-accent) 24%, #deddd8);
  border-radius: 13px;
  display: flex;
  gap: 12px;
  margin-bottom: 13px;
  min-height: 62px;
  padding: 11px 13px;
}

.meta-connection-card.is-connected {
  background: #edf5f0;
  border-color: #cae0d1;
}

.meta-connection-card.is-warning,
.meta-connection-card.is-unconfigured {
  background: #f7f3e9;
  border-color: #e6d9bc;
}

.meta-connection-card.is-loading {
  color: var(--muted);
  font-size: 11px;
}

.meta-connection-card__icon {
  align-items: center;
  background: white;
  border: 1px solid rgba(35, 42, 38, 0.09);
  border-radius: 50%;
  color: var(--account-accent);
  display: flex;
  flex: 0 0 auto;
  height: 35px;
  justify-content: center;
  width: 35px;
}

.meta-connection-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.meta-connection-card strong {
  font-size: 12px;
}

.meta-connection-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.meta-connection-card .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.api-capture-status {
  align-items: center;
  background: #eef4f2;
  border: 1px solid #d0dfda;
  border-radius: 10px;
  color: #41675a;
  display: flex;
  gap: 9px;
  margin: 12px 0;
  padding: 10px 12px;
}

.api-capture-status.is-failed {
  background: #fff1ef;
  border-color: #efd0cb;
  color: #9a483e;
}

.api-capture-status > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.api-capture-status strong {
  font-size: 11px;
}

.api-capture-status small {
  color: currentColor;
  font-size: 9px;
  opacity: 0.82;
}

.compare-empty {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  padding: 80px 24px;
  text-align: center;
}

.compare-empty > span {
  align-items: center;
  background: color-mix(in srgb, var(--account-accent) 10%, white);
  border-radius: 50%;
  color: var(--account-accent);
  display: flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.compare-empty h2 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 27px;
  font-weight: 500;
  margin: 17px 0 7px;
}

.compare-empty p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 500px;
}

.compare-empty--inline {
  align-items: center;
  flex-direction: row;
  gap: 15px;
  justify-content: flex-start;
  margin: 12px 0;
  padding: 18px;
  text-align: left;
}

.compare-empty--inline h2 {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 3px;
}

.compare-empty--inline p {
  margin: 0;
}

.compare-empty--inline .button {
  margin-left: auto;
}

.compare-toolbar {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 1fr) minmax(185px, 1.1fr) minmax(145px, 0.75fr) auto auto auto auto;
  padding: 13px;
}

.compare-toolbar > label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.compare-toolbar > label > span {
  color: #777d79;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding-left: 2px;
  text-transform: uppercase;
}

.compare-toolbar select,
.compare-toolbar input {
  background: #f6f4ef;
  border: 1px solid #e0dfda;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  height: 37px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.compare-segmented {
  background: #f0eee9;
  border-radius: 8px;
  display: flex;
  height: 37px;
  padding: 3px;
}

.compare-segmented button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #777c78;
  cursor: pointer;
  display: flex;
  font-size: 10px;
  gap: 5px;
  padding: 0 9px;
  white-space: nowrap;
}

.compare-segmented button.is-active {
  background: white;
  box-shadow: 0 1px 3px rgba(27, 33, 30, 0.1);
  color: var(--ink);
  font-weight: 700;
}

.compare-toolbar__capture {
  height: 37px;
  white-space: nowrap;
}

.snapshot-insights {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(125px, 1fr)) minmax(160px, 1.15fr);
  margin: 12px 0;
  overflow: hidden;
}

.snapshot-insights > div {
  align-items: center;
  border-right: 1px solid #ebe9e4;
  display: flex;
  gap: 10px;
  min-height: 66px;
  padding: 12px 14px;
}

.snapshot-insights > div:last-child {
  border-right: 0;
}

.snapshot-insights svg {
  color: var(--account-accent);
  flex: 0 0 auto;
}

.snapshot-insights > div > span:first-of-type {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.snapshot-insights small {
  color: #8a8f8b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.snapshot-insights strong {
  font-size: 11px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-insights__palette {
  justify-content: space-between;
}

.snapshot-insights__palette > span:last-child {
  display: flex;
  flex-direction: row;
  gap: 3px;
}

.snapshot-insights__palette i {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  display: block;
  height: 17px;
  width: 17px;
}

.comparison-panes {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-top: 16px;
  align-items: flex-start;
}

.comparison-pane {
  container-type: inline-size;
  flex: 1 0 320px;
  max-width: 100%;
  background: #e9e7e2;
  border: 1px solid #d8d7d2;
  border-radius: 14px;
  min-width: 0;
  overflow: hidden;
}

.comparison-pane__buttons, .reference-pane__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.reference-pane__tools { padding: 12px; background: var(--surface); }
.reference-pane__tools label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; }
.reference-pane__tools select { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; font: inherit; }
.reference-pane__actions .button { font-size: 11px; padding: 8px 10px; }
.reference-palette { margin: 12px 0; display: grid; gap: 7px; font-size: 12px; }
.reference-palette > div { display: flex; flex-wrap: wrap; gap: 5px; }
.reference-palette > div > span { flex: 1 1 44px; min-width: 0; text-align: center; }
.reference-palette i { display: block; height: 30px; border: 1px solid #0002; border-radius: 5px; margin-bottom: 4px; }
.reference-palette code { font-size: 10px; }
.reference-palette small { color: var(--muted); }
.reference-pane__research { font-size: 12px; margin-top: 10px; }
.reference-pane__research summary { cursor: pointer; }
.reference-pane__research .snapshot-insights { grid-template-columns: 1fr; }
.compare-toolbar { display: flex; flex-wrap: wrap; align-items: end; }
.compare-toolbar > label { flex: 1 1 180px; }
.compare-toolbar > .button { min-height: 37px; }
.comparison-panes--row-aligned .reference-pane__tools { height: 250px; box-sizing: border-box; overflow-y: auto; }
.comparison-context-toggle { display: flex !important; align-items: center; gap: 8px; }
.comparison-context-toggle input { width: auto !important; }
.comparison-help, .comparison-provenance { color: var(--muted); font-size: 12px; }
.comparison-provenance { display: block; margin: 6px 0; }
.comparison-grid__context { position: absolute; bottom: 0; left: 0; right: 0; padding: 4px; background: #ffffffdf; color: #183f38; font-size: 10px; overflow-wrap: anywhere; }
.comparison-grid__tile > .instagram-grid-crop { width: 100%; height: 100%; }
@container (max-width: 480px) {
  .comparison-profile__summary { padding: 16px 12px; gap: 12px; }
  .comparison-profile__avatar { height: 60px; width: 60px; flex-shrink: 0; }
  .comparison-profile__bio, .comparison-profile__actions { padding-left: 12px; padding-right: 12px; }
}

.comparison-pane > header {
  align-items: center;
  background: #f8f7f3;
  border-bottom: 1px solid #d8d7d2;
  display: flex;
  height: 42px;
  justify-content: space-between;
  padding: 0 13px;
}

.comparison-pane > header > span {
  align-items: center;
  display: flex;
  font-size: 10px;
  font-weight: 750;
  gap: 7px;
}

.comparison-pane > header small {
  color: #7c817d;
  font-size: 9px;
}

.comparison-pane > header button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #676d69;
  cursor: pointer;
  display: flex;
  padding: 5px;
}

.comparison-dot {
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.comparison-dot--managed {
  background: var(--account-accent);
}

.comparison-dot--reference {
  background: #69736d;
}

.comparison-pane__scroll {
  height: min(72vh, 820px);
  min-height: 570px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 13px;
  scrollbar-color: #bbbdb8 transparent;
  scrollbar-width: thin;
}

.comparison-profile {
  background: white;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(28, 31, 29, 0.07);
  color: #111;
  margin: 0 auto;
  max-width: 620px;
  overflow: hidden;
}

.comparison-profile__bar {
  align-items: center;
  border-bottom: 1px solid #efefef;
  display: flex;
  font-size: 13px;
  height: 49px;
  justify-content: center;
  padding: 0 15px;
  position: relative;
}

.comparison-profile__bar strong {
  letter-spacing: -0.02em;
}

.comparison-profile__bar span {
  letter-spacing: 2px;
  position: absolute;
  right: 15px;
}

.comparison-profile__head {
  background: white;
}

.comparison-panes--row-aligned .comparison-profile__head {
  height: 270px;
  overflow: auto;
}

.comparison-profile__summary {
  align-items: center;
  display: grid;
  gap: clamp(18px, 5vw, 48px);
  grid-template-columns: auto 1fr;
  padding: 26px 30px 14px;
}

.comparison-profile__avatar {
  align-items: center;
  border: 4px solid #f4f4f4;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #d1d1d1;
  color: white;
  display: flex;
  font-family: Georgia, serif;
  font-size: 22px;
  height: 88px;
  justify-content: center;
  width: 88px;
}

.comparison-profile__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.comparison-profile__stats span {
  align-items: center;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.comparison-profile__stats strong {
  font-size: 15px;
}

.comparison-profile__stats small {
  font-size: 11px;
  margin-top: 2px;
}

.comparison-profile__bio {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  line-height: 1.38;
  padding: 0 30px 14px;
}

.comparison-profile__bio > span:not(.comparison-profile__link) {
  color: #737373;
}

.comparison-profile__bio p {
  margin: 2px 0 4px;
  white-space: pre-line;
}

.comparison-profile__link {
  align-items: center;
  color: #00376b;
  display: flex;
  font-weight: 650;
  gap: 4px;
}

.comparison-profile__actions {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 30px 18px;
}

.comparison-profile__actions span {
  background: #efefef;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 650;
  padding: 7px;
  text-align: center;
}

.comparison-profile__tabs {
  align-items: center;
  border-top: 1px solid #dbdbdb;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 45px;
  justify-items: center;
}

.comparison-profile__tabs svg:first-child {
  color: #111;
}

.comparison-profile__tabs svg:not(:first-child) {
  color: #737373;
}

.comparison-grid {
  background: white;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.comparison-grid__tile {
  align-items: center;
  aspect-ratio: 3 / 4;
  background: #eeefec;
  color: #a5aaa6;
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.comparison-grid__tile > img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.comparison-grid__reference-button { border: 0; padding: 0; width: 100%; cursor: pointer; }
.comparison-grid__reference-button:focus-visible { outline: 3px solid #a26446; outline-offset: -3px; }
.reference-post-dialog { border: 0; border-radius: 12px; padding: 20px; width: min(900px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; color: #26332e; }
.reference-post-dialog::backdrop { background: rgb(0 0 0 / 65%); }
.reference-post-dialog > header, .reference-post-dialog > nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.reference-post-dialog > header h2 { font-size: 18px; margin: 0; }
.reference-post-dialog__media { display: flex; align-items: center; justify-content: center; min-height: 200px; background: #eeefec; margin-bottom: 14px; }
.reference-post-dialog__media img { display: block; max-width: 100%; max-height: 60vh; object-fit: contain; }
.reference-post-dialog__details { line-height: 1.5; }
.reference-post-dialog__caption { white-space: pre-wrap; overflow-wrap: anywhere; }

.comparison-grid__tile > i {
  color: white;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  font-style: normal;
  position: absolute;
  right: 7px;
  top: 7px;
}

.comparison-grid__tile.is-processing {
  background: linear-gradient(130deg, #ecece9, #f7f7f5, #e9eae7);
  background-size: 200% 200%;
}

.comparison-grid__engagement {
  align-items: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.68));
  bottom: 0;
  color: white;
  display: flex;
  gap: 7px;
  left: 0;
  padding: 18px 6px 6px;
  position: absolute;
  right: 0;
}

.comparison-grid__engagement small {
  align-items: center;
  display: flex;
  font-size: 8px;
  font-weight: 700;
  gap: 2px;
}

.comparison-grid--loading span {
  animation: compare-pulse 1.3s ease-in-out infinite alternate;
  aspect-ratio: 3 / 4;
  background: #eff0ed;
}

@keyframes compare-pulse {
  to { background: #e2e4e0; }
}

.comparison-profile__empty,
.comparison-profile-empty {
  align-items: center;
  color: #8a8f8b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  padding: 30px;
  text-align: center;
}

.comparison-profile__empty strong,
.comparison-profile-empty strong {
  color: #555c57;
  font-size: 12px;
  margin: 9px 0 4px;
}

.comparison-profile__empty small,
.comparison-profile-empty p {
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
  max-width: 250px;
}

.reference-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 40px);
  overflow: auto;
  width: min(1040px, calc(100vw - 36px));
}

.reference-dialog--small {
  width: min(520px, calc(100vw - 36px));
}

.reference-dialog > header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 20px 22px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
}

.reference-dialog > header h2 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  margin: 2px 0 0;
}

.reference-dialog > form {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: 22px;
}

.reference-dialog > form > footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 4px -22px -22px;
  padding: 16px 22px;
}

.reference-handle-field {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  overflow: hidden;
}

.reference-handle-field > span {
  color: #858b87;
  font-size: 12px;
  padding-left: 11px;
}

.reference-handle-field input {
  border: 0 !important;
}

.reference-policy-note {
  background: #f3f1ec;
  border-radius: 8px;
  color: #656c67;
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
  padding: 10px 12px;
}

.snapshot-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.snapshot-form-grid__wide {
  grid-column: span 2;
}

.snapshot-images {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.snapshot-images__heading {
  align-items: center;
  background: #f5f3ee;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.snapshot-images__heading strong {
  font-size: 12px;
}

.snapshot-images__heading p {
  color: #747a76;
  font-size: 9px;
  margin: 3px 0 0;
}

.snapshot-images input[type="file"] {
  display: none;
}

.snapshot-import-tabs {
  background: #efede8;
  display: grid;
  gap: 3px;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
}

.snapshot-import-tabs button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #747a76;
  display: flex;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
  padding: 9px 12px;
}

.snapshot-import-tabs button.is-active {
  background: white;
  box-shadow: 0 1px 3px rgba(30, 35, 31, 0.09);
  color: #292e2b;
}

.snapshot-screenshot-import {
  border-top: 1px solid var(--line);
}

.snapshot-upload-empty {
  align-items: center;
  color: #7b817d;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 42px 20px;
  text-align: center;
}

.snapshot-upload-empty--screenshots {
  background: linear-gradient(145deg, #fafbf8, #f2f5ef);
  border: 1px dashed #b8c3b8;
  border-radius: 10px;
  margin: 12px;
}

.snapshot-upload-empty--screenshots svg {
  color: var(--account-accent);
}

.snapshot-upload-empty strong {
  color: #444b47;
  font-size: 12px;
  margin: 9px 0 4px;
}

.snapshot-upload-empty span {
  font-size: 9px;
  line-height: 1.5;
  max-width: 430px;
}

.screenshot-source-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 11px 12px;
}

.screenshot-source-toolbar > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.screenshot-source-toolbar strong {
  font-size: 11px;
}

.screenshot-source-toolbar span {
  color: #777d79;
  font-size: 9px;
}

.screenshot-source-toolbar > div:last-child {
  display: flex;
  gap: 6px;
}

.screenshot-overlap-note {
  align-items: center;
  background: #f7f2e8;
  border-bottom: 1px solid #e8deca;
  color: #76664a;
  display: flex;
  font-size: 9px;
  justify-content: space-between;
  padding: 7px 12px;
}

.screenshot-overlap-note button {
  background: transparent;
  border: 0;
  color: var(--account-accent);
  font: inherit;
  font-size: 9px;
  font-weight: 750;
  padding: 2px 0;
}

.screenshot-source-editor {
  background: #f7f6f2;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 430px;
  overflow: auto;
  padding: 10px;
}

.screenshot-source-card {
  align-items: flex-start;
  background: white;
  border: 1px solid #deded8;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: 128px minmax(0, 1fr);
  overflow: hidden;
  padding: 7px;
}

.screenshot-source-card__preview {
  background: #e9eae6;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.screenshot-source-card__preview img {
  display: block;
  height: auto;
  width: 100%;
}

.screenshot-source-card__preview > b {
  align-items: center;
  background: rgba(25, 29, 26, 0.8);
  border-radius: 50%;
  color: white;
  display: flex;
  font-size: 9px;
  height: 22px;
  justify-content: center;
  left: 6px;
  position: absolute;
  top: 6px;
  width: 22px;
  z-index: 2;
}

.screenshot-source-card__shade {
  background: rgba(22, 25, 23, 0.5);
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.screenshot-source-card__grid {
  display: grid;
  grid-auto-rows: 1fr;
  grid-template-columns: repeat(3, 1fr);
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.screenshot-source-card__grid span {
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(39, 145, 77, 0.75);
  min-height: 0;
}

.screenshot-source-card__controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 3px 3px 3px 0;
}

.screenshot-source-card__controls > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.screenshot-source-card__controls > .screenshot-source-card__identity {
  align-items: flex-start;
  flex-direction: row;
  gap: 5px;
  justify-content: space-between;
}

.screenshot-source-card__identity > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.screenshot-source-card__order {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
}

.screenshot-source-card__order button {
  align-items: center;
  background: #f1f1ed;
  border: 0;
  border-radius: 50%;
  color: #4b514d;
  display: flex;
  height: 23px;
  justify-content: center;
  padding: 0;
  width: 23px;
}

.screenshot-source-card__order button:disabled {
  opacity: 0.35;
}

.screenshot-source-card__controls strong {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screenshot-source-card__controls span {
  color: #7b817c;
  font-size: 8px;
  line-height: 1.4;
}

.screenshot-source-card__controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.screenshot-source-card__controls input[type="range"] {
  accent-color: var(--account-accent);
  display: block;
  width: 100%;
}

.screenshot-source-card__controls select {
  background: #f7f6f2;
  border: 1px solid #dcdcd6;
  border-radius: 6px;
  font: inherit;
  font-size: 9px;
  height: 29px;
  padding: 0 7px;
}

.screenshot-crop-status {
  align-items: center;
  background: #edf6ee;
  border-top: 1px solid #d7e8da;
  color: #477052;
  display: flex;
  font-size: 9px;
  gap: 6px;
  margin: 0;
  padding: 9px 12px;
}

.screenshot-crop-status.is-dirty {
  background: #fff7e7;
  border-color: #ead8af;
  color: #826327;
}

.snapshot-tile-review-heading {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 11px 12px 2px;
}

.snapshot-tile-review-heading > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.snapshot-tile-review-heading strong {
  font-size: 11px;
}

.snapshot-tile-review-heading span,
.snapshot-tile-review-heading small {
  color: #787e7a;
  font-size: 9px;
}

.snapshot-tile-review-heading small {
  background: #efefeb;
  border-radius: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.snapshot-no-tiles {
  color: #777d79;
  font-size: 10px;
  margin: 0;
  padding: 20px;
  text-align: center;
}

.snapshot-tile-editor {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-height: 520px;
  overflow: auto;
  padding: 10px;
}

.snapshot-tile-card {
  background: #f5f3ee;
  border: 1px solid #e1dfd9;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  padding: 5px;
}

.snapshot-tile-card__image {
  aspect-ratio: 3 / 4;
  background: #e8e8e5;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.snapshot-tile-card__image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.snapshot-tile-card__image > span {
  align-items: center;
  background: rgba(20, 24, 22, 0.75);
  border-radius: 50%;
  color: white;
  display: flex;
  font-size: 9px;
  font-weight: 700;
  height: 22px;
  justify-content: center;
  left: 6px;
  position: absolute;
  top: 6px;
  width: 22px;
}

.snapshot-tile-card__image > div {
  bottom: 5px;
  display: flex;
  gap: 3px;
  position: absolute;
  right: 5px;
}

.snapshot-tile-card__image button {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 0;
  border-radius: 50%;
  color: #343a36;
  display: flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.snapshot-tile-card__image button:disabled {
  opacity: 0.4;
}

.snapshot-tile-card > select,
.snapshot-tile-card > input {
  background: white;
  border: 1px solid #ddddd8;
  border-radius: 5px;
  color: #454b47;
  font: inherit;
  font-size: 9px;
  height: 28px;
  min-width: 0;
  padding: 0 5px;
  width: 100%;
}

.snapshot-tile-card__metrics {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.snapshot-tile-card__metrics label {
  align-items: center;
  background: white;
  border: 1px solid #ddddd8;
  border-radius: 5px;
  color: #777d79;
  display: flex;
  min-width: 0;
  padding-left: 4px;
}

.snapshot-tile-card__metrics input {
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 8px;
  height: 27px;
  min-width: 0;
  padding: 0 2px;
  width: 100%;
}

.snapshot-progress {
  align-items: center;
  color: var(--account-accent);
  display: flex;
  font-size: 10px;
  font-weight: 700;
  gap: 7px;
  margin: 0;
}

@media (max-width: 1280px) {
  .compare-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compare-segmented,
  .compare-toolbar__capture {
    justify-self: stretch;
  }

  .compare-segmented button {
    flex: 1;
    justify-content: center;
  }

  .snapshot-insights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .snapshot-insights > div:nth-child(3) {
    border-right: 0;
  }

  .snapshot-insights > div:nth-child(n + 4) {
    border-top: 1px solid #ebe9e4;
  }
}

@media (max-width: 1000px) {
  .comparison-profile__summary {
    gap: 16px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .comparison-profile__avatar {
    height: 70px;
    width: 70px;
  }

  .comparison-profile__bio,
  .comparison-profile__actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .snapshot-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .snapshot-tile-editor {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .compare-workspace {
    padding: 26px 13px 38px;
  }

  .compare-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .compare-heading .button {
    width: 100%;
  }

  .meta-connection-card {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .meta-connection-card > div {
    flex-basis: calc(100% - 50px);
  }

  .meta-connection-card .button {
    flex: 1;
  }

  .compare-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .compare-toolbar > label:first-child,
  .compare-toolbar > label:nth-child(2) {
    grid-column: span 1;
  }

  .compare-toolbar > label:nth-child(3),
  .compare-segmented,
  .compare-toolbar__capture {
    grid-column: span 2;
  }

  .snapshot-insights {
    grid-template-columns: 1fr 1fr;
  }

  .snapshot-insights > div {
    border-bottom: 1px solid #ebe9e4;
  }

  .snapshot-insights > div:nth-child(even) {
    border-right: 0;
  }

  .snapshot-insights__palette {
    grid-column: span 2;
  }

  .comparison-panes {
    grid-template-columns: 1fr;
  }

  .comparison-pane__scroll {
    height: 70vh;
  }

  .snapshot-tile-editor {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .screenshot-source-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .compare-heading h1 {
    font-size: 38px;
  }

  .compare-toolbar {
    grid-template-columns: 1fr;
  }

  .compare-toolbar > label:first-child,
  .compare-toolbar > label:nth-child(2),
  .compare-toolbar > label:nth-child(3),
  .compare-segmented,
  .compare-toolbar__capture {
    grid-column: auto;
  }

  .snapshot-form-grid {
    grid-template-columns: 1fr;
  }

  .snapshot-form-grid__wide {
    grid-column: auto;
  }

  .snapshot-images__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .snapshot-images__heading .button {
    justify-content: center;
    width: 100%;
  }

  .screenshot-source-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .screenshot-source-toolbar > div:last-child,
  .screenshot-source-toolbar .button {
    justify-content: center;
    width: 100%;
  }

  .screenshot-source-card {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .snapshot-tile-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  min-width: 320px;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--account-accent, var(--clay)) 30%, transparent);
  outline-offset: 2px;
}

#frameplan-root {
  min-height: 100vh;
}

.brand-lockup {
  align-items: center;
  color: #f7f3eb;
  display: flex;
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  gap: 10px;
  letter-spacing: -0.02em;
}

.brand-lockup--light {
  color: #fffaf2;
}

.brand-mark {
  align-items: center;
  background: var(--clay);
  border-radius: 8px 8px 8px 2px;
  color: white;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.eyebrow {
  color: #847e74;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.eyebrow--light {
  color: #b9c6c0;
}

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

.button {
  align-items: center;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 650;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button small {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 10px;
  font-weight: 500;
  margin-left: 2px;
  padding-left: 8px;
}

.button--primary {
  background: var(--account-accent, var(--clay));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--account-accent, var(--clay)) 22%, transparent);
  color: white;
}

.button--primary:not(:disabled):hover {
  background: color-mix(in srgb, var(--account-accent, var(--clay)) 86%, black);
}

.button--ghost {
  background: #efeee9;
  color: #4d534f;
}

.button--wide {
  width: 100%;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #59605c;
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.icon-button:hover {
  background: #f2f1ec;
  color: var(--ink);
}

.spin {
  animation: spin 900ms linear infinite;
}

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

/* Authentication */

.login-page {
  background: #f2efe8;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(420px, 0.95fr);
  min-height: 100vh;
}

.login-story {
  background:
    radial-gradient(circle at 18% 80%, rgba(162, 100, 70, 0.34), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(121, 142, 131, 0.2), transparent 28%),
    linear-gradient(142deg, #21332d 0%, #18231f 52%, #101916 100%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  overflow: hidden;
  padding: 42px clamp(38px, 6vw, 86px) 48px;
  position: relative;
}

.login-story::before,
.login-story::after {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
  height: 480px;
  position: absolute;
  right: -250px;
  top: 18%;
  width: 480px;
}

.login-story::after {
  height: 320px;
  right: -170px;
  top: calc(18% + 80px);
  width: 320px;
}

.login-story__copy {
  max-width: 580px;
  position: relative;
  z-index: 1;
}

.login-story__copy h1 {
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: clamp(48px, 5.4vw, 78px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin: 0 0 28px;
}

.login-story__copy > p:last-child {
  color: #c8d0cc;
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: 19px;
  line-height: 1.55;
  margin: 0;
  max-width: 485px;
}

.login-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  position: relative;
  z-index: 1;
}

.login-proof span {
  align-items: center;
  color: #b9c5bf;
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
}

.login-panel {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 48px;
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 390px;
  width: 100%;
}

.login-card h2,
.settings-sheet h2 {
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: 37px;
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 0 0 7px;
}

.login-card > div:first-child > p:last-child {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.field {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
}

.field > span:first-child {
  color: #5d625e;
  font-size: 12px;
  font-weight: 650;
}

.field input:not([type="color"]),
.field select,
.field textarea {
  background: #fffefa;
  border: 1px solid #d4d5cf;
  border-radius: 9px;
  font-size: 14px;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.field textarea {
  line-height: 1.5;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #b8bbb4;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--account-accent, var(--clay));
  outline: 3px solid color-mix(in srgb, var(--account-accent, var(--clay)) 14%, transparent);
}

.form-error {
  background: #fff0ed;
  border: 1px solid #efc9c2;
  border-radius: 8px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
  margin: -8px 0 0;
  padding: 10px 12px;
}

.demo-note {
  color: #878b86;
  font-size: 11px;
  line-height: 1.55;
  margin: -6px 0 0;
  text-align: center;
}

.demo-note strong {
  color: #5b605c;
}

/* Application shell */

.app-shell {
  --account-accent: var(--clay);
  --account-secondary: var(--green);
  background: var(--paper);
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 25px 17px 20px;
}

.sidebar .brand-lockup {
  padding: 0 9px;
}

.main-nav {
  margin-top: 44px;
}

.nav-label {
  color: #718078;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 12px 10px;
  text-transform: uppercase;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--sidebar-muted);
  cursor: default;
  display: flex;
  font-size: 12px;
  gap: 11px;
  margin: 2px 0;
  min-height: 42px;
  padding: 0 11px;
  text-align: left;
  width: 100%;
}

.nav-item--active {
  background: rgba(255, 255, 255, 0.08);
  color: #f8f5ed;
  cursor: pointer;
}

.nav-item small {
  color: #6f7b75;
  font-size: 9px;
  margin-left: auto;
}

.sidebar__footer {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 18px 8px 0;
  min-width: 0;
}

.sidebar__footer > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar__footer strong {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__footer small {
  color: #7e8a84;
  font-size: 9px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar {
  align-items: center;
  background: #394b44;
  border-radius: 50%;
  color: #e6ded2;
  display: flex;
  flex: 0 0 auto;
  font-family: Georgia, serif;
  font-size: 12px;
  height: 31px;
  justify-content: center;
  width: 31px;
}

.workspace {
  min-width: 0;
}

.workspace-header {
  align-items: center;
  background: rgba(255, 254, 250, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 74px;
  justify-content: space-between;
  padding: 0 clamp(22px, 3.1vw, 48px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.workspace-header__actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.foundation-pill {
  align-items: center;
  background: #edf3ef;
  border-radius: 999px;
  color: #45675c;
  display: inline-flex;
  font-size: 10px;
  font-weight: 650;
  gap: 5px;
  margin-right: 6px;
  padding: 7px 10px;
}

.account-switcher {
  position: relative;
}

.account-switcher__button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin-left: -8px;
  min-width: 230px;
  padding: 7px 8px;
  text-align: left;
}

.account-switcher__button:hover {
  background: #f2f1ec;
}

.account-switcher__identity {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.account-switcher__identity strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-switcher__identity small {
  color: #858b86;
  font-size: 10px;
  margin-top: 2px;
}

.account-avatar {
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(35, 42, 38, 0.1);
  color: white;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 750;
  justify-content: center;
  object-fit: cover;
}

.account-avatar--small {
  height: 29px;
  width: 29px;
}

.account-avatar--medium {
  height: 36px;
  width: 36px;
}

.account-avatar--large {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 17px;
  height: 74px;
  width: 74px;
}

.account-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  left: -8px;
  min-width: 294px;
  overflow: hidden;
  padding: 7px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 50;
}

.account-menu__studio + .account-menu__studio {
  border-top: 1px solid #ebe9e2;
  margin-top: 6px;
  padding-top: 6px;
}

.account-menu__studio-label {
  align-items: center;
  color: #8a8f8b;
  display: flex;
  font-size: 9px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.08em;
  padding: 7px 9px 5px;
  text-transform: uppercase;
}

.account-menu__studio-label small {
  font-size: 8px;
}

.account-menu__option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.account-menu__option:hover,
.account-menu__option[aria-selected="true"] {
  background: #f3f1eb;
}

.account-menu__option > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.account-menu__option strong {
  font-size: 11px;
}

.account-menu__option small {
  color: #8a8f8b;
  font-size: 9px;
  margin-top: 2px;
}

.workspace-main {
  margin: 0 auto;
  max-width: 1500px;
  padding: 42px clamp(22px, 3.1vw, 48px) 48px;
}

.notice {
  align-items: center;
  background: #edf3ef;
  border: 1px solid #d4e2d9;
  border-radius: 8px;
  color: #45675c;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  gap: 12px;
  margin-bottom: 20px;
  margin-left: auto;
  padding: 8px 10px;
}

.workspace-intro {
  align-items: flex-end;
  display: flex;
  gap: 30px;
  justify-content: space-between;
  margin-bottom: 31px;
}

.workspace-intro h1 {
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: clamp(38px, 4vw, 57px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0 0 13px;
}

.workspace-intro h1 em {
  color: var(--account-accent);
  font-style: italic;
  font-weight: 500;
}

.workspace-intro > div > p:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-width: 630px;
}

.planner-grid {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.66fr);
}

.planner-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.schedule-card,
.profile-preview,
.account-rules-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.schedule-card {
  padding: 25px;
}

.card-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.card-heading h2 {
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0;
}

.cadence-chip {
  align-items: center;
  background: color-mix(in srgb, var(--account-accent) 10%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--account-accent) 80%, black);
  display: inline-flex;
  font-size: 10px;
  font-weight: 650;
  gap: 5px;
  padding: 7px 9px;
}

.week-strip {
  border-bottom: 1px solid #e8e7e1;
  border-top: 1px solid #e8e7e1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 22px;
  padding: 14px 0;
}

.week-day {
  align-items: center;
  border-right: 1px solid #ebeae5;
  display: flex;
  flex-direction: column;
  min-height: 63px;
  position: relative;
}

.week-day:last-child {
  border: 0;
}

.week-day span {
  color: #9a9e9a;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.week-day strong {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  margin-top: 6px;
}

.week-day i {
  background: transparent;
  border-radius: 50%;
  bottom: 0;
  height: 4px;
  position: absolute;
  width: 4px;
}

.week-day--today strong {
  color: var(--account-accent);
}

.week-day--today i {
  background: var(--account-accent);
}

.schedule-empty {
  align-items: center;
  display: flex;
  gap: 14px;
  padding: 23px 5px 3px;
}

.schedule-empty__icon,
.rule-icon {
  align-items: center;
  background: #f0eee8;
  border-radius: 10px;
  color: #787e79;
  display: flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.schedule-empty strong {
  font-size: 12px;
}

.schedule-empty p {
  color: #888d89;
  font-size: 10px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.account-rules-card {
  align-items: center;
  display: grid;
  gap: 15px;
  grid-template-columns: auto 1fr auto;
  padding: 20px 21px;
}

.account-rules-card h3 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 4px;
}

.account-rules-card p:last-child {
  color: #858a86;
  font-size: 10px;
  line-height: 1.45;
  margin: 0;
}

.account-rules-card > button {
  background: transparent;
  border: 0;
  color: var(--account-accent);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-preview {
  overflow: hidden;
  padding: 20px 20px 22px;
}

.profile-preview__topline {
  align-items: center;
  border-bottom: 1px solid #ebeae5;
  color: #747a76;
  display: flex;
  font-size: 9px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.08em;
  padding-bottom: 13px;
  text-transform: uppercase;
}

.preview-date {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.profile-header {
  align-items: center;
  display: grid;
  gap: clamp(18px, 3vw, 32px);
  grid-template-columns: auto 1fr;
  padding: 25px 7px 23px;
}

.profile-header__content {
  min-width: 0;
}

.profile-header__identity {
  align-items: center;
  display: flex;
  gap: 12px;
}

.profile-header__identity strong {
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-header__identity button {
  background: #ededeb;
  border: 0;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  padding: 6px 12px;
}

.profile-stats {
  display: flex;
  font-size: 9px;
  gap: 15px;
  margin-top: 15px;
  white-space: nowrap;
}

.profile-stats strong {
  font-size: 10px;
}

.profile-header__content > p {
  font-size: 9px;
  line-height: 1.45;
  margin: 13px 0 0;
}

.profile-tabs {
  border-top: 1px solid #e5e4df;
  display: flex;
  gap: 40px;
  justify-content: center;
  min-height: 35px;
}

.profile-tabs > span {
  align-items: center;
  color: #a1a4a1;
  display: flex;
  font-size: 8px;
  font-weight: 650;
  gap: 5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-tabs .profile-tabs__active {
  border-top: 1px solid #2e322f;
  color: #3a3f3b;
  margin-top: -1px;
}

.mini-grid {
  background:
    linear-gradient(90deg, currentColor 1px, transparent 1px) 0 0 / 4px 100%,
    linear-gradient(currentColor 1px, transparent 1px) 0 0 / 100% 4px;
  height: 9px;
  width: 9px;
}

.empty-grid {
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(3, 1fr);
}

.empty-grid__cell {
  align-items: center;
  aspect-ratio: 1;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.52), transparent),
    color-mix(in srgb, var(--account-secondary) 8%, #eceae3);
  display: flex;
  justify-content: center;
}

.empty-grid__cell:nth-child(2n) {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.45), transparent),
    color-mix(in srgb, var(--account-accent) 8%, #eceae3);
}

.empty-grid__cell span {
  align-items: center;
  color: #878c88;
  display: flex;
  flex-direction: column;
  font-size: 8px;
  gap: 6px;
  text-align: center;
}

.foundation-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.foundation-row article {
  align-items: flex-start;
  background: rgba(255, 254, 250, 0.64);
  border: 1px solid #e2e1dc;
  border-radius: 10px;
  display: flex;
  gap: 10px;
  padding: 14px;
}

.foundation-row article > span {
  color: var(--account-accent);
  display: flex;
}

.foundation-row strong {
  font-size: 10px;
}

.foundation-row p {
  color: #8d918e;
  font-size: 9px;
  line-height: 1.4;
  margin: 4px 0 0;
}

/* Account settings */
.post-status-badges { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.post-status-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 7px; padding: 5px 7px; font-size: 11px; font-weight: 650; line-height: 1.3; background: #f1eee8; color: #504a42; }
.post-status-badge--approved { background: #e2f1e8; color: #244c38; }
.post-status-badge--queued { background: #e3edf7; color: #23496c; }
.post-status-badge--attention { background: #ffeadb; color: #793c18; }
.post-status-badges--compact { position: absolute; bottom: 8px; left: 8px; right: 8px; z-index: 2; margin: 0; pointer-events: none; align-items: flex-start; flex-direction: column; }
.post-status-badges--compact .post-status-badge { box-shadow: 0 1px 5px #0002; font-size: clamp(8px, 1vw, 11px); padding: 4px 6px; }
.planning-grid__post .post-status-badges--compact { bottom: 40px; }
.publishing-timeline { max-width: 1080px; margin: 0 auto 40px; padding: 24px; background: #fffefa; border: 1px solid #e3dfd7; border-radius: 18px; }
.publishing-timeline > p, .publishing-timeline > small { color: #666a61; font-size: 13px; line-height: 1.6; }
.timeline-summary, .timeline-summary > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.timeline-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.timeline-filters button { border: 1px solid #ddd9d0; border-radius: 24px; padding: 9px 13px; background: transparent; font-size: 12px; cursor: pointer; }
.timeline-filters button[aria-pressed="true"] { background: #203b35; color: white; border-color: #203b35; }
.timeline-list { list-style: none; padding: 0; margin: 0; }
.timeline-item { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-top: 1px solid #e5e1da; }
.timeline-item__time { font-size: 14px; font-weight: 600; line-height: 1.5; }
.timeline-item__time small { display: block; margin-top: 8px; font-size: 11px; color: #914e2e; }
.timeline-item__content { min-width: 0; }
.timeline-item__content h3 { margin: 8px 0; overflow-wrap: anywhere; }
.timeline-item__content .eyebrow { display: flex; align-items: center; gap: 5px; }
.timeline-item__caption { font-size: 13px; color: #666a61; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.timeline-item__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.timeline-empty { text-align: center; padding: 45px 16px; color: #666a61; }
.timeline-empty p { font-size: 13px; line-height: 1.6; }
.composer-save-actions { flex-wrap: wrap; justify-content: flex-end; }
.composer-save-actions small { flex-basis: 100%; font-size: 11px; color: #666a61; text-align: right; }
.publishing-settings-disclosure { margin-top: 22px; font-size: 12px; }
.publishing-settings-disclosure summary, .manual-publishing-disclosure > summary { cursor: pointer; color: #59645b; padding: 10px 0; }
.manual-publishing-disclosure > summary { font-size: 14px; }
.manual-publishing-disclosure[open] > summary { margin-bottom: 15px; }
.automatic-publishing-card h2 { margin: 0 0 10px; font-size: 24px; }
.automatic-publishing-card > p { margin: 0 0 20px; }
.automatic-publishing-card small { color: #666a61; font-size: 12px; }
@media (max-width: 640px) {
  .publishing-timeline { padding: 16px; }
  .timeline-item { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .timeline-summary { flex-wrap: wrap; }
  .composer-save-actions small { text-align: left; }
  .mobile-section-tabs { overflow-x: auto; }
  .mobile-section-tabs button { flex-shrink: 0; }
}


.feed-refresh { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 440px; min-width: 0; }
.feed-refresh__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.feed-refresh p, .feed-refresh small { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.feed-refresh__details { display: grid; gap: 4px; }

.settings-backdrop {
  align-items: stretch;
  background: rgba(21, 27, 24, 0.36);
  display: flex;
  inset: 0;
  justify-content: flex-end;
  position: fixed;
  z-index: 100;
}

.settings-sheet {
  background: var(--surface);
  box-shadow: -24px 0 70px rgba(24, 31, 27, 0.15);
  max-width: 470px;
  overflow-y: auto;
  padding: 31px;
  width: 100%;
}

.settings-sheet__header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.settings-sheet h2 {
  font-size: 30px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 25px;
}

.settings-account-summary {
  align-items: center;
  background: #f2f0ea;
  border-radius: 11px;
  display: flex;
  gap: 15px;
  padding: 14px;
}

.settings-account-summary > span:last-child {
  display: flex;
  flex-direction: column;
}

.settings-account-summary strong {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 17px;
  font-weight: 500;
}

.settings-account-summary small {
  color: #858a86;
  font-size: 10px;
  margin-top: 3px;
}

.field-row {
  display: grid;
  gap: 13px;
  grid-template-columns: 1fr 1fr;
}

.color-field {
  align-items: center;
  background: #fffefa;
  border: 1px solid #d4d5cf;
  border-radius: 9px;
  display: flex;
  gap: 9px;
  min-height: 44px;
  padding: 6px 10px;
}

.color-field input {
  background: transparent;
  border: 0;
  height: 28px;
  padding: 0;
  width: 32px;
}

.color-field code {
  color: #707672;
  font-size: 11px;
}

.settings-sheet__footer {
  border-top: 1px solid #e5e4df;
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 7px;
  padding-top: 20px;
}

/* Loading and error states */

.account-publishing-settings { border: 1px solid #d9ded4; border-radius: 12px; padding: 18px; background: #f8f6f0; }
.account-publishing-settings h3 { font-size: 15px; margin: 0 0 10px; }
.account-publishing-settings p, .account-publishing-settings small { font-size: 12px; line-height: 1.6; }
.account-publishing-settings small { display: block; margin-top: 12px; }
.account-publishing-settings [role="switch"][aria-checked="true"] { background: #203b35; color: #fff; }

.add-account-dialog {
  background: #f8f6f0;
  border: 1px solid #d9ded4;
  border-radius: 16px;
  color: #203b35;
  max-height: calc(100dvh - 40px);
  max-width: 520px;
  overflow-y: auto;
  padding: 28px;
  text-align: left;
  width: calc(100% - 32px);
}

.add-account-dialog::backdrop { background: rgb(17 34 29 / 55%); }
.add-account-dialog form, .add-account-connection { display: grid; gap: 20px; }
.add-account-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.add-account-dialog h2 { font-size: 23px; margin: 0; }
.add-account-dialog p { font-size: 14px; line-height: 1.6; margin: 0; }
.add-account-dialog .field small { line-height: 1.5; }
.empty-account-state { padding: 28px; }
.empty-account-state > p { max-width: 520px; line-height: 1.6; }

.loading-state,
.fatal-state,
.empty-account-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.loading-state {
  color: #747b76;
  font-size: 12px;
}

.fatal-state h1,
.empty-account-state h1 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 38px;
  font-weight: 500;
  margin: 0;
}

.fatal-state p,
.empty-account-state p {
  color: var(--muted);
  margin: 0;
}

.fatal-state button {
  background: var(--green);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  margin-top: 8px;
  padding: 10px 15px;
}

/* Feed-first planner */

.planner-home {
  padding-bottom: calc(230px + env(safe-area-inset-bottom, 0px));
}

.feed-focus {
  align-items: center;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.feed-focus .profile-preview {
  max-width: 650px;
  width: 100%;
}

.feed-direction-card {
  margin: 18px auto 0;
  max-width: 650px;
}

.temporal-control {
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--account-accent) 18%, #d9d8d2);
  border-radius: 0;
  bottom: 0;
  box-shadow: 0 18px 50px rgba(26, 34, 29, 0.2);
  left: 218px;
  right: 0;
  padding: 16px max(24px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  position: fixed;
  width: auto;
  z-index: 18;
}

.temporal-control__heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.temporal-control__heading > span {
  align-items: center;
  display: flex;
  gap: 9px;
}

.temporal-control__heading > span > svg {
  color: var(--account-accent);
}

.temporal-control__heading > span > span {
  display: flex;
  flex-direction: column;
}

.temporal-control__heading strong {
  font-size: 20px;
}

.temporal-control__heading small {
  color: #616a64;
  font-size: 14px;
  margin-top: 2px;
}

.temporal-control output {
  background: color-mix(in srgb, var(--account-accent) 11%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--account-accent) 82%, black);
  font-size: 10px;
  font-weight: 700;
  min-width: 74px;
  padding: 7px 10px;
  text-align: center;
}

.temporal-control input[type="range"] {
  appearance: none;
  background: transparent;
  border-radius: 999px;
  cursor: ew-resize;
  display: block;
  height: 44px;
  margin: 0;
  width: 100%;
}

.temporal-control input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--account-accent) 0 var(--slider-progress), #d9d8d1 var(--slider-progress) 100%);
  border-radius: 999px;
  height: 15px;
}

.temporal-control input[type="range"]::-moz-range-track {
  background: linear-gradient(to right, var(--account-accent) 0 var(--slider-progress), #d9d8d1 var(--slider-progress) 100%);
  border-radius: 999px;
  height: 15px;
}

.temporal-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  background: var(--surface);
  border: 3px solid var(--account-accent);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(35, 42, 38, 0.24);
  height: 44px;
  margin-top: -14.5px;
  width: 44px;
}

.temporal-control input[type="range"]::-moz-range-thumb {
  background: var(--surface);
  border: 3px solid var(--account-accent);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(35, 42, 38, 0.24);
  box-sizing: border-box;
  height: 44px;
  width: 44px;
}

.temporal-control__ticks {
  color: #616a64;
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  margin-top: 2px;
}

.temporal-control > p {
  align-items: center;
  color: #7d837f;
  display: flex;
  font-size: 8px;
  gap: 5px;
  justify-content: center;
  margin: 7px 0 0;
}

/* Shared gallery and immutable-media workspace */

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

.mobile-section-tabs {
  display: none;
}

.gallery-workspace {
  max-width: 1580px;
}

.gallery-page-heading {
  align-items: flex-end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 30px;
}

.gallery-page-heading h1 {
  font-family: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin: 0;
  max-width: 760px;
}

.gallery-page-heading h1 em {
  color: var(--account-accent);
  font-style: italic;
  font-weight: 400;
}

.gallery-page-heading > div > p:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 15px 0 0;
}

.gallery-layout {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 610px;
}

.gallery-rail,
.gallery-panel {
  background: var(--surface);
  border: 1px solid #e3e1db;
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(42, 49, 44, 0.055);
}

.gallery-rail {
  align-self: start;
  min-height: 610px;
  overflow: hidden;
  padding: 10px;
}

.gallery-rail__heading {
  align-items: center;
  color: #686e69;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.11em;
  padding: 12px 10px 14px;
  text-transform: uppercase;
}

.gallery-rail__heading small {
  align-items: center;
  background: #efeee8;
  border-radius: 999px;
  display: inline-flex;
  font-size: 9px;
  height: 21px;
  justify-content: center;
  letter-spacing: 0;
  min-width: 21px;
}

.rail-loading,
.gallery-rail__empty {
  align-items: center;
  color: #8a8e8b;
  display: flex;
  font-size: 11px;
  gap: 8px;
  padding: 18px 10px;
}

.gallery-rail__empty {
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
  text-align: center;
}

.gallery-list-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 3px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.gallery-list-item:hover {
  background: #f5f3ed;
}

.gallery-list-item--active {
  background: color-mix(in srgb, var(--account-accent) 10%, #f7f5ef);
}

.gallery-list-item__icon {
  align-items: center;
  background: #eceae3;
  border-radius: 8px;
  color: #686e69;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.gallery-list-item--active .gallery-list-item__icon {
  background: var(--account-accent);
  color: white;
}

.gallery-list-item > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.gallery-list-item strong {
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-list-item small {
  color: #8a8f8b;
  font-size: 10px;
  margin-top: 3px;
}

.gallery-list-item > i {
  background: var(--danger);
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.gallery-panel {
  min-height: 610px;
  padding: 24px;
}

.gallery-empty-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 550px;
  padding: 42px;
  text-align: center;
}

.gallery-empty-state > span {
  align-items: center;
  background: color-mix(in srgb, var(--account-accent) 12%, white);
  border-radius: 50%;
  color: var(--account-accent);
  display: inline-flex;
  height: 64px;
  justify-content: center;
  margin-bottom: 17px;
  width: 64px;
}

.gallery-empty-state h2 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 29px;
  font-weight: 500;
  margin: 0;
}

.gallery-empty-state p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 10px auto 19px;
  max-width: 430px;
}

.gallery-panel__heading {
  align-items: flex-end;
  border-bottom: 1px solid #e8e6e0;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding-bottom: 19px;
}

.gallery-panel__heading h2 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0;
}

.gallery-panel__heading > div > p:last-child {
  color: var(--muted);
  font-size: 11px;
  margin: 5px 0 0;
}

.upload-queue {
  background: #f5f3ed;
  border: 1px solid #e1dfd8;
  border-radius: 11px;
  margin: 17px 0;
  overflow: hidden;
}

.upload-queue > header {
  align-items: center;
  border-bottom: 1px solid #e1dfd8;
  display: flex;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 13px;
}

.upload-queue > header > div {
  align-items: center;
  display: flex;
  font-size: 11px;
  gap: 7px;
}

.upload-queue > header span {
  background: #dfddd5;
  border-radius: 99px;
  font-size: 9px;
  padding: 2px 6px;
}

.upload-queue > header button {
  background: transparent;
  border: 0;
  color: #767c77;
  cursor: pointer;
  font-size: 10px;
}

.upload-queue__items {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.upload-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.55);
  display: grid;
  gap: 9px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 57px;
  padding: 9px 12px 12px;
  position: relative;
}

.upload-item__icon {
  color: var(--account-accent);
}

.upload-item--failed .upload-item__icon {
  color: var(--danger);
}

.upload-item__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.upload-item__copy strong {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item__copy small {
  color: #7c817d;
  font-size: 9px;
  margin-top: 3px;
}

.upload-item--failed .upload-item__copy small {
  color: var(--danger);
}

.upload-item__progress {
  background: #dfddd6;
  bottom: 0;
  height: 3px;
  left: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
}

.upload-item__progress i {
  background: var(--account-accent);
  display: block;
  height: 100%;
  transition: width 180ms ease;
}

.upload-item--failed .upload-item__progress i {
  background: var(--danger);
}

.gallery-filters {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 17px 0;
}

.gallery-filters select,
.gallery-search {
  background: #f7f5f0;
  border: 1px solid #deddd7;
  border-radius: 8px;
  min-height: 38px;
}

.gallery-filters select {
  font-size: 10px;
  padding: 0 28px 0 10px;
}

.gallery-search {
  align-items: center;
  color: #929692;
  display: flex;
  gap: 7px;
  padding: 0 10px;
}

.gallery-search input {
  background: transparent;
  border: 0;
  font-size: 11px;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.gallery-filters .button {
  min-height: 38px;
}

.media-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(174px, 1fr));
}

.media-card {
  background: #f8f6f1;
  border: 1px solid #e2e0d9;
  border-radius: 11px;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.media-card:hover {
  border-color: color-mix(in srgb, var(--account-accent) 50%, #dedcd6);
  box-shadow: 0 12px 28px rgba(29, 37, 32, 0.1);
  transform: translateY(-2px);
}

.media-card__image {
  aspect-ratio: 4 / 3;
  background: #e6e4de;
  overflow: hidden;
  position: relative;
}

.media-card__image > img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.media-card__image > span:not(.duplicate-badge):not(.review-badge):not(.highlight-badge) {
  align-items: center;
  color: #777d78;
  display: flex;
  flex-direction: column;
  font-size: 9px;
  gap: 7px;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.media-card--failed .media-card__image {
  background: #f2e7e4;
}

.duplicate-badge,
.review-badge {
  backdrop-filter: blur(5px);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 7px;
  position: absolute;
  text-transform: uppercase;
  top: 8px;
}

.duplicate-badge {
  background: rgba(117, 83, 47, 0.85);
  color: white;
  left: 8px;
}

.review-badge {
  background: rgba(255, 255, 255, 0.86);
  color: #515652;
  right: 8px;
}

.review-badge--selected {
  background: rgba(46, 91, 77, 0.9);
  color: white;
}

.review-badge--shortlisted {
  background: rgba(173, 111, 67, 0.9);
  color: white;
}

.review-badge--rejected {
  background: rgba(87, 84, 81, 0.85);
  color: white;
}

.media-card__body {
  padding: 10px;
  position: relative;
}

.media-card__body > div:first-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.media-card__body strong {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card__body small {
  color: #878c88;
  font-size: 9px;
  margin-top: 3px;
}

.rating-row {
  display: flex;
  gap: 0;
  margin-top: 7px;
}

.rating-row button,
.inspector-rating button {
  background: transparent;
  border: 0;
  color: #c18d46;
  cursor: pointer;
  padding: 1px;
}

.rating-row button:disabled,
.inspector-rating button:disabled {
  cursor: default;
}

.media-retry {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--danger);
  cursor: pointer;
  display: inline-flex;
  font-size: 9px;
  gap: 4px;
  padding: 6px 0 0;
}

.gallery-drop-zone {
  align-items: center;
  background: repeating-linear-gradient(-45deg, #faf9f5, #faf9f5 9px, #f7f5ef 9px, #f7f5ef 18px);
  border: 1px dashed #c9c8c1;
  border-radius: 12px;
  color: #737a75;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 350px;
  padding: 35px;
  text-align: center;
}

.gallery-drop-zone > svg {
  color: var(--account-accent);
  margin-bottom: 12px;
}

.gallery-drop-zone strong {
  color: var(--ink);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 21px;
  font-weight: 500;
}

.gallery-drop-zone span {
  font-size: 10px;
  margin: 7px 0 16px;
}

.gallery-drop-zone--readonly {
  cursor: default;
}

.new-gallery-dialog,
.asset-inspector {
  background: var(--surface);
  border-radius: 17px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 42px);
  overflow: auto;
  width: min(500px, calc(100vw - 32px));
}

.asset-inspector {
  width: min(560px, calc(100vw - 32px));
}

.new-gallery-dialog > header,
.asset-inspector > header {
  align-items: center;
  border-bottom: 1px solid #e6e4de;
  display: flex;
  justify-content: space-between;
  padding: 21px 24px 17px;
}

.new-gallery-dialog h2,
.asset-inspector h2 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  margin: 0;
}

.new-gallery-dialog form,
.asset-inspector form {
  display: grid;
  gap: 15px;
  padding: 21px 24px 24px;
}

.new-gallery-dialog footer,
.asset-inspector footer {
  border-top: 1px solid #e6e4de;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 17px;
}

.asset-inspector__preview {
  align-items: center;
  background: #252b28;
  display: flex;
  justify-content: center;
  min-height: 280px;
}

.asset-inspector__preview img, .asset-inspector__preview video {
  max-height: 430px;
  max-width: 100%;
  object-fit: contain;
}

.media-video-badge { position: absolute; left: 10px; bottom: 10px; border-radius: 5px; padding: 5px 8px; color: white; background: rgb(0 0 0 / 78%); font-size: 12px; pointer-events: none; }
.reel-cover-picker { display: grid; gap: 12px; padding: 16px; border: 1px solid #deded6; border-radius: 10px; }
.reel-cover-picker__preview { width: 180px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 5px; }
.reel-cover-picker__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.composer-document video { width: 100%; max-height: 400px; }

.asset-inspector__preview > span {
  align-items: center;
  color: #c8ceca;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  gap: 9px;
}

.asset-filename {
  display: flex;
  flex-direction: column;
}

.asset-filename strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.asset-filename small,
.camera-meta {
  color: #858b87;
  font-size: 10px;
  margin-top: 4px;
}

.inspector-rating {
  display: flex;
  gap: 3px;
}

.duplicate-note {
  background: #f5ecdf;
  border-left: 3px solid #a97843;
  color: #715434;
  font-size: 10px;
  line-height: 1.45;
  margin: 0;
  padding: 9px 11px;
}

.processing-error {
  align-items: flex-start;
  background: #f5e9e7;
  border-radius: 8px;
  color: var(--danger);
  display: flex;
  gap: 9px;
  padding: 10px;
}

.processing-error > span {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.processing-error strong {
  font-size: 10px;
}

.processing-error small {
  font-size: 9px;
  margin-top: 3px;
}

.processing-error button {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  font-size: 9px;
  gap: 4px;
}

/* Instagram's August 2026 mobile profile grid uses a 3:4 tile viewport. */
.empty-grid__cell {
  aspect-ratio: 3 / 4;
}

@media (max-width: 1060px) {
  .planner-grid {
    grid-template-columns: 1fr;
  }

  .profile-preview {
    margin: 0 auto;
    max-width: 580px;
    width: 100%;
  }

  .foundation-row {
    grid-template-columns: 1fr;
  }

  .gallery-layout {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  .gallery-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-story {
    min-height: 48vh;
    padding: 30px;
  }

  .login-story__copy {
    margin: 80px 0 70px;
  }

  .login-story__copy h1 {
    font-size: 52px;
  }

  .login-panel {
    padding: 52px 28px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .workspace-header {
    padding: 0 18px;
  }

  .workspace-main {
    padding: 30px 18px;
  }

  .planner-home {
    padding-bottom: calc(230px + env(safe-area-inset-bottom, 0px));
  }

  .temporal-control {
    left: 0;
  }

  .mobile-section-tabs {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 5px;
    padding: 7px 18px;
  }

  .mobile-section-tabs button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #737a75;
    display: flex;
    font-size: 10px;
    gap: 6px;
    padding: 8px 10px;
  }

  .mobile-section-tabs button.active {
    background: color-mix(in srgb, var(--account-accent) 11%, #f4f2ed);
    color: var(--account-accent);
    font-weight: 700;
  }

  .gallery-page-heading {
    align-items: flex-start;
  }

  .gallery-layout {
    display: block;
  }

  .gallery-rail {
    display: flex;
    gap: 5px;
    min-height: 0;
    overflow-x: auto;
    padding: 8px;
  }

  .gallery-rail__heading,
  .gallery-rail__empty {
    display: none;
  }

  .gallery-list-item {
    flex: 0 0 190px;
    margin: 0;
  }

  .gallery-panel {
    margin-top: 10px;
  }
}

@media (max-width: 600px) {
  .login-story__copy h1 {
    font-size: 43px;
  }

  .login-proof {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-header {
    height: 66px;
  }

  .account-switcher__button {
    min-width: 0;
  }

  .account-switcher__identity strong {
    max-width: 130px;
  }

  .foundation-pill {
    display: none;
  }

  .workspace-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-intro h1 {
    font-size: 40px;
  }

  .workspace-intro .button {
    width: 100%;
  }

  .temporal-control {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .temporal-control__heading small {
    display: none;
  }

  .schedule-card {
    padding: 20px 14px;
  }

  .card-heading {
    gap: 12px;
  }

  .cadence-chip {
    max-width: 120px;
    text-align: center;
  }

  .week-day {
    min-height: 58px;
  }

  .week-day strong {
    font-size: 17px;
  }

  .account-rules-card {
    grid-template-columns: auto 1fr;
  }

  .account-rules-card > button {
    grid-column: 2;
    justify-self: start;
  }

  .profile-preview {
    padding: 15px;
  }

  .profile-header {
    gap: 16px;
    padding: 21px 3px;
  }

  .account-avatar--large {
    height: 62px;
    width: 62px;
  }

  .profile-stats {
    gap: 9px;
  }

  .settings-sheet {
    padding: 25px 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .gallery-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-page-heading h1 {
    font-size: 40px;
  }

  .gallery-page-heading .button {
    width: 100%;
  }

  .gallery-panel {
    padding: 17px 12px;
  }

  .gallery-panel__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-panel__heading .button {
    width: 100%;
  }

  .gallery-filters {
    grid-template-columns: 1fr;
  }

  .media-grid {
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-drop-zone {
    min-height: 290px;
    padding: 22px 15px;
  }

  .new-gallery-dialog > header,
  .asset-inspector > header,
  .new-gallery-dialog form,
  .asset-inspector form {
    padding-left: 17px;
    padding-right: 17px;
  }
}

/* Account planning document and live temporal grid */

@media (max-width: 360px) {
  .account-switcher__identity strong,
  .account-switcher__identity small {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.planner-home--live {
  max-width: 1180px;
}

.workspace-intro--planner {
  margin-left: auto;
  margin-right: auto;
  max-width: 920px;
}

.feed-plan-toolbar {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin: 0 auto 18px;
  max-width: 920px;
}

.planner-load-state {
  align-items: center;
  color: #7b817d;
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
}

.planner-load-state h2,
.planner-load-state p {
  margin: 0;
}

.planner-load-state h2 {
  color: var(--ink);
  font-family: "Iowan Old Style", Georgia, serif;
  font-weight: 500;
}

.profile-preview--planned {
  padding-bottom: 0;
}

.planned-grid {
  background: #fff;
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 -20px -1px;
}

.planned-grid__cell {
  align-items: center;
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.48), transparent),
    color-mix(in srgb, var(--account-secondary) 8%, #eceae3);
  border: 0;
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.planned-grid__cell:nth-child(2n) {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent),
    color-mix(in srgb, var(--account-accent) 8%, #eceae3);
}

.planned-grid__cell--post {
  cursor: pointer;
}

.planned-grid__cell--post::after {
  background: rgba(16, 21, 18, 0.11);
  content: "";
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity 150ms ease;
}

.planned-grid__cell--post:hover::after {
  opacity: 1;
}

.planned-grid__cell img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.planned-grid__cell--empty {
  color: #878c88;
}

.planned-grid__cell--empty > span,
.planned-grid__placeholder {
  align-items: center;
  color: #7f8781;
  display: flex;
  flex-direction: column;
  font-size: 8px;
  gap: 7px;
  max-width: 80%;
  text-align: center;
}

.planned-grid__placeholder small {
  display: -webkit-box;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.grid-media-mark,
.grid-pin-mark {
  align-items: center;
  color: white;
  display: flex;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
}

.grid-pin-mark {
  left: 8px;
  right: auto;
}

.grid-status-dot {
  background: #9c9f9c;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  bottom: 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  height: 8px;
  position: absolute;
  right: 7px;
  width: 8px;
  z-index: 2;
}

.grid-status-dot--in_review { background: #be8843; }
.grid-status-dot--approved { background: #698a75; }
.grid-status-dot--ready { background: #397a61; }
.grid-status-dot--published { background: #395875; }
.grid-status-dot--retired { background: #6e6e6e; }

.planner-direction-card {
  margin-bottom: 10px;
}

.composer-backdrop {
  align-items: center;
  background: rgba(17, 23, 20, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 150;
}

.post-composer {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(10, 17, 13, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(920px, calc(100vh - 40px));
  max-width: 1440px;
  overflow: hidden;
  width: 100%;
}

.post-composer__header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 13px 19px 13px 25px;
}

.post-composer__header h2 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0;
}

.post-composer__header .eyebrow {
  margin-bottom: 3px;
}

.post-composer__header-actions {
  align-items: center;
  display: flex;
  gap: 7px;
}

.post-composer__header-actions select {
  background: #f3f1ec;
  border: 1px solid #deddd7;
  border-radius: 8px;
  font-size: 11px;
  height: 38px;
  padding: 0 9px;
}

.post-composer__body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.composer-library,
.composer-document {
  min-height: 0;
  overflow-y: auto;
}

.composer-library {
  background: #f3f1ec;
  border-right: 1px solid var(--line);
  padding: 18px;
}

.composer-library > input {
  background: #fffefa;
  border: 1px solid #d7d6d0;
  border-radius: 8px;
  font-size: 11px;
  height: 38px;
  margin: 13px 0 10px;
  padding: 0 10px;
  width: 100%;
}

.composer-section-heading {
  align-items: center;
  color: #4f5651;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: space-between;
}

.composer-section-heading > span {
  align-items: center;
  display: flex;
  gap: 7px;
}

.composer-section-heading > span svg {
  color: var(--account-accent);
}

.composer-section-heading > small {
  color: #949994;
  font-size: 9px;
  font-weight: 600;
}

.composer-section-heading > button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--account-accent);
  cursor: pointer;
  display: inline-flex;
  font-size: 9px;
  font-weight: 700;
  gap: 4px;
}

.composer-section-heading--spaced {
  border-top: 1px solid #e7e6e0;
  margin-top: 25px;
  padding-top: 20px;
}

.composer-gallery-tabs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

.composer-gallery-tabs button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #666c68;
  cursor: pointer;
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  padding: 7px 8px;
  text-align: left;
}

.composer-gallery-tabs button.active {
  background: white;
  color: var(--ink);
  font-weight: 700;
}

.composer-gallery-tabs small {
  color: #999d99;
  font-size: 8px;
}

.composer-asset-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.composer-asset-grid button {
  align-items: center;
  aspect-ratio: 3 / 4;
  background: #e6e4df;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.composer-asset-grid button.selected {
  box-shadow: inset 0 0 0 3px var(--account-accent);
  opacity: 0.65;
}

.composer-asset-grid img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.composer-asset-grid i {
  align-items: center;
  background: rgba(25, 31, 27, 0.78);
  border-radius: 999px;
  bottom: 5px;
  color: white;
  display: flex;
  font-size: 8px;
  font-style: normal;
  justify-content: center;
  min-height: 18px;
  min-width: 18px;
  padding: 0 5px;
  position: absolute;
  right: 5px;
}

.composer-library__empty {
  align-items: center;
  color: #818782;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 35px 9px;
  text-align: center;
}

.composer-library__empty p {
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
}

.composer-document {
  padding: 22px 26px 35px;
}

.export-spec-card {
  background: #f5f3ee;
  border: 1px solid #dfded7;
  border-radius: 10px;
  margin-top: 13px;
  padding: 12px;
}

.export-spec-card__heading,
.export-spec-card__heading > span {
  align-items: center;
  display: flex;
}

.export-spec-card__heading {
  justify-content: space-between;
}

.export-spec-card__heading > span {
  color: #4e5550;
  font-size: 10px;
  gap: 6px;
}

.export-spec-card__heading svg {
  color: var(--account-accent);
}

.export-spec-card__heading small {
  color: #878c88;
  font-size: 8px;
}

.export-spec-fields {
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(190px, 1.7fr) repeat(4, minmax(75px, 0.7fr));
  margin-top: 10px;
}

.export-spec-fields label {
  color: #747a75;
  display: flex;
  flex-direction: column;
  font-size: 8px;
  gap: 4px;
}

.export-spec-fields input,
.export-spec-fields select {
  background: white;
  border: 1px solid #d8d7d1;
  border-radius: 6px;
  color: var(--ink);
  font-size: 9px;
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.export-spec-toggles {
  align-items: center;
  color: #747a75;
  display: flex;
  font-size: 8px;
  gap: 13px;
  margin-top: 9px;
}

.export-spec-toggles label {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}

.export-spec-toggles > span {
  margin-left: auto;
  text-align: right;
}

.export-spec-toggles > button {
  align-items: center;
  background: white;
  border: 1px solid #d5d4ce;
  border-radius: 6px;
  color: var(--account-accent);
  cursor: pointer;
  display: inline-flex;
  font-size: 8px;
  font-weight: 700;
  gap: 4px;
  min-height: 29px;
  padding: 0 8px;
  white-space: nowrap;
}

.export-spec-notice {
  color: #5c7464;
  font-size: 8px;
  margin: 8px 0 0;
}

.selected-slides {
  display: flex;
  gap: 9px;
  margin-top: 13px;
  overflow-x: auto;
  padding-bottom: 7px;
}

.selected-slide {
  background: #f4f2ed;
  border: 1px solid #dfded8;
  border-radius: 9px;
  display: grid;
  flex: 0 0 360px;
  grid-template-columns: 108px minmax(0, 1fr);
  overflow: hidden;
}

.selected-slide--cover {
  border-color: color-mix(in srgb, var(--account-accent) 60%, #d5d4ce);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--account-accent) 9%, transparent);
}

.selected-slide__preview {
  align-items: center;
  aspect-ratio: 3 / 4;
  background: #dfddd7;
  display: flex;
  justify-content: center;
  min-height: 113px;
  overflow: hidden;
  position: relative;
}

.selected-slide__preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.selected-slide__preview > span {
  align-items: center;
  background: rgba(25, 31, 27, 0.82);
  border-radius: 50%;
  color: white;
  display: flex;
  font-size: 8px;
  height: 19px;
  justify-content: center;
  left: 5px;
  position: absolute;
  top: 5px;
  width: 19px;
}

.selected-slide__preview > i {
  align-items: center;
  background: rgba(25, 31, 27, 0.78);
  bottom: 5px;
  color: white;
  display: flex;
  font-size: 7px;
  font-style: normal;
  gap: 3px;
  left: 5px;
  padding: 4px 5px;
  position: absolute;
}

.selected-slide__details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px;
}

.selected-slide__details > strong {
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crop-quality {
  color: #788079;
  font-size: 7px;
  line-height: 1.3;
  margin-top: 3px;
}

.crop-quality--warning {
  color: #a55b3f;
}

.slide-export-link {
  align-items: center;
  color: var(--account-accent);
  display: inline-flex;
  font-size: 7px;
  font-weight: 700;
  gap: 4px;
  margin-top: 4px;
  text-decoration: none;
}

.selected-slide__details textarea {
  background: white;
  border: 1px solid #deddd7;
  border-radius: 6px;
  flex: 1;
  font-size: 8px;
  line-height: 1.4;
  margin-top: 6px;
  min-height: 50px;
  padding: 6px;
  resize: none;
  width: 100%;
}

.selected-slide__details > div {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
}

.selected-slide__details button {
  align-items: center;
  background: transparent;
  border: 1px solid #d8d7d1;
  border-radius: 5px;
  color: #737974;
  cursor: pointer;
  display: inline-flex;
  font-size: 7px;
  gap: 3px;
  height: 24px;
  justify-content: center;
  padding: 0 5px;
}

.selected-slide__details button.active {
  background: color-mix(in srgb, var(--account-accent) 11%, white);
  border-color: color-mix(in srgb, var(--account-accent) 35%, #d8d7d1);
  color: var(--account-accent);
}

.selected-slide__details button:disabled {
  cursor: default;
  opacity: 0.35;
}

.composer-media-heading {
  position: relative;
}

.composer-media-heading__actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.composer-media-heading__actions > small {
  color: #949994;
  font-size: 9px;
  font-weight: 600;
}

.composer-more-menu {
  position: relative;
}

.composer-more-menu > summary {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #6e756f;
  cursor: pointer;
  display: flex;
  height: 30px;
  justify-content: center;
  list-style: none;
  width: 30px;
}

.composer-more-menu > summary::-webkit-details-marker,
.composer-advanced > summary::-webkit-details-marker {
  display: none;
}

.composer-more-menu > summary:hover,
.composer-more-menu > summary:focus-visible,
.composer-more-menu[open] > summary {
  background: #f2f0eb;
  border-color: #deddd7;
  color: var(--ink);
  outline: none;
}

.export-settings-popover {
  box-shadow: 0 18px 45px rgba(20, 28, 23, 0.16);
  margin: 7px 0 0;
  position: absolute;
  right: 0;
  top: 100%;
  width: min(720px, calc(100vw - 390px));
  z-index: 30;
}

.composer-slide-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  margin-top: 13px;
}

.composer-slide-tile {
  aspect-ratio: 4 / 5;
  background: #e3e1db;
  border: 1px solid #dad9d3;
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(20, 28, 23, 0.04);
  min-width: 0;
  overflow: hidden;
}

.composer-slide-tile--cover {
  border-color: color-mix(in srgb, var(--account-accent) 70%, #d5d4ce);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--account-accent) 13%, transparent);
}

.composer-slide-tile__media {
  align-items: center;
  color: #888e89;
  display: flex;
  height: 100%;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.composer-slide-tile__media::after {
  background: linear-gradient(to top, rgba(11, 15, 13, 0.76), transparent 34%);
  bottom: 0;
  content: "";
  height: 42%;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 1;
}

.composer-slide-tile__media > img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.composer-slide-tile__number,
.composer-slide-tile__cover-label,
.composer-slide-tile__warning {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(21, 27, 23, 0.72);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 8px;
  font-weight: 700;
  gap: 4px;
  min-height: 23px;
  padding: 0 7px;
  position: absolute;
  z-index: 3;
}

.composer-slide-tile__number {
  left: 7px;
  min-width: 23px;
  padding: 0 6px;
  top: 7px;
}

.composer-slide-tile__cover-label {
  left: 37px;
  top: 7px;
}

.composer-slide-tile__warning {
  background: rgba(138, 72, 45, 0.88);
  bottom: 47px;
  left: 7px;
}

.composer-slide-tile__reorder {
  display: flex;
  gap: 3px;
  position: absolute;
  right: 7px;
  top: 7px;
  z-index: 3;
}

.composer-slide-tile__reorder button,
.composer-slide-tile__actions button,
.composer-slide-tile__actions a {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(21, 27, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  justify-content: center;
  text-decoration: none;
}

.composer-slide-tile__reorder button {
  height: 27px;
  padding: 0;
  width: 27px;
}

.composer-slide-tile__actions {
  bottom: 7px;
  display: flex;
  gap: 4px;
  left: 7px;
  position: absolute;
  right: 7px;
  z-index: 3;
}

.composer-slide-tile__actions button,
.composer-slide-tile__actions a {
  font-size: 8px;
  font-weight: 700;
  gap: 4px;
  height: 32px;
  padding: 0 7px;
}

.composer-slide-tile__actions button.active {
  background: var(--account-accent);
  border-color: rgba(255, 255, 255, 0.35);
}

.composer-slide-tile__actions .danger {
  margin-left: auto;
  padding: 0;
  width: 32px;
}

.composer-slide-tile__actions button:hover,
.composer-slide-tile__actions button:focus-visible,
.composer-slide-tile__actions a:hover,
.composer-slide-tile__actions a:focus-visible,
.composer-slide-tile__reorder button:hover,
.composer-slide-tile__reorder button:focus-visible {
  background: rgba(12, 16, 14, 0.92);
  outline: 1px solid rgba(255, 255, 255, 0.45);
}

.composer-advanced {
  border-bottom: 1px solid #e2e1db;
  border-top: 1px solid #e2e1db;
  margin-top: 2px;
}

.composer-advanced > summary {
  align-items: center;
  color: #545b56;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  min-height: 54px;
  padding: 0 2px;
}

.composer-advanced > summary > span {
  align-items: baseline;
  display: flex;
  gap: 8px;
}

.composer-advanced > summary strong {
  font-size: 10px;
}

.composer-advanced > summary small {
  color: #949994;
  font-size: 8px;
}

.composer-advanced > summary svg {
  transition: transform 150ms ease;
}

.composer-advanced[open] > summary svg {
  transform: rotate(180deg);
}

.composer-advanced__fields {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 2px 0 16px;
}

.composer-alt-text {
  border-top: 1px solid #e7e6e0;
  padding-top: 13px;
}

.composer-alt-text > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.composer-alt-text > div:first-child strong {
  color: #5c635e;
  font-size: 9px;
}

.composer-alt-text > div:first-child span {
  color: #929792;
  font-size: 8px;
}

.composer-alt-text__grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.composer-advanced__section {
  border-top: 1px solid #e7e6e0;
  padding-top: 15px;
}

.composer-drop-empty {
  align-items: center;
  background: #f5f3ee;
  border: 1px dashed #cccdc6;
  border-radius: 10px;
  color: #7b817c;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
  min-height: 138px;
  padding: 20px;
  text-align: center;
}

.composer-drop-empty strong {
  color: #4b514d;
  font-size: 11px;
}

.composer-drop-empty span {
  font-size: 9px;
}

.composer-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 13px;
}

.field--span-2 {
  grid-column: 1 / -1;
}

.input-with-icon {
  align-items: center;
  background: #fffefa;
  border: 1px solid #d4d5cf;
  border-radius: 9px;
  display: flex;
  min-height: 44px;
  padding-left: 11px;
}

.input-with-icon svg {
  color: #999d99;
  flex: 0 0 auto;
}

.field .input-with-icon input {
  border: 0;
  min-height: 40px;
}

.story-editor {
  align-items: center;
  background: #f5f3ee;
  border-radius: 9px;
  display: grid;
  gap: 7px;
  grid-template-columns: 24px minmax(120px, 0.7fr) minmax(180px, 1fr) auto 30px;
  margin-top: 8px;
  padding: 8px;
}

.story-editor > span {
  align-items: center;
  background: var(--account-accent);
  border-radius: 50%;
  color: white;
  display: flex;
  font-size: 8px;
  height: 21px;
  justify-content: center;
  width: 21px;
}

.story-editor select,
.story-editor textarea,
.story-editor input,
.audio-editor select,
.audio-editor input {
  background: white;
  border: 1px solid #d8d7d1;
  border-radius: 6px;
  font-size: 9px;
  min-height: 34px;
  padding: 6px 8px;
  width: 100%;
}

.story-editor textarea {
  resize: vertical;
}

.story-editor label,
.audio-editor label {
  align-items: center;
  color: #777d78;
  display: flex;
  font-size: 8px;
  gap: 4px;
  white-space: nowrap;
}

.story-editor label input {
  width: 62px;
}

.story-editor > button,
.story-editor__actions button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #8d5e57;
  cursor: pointer;
  display: flex;
  justify-content: center;
}

.story-editor__actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.composer-empty-line {
  color: #929692;
  font-size: 9px;
  margin: 10px 0 0;
}

.audio-editor {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 0.8fr) auto auto minmax(180px, 1fr);
  margin-top: 10px;
}

.audio-editor label input {
  width: 68px;
}

.new-audio-reference {
  background: #f3f1ec;
  border: 1px solid #deddd7;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
  padding: 13px;
}

.new-audio-reference footer {
  display: flex;
  gap: 7px;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.composer-warnings,
.readiness-card {
  background: #fbf3e7;
  border: 1px solid #ead6b6;
  border-radius: 9px;
  color: #765a35;
  margin-top: 16px;
  padding: 11px 13px;
}

.composer-warnings strong,
.readiness-card strong {
  align-items: center;
  display: flex;
  font-size: 10px;
  gap: 6px;
}

.composer-warnings p,
.readiness-card p {
  font-size: 9px;
  line-height: 1.45;
  margin: 5px 0 0 21px;
}

.readiness-card--ready {
  background: #edf4ef;
  border-color: #c8ddcf;
  color: #40624f;
}

.composer-error {
  margin-top: 14px;
}

.post-composer__footer {
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  min-height: 66px;
  padding: 10px 18px;
}

.post-composer__footer > div {
  display: flex;
  gap: 8px;
}

.button--danger {
  background: #f6e9e6;
  color: var(--danger);
}

.crop-editor-backdrop {
  align-items: center;
  background: rgba(10, 14, 12, 0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 190;
}

.crop-editor {
  background: #fbfaf7;
  border-radius: 15px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.38);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 40px);
  max-width: 1080px;
  overflow: hidden;
  width: 100%;
}

.crop-editor > header,
.crop-editor > footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.crop-editor > header {
  border-bottom: 1px solid var(--line);
  min-height: 72px;
  padding: 12px 18px 12px 23px;
}

.crop-editor > header h2 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 2px 0 0;
}

.crop-editor__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  min-height: 0;
}

.crop-editor__canvas-column {
  align-items: center;
  background: #202522;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 560px;
  overflow: hidden;
  padding: 28px;
}

.crop-editor__canvas-column > p {
  align-items: center;
  color: #aeb6b0;
  display: flex;
  font-size: 9px;
  gap: 5px;
  margin: 13px 0 0;
}

.crop-viewport {
  background: #111512;
  box-shadow: 0 10px 45px rgba(0, 0, 0, 0.35);
  cursor: grab;
  max-height: 610px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  touch-action: none;
  user-select: none;
  width: min(100%, 500px);
}

.crop-viewport:active {
  cursor: grabbing;
}

.crop-viewport:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--account-accent) 75%, white);
  outline-offset: 3px;
}

.crop-viewport--focal,
.crop-viewport--focal:active {
  cursor: crosshair;
}

.crop-viewport svg {
  display: block;
  height: 100%;
  pointer-events: none;
  width: 100%;
}

.crop-viewport__empty {
  align-items: center;
  color: #c5cbc7;
  display: flex;
  flex-direction: column;
  gap: 8px;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.crop-thirds {
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  position: absolute;
}

.crop-thirds--vertical {
  bottom: 0;
  top: 0;
  width: 1px;
}

.crop-thirds--horizontal {
  height: 1px;
  left: 0;
  right: 0;
}

.crop-thirds--vertical.crop-thirds--one { left: 33.333%; }
.crop-thirds--vertical.crop-thirds--two { left: 66.666%; }
.crop-thirds--horizontal.crop-thirds--one { top: 33.333%; }
.crop-thirds--horizontal.crop-thirds--two { top: 66.666%; }

.crop-focal-marker {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--account-accent);
  border-radius: 50%;
  color: var(--account-accent);
  display: flex;
  height: 28px;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
}

.crop-editor__controls {
  overflow-y: auto;
  padding: 22px 20px;
}

.crop-control-heading {
  align-items: center;
  color: #555c57;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  justify-content: space-between;
}

.crop-control-heading > span {
  align-items: center;
  display: flex;
  gap: 6px;
}

.crop-control-heading output {
  color: var(--account-accent);
  font-variant-numeric: tabular-nums;
}

.crop-editor__controls > input[type="range"] {
  accent-color: var(--account-accent);
  margin: 14px 0 17px;
  width: 100%;
}

.crop-editor__buttons {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crop-editor__buttons button {
  align-items: center;
  background: white;
  border: 1px solid #d8d7d1;
  border-radius: 7px;
  color: #626963;
  cursor: pointer;
  display: inline-flex;
  font-size: 8px;
  gap: 5px;
  justify-content: center;
  min-height: 34px;
  padding: 0 7px;
}

.crop-editor__buttons button.active {
  background: color-mix(in srgb, var(--account-accent) 12%, white);
  border-color: var(--account-accent);
  color: var(--account-accent);
}

.crop-resolution {
  align-items: flex-start;
  background: #edf4ef;
  border: 1px solid #c9ddd0;
  border-radius: 8px;
  color: #41634f;
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding: 10px;
}

.crop-resolution--warning {
  background: #fbede7;
  border-color: #e6c5b9;
  color: #985339;
}

.crop-resolution--upscale {
  background: #faf2e5;
  border-color: #e6d3ae;
  color: #806139;
}

.crop-resolution svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.crop-resolution div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.crop-resolution strong {
  font-size: 9px;
}

.crop-resolution span {
  font-size: 8px;
  line-height: 1.4;
}

.crop-recipe-readout {
  border-top: 1px solid #e3e2dc;
  margin: 18px 0 0;
  padding-top: 11px;
}

.crop-recipe-readout div {
  display: flex;
  font-size: 8px;
  justify-content: space-between;
  padding: 4px 0;
}

.crop-recipe-readout dt {
  color: #888d89;
}

.crop-recipe-readout dd {
  color: #4f5651;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.crop-save-state {
  align-items: center;
  color: #597362;
  display: flex;
  font-size: 8px;
  gap: 5px;
  margin: 16px 0 0;
}

.crop-save-state--saving { color: #776a4d; }
.crop-save-state--unsaved { color: #9b593f; }

.crop-editor > footer {
  border-top: 1px solid var(--line);
  color: #777d78;
  font-size: 9px;
  min-height: 63px;
  padding: 10px 18px 10px 23px;
}

@media (max-width: 980px) {
  .composer-backdrop {
    padding: 8px;
  }

  .post-composer {
    height: calc(100vh - 16px);
  }

  .post-composer__body {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .composer-asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-editor {
    grid-template-columns: 24px minmax(110px, 0.7fr) minmax(140px, 1fr) 30px;
  }

  .story-editor label {
    display: none;
  }

  .audio-editor {
    grid-template-columns: 1fr auto auto;
  }

  .audio-editor > input:last-child {
    grid-column: 1 / -1;
  }

  .export-spec-fields {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }

  .export-spec-fields label:first-child {
    grid-column: 1 / -1;
  }

  .crop-editor__workspace {
    grid-template-columns: minmax(0, 1fr) 255px;
  }

  .crop-editor__canvas-column {
    min-height: 480px;
    padding: 18px;
  }
}

@media (max-width: 700px) {
  .planned-grid {
    margin-left: -15px;
    margin-right: -15px;
  }

  .composer-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .post-composer {
    border-radius: 0;
    height: 100vh;
  }

  .post-composer__header {
    min-height: 63px;
    padding: 10px 12px 10px 16px;
  }

  .post-composer__header-actions select {
    display: none;
  }

  .post-composer__body {
    display: block;
    overflow-y: auto;
  }

  .composer-library,
  .composer-document {
    overflow: visible;
  }

  .composer-library {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    padding: 14px;
  }

  .composer-gallery-tabs {
    flex-direction: row;
    overflow-x: auto;
  }

  .composer-gallery-tabs button {
    flex: 0 0 auto;
    gap: 10px;
  }

  .composer-asset-grid {
    display: flex;
    overflow-x: auto;
  }

  .composer-asset-grid button {
    flex: 0 0 84px;
  }

  .composer-document {
    padding: 18px 14px 25px;
  }

  .export-settings-popover {
    width: calc(100vw - 28px);
  }

  .composer-slide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .composer-slide-tile__actions button span {
    display: none;
  }

  .composer-form-grid,
  .new-audio-reference,
  .composer-advanced__fields,
  .composer-alt-text__grid {
    grid-template-columns: 1fr;
  }

  .export-spec-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .export-spec-fields label:first-child {
    grid-column: 1 / -1;
  }

  .export-spec-toggles {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .export-spec-toggles > span {
    margin-left: 0;
    text-align: left;
    width: 100%;
  }

  .field--span-2,
  .new-audio-reference footer {
    grid-column: auto;
  }

  .story-editor {
    grid-template-columns: 24px 1fr 30px;
  }

  .story-editor textarea {
    grid-column: 2;
  }

  .story-editor > button,
  .story-editor__actions {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .audio-editor {
    grid-template-columns: 1fr 1fr;
  }

  .audio-editor > select,
  .audio-editor > input:last-child {
    grid-column: 1 / -1;
  }

  .post-composer__footer {
    bottom: 0;
    position: sticky;
    z-index: 3;
  }

  .post-composer__footer .button {
    min-height: 38px;
    padding: 0 11px;
  }

  .planner-direction-card {
    display: none;
  }

  .crop-editor-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .crop-editor {
    border-radius: 0;
    max-height: 100vh;
  }

  .crop-editor > header {
    min-height: 62px;
    padding: 9px 12px 9px 15px;
  }

  .crop-editor > header h2 {
    font-size: 20px;
  }

  .crop-editor__workspace {
    display: block;
    overflow-y: auto;
  }

  .crop-editor__canvas-column {
    min-height: auto;
    padding: 14px;
  }

  .crop-viewport {
    max-height: 62vh;
    width: min(100%, 440px);
  }

  .crop-editor__controls {
    overflow: visible;
  }

  .crop-editor > footer {
    gap: 10px;
    padding: 9px 12px;
  }
}

/* Stage 6: culling and reversible visual planning workbench */

.media-favorite {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  border-radius: 50%;
  bottom: 8px;
  box-shadow: 0 2px 9px rgba(20, 24, 22, 0.18);
  color: #555d58;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 8px;
  width: 34px;
  z-index: 3;
}

.media-favorite.is-favorite,
.inspector-favorite.is-favorite {
  background: #fff0f1;
  color: #dc304c;
}

.asset-inspector__navigation {
  align-items: center;
  display: flex;
  gap: 4px;
}

.asset-inspector__navigation > span {
  color: var(--muted);
  font-size: 10px;
  margin-right: 5px;
}

.asset-inspector__navigation button {
  align-items: center;
  background: #f0eee8;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  height: 31px;
  justify-content: center;
  width: 31px;
}

.asset-inspector__navigation button:disabled {
  cursor: default;
  opacity: 0.35;
}

.asset-inspector__preview {
  position: relative;
}

.inspector-favorite {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 999px;
  bottom: 13px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  color: #414844;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
  padding: 8px 10px;
  position: absolute;
  right: 13px;
}

.inspector-favorite kbd {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  font: inherit;
  font-size: 8px;
  padding: 2px 4px;
}

.instagram-drafts-toggle {
  align-items: center;
  background: #f0f0f0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  gap: 5px;
  padding: 7px 9px !important;
}

.instagram-drafts-toggle.is-active {
  background: #111 !important;
  color: white;
}

.planning-panel {
  background: #fffefa;
  border: 1px solid #deddd7;
  border-radius: 15px;
  bottom: 124px;
  box-shadow: 0 24px 70px rgba(23, 29, 25, 0.22);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 214px);
  overflow: hidden;
  position: fixed;
  right: 22px;
  top: 82px;
  width: 350px;
  z-index: 24;
}

.planning-panel button,
.planning-panel input,
.planning-panel select,
.planning-action-bar button {
  font: inherit;
}

.planning-panel__header {
  align-items: center;
  border-bottom: 1px solid #e6e4de;
  display: flex;
  justify-content: space-between;
  padding: 14px 15px 12px;
}

.planning-panel__header > div,
.proposal-editor header > span:first-child {
  display: flex;
  flex-direction: column;
}

.planning-panel__header small,
.proposal-editor header small {
  color: #858b87;
  font-size: 9px;
}

.planning-panel__header strong {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 19px;
  font-weight: 500;
}

.planning-panel__header > button {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
}

.planning-mode-switch {
  background: #eeece6;
  border-radius: 9px;
  display: grid;
  gap: 3px;
  grid-template-columns: 1fr 1fr;
  margin: 12px 14px 0;
  padding: 3px;
}

.planning-mode-switch button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #707671;
  cursor: pointer;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  gap: 5px;
  justify-content: center;
  padding: 8px;
}

.planning-mode-switch button.is-active {
  background: white;
  box-shadow: 0 2px 8px rgba(24, 30, 26, 0.1);
  color: var(--ink);
}

.planning-mode-copy {
  color: #747a75;
  font-size: 9px;
  line-height: 1.4;
  margin: 7px 16px 10px;
}

.auto-schedule-launcher {
  align-items: center;
  background: color-mix(in srgb, var(--account-secondary) 6%, white);
  border: 1px solid color-mix(in srgb, var(--account-secondary) 20%, #deddd7);
  border-radius: 10px;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 14px 10px;
  padding: 9px;
}

.auto-schedule-launcher > span,
.auto-schedule-controls header > span,
.auto-schedule-controls output {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.auto-schedule-launcher > span > span,
.auto-schedule-controls header > span > span,
.auto-schedule-controls output > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.auto-schedule-launcher strong,
.auto-schedule-controls strong {
  font-size: 10px;
}

.auto-schedule-launcher small,
.auto-schedule-controls small {
  color: #747a75;
  font-size: 8px;
  line-height: 1.35;
}

.auto-schedule-launcher > button,
.auto-schedule-preview-button {
  background: var(--account-secondary);
  border: 0;
  border-radius: 7px;
  color: white;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  padding: 7px 8px;
}

.auto-schedule-launcher > button:disabled,
.auto-schedule-preview-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.auto-schedule-launcher > p {
  color: #8b6652;
  font-size: 8px;
  grid-column: 1 / -1;
  margin: 0;
}

.planning-panel.is-auto-scheduling .future-slot-control,
.planning-panel.is-auto-scheduling .proposal-editor,
.planning-panel.is-auto-scheduling .planning-panel__tabs,
.planning-panel.is-auto-scheduling .planning-panel__search,
.planning-panel.is-auto-scheduling .planning-panel__filters,
.planning-panel.is-auto-scheduling .planning-source-list {
  display: none;
}

.auto-schedule-controls {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 14px;
}

.auto-schedule-controls > header {
  align-items: center;
  border-bottom: 1px solid #e8e6e0;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 2px 0 10px;
}

.auto-schedule-controls > header > button {
  align-items: center;
  background: #efede8;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  width: 26px;
}

.auto-schedule-controls form,
.auto-schedule-controls fieldset {
  display: flex;
  flex-direction: column;
}

.auto-schedule-controls form {
  gap: 12px;
}

.auto-schedule-controls fieldset {
  border: 0;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.auto-schedule-controls legend,
.auto-schedule-fields label > span,
.auto-schedule-times label > span {
  color: #606762;
  font-size: 8px;
  font-weight: 700;
  margin-bottom: 4px;
}

.auto-schedule-fields,
.auto-schedule-times {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auto-schedule-fields label,
.auto-schedule-times label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.auto-schedule-fields input,
.auto-schedule-times input,
.auto-schedule-choice-row label {
  background: white;
  border: 1px solid #dcdad3;
  border-radius: 7px;
  font-size: 9px;
  min-width: 0;
  padding: 7px;
}

.auto-schedule-choice-row {
  display: flex;
  gap: 5px;
}

.auto-schedule-choice-row > button {
  background: white;
  border: 1px solid #dcdad3;
  border-radius: 7px;
  color: #626964;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  padding: 7px;
}

.auto-schedule-choice-row > button.is-active {
  background: var(--account-secondary);
  border-color: var(--account-secondary);
  color: white;
}

.auto-schedule-choice-row > label {
  align-items: center;
  display: flex;
  gap: 4px;
  margin-left: auto;
  padding: 4px 6px;
}

.auto-schedule-choice-row > label span {
  color: #747a75;
  font-size: 8px;
}

.auto-schedule-choice-row > label input {
  border: 0;
  font-size: 9px;
  padding: 2px;
  width: 34px;
}

.auto-schedule-choice-row--count > button {
  flex: 1;
}

.auto-schedule-controls form > p {
  align-items: center;
  color: #747a75;
  display: flex;
  font-size: 8px;
  gap: 5px;
  line-height: 1.4;
  margin: 0;
}

.auto-schedule-controls output {
  background: #edf7ef;
  border: 1px solid #cce4d1;
  border-radius: 8px;
  color: #23723b;
  padding: 8px;
}

.auto-schedule-preview-button {
  align-items: center;
  display: flex;
  gap: 5px;
  justify-content: center;
  padding: 9px;
  width: 100%;
}

.future-slot-control {
  align-items: center;
  border-bottom: 1px solid #eceae5;
  border-top: 1px solid #eceae5;
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
}

.future-slot-control > span {
  font-size: 9px;
  font-weight: 700;
}

.future-slot-control > div {
  display: flex;
  gap: 3px;
}

.future-slot-control button {
  background: transparent;
  border: 1px solid #d9d7d0;
  border-radius: 6px;
  color: #747a75;
  cursor: pointer;
  font-size: 9px;
  min-width: 26px;
  padding: 4px;
}

.future-slot-control button.is-active {
  background: var(--account-secondary);
  border-color: var(--account-secondary);
  color: white;
}

.planning-panel__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 10px 14px 0;
}

.planning-panel__tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid #deddd7;
  color: #7b817d;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  padding: 8px 4px;
}

.planning-panel__tabs button.is-active {
  border-color: var(--account-accent);
  color: var(--ink);
}

.planning-panel__tabs button span {
  background: #efede8;
  border-radius: 999px;
  font-size: 8px;
  margin-left: 3px;
  padding: 2px 5px;
}

.planning-panel__search {
  align-items: center;
  background: #f1efe9;
  border-radius: 8px;
  display: flex;
  gap: 6px;
  margin: 10px 14px 7px;
  padding: 8px 9px;
}

.planning-panel__search input {
  background: transparent;
  border: 0;
  font-size: 10px;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.planning-panel__filters {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 14px 7px;
}

.planning-panel__filters select,
.planning-panel__filters button {
  background: white;
  border: 1px solid #dddcd6;
  border-radius: 7px;
  font-size: 9px;
  min-width: 0;
  padding: 7px;
}

.planning-panel__filters button {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 4px;
}

.planning-panel__filters button.is-active {
  background: #fff0f1;
  border-color: #f2cbd0;
  color: #c82e48;
}

.planning-source-list {
  flex: 1;
  overflow-y: auto;
  padding: 3px 14px 14px;
}

.planning-source-card {
  align-items: center;
  background: white;
  border: 1px solid #e3e1db;
  border-radius: 9px;
  cursor: grab;
  display: grid;
  gap: 9px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  margin-top: 7px;
  padding: 6px;
}

.planning-source-card.is-held {
  background: color-mix(in srgb, var(--account-accent) 8%, white);
  border-color: var(--account-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--account-accent) 13%, transparent);
}

.planning-source-card__preview {
  align-items: center;
  background: #ebe9e3;
  border-radius: 6px;
  display: flex;
  height: 52px;
  justify-content: center;
  overflow: hidden;
  width: 48px;
}

.planning-source-card__preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.planning-source-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.planning-source-card strong {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-source-card small {
  align-items: center;
  color: #858b87;
  display: flex;
  font-size: 8px;
  gap: 3px;
  margin-top: 3px;
}

.planning-source-card > button {
  background: #eeece6;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
  padding: 7px;
}

.planning-source-card.is-held > button {
  background: var(--account-secondary);
  color: white;
}

.planning-source-list--tiles {
  align-content: flex-start;
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 7px;
}

.planning-source-card--tile {
  aspect-ratio: 4 / 5;
  display: block;
  flex: 0 0 calc(50% - 4.5px);
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.planning-source-card--tile::after {
  background: linear-gradient(to top, rgba(12, 16, 14, 0.82), transparent 46%);
  bottom: 0;
  content: "";
  height: 55%;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 1;
}

.planning-source-card--tile .planning-source-card__preview {
  border-radius: 0;
  height: 100%;
  width: 100%;
}

.planning-source-card--tile > span:nth-child(2) {
  bottom: 8px;
  color: white;
  left: 9px;
  max-width: calc(100% - 18px);
  position: absolute;
  right: 9px;
  z-index: 2;
}

.planning-source-card--tile strong {
  color: white;
  font-size: 9px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.planning-source-card--tile small {
  color: rgba(255, 255, 255, 0.84);
}

.planning-source-card--tile > button {
  backdrop-filter: blur(8px);
  background: rgba(20, 25, 22, 0.72);
  color: white;
  position: absolute;
  right: 7px;
  top: 7px;
  z-index: 3;
}

.planning-source-list--tiles .planning-source-empty {
  flex: 0 0 100%;
}

.planning-source-empty {
  align-items: center;
  color: #858b87;
  display: flex;
  flex-direction: column;
  padding: 30px 15px;
  text-align: center;
}

.planning-source-empty strong {
  color: var(--ink);
  font-size: 11px;
  margin-top: 8px;
}

.planning-source-empty p {
  font-size: 9px;
  line-height: 1.4;
  margin: 4px 0;
}

.planning-panel__footer {
  align-items: center;
  background: #f5f3ed;
  border-top: 1px solid #dfddd7;
  color: #6f7671;
  display: flex;
  font-size: 9px;
  gap: 5px;
  line-height: 1.35;
  padding: 10px 14px;
}

.proposal-editor {
  background: #f3faf5;
  border-bottom: 1px solid #cfe2d4;
  border-top: 1px solid #cfe2d4;
  padding: 10px 14px;
}

.proposal-editor > header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.proposal-editor > header strong {
  color: #235c35;
  font-size: 10px;
}

.proposal-editor > header > span:last-child {
  align-items: center;
  background: #2d7b47;
  border-radius: 50%;
  color: white;
  display: flex;
  font-size: 8px;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.proposal-editor__slides {
  display: flex;
  gap: 7px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.proposal-editor__slides article {
  border: 2px solid transparent;
  border-radius: 7px;
  flex: 0 0 66px;
  overflow: hidden;
  position: relative;
}

.proposal-editor__slides article.is-cover {
  border-color: #2d8b4c;
}

.proposal-editor__slides article > span {
  align-items: center;
  background: #e5e7e2;
  display: flex;
  height: 74px;
  justify-content: center;
}

.proposal-editor__slides img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.proposal-editor__cover {
  align-items: center;
  background: white;
  border: 0;
  border-radius: 50%;
  display: flex;
  font-size: 8px;
  height: 20px;
  justify-content: center;
  left: 3px;
  position: absolute;
  top: 3px;
  width: 20px;
}

.proposal-editor__slides article > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.proposal-editor__slides article > div button {
  align-items: center;
  background: white;
  border: 0;
  display: flex;
  justify-content: center;
  padding: 5px 0;
}

.proposal-editor > p {
  color: #64736a;
  font-size: 8px;
  line-height: 1.35;
  margin: 7px 0 0;
}

.planning-grid {
  background: #e9e8e4;
}

.planning-grid__virtual {
  align-items: center;
  aspect-ratio: 3 / 4;
  background: repeating-linear-gradient(-45deg, #f7f7f5, #f7f7f5 8px, #eeeeeb 8px, #eeeeeb 16px);
  border: 1px dashed #aaa9a4;
  color: #70736f;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 10px;
  text-align: center;
}

.planning-grid__virtual.is-ready {
  background: color-mix(in srgb, var(--account-accent) 10%, white);
  border-color: var(--account-accent);
}

.planning-grid__virtual > span {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: flex;
  font-size: 22px;
  height: 34px;
  justify-content: center;
  margin-bottom: 7px;
  width: 34px;
}

.planning-grid__virtual strong {
  font-size: clamp(9px, 1.5vw, 12px);
}

.planning-grid__virtual small {
  font-size: clamp(7px, 1vw, 9px);
  margin-top: 4px;
}

.planning-grid__post {
  cursor: grab;
}

.planning-grid__post.is-auto-scheduled {
  box-shadow: inset 0 0 0 3px #2d9a50;
}

.planning-grid__post.is-auto-scheduled .planning-grid__state {
  background: rgba(238, 252, 241, 0.94);
  color: #1e6334;
  line-height: 1.2;
  max-width: calc(100% - 14px);
  right: 7px;
}

.planning-grid__post::after,
.planning-grid__proposal::after {
  pointer-events: none;
}

.planning-grid__post-preview {
  background: transparent;
  border: 0;
  height: 100%;
  inset: 0;
  padding: 0;
  position: absolute;
  width: 100%;
}

.planning-grid__post-preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.planning-grid__drag,
.planning-grid__state,
.planning-grid__date-action,
.planning-grid__proposal-label {
  backdrop-filter: blur(6px);
  position: absolute;
  z-index: 4;
}

.planning-grid__drag {
  align-items: center;
  background: rgba(0, 0, 0, 0.56);
  border-radius: 5px;
  color: white;
  display: flex;
  left: 7px;
  padding: 4px;
  top: 7px;
}

.planning-grid__state {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  bottom: 7px;
  color: #343936;
  display: flex;
  font-size: 8px;
  font-weight: 700;
  gap: 3px;
  left: 7px;
  padding: 5px 7px;
}

.planning-grid__move-controls,
.planning-grid__proposal-actions {
  bottom: 7px;
  display: flex;
  gap: 4px;
  position: absolute;
  right: 7px;
  z-index: 5;
}

.planning-grid__move-controls button,
.planning-grid__proposal-actions button {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 50%;
  display: flex;
  height: 25px;
  justify-content: center;
  padding: 0;
  width: 25px;
}

.planning-grid__move-controls button:disabled {
  opacity: 0.4;
}

.planning-grid__date-action {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 999px;
  bottom: 7px;
  display: flex;
  font-size: 8px;
  font-weight: 700;
  gap: 3px;
  padding: 6px 7px;
  right: 7px;
}

.planning-grid__proposal {
  box-shadow: inset 0 0 0 4px #35a85b;
  cursor: default;
}

.planning-grid__proposal::after {
  background: linear-gradient(transparent 45%, rgba(4, 42, 16, 0.62));
  opacity: 1;
}

.planning-grid__proposal-label {
  bottom: 42px;
  color: white;
  font-size: 8px;
  font-weight: 700;
  left: 8px;
  right: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.planning-grid__proposal-actions button.is-confirm,
.planning-action-bar button.is-confirm {
  background: #238d46;
  color: white;
}

.planning-action-bar {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 254, 250, 0.96);
  border: 1px solid #d9ddd8;
  border-radius: 11px;
  bottom: calc(184px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 12px 36px rgba(20, 27, 22, 0.2);
  display: flex;
  gap: 7px;
  left: calc(218px + (100vw - 218px) / 2);
  max-width: 650px;
  padding: 8px 9px 8px 13px;
  position: fixed;
  transform: translateX(-50%);
  width: calc(100vw - 630px);
  z-index: 26;
}

.planning-action-bar.has-error {
  border-color: #dfa9a4;
}

.planning-action-bar > span {
  flex: 1;
  font-size: 9px;
  line-height: 1.3;
}

.planning-action-bar button {
  align-items: center;
  background: #efede7;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  font-size: 9px;
  font-weight: 700;
  gap: 4px;
  padding: 8px 9px;
}

.planning-slots-loading {
  align-items: center;
  background: white;
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.13);
  display: flex;
  font-size: 9px;
  gap: 5px;
  padding: 6px 9px;
  position: fixed;
  right: 375px;
  top: 90px;
  z-index: 25;
}

@media (min-width: 1180px) {
  .instagram-preview-shell.is-planning .instagram-profile {
    transform: translateX(-180px);
    transition: transform 180ms ease;
  }
}

@media (max-width: 900px) {
  .planning-panel {
    bottom: calc(184px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    max-height: min(58vh, 560px);
    right: 10px;
    top: auto;
    width: auto;
    z-index: 28;
  }

  .planning-action-bar {
    bottom: calc(184px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    width: calc(100vw - 28px);
    z-index: 30;
  }

  .planning-panel:has(+ .planning-action-bar) {
    padding-bottom: 48px;
  }

  .planning-slots-loading {
    right: 18px;
    top: 118px;
  }
}

@media (max-width: 540px) {
  .instagram-drafts-toggle {
    font-size: 0 !important;
  }

  .instagram-drafts-toggle svg {
    height: 19px;
    width: 19px;
  }

  .planning-panel {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    left: 0;
    max-height: 62vh;
    right: 0;
  }

  .planning-grid__state,
  .planning-grid__date-action,
  .planning-grid__proposal-label {
    font-size: 7px;
  }

  .planning-grid__move-controls button {
    height: 22px;
    width: 22px;
  }

  .asset-inspector__navigation > span {
    display: none;
  }
}

/* Stage 7: mobile-first manual publishing handoff */

.instagram-post-modal > footer > div {
  display: flex;
  gap: 10px;
}

.handoff-backdrop {
  align-items: center;
  background: rgba(20, 25, 22, 0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 80;
}

.handoff-sheet {
  background: #f6f4ef;
  border-radius: 18px;
  box-shadow: 0 35px 110px rgba(9, 15, 12, 0.35);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 36px);
  max-width: 960px;
  overflow: hidden;
  width: 100%;
}

.handoff-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #dfdfd9;
  display: grid;
  flex: 0 0 auto;
  gap: 14px;
  grid-template-columns: auto 1fr auto;
  padding: 14px 20px;
}

.handoff-header > div > span,
.handoff-header > div > span svg {
  align-items: center;
  display: flex;
}

.handoff-header > div > span {
  color: #747a75;
  font-size: 10px;
  font-weight: 700;
  gap: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.handoff-header h1 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  margin: 2px 0 0;
}

.handoff-close {
  align-items: center;
  background: #efefeb;
  border: 0;
  border-radius: 50%;
  color: #252b27;
  cursor: pointer;
  display: flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.handoff-account {
  background: #f0eee9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 11px;
}

.handoff-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 20px;
}

.handoff-hero {
  align-items: center;
  background: linear-gradient(130deg, #283c37, #3e5a52);
  border-radius: 14px;
  color: white;
  display: flex;
  gap: 25px;
  justify-content: space-between;
  min-height: 126px;
  padding: 22px 24px;
}

.handoff-hero h2 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(23px, 3vw, 31px);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 9px 0 7px;
}

.handoff-hero p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  margin: 0;
}

.handoff-status {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  display: inline-flex;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 5px 8px;
  text-transform: uppercase;
}

.handoff-status--ready {
  background: #dff1e6;
  border-color: #dff1e6;
  color: #1d603e;
}

.handoff-status--failed,
.handoff-status--stale,
.handoff-status--expired {
  background: #f7e0dd;
  border-color: #f7e0dd;
  color: #8d3c35;
}

.handoff-download-all {
  background: white !important;
  color: #253b35 !important;
  flex: 0 0 auto;
  text-decoration: none;
}

.handoff-download-all small {
  color: #79827d;
  font-size: 9px;
  font-weight: 600;
}

.handoff-loading {
  align-items: center;
  color: #727974;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 220px;
}

.handoff-callout,
.handoff-readiness,
.handoff-section,
.handoff-completion,
.handoff-complete {
  background: white;
  border: 1px solid #dedfd9;
  border-radius: 13px;
}

.handoff-callout {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
  padding: 15px 17px;
}

.handoff-callout strong,
.handoff-readiness strong {
  font-size: 12px;
}

.handoff-callout p,
.handoff-readiness p {
  color: #737a75;
  font-size: 10px;
  line-height: 1.45;
  margin: 3px 0 0;
}

.handoff-callout > button,
.handoff-override > button {
  align-items: center;
  background: #eef3ef;
  border: 0;
  border-radius: 8px;
  color: #29463d;
  cursor: pointer;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 6px;
  padding: 9px 11px;
}

.handoff-callout--ready {
  border-color: #bcd9c6;
}

.handoff-callout--ready > svg {
  color: #268653;
}

.handoff-callout--working > svg {
  color: #a26446;
}

.handoff-callout--error {
  border-color: #e9bbb5;
}

.handoff-callout--error > svg {
  color: #a1433e;
}

.handoff-readiness {
  overflow: hidden;
}

.handoff-readiness > header {
  align-items: flex-start;
  display: flex;
  gap: 11px;
  padding: 16px 17px 8px;
}

.handoff-readiness > header > svg {
  color: #a26446;
  flex: 0 0 auto;
}

.handoff-readiness ul {
  color: #555d58;
  font-size: 10px;
  line-height: 1.5;
  margin: 3px 17px 15px 48px;
  padding-left: 14px;
}

.handoff-override {
  background: #f6f3ed;
  border-top: 1px solid #e4e0d7;
  padding: 11px 17px;
}

.handoff-override > div {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin-top: 11px;
}

.handoff-override label,
.handoff-completion label {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  font-weight: 700;
  gap: 5px;
}

.handoff-override textarea,
.handoff-completion input {
  background: white;
  border: 1px solid #d6d7d2;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 9px 10px;
  resize: vertical;
}

.handoff-section {
  padding: 17px;
}

.handoff-section__heading,
.handoff-section__heading > span,
.handoff-section__heading > span > span,
.handoff-section__subheading {
  display: flex;
}

.handoff-section__heading,
.handoff-section__subheading {
  align-items: center;
  justify-content: space-between;
}

.handoff-section__heading > span {
  align-items: center;
  gap: 9px;
}

.handoff-section__heading > span > span {
  flex-direction: column;
}

.handoff-section__heading strong {
  font-size: 12px;
}

.handoff-section__heading small,
.handoff-section__subheading small {
  color: #7a807c;
  font-size: 9px;
  margin-top: 2px;
}

.handoff-section__heading em {
  align-items: center;
  background: #eeeee9;
  border-radius: 999px;
  display: flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  height: 25px;
  justify-content: center;
  min-width: 25px;
}

.handoff-section__subheading {
  border-top: 1px solid #ecece7;
  font-size: 11px;
  font-weight: 700;
  margin-top: 18px;
  padding-top: 16px;
}

.handoff-section__subheading > span {
  align-items: center;
  display: flex;
  gap: 6px;
}

.handoff-media-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.handoff-media-card {
  border: 1px solid #dedfd9;
  border-radius: 10px;
  min-width: 0;
  overflow: hidden;
}

.handoff-media-card > div {
  aspect-ratio: 4 / 5;
  background: #eeeee9;
  overflow: hidden;
  position: relative;
}

.handoff-media-card--story > div {
  aspect-ratio: 9 / 16;
}

.handoff-media-card > div > img,
.handoff-media-card > div > span {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.handoff-media-card > div > span {
  align-items: center;
  color: #858b87;
  display: flex;
  justify-content: center;
}

.handoff-media-card > div > b {
  align-items: center;
  background: rgba(20, 26, 23, 0.8);
  border-radius: 999px;
  color: white;
  display: flex;
  font-size: 9px;
  height: 25px;
  justify-content: center;
  left: 8px;
  position: absolute;
  top: 8px;
  width: 25px;
}

.handoff-media-card > footer {
  align-items: center;
  background: white;
  display: flex;
  justify-content: space-between;
  padding: 9px;
}

.handoff-media-card > footer > span:first-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.handoff-media-card > footer strong {
  font-size: 10px;
}

.handoff-media-card > footer small {
  color: #7a807c;
  font-size: 8px;
  margin-top: 2px;
}

.handoff-media-card > footer > a,
.handoff-media-pending {
  align-items: center;
  background: #eef3ef;
  border-radius: 50%;
  color: #29463d;
  display: flex;
  flex: 0 0 auto;
  height: 31px;
  justify-content: center;
  width: 31px;
}

.handoff-media-pending {
  color: #8b918d;
}

.handoff-copy-list,
.handoff-audio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 13px;
}

.handoff-copy-list article {
  align-items: center;
  background: #f6f5f1;
  border: 1px solid #e4e4df;
  border-radius: 9px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  padding: 11px 12px;
}

.handoff-copy-list article.is-empty {
  opacity: 0.62;
}

.handoff-copy-list strong {
  font-size: 10px;
}

.handoff-copy-list p {
  color: #525954;
  font-size: 10px;
  line-height: 1.45;
  margin: 4px 0 0;
  max-height: 72px;
  overflow: auto;
  white-space: pre-line;
}

.handoff-copy-list button {
  align-items: center;
  background: white;
  border: 1px solid #d7d9d3;
  border-radius: 8px;
  color: #304b46;
  cursor: pointer;
  display: flex;
  font-size: 9px;
  font-weight: 800;
  gap: 5px;
  padding: 8px 9px;
}

.handoff-copy-list button:disabled {
  cursor: default;
  opacity: 0.45;
}

.handoff-audio-list article {
  align-items: center;
  background: #f6f5f1;
  border-radius: 9px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr auto;
  padding: 11px 12px;
}

.handoff-audio-list article > span {
  display: flex;
  flex-direction: column;
}

.handoff-audio-list strong {
  font-size: 10px;
}

.handoff-audio-list small {
  color: #767d78;
  font-size: 9px;
  margin-top: 3px;
}

.handoff-audio-list a {
  color: #304b46;
}

.handoff-completion {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr minmax(210px, 1fr) auto;
  padding: 16px 17px;
}

.handoff-completion > div,
.handoff-complete {
  align-items: center;
  display: flex;
  gap: 10px;
}

.handoff-completion > div > svg,
.handoff-complete > svg {
  color: #288653;
  flex: 0 0 auto;
}

.handoff-completion > div > span {
  display: flex;
  flex-direction: column;
}

.handoff-completion strong,
.handoff-complete strong {
  font-size: 11px;
}

.handoff-completion small,
.handoff-complete p {
  color: #777e79;
  font-size: 9px;
  margin: 3px 0 0;
}

.handoff-completion > p {
  color: #8b6250;
  font-size: 9px;
  grid-column: 1 / -1;
  margin: 0;
}

.handoff-complete {
  padding: 16px 17px;
}

.handoff-complete > div {
  flex: 1;
}

.handoff-complete a {
  align-items: center;
  color: #304b46;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 5px;
  text-decoration: none;
}

.handoff-error {
  align-items: center;
  display: flex;
  gap: 7px;
  margin: 0;
}

@media (max-width: 760px) {
  .handoff-backdrop {
    padding: 0;
  }

  .handoff-sheet {
    border-radius: 0;
    height: 100dvh;
    max-height: none;
  }

  .handoff-header {
    padding: 11px 13px;
  }

  .handoff-header h1 {
    font-size: 17px;
  }

  .handoff-account {
    display: none;
  }

  .handoff-header {
    grid-template-columns: auto 1fr;
  }

  .handoff-body {
    padding: 12px;
  }

  .handoff-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
    padding: 19px;
  }

  .handoff-download-all {
    justify-content: center;
    width: 100%;
  }

  .handoff-callout {
    grid-template-columns: auto 1fr;
  }

  .handoff-callout > button {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .handoff-override > div,
  .handoff-completion {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .handoff-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .handoff-completion > p {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .handoff-body {
    gap: 10px;
  }

  .handoff-section {
    padding: 14px;
  }

  .handoff-copy-list button span {
    display: none;
  }

  .handoff-copy-list button {
    border-radius: 50%;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
  }

  .post-composer__header-actions > .button {
    font-size: 0;
    padding: 8px;
  }
}
.feed-archive-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 18px; }
.feed-archive-toggle small { color: var(--muted); }
.post-archive-controls { padding: 18px; border-top: 1px solid #e0e0dc; }
.post-archive-controls p { margin: 8px 0 12px; font-size: 14px; }
.post-archive-controls__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.story-publishing { width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 24px; border-radius: 20px; background: #fffefa; font-size: 16px; line-height: 1.5; }
.story-publishing header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.story-publishing h2 { margin: 0 0 20px; font-size: 28px; }
.story-publishing p { margin: 12px 0; }
.story-publishing__preview { display: block; width: 135px; aspect-ratio: 9 / 16; object-fit: contain; margin: 12px 0; border-radius: 10px; background: #eee; }
.story-publishing small { color: #666a61; }
.story-publishing fieldset { margin: 16px 0; padding: 16px; border: 1px solid #deded7; border-radius: 12px; min-width: 0; }
.story-publishing input, .story-publishing select { max-width: 100%; min-width: 0; }
.story-publishing__manual { padding: 14px; background: #f3f1ec; border-radius: 12px; }
.story-publishing__manual ul { margin: 8px 0 0; padding-left: 20px; }
.story-publishing__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.story-publishing footer { border-top: 1px solid #deded7; margin-top: 20px; padding-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.story-editor__actions { flex-wrap: wrap; }
@media (max-width: 600px) { .story-publishing { padding: 18px; } .story-publishing__actions .button { width: 100%; } }

.direction-picker, .direction-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.direction-workspace { padding-bottom: 180px; }
.feed-plan-help { font-size: 14px; color: var(--muted); line-height: 1.5; }
.feed-plan-help .button { margin-left: 12px; }
.feed-plan-cell { min-width: 0; background: var(--surface); }
.feed-plan-cell__label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px; font-size: 13px; }
.feed-plan-cell__label strong { flex: 1 1 100px; overflow-wrap: anywhere; font-size: 14px; }
.feed-plan-cell__label small { color: var(--muted); }
.feed-plan-tile__context { position: absolute; top: 10px; right: 10px; z-index: 2; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; padding: 4px 8px; font-size: 12px; pointer-events: none; }
.planning-grid__post.is-swap-selected { outline: 4px solid var(--clay); outline-offset: -4px; }
.feed-plan-slider { border: 0; padding: 0; margin: 0; min-width: 0; }
.direction-preview > .direction-picker input[type="checkbox"] { width: 18px; height: 18px; margin-right: 8px; }
.weekly-cadence { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; min-width: 0; }
.weekly-cadence legend { font-size: 14px; font-weight: 650; }
.weekly-cadence__days { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0; }
.weekly-cadence__days label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.weekly-cadence__days input { width: 18px; height: 18px; }
.weekly-cadence small { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); }
.direction-picker { padding: 16px 0; }
.direction-picker > .field { flex: 1 1 240px; max-width: 560px; }
.direction-picker select { width: 100%; }
.direction-card { padding: 24px; margin: 16px 0; border: 1px solid #deded7; border-radius: 18px; background: #fffefa; }
.direction-card h2 { font-size: 26px; margin: 0 0 12px; overflow-wrap: anywhere; }
.direction-card p { margin: 10px 0; }
.direction-card fieldset { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; display: grid; gap: 16px; }
.direction-card input, .direction-card select, .direction-card textarea { max-width: 100%; min-width: 0; }
.direction-details { margin-top: 16px; }
.direction-details summary { cursor: pointer; }
.direction-color { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 10px; }
.direction-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.direction-tile { min-width: 0; border: 1px solid #deded7; border-radius: 12px; overflow: hidden; background: #fffefa; }
.direction-tile__image { display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 0; background: #eae8e2; overflow: hidden; }
.direction-tile__image:disabled { opacity: 1; cursor: default; }
.direction-tile__image img, .direction-tile__image svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.direction-tile__caption { padding: 14px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; color: var(--ink); }
.direction-tile__caption strong { font-size: 15px; font-weight: 650; line-height: 1.35; }
.direction-tile__caption p { white-space: pre-wrap; max-height: 8em; overflow-y: auto; margin: 8px 0; }
.direction-tile__caption small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.direction-tile__caption .direction-actions { margin-top: 12px; gap: 8px; }
.direction-tile__caption button { min-height: 40px; min-width: 40px; }
.direction-tile__caption .icon-button:disabled { opacity: 0.4; cursor: not-allowed; background: transparent; }
.direction-tile__caption button:focus-visible, .direction-tile__image:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.direction-actions > .button[aria-pressed] { background: #efeee9; color: var(--muted); margin-bottom: 12px; }
.direction-actions > .button[aria-pressed="true"] { background: var(--green); color: #fff; }
.direction-composer-note { padding: 12px; background: #edf3ef; border-radius: 8px; }
.direction-source-status { margin: 12px 0; padding: 12px; background: #f4f2ec; border-radius: 10px; }
.direction-source-status .button { margin-left: 8px; }
.direction-cadence__table { max-width: 100%; overflow-x: auto; }
.direction-cadence table { width: 100%; border-collapse: collapse; text-align: left; }
.direction-cadence th, .direction-cadence td { padding: 10px; border-bottom: 1px solid #deded7; }
.direction-adoption__selection { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; max-height: 480px; overflow-y: auto; }
.direction-adoption__choice { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #deded7; border-radius: 10px; overflow-wrap: anywhere; cursor: pointer; }
.direction-adoption input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 22px; }
.direction-adoption__thumbnail { display: block; flex: 0 0 72px; width: 72px; aspect-ratio: 3 / 4; overflow: hidden; background: #eae8e2; border-radius: 6px; }
.direction-adoption__thumbnail img, .direction-adoption__thumbnail svg { width: 100%; height: 100%; object-fit: cover; }
.direction-adoption__photos { display: flex; flex-wrap: wrap; gap: 10px; }
.direction-adoption__photos .direction-adoption__thumbnail { width: 132px; flex-basis: 132px; }
.direction-adoption__review { margin: 24px 0; overflow-wrap: anywhere; }
.direction-adoption__post { border-top: 1px solid #deded7; padding: 18px 0; }
.direction-adoption__caption { white-space: pre-wrap; }
.direction-adoption__duplicate { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: #f4f2ec; border-radius: 10px; }
@media (max-width: 600px) {
  .direction-picker > .field { max-width: none; flex-basis: 100%; }
  .direction-card { padding: 16px; }
  .direction-grid { gap: 5px; }
  .direction-tile__caption { padding: 6px; font-size: 13px; }
  .direction-tile__caption strong { font-size: 14px; }
  .direction-tile__caption small { font-size: 11px; }
}

.reference-trends { padding: 28px; min-width: 0; }
.reference-trends__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.reference-trends h1 { margin: 4px 0 12px; }
.reference-trends h2 { font-size: 21px; }
.reference-trends p { line-height: 1.55; }
.reference-trends__switch { display: flex; gap: 8px; margin: 16px 0; }
.reference-trends__switch .button[aria-pressed] { background: #efeee9; color: var(--ink); transition: box-shadow 160ms ease, transform 160ms ease; }
.reference-trends__switch .button[aria-pressed="true"] { background: var(--green); color: white; }
.reference-trends__filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.reference-trends__filters .field { flex: 1 1 145px; max-width: 270px; }
.reference-trends__filters input, .reference-trends__filters select { width: 100%; min-width: 0; }
.reference-trends__note { color: var(--muted); font-size: 13px; }
.reference-trends__grid { display: grid; gap: 8px; margin: 20px 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }
.reference-trends__grid--roomy { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.reference-trends__tile { min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.reference-trends__image { width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 0; display: block; position: relative; background: #eae8e2; overflow: hidden; cursor: pointer; }
.reference-trends__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reference-trends__image > span:not(.reference-trends__badge) { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; padding: 10px; font-size: 12px; }
.reference-trends__image:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.reference-trends__badge { position: absolute; right: 5px; top: 5px; color: white; background: #000a; border-radius: 4px; padding: 4px; font-size: 11px; }
.reference-trends__tile-info { padding: 9px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; overflow-wrap: anywhere; }
.reference-trends__tile-info strong { font-size: 12px; }
.reference-trends__tile-info time, .reference-trends__tile-info small { color: var(--muted); }
.reference-trends__analytics section { padding: 16px 0; border-top: 1px solid var(--line); }
.reference-trends__analytics section > p { font-size: 14px; color: var(--muted); }
.reference-trends__notice { padding: 16px; border-radius: 10px; background: #f3f1ec; }
.reference-trends__table { overflow-x: auto; }
.reference-trends__table table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.reference-trends__table th, .reference-trends__table td { padding: 12px 10px; border-bottom: 1px solid var(--line); min-width: 100px; }
.reference-trends__weeks { max-height: 360px; overflow-y: auto; }
.reference-trends__weekdays { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; }
.reference-trends__weekdays > div { display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.reference-trends__weekdays small { color: var(--muted); line-height: 1.5; }
.reference-trends__bar { background: #eeeae2; height: 12px; border-radius: 3px; overflow: hidden; }
.reference-trends__bar span { display: block; height: 100%; background: var(--green); }
@media (max-width: 600px) { .reference-trends { padding: 16px; } .reference-trends__grid { gap: 5px; grid-template-columns: repeat(3, minmax(0, 1fr)); } .reference-trends__grid--roomy { grid-template-columns: repeat(2, minmax(0, 1fr)); } .reference-trends__tile-info { padding: 6px; } }
.reference-trends__histograms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin: 24px 0; }
.reference-trends__histogram { min-width: 0; }
.reference-trends__histogram h3 { margin: 0; font-size: 17px; }
.reference-trends__histogram > p { color: var(--muted); font-size: 12px; min-height: 38px; }
.reference-trends__histogram-row { display: flex; flex-direction: column; gap: 7px; margin: 16px 0; font-size: 13px; }
.reference-trends__histogram-row > strong { display: flex; justify-content: space-between; gap: 8px; }
.reference-trends__histogram-row > span { color: var(--muted); font-size: 12px; }
.reference-trends__bar--normalized { position: relative; overflow: visible; }
.reference-trends__bar--normalized > span { border-radius: 3px; background: var(--clay); }
.reference-trends__bar--normalized > i { position: absolute; top: -3px; bottom: -3px; border-left: 2px dashed var(--ink); transform: translateX(-1px); }
.reference-trends__baselines summary { cursor: pointer; font-weight: 650; }
.reference-trends__baselines > p { font-size: 13px; color: var(--muted); }
@media (max-width: 700px) { .reference-trends__histograms { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* Private reference Story library */
.story-archive { padding: 28px; min-width: 0; }
.story-archive__header { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 24px; }
.story-archive h1 { margin: 4px 0 8px; font-size: 30px; }
.story-archive__header p { margin: 6px 0; }
.story-archive__toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.story-archive__toolbar [aria-pressed="true"] { background: #222; color: #fff; border-color: #222; }
.story-archive__filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; gap: 14px; padding: 20px; background: #fff; border: 1px solid #e3e1df; border-radius: 12px; }
.story-archive__notice { background: #f3f1ed; color: #53514b; padding: 12px 16px; font-size: 13px; line-height: 1.6; border-radius: 8px; }
.story-archive__summary { margin: 24px 0 16px; font-size: 13px; color: #575653; }
.story-archive__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.story-archive__card { overflow: hidden; border: 1px solid #e3e1df; border-radius: 10px; background: #fff; min-width: 0; }
.story-archive__image { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 9 / 16; border: 0; padding: 0; cursor: pointer; background: #eae8e4; position: relative; color: #69665f; }
.story-archive__image img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
.story-archive__image > span:first-child { display: grid; justify-items: center; gap: 10px; }
.story-archive__badge { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); border-radius: 5px; padding: 5px 8px; background: #171717e8; color: #fff; font-size: 11px; }
.story-archive__caption { display: grid; gap: 6px; padding: 12px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.story-archive__caption strong { font-size: 13px; }
.story-archive__caption small { color: #6c6860; }
.story-archive__noted { color: #406b55; }
.story-archive__timeline h2 { font-size: 20px; padding-top: 16px; }
.story-archive__timeline h2 small { font-size: 13px; font-weight: 400; color: #6c6860; }
.story-archive__pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 24px 0; font-size: 13px; }
.story-archive__empty { display: grid; justify-items: center; text-align: center; padding: 48px 20px; border: 1px dashed #cfccc6; border-radius: 10px; }
.story-archive__coverage { margin-top: 30px; padding: 20px; background: #fff; border: 1px solid #e3e1df; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.story-archive__coverage summary, .story-detail summary { cursor: pointer; font-weight: 600; }
.story-archive__checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.story-archive__checks article { border: 1px solid #e3e1df; padding: 14px; border-radius: 8px; overflow-wrap: anywhere; }
.story-archive__check { display: grid; gap: 6px; font-size: 12px; line-height: 1.6; padding-top: 8px; }
.story-archive__check p { margin: 0; }
.story-detail { padding: 0; width: min(1140px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); border: 1px solid #d8d5ce; border-radius: 14px; color: #282721; background: #fff; }
.story-detail::backdrop { background: #10120fc9; }
.story-detail > header { position: sticky; top: 0; z-index: 2; background: #fff; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e3e1df; }
.story-detail h2 { margin: 4px 0; font-size: 22px; }
.story-detail .eyebrow { margin: 0; }
.story-detail__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.story-detail__visual { padding: 22px; background: #f5f4f1; min-width: 0; }
.story-detail__media { width: 100%; height: min(66vh, 720px); display: flex; justify-content: center; align-items: center; background: #e7e5e0; border-radius: 6px; }
.story-detail__media img, .story-detail__media video { width: 100%; height: 100%; object-fit: contain; }
.story-detail__asset-label { text-align: center; font-size: 12px; }
.story-detail__evidence { padding: 22px; min-width: 0; font-size: 13px; line-height: 1.6; }
.story-detail dl { display: grid; grid-template-columns: minmax(95px, 1fr) minmax(0, 2fr); gap: 8px 14px; margin: 20px 0; font-size: 12px; }
.story-detail dt { color: #6b675e; }
.story-detail dd { margin: 0; overflow-wrap: anywhere; }
.story-detail__sources { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 20px 0; }
.story-detail a { color: #34563f; text-decoration: underline; text-underline-offset: 3px; }
.story-detail a svg { vertical-align: middle; }
.story-detail__technical { font-size: 12px; line-height: 1.6; }
.story-detail__notes { margin-top: 24px; padding-top: 16px; border-top: 1px solid #e3e1df; }
.story-detail__notes fieldset { border: 0; padding: 0; margin: 16px 0; }
.story-detail__notes legend { margin-bottom: 8px; font-weight: 600; }
.story-detail__tags { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.story-detail__tags label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.story-archive button:focus-visible, .story-detail button:focus-visible { outline: 3px solid #4a7658; outline-offset: 3px; }
@media (max-width: 700px) {
  .story-archive { padding: 18px 12px; }
  .story-archive__header { flex-direction: column; }
  .story-archive__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
  .story-archive__filters .field { min-width: 0; }
  .story-archive__filters select, .story-archive__filters input { min-width: 0; width: 100%; }
  .story-archive__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .story-archive__caption { padding: 9px; font-size: 11px; }
  .story-detail { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .story-detail__body { grid-template-columns: minmax(0, 1fr); }
  .story-detail__media { height: 58vh; }
  .story-detail__visual, .story-detail__evidence { padding: 16px; }
}

.story-archive__filter-panel > summary { cursor: pointer; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.story-archive__filter-panel:not([open]) > summary { padding: 14px 16px; background: #fff; border: 1px solid #e3e1df; border-radius: 8px; }

.highlight-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f5ecd9;
  color: #4b3925;
  font-size: 10px;
  font-weight: 700;
}
.highlight-upload-option { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.highlight-upload-option input { width: auto; }

.gallery-tag-manager { margin: 16px 0; border: 1px solid #deddd7; border-radius: 8px; padding: 12px; }
.gallery-tag-manager summary { cursor: pointer; font-weight: 600; }
.gallery-tag-manager p { font-size: 12px; color: #62665e; }
.gallery-tag-manager form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 10px 0; }
.gallery-tag-manager input { min-width: 0; max-width: 100%; border: 1px solid #deddd7; border-radius: 6px; padding: 8px; font: inherit; }
.gallery-tag-manager label { display: grid; gap: 4px; font-size: 12px; }
.gallery-tag-chips { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 8px 0 0; padding: 0; }
.gallery-tag-chips li { overflow-wrap: anywhere; max-width: 100%; font-size: 10px; color: #40574c; background: #e5eee8; padding: 3px 7px; border-radius: 12px; }
.gallery-photo-tags { min-width: 0; border: 1px solid #deddd7; border-radius: 6px; padding: 10px; margin: 14px 0; }
.gallery-photo-tags legend { font-size: 12px; }
.gallery-photo-tags label { display: flex; align-items: center; gap: 7px; margin: 6px 0; overflow-wrap: anywhere; }
.gallery-photo-tags input { width: auto; }

/* Reusable concept library. Full photographs remain separate from feed crops. */
.concept-workspace { padding: clamp(20px, 4vw, 56px); max-width: 1440px; margin: auto; }
.concept-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.concept-heading h1 { font: 38px Georgia, serif; margin: 4px 0 12px; }
.concept-filters { display: flex; flex-wrap: wrap; gap: 18px; align-items: end; margin-bottom: 26px; }
.concept-workspace label, .concept-dialog label { display: grid; gap: 7px; font-size: 13px; }
.concept-workspace input, .concept-workspace select, .concept-dialog input:not([type=checkbox]):not([type=range]), .concept-dialog textarea, .concept-dialog select { padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.concept-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.concept-card { text-align: left; display: block; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; }
.concept-card h2 { font: 23px/1.2 Georgia, serif; margin: 9px 0; }
.concept-card p, .concept-card > span:last-child { font-size: 12px; color: var(--muted); }
.concept-card .eyebrow { display: block; margin-top: 15px; font-size: 10px; }
.concept-photo-block { margin: 0; min-width: 0; }
.concept-photo { background: #e6e4de; position: relative; overflow: hidden; }
.concept-photo img { display: block; width: 100%; }
.concept-photo--post { aspect-ratio: 4 / 5; }
.concept-photo--grid { aspect-ratio: 3 / 4; }
.concept-photo--original { height: 100%; min-height: 150px; }
.concept-photo--original img { height: 100%; object-fit: contain; max-height: 420px; }
.concept-photo--missing { min-height: 200px; display: grid; place-items: center; color: var(--muted); }
.concept-photo-block figcaption { font-size: 12px; margin-top: 9px; color: var(--muted); }
.concept-dialog { max-width: 1100px; width: calc(100% - 32px); max-height: 92vh; border: 1px solid var(--line); border-radius: 12px; padding: clamp(16px, 3vw, 36px); background: var(--paper); color: var(--ink); overflow-y: auto; }
.concept-dialog::backdrop { background: #14221dbb; }
.concept-dialog > label { margin: 15px 0; }
.concept-framing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px; }
.concept-sequence { list-style: none; padding: 0; }
.concept-sequence > li { display: grid; grid-template-columns: 150px 1fr; gap: 22px; border-top: 1px solid var(--line); padding: 22px 0; }
.concept-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0; }
.concept-focal { max-width: 350px; margin-top: 12px; }
.concept-dialog .concept-ack { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; }
@media (max-width: 600px) { .concept-heading { flex-wrap: wrap; } .concept-framing { gap: 8px; } .concept-sequence > li { grid-template-columns: 95px 1fr; gap: 12px; } }
.concept-alternatives { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; }
.concept-view-switch { display: flex; gap: 0; margin-left: auto; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.concept-view-switch button { padding: 10px 18px; border: 0; border-radius: 0; background: var(--surface); color: var(--muted); cursor: pointer; }
.concept-view-switch button[aria-pressed=true] { background: var(--green); color: white; }
.concept-cards--feed { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; max-width: 960px; margin-inline: auto; }
.concept-card--feed { padding: 0; border: 0; border-radius: 0; overflow: hidden; }
.concept-card--feed:focus-visible { outline: 3px solid var(--clay); outline-offset: -3px; }
.concept-scroll-status { min-height: 60px; display: grid; justify-items: center; align-content: center; padding: 20px 0; color: var(--muted); font-size: 12px; }
@media (max-width: 600px) { .concept-cards--feed { gap: 2px; } .concept-view-switch { margin-left: 0; } }

/* Photo-first concept review; controls stay within reach while the body scrolls. */
.concept-dialog--review { width: min(880px, calc(100% - 24px)); height: min(900px, 92dvh); max-height: 92dvh; padding: 0; overflow: hidden; }
.concept-dialog--review[open] { display: flex; flex-direction: column; }
.concept-dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; background: var(--paper); }
.concept-dialog__header h2 { font: 26px/1.15 Georgia, serif; margin: 0; overflow-wrap: anywhere; }
.concept-dialog__header p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.concept-dialog__close { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; }
.concept-dialog__close:hover { background: #e8e6df; }
.concept-dialog__body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 20px 24px; }
.concept-review-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.concept-review-toolbar .concept-view-switch { margin-left: 0; }
.concept-review-toolbar .concept-view-switch button { padding: 9px 12px; font-size: 12px; }
.concept-review-photo { max-width: 350px; margin: 0 auto 18px; }
.concept-review-photo--original { max-width: 650px; }
.concept-review-photo--post { max-width: 420px; }
.concept-review-photo .concept-photo--original img { max-height: 430px; }
.concept-filmstrip { display: flex; overflow-x: auto; gap: 8px; padding: 4px 2px 12px; }
.concept-filmstrip > button { position: relative; flex: 0 0 74px; padding: 3px; background: none; border: 2px solid transparent; border-radius: 4px; cursor: pointer; }
.concept-filmstrip > button[aria-pressed=true] { border-color: var(--green); }
.concept-filmstrip > button > span { display: block; font-size: 10px; margin-top: 5px; color: var(--muted); }
.concept-frame-caption { margin: 4px 0 20px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.concept-review-summary { line-height: 1.6; font-size: 14px; }
.concept-edit-panel { padding: 18px; border: 1px solid var(--line); border-radius: 8px; margin: 20px 0; background: var(--surface); }
.concept-edit-panel > label, .concept-disclosure > label { margin: 14px 0; }
.concept-edit-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.concept-edit-panel textarea, .concept-feedback textarea { width: 100%; resize: vertical; box-sizing: border-box; }
.concept-feedback { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.concept-disclosure { border-top: 1px solid var(--line); padding: 16px 0; font-size: 13px; line-height: 1.6; }
.concept-disclosure > summary { font-weight: 600; cursor: pointer; }
.concept-disclosure[open] > summary { margin-bottom: 16px; }
.concept-muted { font-size: 12px; color: var(--muted); }
.concept-notice { font-size: 13px; background: #e5eee8; padding: 12px; border-radius: 6px; }
.concept-dialog__footer { border-top: 1px solid var(--line); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--surface); flex-shrink: 0; }
.concept-dialog__footer .concept-actions { margin: 0; }
.concept-close-prompt { width: 100%; }
.concept-close-prompt p { font-size: 12px; color: var(--muted); margin: 5px 0 12px; }
@media (max-width: 600px) { .concept-dialog--review { width: calc(100% - 12px); height: 96dvh; max-height: 96dvh; } .concept-dialog__header, .concept-dialog__body { padding: 16px; } .concept-dialog__header h2 { font-size: 22px; } .concept-dialog__footer { padding: 12px 16px; } .concept-edit-fields { grid-template-columns: 1fr; } .concept-filmstrip > button { flex-basis: 62px; } }
.concept-tile { position: relative; min-width: 0; }
.concept-tile > .concept-card { width: 100%; height: 100%; }
.concept-card-image { position: relative; }
.concept-card-collage-indicator { position: absolute; bottom: 8px; left: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid #ffffff45; border-radius: 5px; background: #202623d9; color: #fff; font: 500 10px/1.2 system-ui, sans-serif; pointer-events: none; }
.concept-card-collage-indicator svg { flex-shrink: 0; }
.concept-cycle-cover { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #ffffffb3; border-radius: 50%; background: #fffefaec; color: var(--ink); font-size: 25px; cursor: pointer; box-shadow: 0 2px 8px #0002; }
.concept-cycle-cover:hover { background: white; }
.concept-cycle-cover:disabled { cursor: wait; opacity: .65; }
.concept-framing-tools .concept-view-switch { width: fit-content; margin: 0 0 16px; }
@media (max-width: 600px) { .concept-cycle-cover { width: 36px; height: 36px; top: 5px; right: 5px; } }
.concept-heart { position: absolute; top: 10px; left: 10px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #ffffffb3; border-radius: 50%; background: #fffefaec; color: var(--ink); font-size: 23px; cursor: pointer; box-shadow: 0 2px 8px #0002; }
.concept-heart--active { color: #91465c; }
.concept-heart:disabled { cursor: wait; opacity: .65; }
.concept-favorites-filter { align-self: end; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.concept-favorites-filter[aria-pressed=true] { color: #91465c; background: #f4e9ed; border-color: #d6acb9; }
@media (max-width: 600px) { .concept-heart { width: 36px; height: 36px; top: 5px; left: 5px; } }
.concept-review-photo { position: relative; }
.concept-photo-arrows { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.concept-photo-arrows button { pointer-events: auto; width: 36px; height: 44px; border: 0; background: #fffefadd; border-radius: 5px; font-size: 30px; cursor: pointer; }
.concept-photo-arrows button:disabled { opacity: .25; cursor: default; }
.concept-thumbnail { position: relative; flex: 0 0 74px; min-width: 0; border-radius: 5px; }
.concept-thumbnail[draggable=true] { cursor: grab; }
.concept-thumbnail.is-dragging { opacity: .5; }
.concept-thumbnail.is-drop-target { box-shadow: -3px 0 0 var(--green); }
.concept-thumbnail__select { display: block; width: 100%; padding: 3px; background: none; border: 2px solid transparent; border-radius: 4px; cursor: pointer; }
.concept-thumbnail__select[aria-pressed=true] { border-color: var(--green); }
.concept-thumbnail__select > span { display: block; font-size: 10px; margin-top: 5px; color: var(--muted); }
.concept-thumbnail__remove { position: absolute; top: 1px; right: 1px; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; padding: 0; background: var(--surface); color: var(--danger); cursor: pointer; }
.concept-thumbnail__remove:disabled { opacity: .4; }
.concept-thumbnail__grip { position: absolute; left: 4px; top: 6px; color: white; background: #0005; border-radius: 3px; pointer-events: none; }
.concept-photo-picker { border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--surface); margin: 15px 0; }
@media (max-width: 600px) { .concept-thumbnail { flex-basis: 62px; } }

/* The collage is a whole slide; panel targets never crop its source photos. */
.concept-collage { position: relative; width: 100%; }
.concept-collage-badge { position: absolute; bottom: .4rem; left: .4rem; padding: .2rem .45rem; border-radius: .3rem; background: #fffef2e8; color: #3c302a; font-size: .72rem; pointer-events: none; }
.concept-thumbnail .concept-collage-badge { font-size: .6rem; bottom: 0; left: 0; }
.collage-canvas { position: relative; width: 100%; overflow: hidden; }
.collage-canvas img { display: block; max-width: none; object-fit: contain; background: white; }
.collage-empty { position: absolute; display: grid; place-items: center; border: 1px dashed #9b8b7b; color: #766759; font-size: .8rem; }
.collage-panel-target { position: absolute; padding: 0; border: 2px solid transparent; border-radius: 0; background: transparent; }
.collage-panel-target:hover, .collage-panel-target:focus-visible, .collage-panel-target.is-selected { background: transparent; border-color: #7c5d42; outline-offset: 2px; }
.collage-editor { padding-bottom: 1rem; }
.collage-editor h3:focus { outline: none; }
.collage-editor-layout { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr); gap: 1.25rem; align-items: start; margin: 1rem 0; }
.collage-editor-layout > div:first-child { max-width: 460px; }
.collage-panel-cards { display: grid; gap: .7rem; }
.collage-panel-card { padding: .85rem; border: 1px solid #ddd4c7; border-radius: .6rem; overflow-wrap: anywhere; }
.collage-panel-card.is-selected { border-color: #7c5d42; box-shadow: 0 0 0 1px #7c5d42; }
.collage-panel-card h4 { margin: 0 0 .4rem; text-transform: capitalize; }
.collage-panel-card p { margin: .3rem 0 .7rem; }
.collage-editor select { max-width: 100%; }
.collage-concept-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.collage-concept-photos button { min-width: 0; overflow-wrap: anywhere; }
.collage-concept-photos img { width: 100%; height: 110px; object-fit: contain; }
.collage-concept-photos span { display: block; font-size: .7rem; }
.collage-editor fieldset { display: grid; gap: .65rem; padding: 1rem; border: 1px solid #ddd4c7; margin: 1rem 0; }
.collage-editor fieldset label { display: flex; gap: .5rem; align-items: center; }
.collage-editor-footer { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding-top: 1rem; }
.concept-collage-status { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; padding: .5rem 0; }
@media (max-width: 640px) {
  .collage-editor-layout { grid-template-columns: minmax(0, 1fr); }
  .collage-editor-layout > div:first-child { max-width: 100%; }
  .collage-panel-card .concept-actions { flex-wrap: wrap; }
}
.collage-layout-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 1rem 0; }
.collage-layout-options > button { min-width: 0; padding: .4rem; text-align: center; font-size: .75rem; }
.collage-layout-options > button[aria-pressed="true"] { box-shadow: 0 0 0 2px #7c5d42; }
.collage-layout-options .collage-empty { font-size: 0; background: #d4c9bc; border: 0; }
.collage-layout-options span { display: block; margin-top: .4rem; }
@media (max-width: 420px) { .collage-layout-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Version-scoped rejection sits beside the favorite in either concept view. */
.concept-reject { position: absolute; z-index: 1; top: 10px; left: 56px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #ffffffb3; border-radius: 50%; background: #fffefaec; color: var(--ink); font-size: 27px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px #0002; }
.concept-reject--active { color: #8b3434; background: #fff3f0; border-color: #d8aaaa; }
.concept-reject:disabled { opacity: .65; cursor: wait; }
.concept-reject:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
.concept-reject-dialog { width: min(550px, calc(100% - 24px)); padding: 0; }
.concept-reject-dialog textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.concept-reject-dialog .concept-dialog__body { max-height: 60dvh; }
.concept-reject-discard { margin-top: 16px; padding: 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; }
@media (max-width: 600px) { .concept-reject { top: 5px; left: 46px; width: 36px; height: 36px; } }
@media (max-width: 600px) {
  .concept-tile--feed .concept-heart { width: 30px; height: 30px; }
  .concept-tile--feed .concept-reject { left: 40px; width: 30px; height: 30px; font-size: 24px; }
  .concept-tile--feed .concept-cycle-cover { top: auto; bottom: 5px; }
}
.concept-reasoning { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.concept-reasoning h3 { margin: 0 0 12px; font-size: 17px; }
.concept-reasoning h3 span { font-size: 12px; font-weight: 400; color: var(--muted); }
.concept-reasoning h4 { margin: 14px 0 5px; font-size: 12px; }
.concept-reasoning p { margin: 5px 0 12px; white-space: pre-line; overflow-wrap: anywhere; }
.concept-reasoning a { font-size: 13px; }

/* Nine-photo layouts keep the selected position editor next to the full canvas. */
.collage-slot-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.collage-slot-list button { padding: .5rem; font-size: .75rem; overflow-wrap: anywhere; }
.collage-slot-list button[aria-pressed="true"] { border-color: #7c5d42; box-shadow: 0 0 0 1px #7c5d42; }
.collage-panel-target[draggable="true"] { cursor: grab; }

.tiktok-connections { max-width: 780px; margin: 40px auto; padding: 24px; }
.tiktok-connections section { padding: 20px 0; border-bottom: 1px solid #ddd; }
.tiktok-connections form { display: inline-block; margin: 6px 12px 6px 0; }
.tiktok-connections [role="status"] { padding: 16px; background: #e8efec; }
.tiktok-draft-editor, .tiktok-drafts { max-width: 900px; }
.tiktok-draft-editor form, .tiktok-drafts form { display: block; }
.tiktok-draft-editor fieldset { min-inline-size: 0; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 20px 0; }
.tiktok-draft-editor label, .tiktok-drafts label { display: block; margin-top: 16px; margin-bottom: 6px; }
.tiktok-draft-editor textarea { width: 100%; box-sizing: border-box; }
.tiktok-draft-editor select, .tiktok-drafts select { max-width: 100%; }
.tiktok-video-preview { display: block; max-width: 100%; max-height: 520px; margin: 16px auto; background: #111; border-radius: 12px; }
.tiktok-drafts details { margin-top: 28px; }
.tiktok-drafts summary { cursor: pointer; font-weight: 700; }
.tiktok-identity-avatar { border-radius: 50%; object-fit: cover; }
