:root {
  color-scheme: light;
  font-family:
    Inter, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic",
    sans-serif;
  color: #292b2a;
  background: #f2ecdd;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #f2ecdd;
}

body.post-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -100px, rgba(255, 255, 255, 0.55), transparent 360px),
    #f2ecdd;
  color: #292b2a;
  -webkit-font-smoothing: antialiased;
}

.post-site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 430px);
  min-height: 58px;
  margin: 0 auto;
  padding: 18px 16px 10px;
}

.post-site-brand {
  color: #171918;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  text-decoration: none;
}

.post-site-brand:focus-visible,
.post-action:focus-visible,
.post-carousel-button:focus-visible,
.post-carousel-dot:focus-visible,
.post-carousel-track:focus-visible {
  outline: 3px solid rgba(46, 123, 88, 0.48);
  outline-offset: 3px;
}

.post-shell {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 8px 10px calc(88px + env(safe-area-inset-bottom, 0px));
}

.post-card,
.post-error-card {
  overflow: hidden;
  border: 1px solid rgba(37, 39, 38, 0.06);
  border-radius: 15px;
  background: #fff;
  box-shadow:
    0 2px 2px rgba(30, 32, 31, 0.18),
    0 8px 22px rgba(55, 47, 29, 0.09);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 12px 14px 10px;
}

.post-avatar,
.post-avatar-fallback {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(28, 32, 30, 0.12);
  border-radius: 50%;
  background: #e9eee9;
}

.post-avatar {
  display: block;
  object-fit: cover;
}

.post-avatar-fallback {
  display: grid;
  place-items: center;
  color: #2f6f55;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
}

.post-author-copy {
  min-width: 0;
}

.post-author-name,
.post-property-name,
.post-body {
  margin: 0;
}

.post-author-name {
  overflow: hidden;
  color: #212322;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-property-name {
  overflow: hidden;
  margin-top: 1px;
  color: #515552;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-carousel {
  position: relative;
  margin: 0 13px;
}

.post-carousel-track {
  display: flex;
  overflow-x: auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: #eef1ee;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.post-carousel-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  background: #e6eae7;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.post-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.post-carousel-controls {
  pointer-events: none;
}

.post-carousel-button {
  position: absolute;
  z-index: 2;
  top: calc(50% - 22px);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0 0 3px;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 25, 23, 0.64);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1.65rem;
  line-height: 1;
  opacity: 1;
  pointer-events: auto;
  transition:
    opacity 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.post-carousel-button:hover:not(:disabled) {
  background: rgba(22, 25, 23, 0.78);
  transform: scale(1.04);
}

.post-carousel-button:disabled {
  cursor: default;
  opacity: 0;
  pointer-events: none;
}

.post-carousel-button--previous {
  left: 8px;
}

.post-carousel-button--next {
  right: 8px;
}

.post-carousel-status {
  position: absolute;
  z-index: 2;
  right: 9px;
  bottom: 9px;
  min-width: 46px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(22, 25, 23, 0.65);
  color: #fff;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

.post-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 14px;
  padding-top: 8px;
}

.post-carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c5c9c6;
  cursor: pointer;
  transition:
    width 160ms ease,
    background-color 160ms ease;
}

.post-carousel-dot.is-active {
  width: 18px;
  border-radius: 999px;
  background: #34765a;
}

.post-body {
  padding: 14px 14px 19px;
  color: #454946;
  font-size: 0.91rem;
  letter-spacing: 0.005em;
  line-height: 1.9;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.post-edited {
  margin: -10px 14px 16px;
  color: #858b87;
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: right;
}

.post-actions {
  display: grid;
  gap: 10px;
  padding: 27px 16px 0;
}

.post-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.post-action--primary {
  background: #2f7658;
  box-shadow: 0 7px 20px rgba(47, 118, 88, 0.2);
  color: #fff;
}

.post-action--secondary {
  border: 1px solid rgba(47, 84, 67, 0.2);
  background: rgba(255, 255, 255, 0.58);
  color: #315b48;
}

.post-error-card {
  padding: 50px 28px 46px;
  text-align: center;
}

.post-error-code {
  margin: 0 0 12px;
  color: #ad8531;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.post-error-card h1 {
  margin: 0;
  color: #222522;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
  line-height: 1.45;
}

.post-error-card > p:last-child {
  margin: 17px 0 0;
  color: #686e69;
  font-size: 0.9rem;
  line-height: 1.8;
}

@media (min-width: 520px) {
  .post-site-header {
    padding-top: 22px;
  }

  .post-shell {
    padding-top: 10px;
    padding-bottom: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-carousel-track {
    scroll-behavior: auto;
  }

  .post-carousel-button,
  .post-carousel-dot {
    transition: none;
  }
}
