:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #171717;
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid #0095f6; outline-offset: 4px; }

main { display: flex; justify-content: center; padding: 8px 24px 32px; }
.post {
  width: min(640px, calc((100svh - 142px) * .8));
  min-width: 340px;
  margin: 0;
}
.swipe-cue { display: flex; align-items: center; justify-content: center; gap: 9px; height: 48px; margin: 0; color: #737373; font-size: 14px; font-weight: 500; letter-spacing: .02em; }
.swipe-cue svg { width: 22px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.viewer { position: relative; overflow: hidden; border: 1px solid #e5e5e5; border-radius: 3px; background: #15191c; }
.slides {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  aspect-ratio: 4 / 5;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
}
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline-offset: -3px; }
.slides.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }
.slide { flex: 0 0 100%; width: 100%; height: 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.slide img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.counter { position: absolute; top: 13px; right: 13px; padding: 5px 9px; border-radius: 20px; color: #fff; background: rgb(0 0 0 / 65%); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; pointer-events: none; transition: opacity 180ms ease; }
.counter.is-idle { opacity: 0; }
.arrow { position: absolute; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; padding: 8px; border: 0; background: transparent; transform: translateY(-50%); cursor: pointer; }
.arrow::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: rgb(255 255 255 / 94%); box-shadow: 0 1px 5px rgb(0 0 0 / 20%); }
.arrow svg { position: relative; width: 17px; height: 17px; fill: none; stroke: #454545; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.arrow--previous { left: 2px; }
.arrow--next { right: 2px; }
.arrow:disabled { visibility: hidden; pointer-events: none; }
.arrow:hover::before { background: #fff; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; height: 34px; }
.dot { display: grid; place-items: center; width: 8px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #d6d6d6; transition: background-color 120ms ease; }
.dot[aria-current="true"]::after { background: #0095f6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
  main { padding: env(safe-area-inset-top) 0 calc(24px + env(safe-area-inset-bottom)); }
  .post { width: 100%; min-width: 0; }
  .swipe-cue { height: 42px; }
  .viewer { border-right: 0; border-left: 0; border-radius: 0; }
  .pagination { height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .slides { scroll-behavior: auto; }
  .dot::after, .counter { transition: none; }
}

@media (pointer: coarse) {
  .arrow { display: none; }
}
