.journal {
  --journal-line: color-mix(in srgb, var(--ink) 15%, var(--paper));
  width: min(100%, 510px);
  margin-inline: auto;
}

.journal-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 16px 12px;
}

.journal-heading a {
  width: fit-content;
  color: var(--brand-deep);
}

.journal-heading h1 {
  font: 600 clamp(27px, 4vw, 34px)/1.35 var(--heading);
}

.journal-post {
  border-top: 1px solid var(--journal-line);
}

.journal-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.journal-post-header h2 {
  font: 600 18px/1.45 var(--heading);
}

.journal-post-header p {
  color: var(--muted);
  font-size: 14px;
}

.journal-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  color: var(--brand-deep);
  background: var(--brand-tint);
}

.journal-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journal-gallery { margin: 0; }
.journal-photo-frame { position: relative; }

.journal-photo-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: var(--brand-tint);
  aspect-ratio: 3 / 4;
}

.journal-photo-track::-webkit-scrollbar { display: none; }

.journal-photo-track img {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.journal button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-deep);
}

.journal-open-photo { display: none; }

@media (hover: hover) and (pointer: fine) {
  .journal .journal-open-photo {
    position: absolute;
    display: block;
    inset: 0;
    width: 100%;
    border-radius: 0;
    cursor: zoom-in;
  }

  .journal .journal-open-photo:focus-visible { outline-offset: -4px; }
}

.journal-dots {
  display: flex;
  justify-content: center;
}

.journal-dot {
  display: grid;
  place-items: center;
  width: 28px;
  padding: 0;
}

.journal-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a2adc4;
}

.journal-dot[aria-current="true"]::before {
  width: 9px;
  height: 9px;
  background: var(--brand);
}

@media (pointer: coarse) {
  .journal-dot { width: 44px; }
}

.journal-position {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.journal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0 10px 4px;
}

.journal-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 6px;
}

.journal-actions button:hover, .journal-comment-form button:hover {
  background: var(--brand-tint);
}

.journal-like[aria-pressed="true"] { color: #9b3e5a; }
.journal-like[aria-pressed="true"] svg { fill: currentColor; }
.journal-gallery figcaption { padding: 0 16px 16px; }

.journal-comments {
  display: grid;
  gap: 8px;
  padding: 0 16px 18px;
}

.journal-comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.journal-comment-list:empty { display: none; }

.journal-comment-list li {
  padding: 7px 0;
  border-top: 1px solid var(--journal-line);
  overflow-wrap: anywhere;
}

.journal-comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.journal-comment-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.journal-comment-form button { min-width: 44px; }

.journal-keep-local {
  color: var(--muted);
  font-size: 13px;
}

.journal-lightbox {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  overscroll-behavior: contain;
}

.journal-lightbox::backdrop { background: #1b233bbb; }

.journal-lightbox header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--paper);
}

.journal-lightbox h2 { font: 600 18px/1.45 var(--heading); }

.journal-lightbox button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--brand-deep);
}

.journal-lightbox img { display: block; width: 100%; height: auto; }
.journal-lightbox p { padding: 10px 14px 14px; }
