/* =========================================
   Imagical typography baseline
   ========================================= */

  margin: 0.2em 0 1em 1.6em;

  /* Prevent odd wrapping */
  clear: right;

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #222;
}

/* Mobile readability */
@media (max-width: 736px) {
  body {
    font-size: 17px;
    line-height: 1.65;
  }
}

/* Paragraph spacing */
p {
  margin: 0 0 1.2rem 0;
}

/* Headings — same font, calmer weight */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: inherit;
  font-weight: 500;
  color: #111;
}

/* Captions and secondary text */
.caption,
figcaption,
.gallery__caption {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
}

/* Links — readable, not flashy */
a {
  color: #1a5fb4; /* calm blue */
}

a:hover {
  text-decoration: underline;
}

.post .content {
  max-width: 42rem; /* ~670px */
}

/* Live updates box */
#live-updates .updates-scroll {
  max-height: 9.5rem; /* roughly 5 rows; adjust as needed */
  overflow-y: auto;
}

#live-updates .updates {
  list-style: none;
  margin: 0;
  padding: 0;
}

#live-updates .updates li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9em;
  padding: 0.2rem 0;
  border-bottom: solid 1px rgba(255, 255, 255, 0.1); /* tweak if your background is light */
}

#live-updates .updates li:last-child {
  border-bottom: 0;
}

#live-updates .date {
  flex: 0 0 auto;
  white-space: nowrap;
  opacity: 0.7;
  font-family: "Courier New", monospace;
}

#live-updates .text {
  flex: 1 1 auto;
}

#live-updates.box {
  border: none;
  box-shadow: none;
  padding-top: 0.5rem; /* optional: tighten the top */
}

.video-fullwidth {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 2rem 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-fullwidth iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.share-box {
  margin: 1rem 0;
  font-size: 0.9rem;
}

.share-box span {
  margin-right: 0.5rem;
  font-weight: 600;
}

.share-btn {
  padding: 0rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  background: #f8f8f8;
  cursor: pointer;
}

.imagical-chapter-nav {
  margin: 4rem 0 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
  text-align: center;
}

/* subtle section title */
.imagical-chapter-nav h3 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 1.5rem;
}

/* vertical flow */
.chapter-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  line-height: 1.6;
}

/* links */
.chapter-links a {
  text-decoration: none;
  color: #333;
  transition: color 0.2s ease;
}

/* gentle hover */
.chapter-links a:hover {
  color: #000;
  text-decoration: underline;
}

/* current post */
.chapter-current {
  font-style: italic;
  color: #aaa;
}

/* optional: soften arrows slightly */
.chapter-prev,
.chapter-next {
  font-size: 0.95rem;
}

@media screen and (max-width: 980px) {
  span.image.left {
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 1rem 0 !important;
    clear: both !important;
  }

  span.image.left img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* =========================================
   Gallery captions — readability fix
   ========================================= */

.gallery__caption {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333; /* darker, easy to read */
}

/* If captions appear inside a lightbox/modal */
.gallery__lightbox .gallery__caption,
.lightbox .gallery__caption {
  color: #111;
}
.gallery figcaption,
.gallery__item figcaption {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 0.95rem;
  color: #111;
}
.post-date-home {
  font-size: 0.8rem;
}
.name-explain {
  border-radius: 0.375em;
  background-color: linen;
  width: 180px;
  padding: 5px;
  border: 1px solid #333;
  float: left;
  margin-right: 10px;
  margin-top: 8px;
  font-size: 0.9rem;
}
.side-note-right {
  border-radius: 0.375em;
  background-color: linen;
  width: 180px;
  padding: 5px;
  border: 1px solid #333;
  float: right;
  margin-right: 10px;
  margin-top: 8px;
  font-size: 0.9rem;
}
.thumb-caption {
  color: #111;
}

.gallery__item-wrapper {
  max-width: 500px;
  margin: 0 auto;   /* centers single images */
}
.imagical-video-wrapper {
  display: flex;
  justify-content: center;
  margin: 3rem auto;
}

.imagical-video-wrapper video {
  max-width: 420px; /* ← KEY: controls size */
  width: 100%;
  height: auto;
  background: transparent; /* removes black box */
  display: block;
  border-radius: 6px; /* optional, feels nice */
}
.imagical-video-wrapper video {
  max-width: 420px;
  width: 100%;
  aspect-ratio: 3 / 4; /* ← THIS is the missing piece */
  object-fit: cover; /* ensures no bars */
  display: block;
  border-radius: 6px;
}
/* Remove the forced thumbnail shape */
.gallery__item {
  aspect-ratio: auto; /* or just delete the aspect-ratio rule */
  overflow: hidden;
  max-width: 500px;
  max-height: 500px;    
}

/* Let images keep their natural aspect ratio */
.gallery__item img,
.gallery__item video {
  width: 100%;
  height: auto; /* key change */
  object-fit: contain; /* key change: no cropping */
  display: block;
}
.gallery__item[data-type="video"]::after {
  content: "🔊";
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 8px;
  border-radius: 50%;
  line-height: 1;
  pointer-events: none; /* don’t block clicks */
}
.map-wrapper {
  margin-top: 1.5rem;
}
#map {
  width: 100%;
  height: 70vh;        /* more dominant on this page */
  min-height: 400px;   /* usable on small screens */
  max-height: 800px;   /* avoids oversized desktop maps */
  border-radius: 12px;
}

@media (max-width: 768px) {
  .gallery__item {
    aspect-ratio: auto !important;
  }

  .gallery__item img,
  .gallery__item video {
    height: auto !important;
    object-fit: contain !important;
  }
}
/* Mobile: prevent gallery image cropping */
@media (max-width: 768px) {
  .gallery__item {
    aspect-ratio: auto !important;
  }

  .gallery__item img,
  .gallery__item video {
    height: auto !important;
    object-fit: contain !important;
  }
}

/* Mobile: make floated images full-width */
@media (max-width: 768px) {
  .image.left,
  .image.right {
    float: none !important;
    width: 100% !important;
    margin: 1rem 0 !important;
  }
}
@media (max-width: 768px) {
  .image {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
  }

  .image img {
    width: 100% !important;
    height: auto !important;
  }
}

/* Places */
/* Remove default marker */
summary {
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

/* Custom arrow */
summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.6rem;
  color: #888;              /* soft gray, not dominant */
  font-size: 0.85em;        /* slightly smaller than text */
  transform: translateY(-1px);
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Open state */
details[open] summary::before {
  transform: rotate(90deg) translateY(-1px);
  color: #555;              /* slightly stronger when active */
}

/* Optional: subtle emphasis when open */
details[open] summary {
  color: #222;
}
details ul {
  list-style: none;     /* remove bullets */
  margin: 0.3rem 0 0.8rem 1.2rem; /* top | right | bottom | left */
  margin-left: 1.6rem;
  padding: 0;
}

details li {
  margin: 0.2rem 0;
  color: #444;
}

.map-right {
  float: right;
  max-width: 300px;
  width: 100%;
  margin: 0 0 1em 1.5em;
}

.map-right figcaption {
  font-size: 0.82em;
  color: #777;
  margin-top: 0.35em;
  line-height: 1.35;

  text-align: center;   /* ← this is the key change */
}

.map-right img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

  /* Key tweak: tighter, more “editorial” feel */
  line-height: 1.35;
}

@media (max-width: 768px) {
  .map-right {
    float: none;
    max-width: 100%;
    margin: 1.2em 0;
  }
}

.post-nav {
  margin-top: 2em;
  font-size: 0.95em;
}

.post-nav-links a {
  text-decoration: none;
}

.post-nav-links a:hover {
  text-decoration: underline;
}

.post-nav .related {
  display: inline-block;
  margin-top: 0.3em;
  color: #666;
}

.related .marker {
  font-size: 2.5em;
  color: #999;
}

#goToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;

  width: 2.6rem;
  height: 2.6rem;
  line-height: 2.6rem;   /* centers the arrow vertically */
  text-align: center;

  background: rgba(60,60,60,0.35);
  color: #fff;
  border-radius: 50%;

  font-size: 1.2rem;
  text-decoration: none;

  opacity: 0.5;
  transition: opacity 0.25s ease, transform 0.2s ease;
  z-index: 1000;
}

#goToTop:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

html {
  scroll-behavior: smooth;
}

.float-left {
  float: left;
  margin: 0 1rem 0.5rem 0;
}

.img-200 {
  max-width: 200px;
}

.img-320 {
  max-width: 320px;
}

.float-left img {
  width: 100%;
  height: auto;
  display: block;
}

.float-left figcaption {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.3rem;
  line-height: 1.3;
}

/* Comment section */
.comment {
  margin-bottom: 1.5em;
  max-width: 700px;
}
.comment-author {
  color: #111;
  font-weight: 600;
  margin-bottom: 2px;
}
.comment-date {
  font-size: 0.8em;
  color: #777;
  margin-bottom: 0.5em;
}
.comment-text {
  line-height: 1.5;
  font-size: 0.9em;
  margin-bottom: 0.4em;
}
.comment-reply {
  margin-left: 2em;
}
/* End Comment section */

/* Link card section */
.link-card {
  border-radius: 0; /* or just remove it */
  overflow: hidden; /* optional, see note below */
}

.link-card:hover {
  background: #f9f9f9;
}

.link-card__image img {
  width: 100%;
  max-width: 500px;
  display: block;
  border-radius: 6px 6px 0 0;
}

.link-card__content {
  padding: 0.8em 1em;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;  
  max-width: 500px;
}

.link-card__source {
  font-size: 0.75em;
  color: #777;
  margin-bottom: 0.3em;
  text-transform: uppercase;
}

.link-card__title {
  font-size: 0.85em;
  line-height: 1.4;
}
/* End link card section */
