/* ============================================================
   Instagram Stories — customer-facing
   ============================================================ */

.stories-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.8rem, 4vw, 3rem) 1.5rem 4.5rem;
}

/* Header */
.stories-head {
  display: grid;
  gap: 0.4rem;
}

.stories-head__kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.58);
}

.stories-head__title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  color: #000;
}

/* Profile bar */
.stories-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.4rem 0 1.8rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.stories-profile__avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid #000;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #000;
}

.stories-profile__meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.stories-profile__handle {
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  color: #000;
}

.stories-profile__link {
  width: fit-content;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.6);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  padding-bottom: 1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.stories-profile__link:hover {
  color: #000;
  border-color: #000;
}

/* Stories tray (rings) */
.stories-tray {
  display: flex;
  gap: 1.1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.story-ring {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 5.4rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  scroll-snap-align: start;
}

.story-ring__frame {
  position: relative;
  width: 4.7rem;
  height: 4.7rem;
  border-radius: 50%;
  padding: 0.2rem;
  border: 1.5px solid #000;
  background: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.story-ring:hover .story-ring__frame,
.story-ring:focus-visible .story-ring__frame {
  transform: translateY(-2px) scale(1.03);
}

.story-ring:focus-visible {
  outline: none;
}

.story-ring:focus-visible .story-ring__frame {
  box-shadow: 0 0 0 2px #000;
}

.story-ring--seen .story-ring__frame {
  border-color: rgba(0, 0, 0, 0.22);
}

.story-ring__media {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
}

.story-ring__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.story-ring__frame--video::after {
  content: "";
  position: absolute;
  right: 0.05rem;
  bottom: 0.05rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 0.55rem no-repeat;
}

.story-ring__label {
  max-width: 100%;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-ring--seen .story-ring__label {
  color: rgba(0, 0, 0, 0.4);
}

.stories-empty {
  margin: 0 0 1rem;
  padding: 2.6rem 1rem;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  text-align: center;
  color: rgba(0, 0, 0, 0.55);
}

/* Story viewer (full-screen lightbox) */
.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 2rem);
  padding: clamp(0.5rem, 3vh, 2rem);
  background: rgba(0, 0, 0, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.story-viewer.is-open {
  display: flex;
}

body.story-viewer-open {
  overflow: hidden;
}

.story-viewer__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(45px) brightness(0.4);
  transform: scale(1.2);
  pointer-events: none;
}

.story-viewer__stage {
  position: relative;
  z-index: 1;
  height: 94vh;
  max-height: 94vh;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  background: #000;
  overflow: hidden;
  border-radius: 0.6rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.story-viewer__media {
  position: absolute;
  inset: 0;
  z-index: 1;
  will-change: transform, opacity;
}

.story-viewer__media img,
.story-viewer__media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.story-viewer__progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  gap: 3px;
  padding: 0.55rem 0.7rem 0;
}

.story-seg {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.32);
  overflow: hidden;
}

.story-seg__fill {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
  border-radius: 2px;
}

.story-viewer__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 0.7rem 0.7rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.story-viewer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.story-viewer__avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
  color: #fff;
}

.story-viewer__id {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.story-viewer__handle {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-viewer__time {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
}

.story-viewer__close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
}

.story-viewer__close:hover {
  opacity: 1;
}

.story-viewer__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  margin: 0;
  padding: 2.6rem 1rem 1.2rem;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.5;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.story-viewer__pause {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: 4rem;
  height: 4rem;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.story-viewer__pause::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.1rem;
  height: 1.3rem;
  border-left: 0.32rem solid #fff;
  border-right: 0.32rem solid #fff;
}

.story-viewer.is-paused .story-viewer__pause {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.story-viewer__arrow {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.story-viewer__arrow:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Instagram-profile-style posts grid */
.ig-posts {
  margin-top: 3.2rem;
}

.ig-posts__head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.ig-posts__kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.58);
}

.ig-posts__title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1;
  color: #000;
}

.ig-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2px, 0.6vw, 0.6rem);
}

.ig-post {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #000;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.ig-post:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.ig-post__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ig-post:hover .ig-post__img,
.ig-post:focus-visible .ig-post__img {
  transform: scale(1.045);
}

.ig-post__badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 1.35rem;
  height: 1.35rem;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.ig-post__badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ig-post__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.22s ease;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.ig-post:hover .ig-post__overlay,
.ig-post:focus-visible .ig-post__overlay {
  opacity: 1;
}

.ig-post__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ig-post__stat svg {
  width: 1rem;
  height: 1rem;
}

/* Instagram-post lightbox */
.post-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  padding: clamp(0.75rem, 3vh, 2rem);
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.post-viewer.is-open {
  display: flex;
}

body.post-viewer-open {
  overflow: hidden;
}

.post-viewer__dialog {
  display: flex;
  width: min(960px, 100%);
  max-height: 90vh;
  background: #fff;
  border-radius: 0.6rem;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.post-viewer__stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  place-items: center;
  background: #000;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.post-viewer__media {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  will-change: transform, opacity;
}

.post-viewer__media img,
.post-viewer__media video {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  background: #000;
}

.post-viewer__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.8rem;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  pointer-events: none;
}

.post-viewer__dots:empty {
  display: none;
}

.post-dot {
  width: 0.42rem;
  height: 0.42rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.18s ease, transform 0.18s ease;
}

.post-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

/* In-image carousel arrows (move between media of one post) */
.post-viewer__carousel {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.post-viewer__stage:hover .post-viewer__carousel:not([hidden]) {
  opacity: 1;
}

.post-viewer__carousel:hover {
  background: rgba(0, 0, 0, 0.7);
}

.post-viewer__carousel--prev {
  left: 0.6rem;
}

.post-viewer__carousel--next {
  right: 0.6rem;
}

.post-viewer__carousel[hidden] {
  display: none;
}

.post-viewer__aside {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.post-viewer__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.post-viewer__avatar {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid #000;
  font-family: "Cinzel", serif;
  font-size: 0.6rem;
  color: #000;
}

.post-viewer__id {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.post-viewer__handle {
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  color: #000;
}

.post-viewer__time {
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.55);
}

.post-viewer__caption {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.1rem;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #000;
}

.post-viewer__caption:empty::before {
  content: attr(data-empty-label);
  color: rgba(0, 0, 0, 0.4);
}

.post-viewer__close {
  position: absolute;
  top: clamp(0.75rem, 3vh, 2rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  z-index: 4;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
}

.post-viewer__close:hover {
  opacity: 1;
}

.post-viewer__arrow {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.post-viewer__arrow:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.6);
}

.post-viewer__arrow[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .stories-page {
    padding: 1.4rem 1rem 3rem;
  }

  .ig-posts__grid {
    gap: 2px;
  }

  .story-viewer {
    padding: 0;
    gap: 0;
  }

  .story-viewer__arrow {
    display: none;
  }

  .story-viewer__stage {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    aspect-ratio: auto;
  }

  .story-ring {
    width: 4.8rem;
  }

  .story-ring__frame {
    width: 4.1rem;
    height: 4.1rem;
  }

  .post-viewer {
    padding: 0;
    gap: 0;
  }

  .post-viewer__arrow {
    display: none;
  }

  .post-viewer__dialog {
    flex-direction: column;
    width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }

  .post-viewer__stage {
    flex: 0 0 auto;
    max-height: 62vh;
  }

  .post-viewer__media img,
  .post-viewer__media video {
    max-height: 62vh;
  }

  .post-viewer__aside {
    flex: 1 1 auto;
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .post-viewer__close {
    top: 0.6rem;
    right: 0.6rem;
  }

  .post-viewer__carousel:not([hidden]) {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-ring__frame,
  .ig-post__img,
  .ig-post__overlay,
  .story-viewer__arrow,
  .story-viewer__pause {
    transition: none;
  }
}

.admin-instagram-page {
  display: grid;
  gap: 2rem;
}

.admin-instagram-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.admin-instagram-header h1,
.admin-instagram-header p,
.admin-instagram-settings h2,
.admin-instagram-status h2,
.admin-instagram-stories h2,
.admin-instagram-events h2 {
  margin: 0;
}

.admin-instagram-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid #000;
}

.admin-instagram-tabs__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid #000;
  border-bottom: 0;
  color: #000;
  text-decoration: none;
}

.admin-instagram-tabs__link--active {
  background: #000;
  color: #fff;
}

.admin-instagram-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-instagram-section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.admin-instagram-section-actions form {
  margin: 0;
}

.admin-instagram-status {
  display: grid;
  gap: 1rem;
}

.admin-instagram-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid #000;
  border-left: 1px solid #000;
}

.admin-instagram-status-grid > div {
  min-width: 0;
  padding: 0.85rem;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
}

.admin-instagram-status-grid dt {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-instagram-status-grid dd {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-instagram-status-grid small {
  display: block;
  font-size: 0.85rem;
}

.admin-instagram-settings {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.2fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

.admin-instagram-settings__summary,
.admin-instagram-settings__form {
  min-width: 0;
}

.admin-instagram-settings dl,
.admin-instagram-story__details {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.admin-instagram-settings dt,
.admin-instagram-story__details dt {
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-instagram-settings dd,
.admin-instagram-story__details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-instagram-session-help {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #000;
}

.admin-instagram-session-help h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.admin-instagram-session-help ol {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.25rem;
}

.admin-instagram-session-help code {
  overflow-wrap: anywhere;
}

.admin-instagram-story-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.admin-instagram-story {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #000;
}

.admin-instagram-story:last-child {
  border-bottom: 1px solid #000;
}

.admin-instagram-story__media {
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
}

.admin-instagram-story__media img,
.admin-instagram-story__media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.admin-instagram-story__body {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.admin-instagram-story__meta,
.admin-instagram-story__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.admin-instagram-story__meta span,
.admin-instagram-story__meta time {
  border: 1px solid #000;
  padding: 0.2rem 0.5rem;
  font-size: 0.82rem;
  line-height: 1.2;
}

.admin-instagram-story__description {
  display: grid;
  gap: 0.5rem;
}

.admin-instagram-story__details code {
  white-space: normal;
}

.admin-instagram-story__events {
  border-top: 1px solid #000;
  padding-top: 0.75rem;
}

.admin-instagram-story__events h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.admin-instagram-story__events ul {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-instagram-story__events li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-instagram-story__actions form {
  margin: 0;
}

.admin-instagram-post {
  grid-template-columns: minmax(180px, 340px) minmax(0, 1fr);
}

.admin-instagram-post__media-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0.5rem;
}

.admin-instagram-post__media {
  width: 100%;
}

.admin-instagram-post__media:first-child {
  grid-column: 1 / -1;
}

.admin-instagram-events {
  overflow-x: auto;
}

.admin-instagram-events__table {
  width: 100%;
}

.admin-instagram-event-log {
  min-width: min(32rem, 60vw);
}

.admin-instagram-event-log__summary {
  overflow-wrap: anywhere;
}

.admin-instagram-event-log details {
  margin-top: 0.5rem;
}

.admin-instagram-event-log summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.admin-instagram-event-log pre {
  max-width: min(100%, 68rem);
  margin: 0.5rem 0;
  padding: 0.75rem;
  overflow: auto;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .admin-instagram-settings,
  .admin-instagram-status-grid,
  .admin-instagram-story {
    grid-template-columns: 1fr;
  }

  .admin-instagram-post__media-list {
    width: min(100%, 320px);
  }

  .admin-instagram-story__media {
    width: min(100%, 260px);
  }

  .admin-instagram-event-log {
    min-width: 18rem;
  }
}
