/* == Root styles ========================================================== */
:root {
  --speed: 280ms;
  --easing: cubic-bezier(.2,.8,.2,1);
}

/* for scroll lock */
.no-scroll { overflow: hidden; }

/* == Basic Styles ========================================================= */

html {
  /* Setting a minimum width so that the contents will not get distorted with very small screens. */
  min-width: 300px;
  margin-bottom: 0;
  padding-bottom: 0;
}

body {
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--color01);
  background: var(--color01);
  text-align: left;
}

#main-wrapper {
  background: var(--color01);
  min-height: 100vh; /* Ensure footer is at bottom */
}

a {
  color: var(--color02);
  text-decoration: none;
}
a:visited {
  color: var(--color01);
}

[id^="more-"] {
  scroll-margin-top: 200px; /* Fix "read more" link position for fixed header */
}

h1 {
  font-size: 1.6rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.5rem;
  padding: 1rem 0.5rem;
  border-top: dashed 1px var(--color02);
  width: 90%;
}
h2 {
  font-size: 1.4rem;
  margin: 2rem 2.5rem 1rem 2.5rem;
  padding-top: 0.5rem;
  text-align: center;
  border-top: dashed 1px var(--color02);

}

main {
  background-color: var(--color05);
  padding-bottom: 2rem;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
}

/* For accessibility: Only visible to screen readers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* -- Header Section --------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  height: 120px; 
  background: var(--color02);
  color: var(--color05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 6000; 
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
}

#header {
  background-size: cover;
  background-position: center;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
  margin: 0;
  margin-top: 10px;
}

.brand-logo {
  margin: 0;  
  background: var(--color06);
  box-shadow: 0 0 10px 10px var(--color06);
  border-radius: 300px;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  border-top-right-radius: 300px;
  border-bottom-right-radius: 300px;
}

.brand-logo-img, .brand-logo-img2 {
  max-width: 250px;
}

.brand {
  font-weight: 700;
  letter-spacing: .2px;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  margin-left: 0.2rem;
  /* Put shadow around text for better readability */
  text-shadow:
  4px 4px 4px var(--color01), -4px -4px 4px var(--color01),
  -4px 4px 4px var(--color01),  4px -4px 4px var(--color01),
  4px 0 4px var(--color01), -4px  0 4px var(--color01),
  0 4px 4px var(--color01),  0 -4px 4px var(--color01);
}


/* -- Hamburger Menu --------------------------------------------- */
/* Button (on the right) */
.hamburger {
  appearance: none;
  border: 0; background: transparent;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  cursor: pointer; outline-offset: 2px;
}
.hamburger:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color05) 40%, white);
}
.hamburger-bars {
  position: relative;
  width: 24px; height: 2px;
  background: var(--color05);
  border-radius: 1px;
  transition: background var(--speed) var(--easing);
}
.hamburger-bars::before,
.hamburger-bars::after {
  content: "";
  position: absolute; left: 0;
  width: 24px; 
  height: 2px; 
  background: var(--color05);
  border-radius: 1px;
  transition: transform var(--speed) var(--easing), top var(--speed) var(--easing), opacity var(--speed) var(--easing);
}
.hamburger-bars::before { top: -7px; }
.hamburger-bars::after  { top:  7px; }
.hamburger[aria-expanded="true"] .hamburger-bars { background: transparent; }
.hamburger[aria-expanded="true"] .hamburger-bars::before { top: 0; transform: rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger-bars::after  { top: 0; transform: rotate(-45deg); }

/* Hamburger menu (fixed below header) */
.nav-wrap {
  position: fixed;
  top: var(--header-h);   /* Fixed below header */
  left: 0; right: 0;
  overflow: hidden;       /* For height animation */
  height: 0;              /* JavaScript will handle this */
  transition: height var(--speed) var(--easing);
  background: var(--color02);
  color: var(--color05);
  will-change: height;
  z-index: 6001;           /* Prioritize over header */
  border-bottom: 1px solid rgba(255,255,255,.08);
}
/* Menu scroll area (content) */
.nav {
  padding: 12px;
  display: grid; gap: 6px;
  max-height: calc(100dvh - var(--header-h)); /* Ensure it doesn't exceed viewport height */
  overflow: auto; /* Scroll if content exceeds */
}
.nav a {
  display: block;
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--color05);
  text-decoration: none;
  background: var(--color01);
  border: 1px solid rgba(255,255,255,.06);
}
.nav a:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  .nav-wrap { transition-duration: 1ms; }
  .hamburger-bars::before, .hamburger-bars::after { transition-duration: 1ms; }
}

/* For accessibility: Only visible to screen readers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Form layout (stacked vertically) */
.nav-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

/* Styles for input / select / button */
.field, .select, .btn {
  width: 100%;
  font: inherit;
  border-radius: 10px;
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: var(--color04);
  color: var(--color01);
}

/* Styles for button (type 2) */
.button {
  font: inherit;
  border-radius: 10px;
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: var(--color04);
  color: var(--color01);
}

.field::placeholder { color: var(--color01); }

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color01) 50%),
    linear-gradient(135deg, var(--color01) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px),
                       calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.btn {
  background: var(--color01);
  color: var(--color05); 
  border-color: transparent;
  font-weight: 700;
  cursor: pointer;
}
.btn:active { transform: scale(.98); }


/* -- Breadcrumb ------------------------------------------------- */
/* Base */
.breadcrumb {
  font-size: 0.95rem;
  color: var(--color02);
  margin: 0 0 1rem 0;
  padding-top: 1rem;
  text-align: left;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Rows (vertical by default) */
.breadcrumb li {
  /* clamp depth between 1 and 6 just in case */
  --d: clamp(1, var(--depth, 1), 6);
  margin: 0 0 0.3rem;
  padding-left: calc(var(--d) * 1.1rem);
}
.breadcrumb a {
  color: var(--color02);
  text-decoration: none;
}
.breadcrumb a:hover,
.breadcrumb a:focus-visible { text-decoration: underline; }

.breadcrumb [aria-current="page"] {
  font-weight: 600;
  color: var(--color01);
}

/* Leading arrow per row (vertical mode) */
.breadcrumb [data-arrow] {
  margin-right: 0.5rem;
  color: var(--color01);
}

/* Optional: truncate long labels neatly */
.breadcrumb li > a,
.breadcrumb li > span {
  display: inline-block;
  max-width: 28ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* -- Photo of the Day ------------------------------------------- */
/* Container */
.potd, .album-list { 
  max-width: 720px; 
  margin: 4rem auto; 
  margin-bottom: 4rem;
  padding: 0 1rem; 
}
.potd-card, .album-card { position: relative; }

/* FRAME: border + shadow + zoom lives here */
.potd-link, .album-link {
  display: block;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--color01);   /* border */
  box-shadow: 0 4px 12px rgba(0,0,0,.15);        /* base shadow */
  transition: transform .3s ease, box-shadow .3s ease;
  will-change: transform;
}

/* Image just fills the frame (no border/shadow here) */
.potd-img, .album-img {
  display: block;
  width: 100%;
  height: auto;
  background:
    url("../images/loading.gif") center / 40px 40px no-repeat,
    var(--color05);
}

/* Make the figure center its content */
.potd-card { 
  display: grid; 
  place-items: center; 
}

/* Let the link shrink to the image width while staying responsive */
.potd-link { 
  display: inline-block;     /* was block before */
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--color01);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transition: transform .3s ease, box-shadow .3s ease;
}

/* Cap the height without distortion (no crop) */
.potd-img {
  width: 100%;               /* allow width < 100% when portrait */
  max-width: 100%;           /* still fit narrow viewports */
  height: auto;
  max-height: clamp(360px, 70vh, 560px); /* tweak to taste */
}

/* Caption overlay inside the frame */
.potd-caption, .album-caption {
  text-align: left;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .75rem 1rem 1rem;
  color: #fff;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.75) 25%,
    rgba(0,0,0,.65) 50%,
    rgba(0,0,0,.50) 80%,
    rgba(0,0,0,0) 100%
  );
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none; /* clicks still activate the link */
}

.potd-title, .album-title { display: block; font-size: 1rem; line-height: 1.2; }
.potd-meta, .album-meta { display: block; font-size: 0.85rem; opacity: .9; margin-top: .15rem; }

/* Make text stand out */
.potd-title, .album-title,
.potd-meta,  .album-meta {
  text-shadow:
    0 1px 2px rgba(0,0,0,.85),
    0 0 8px rgba(0,0,0,.55);
}

/* Hover/focus zoom + stronger shadow, show caption */
@media (hover: hover) {
  .potd-link:hover,
  .potd-link:focus-visible,
  .album-link:hover,
  .album-link:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
  }
  .potd-link:hover .potd-caption,
  .potd-link:focus-visible .potd-caption,
  .album-link:hover .album-caption,
  .album-link:focus-visible .album-caption {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Long-press “peek” from JS */
.potd-card.is-peek .potd-link,
.album-card.is-peek .album-link {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.potd-card.is-peek .potd-caption,
.album-card.is-peek .album-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .potd-link, .potd-caption, .album-link, .album-caption { transition: none; }
}

/* POTD stage layout (mirrors .image-stage) */
.potd-stage {
  --nav-col: clamp(44px, 6vw, 72px);
  --potd-max-width: 720px;

  width: min(100%, calc(var(--potd-max-width) + (2 * var(--nav-col))));
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--nav-col) minmax(0, var(--potd-max-width)) var(--nav-col);
  align-items: center;
  gap: 0;
}

/* Center cell just hosts your existing .potd block */
.potd-center { display: block; }


/* -- Album paging ----------------------------------------------- */
/* Base container */
#pagenumbers.pager {
  text-align: center;
  margin: 1rem 0;
  font-size: 0.95rem;
  color: var(--color03);
}

/* Zenphoto outputs: <div class="pagelist"><ul class="pagelist">...</ul></div> */
#pagenumbers .pagelist ul.pagelist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;            /* row by default */
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;               /* space between items */
}

/* Each LI (numbers, prev/next, first/last) */
#pagenumbers .pagelist li {
  display: inline-flex;
}

/* Tap-friendly pills for mobile/tablet */
#pagenumbers .pagelist li a,
#pagenumbers .pagelist li.current,
#pagenumbers .pagelist li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;          /* space between icon and text */
  white-space: nowrap;  /* avoid wrapping to two lines */
  place-items: center;
  min-width: 44px;          /* touch target */
  min-height: 44px;         /* touch target */
  padding: 0 .75rem;
  border-radius: 999px;
  line-height: 1;
  text-decoration: none;
  border: 1px solid var(--color02);
  background: var(--color04);
  color: var(--color01);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

/* Current page (not a link) */
#pagenumbers .pagelist li.current {
  background: var(--color01);
  color: var(--color05);
  border-color: var(--color01);
  font-weight: 600;
  pointer-events: none;
}

/* Disabled (not a link) */
#pagenumbers .pagelist li span {
  background: var(--color02);
  color: var(--color04);
  border-color: var(--color02);
  pointer-events: none;
}

/* Hover/focus */
@media (hover: hover) {
  #pagenumbers .pagelist li a:hover,
  #pagenumbers .pagelist li a:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
  }
}
#pagenumbers .pagelist li a:focus-visible {
  outline: 2px solid var(--color02);
  outline-offset: 2px;
}

/* Prev/Next with Font Awesome icons  */
/* Add FA arrows and (optionally) hide any « » from server text */
#pagenumbers .pagelist li.prev a::before,
#pagenumbers .pagelist li.next a::after {
  font-family: "Font Awesome 7 Free","Font Awesome 6 Free","Font Awesome 5 Free",sans-serif;
  font-weight: 900;                 /* solid */
}

/* "Albums 10–18 of 35" text  */
#pagenumbers > p,
#pagenumbers p[align="center"] {
  margin: .5rem 0 0;
  color: var(--color01);
  font-size: .9rem;
}

.page-navigation-top {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}
.page-navigation-bottom {
  padding-top: 2rem;
  padding-bottom: 3rem;
}


/* -- Albums ----------------------------------------------------- */
.album-list {
  margin-top: 1rem;
}

.album-list-grid {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.album-card {
  margin-top: 2rem;
  margin-bottom: 3rem;
}


/* -- Image View ------------------------------------------------- */
/* Image stage layout */
.image-stage {
  /* Side button column width: responsive but bounded */
  --nav-col: clamp(44px, 6vw, 72px);

  /* Max image width per breakpoint */
  --image-max-width: 767px; /* default: mobile */
  width: min(100%, calc(var(--image-max-width) + (2 * var(--nav-col))));
  margin-inline: auto;

  display: grid;
  grid-template-columns: var(--nav-col) minmax(0, var(--image-max-width)) var(--nav-col);
  align-items: center; /* vertically center buttons to the image */
  gap: 0; /* buttons sit right next to the image */
}

.image-nav-slot {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Prev/Next buttons (next to image) --------- */
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 5vw, 56px);
  height: clamp(40px, 5vw, 56px);
  border-radius: 999px;
  background: var(--color03);
  color: #fff;
  text-decoration: none;
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  line-height: 1;
  transition: transform .15s ease, background .15s ease, box-shadow .2s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.nav-btn i { color: var(--color01); }
@media (hover: hover) {
  .nav-btn:hover { background: var(--color02); transform: translateY(-1px); }
  .nav-btn:hover i { color: var(--color05); }
}
.nav-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Image card (rounded + hover) -------------- */
.image-figure { margin: 0; display: grid; place-items: center; }
.image-main.image-card {
  display: block;
  max-width: 100%;
  height: auto;
  background:
    url("../images/loading.gif") center / 40px 40px no-repeat,
    var(--color05);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  cursor: zoom-in;
  will-change: transform;
}
@media (hover: hover) {
  .image-main.image-card:hover {
    transform: scale(1.01);
    box-shadow: 0 18px 48px rgba(0,0,0,.28);
  }
}
/* No figcaption overlay */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,1px,1px); white-space: nowrap; border: 0;
}

/* Fullscreen lightbox with zoom animation --- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox.open { display: flex; }

#lightbox-img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain;
  border-radius: 28px; /* keep corners rounded in fullscreen */
  box-shadow: 0 16px 60px rgba(0,0,0,.6);
  transform-origin: center center;
}

/* Zoom in/out animations */
@keyframes lb-zoom-in {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes lb-zoom-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(.96); }
}
.lightbox.anim-in #lightbox-img {
  animation: lb-zoom-in .22s ease-out both;
}
.lightbox.anim-out #lightbox-img {
  animation: lb-zoom-out .18s ease-in forwards;
}

/* Close button */
.lightbox-close {
  position: absolute; top: .5rem; right: .75rem;
  font-size: 2rem; line-height: 1;
  background: none; border: none; color: #fff;
  cursor: pointer;
}
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Metadata table */
.metadata-table { border-collapse: collapse; width: 100%; max-width: 900px; }
.metadata-table th,
.metadata-table td { border-bottom: 1px solid #ddd; padding: .5rem .75rem; text-align: left; }
.metadata-table th { width: 240px; white-space: nowrap; }


/* -- Image description ------------------------------------------ */
.image-description {
  width: 80%;
  margin: 0.5rem auto 0 auto;
  padding-left: 0.25rem;
}


/* -- Rating Stars ----------------------------------------------- */
/* Wrapper: center line 1 (form) and allow line 2 (.vote) */
.rating-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;                /* allow second line */
  gap: .75rem .75rem;             /* row/column gaps */
  margin: 1.5rem 0;
}

/* Line 1: stars + submit button stay inline and don't shrink */
.rating-wrap form {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  flex: 0 0 auto;                 /* prevent flex shrinking */
  min-width: max-content;         /* keep stars from squeezing */
}

/* Zenphoto rating plugin star layout (requires floats) */
.rating-wrap .star-rating-control { 
  display: block;
  line-height: 1;
}
.rating-wrap .star-rating-control .rating-cancel,
.rating-wrap .star-rating-control .star-rating {
  float: left;                    /* horizontal row of star halves */
}
/* contain floats */
.rating-wrap .star-rating-control::after {
  content: "";
  display: block;
  clear: both;
}

/* Line 2: status text */
.rating-wrap .vote {
  flex: 0 0 100%;                 /* take full row */
  text-align: center;             /* centered text */
  white-space: nowrap;            /* stay on one line */
  margin-top: .35rem;
}

/* The plugin sometimes injects a clearfix element—hide it */
.rating-wrap .clearall { display: none !important; }

/* Button styling */
.rating-wrap input[type="button"] {
  appearance: none;
  border: none;
  border-radius: 5rem;
  padding: .25rem .9rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color01);
  color: var(--color05);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  flex: 0 0 auto;                 /* don't let flex shrink the button */
}
.rating-wrap input[type="button"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  background: var(--color02);
}
.rating-wrap input[type="button"]:active { transform: translateY(0); }

/* Optional: on very narrow screens, let the button wrap under the stars */
@media (max-width: 360px) {
  .rating-wrap form { flex-wrap: wrap; }
  .rating-wrap input[type="button"] { margin-top: .35rem; }
}


/* -- OpenStreetMap ---------------------------------------------- */
/* Default: mobile-first = full width */
.osm-wrap { 
  width: 100%; 
}

/* Optional: use aspect-ratio instead of hard height */
.aaaosm-wrap .leaflet-container {
  height: auto;              /* let height follow aspect-ratio */
  aspect-ratio: 16 / 10;     /* tweak to taste */
  min-height: 300px;         /* safety floor */
  max-height: 600px;         /* safety cap */
}


/* -- Metadata --------------------------------------------------- */
/* Center the whole block and keep it tidy on small screens */
.metadata-wrap {
  max-width: 780px;            /* tweak to taste */
  margin-inline: auto;         /* center */
  padding: 0.75rem;
  overflow-x: auto;            /* avoids layout break if a long value appears */
}

/* Card-like container (keeps rounded corners even with tables) */
#imagemetadata {
  background: var(--color05);
  border: 1px solid var(--color02);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  overflow: hidden;            /* clip table corners */
}

/* Table base */
#imagemetadata table {
  width: 100%;
  border-collapse: collapse;   /* crisp borders */
  min-width: 320px;            /* avoid ultra-narrow squish */
  color: var(--color01);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Cells */
#imagemetadata td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--color03);
  vertical-align: top;
}

/* Last row: remove bottom border */
#imagemetadata tr:last-child td {
  border-bottom: none;
}

/* Label vs value columns */
#imagemetadata td.label {
  font-weight: 600;
  color: var(--color01);
  background: color-mix(in oklab, var(--color04) 70%, var(--color05));
  /* Fallback if color-mix unsupported: */
  /* background: var(--color04); */
}

#imagemetadata td.value {
  color: var(--color01);
}

/* Subtle row hover */
@media (hover: hover) {
  #imagemetadata tr:hover td.value {
    background: color-mix(in oklab, var(--color05) 85%, white);
  }
}

/* Compact mode on very small screens */
@media (max-width: 560px) {
  /* Stack each row into two lines: label (top), value (bottom) */
  #imagemetadata table,
  #imagemetadata tbody,
  #imagemetadata tr,
  #imagemetadata td {
    display: block;
    width: 100%;
  }

  #imagemetadata td.label {
    border-bottom: none;
    border-right: none;
    border-top: 1px solid var(--color03);
    padding-bottom: .35rem;
    border-radius: 0;          /* keep corners tidy when stacked */
  }

  #imagemetadata tr:first-child td.label {
    border-top: none;          /* no top border on the first row */
  }

  #imagemetadata td.value {
    padding-top: .25rem;
  }
}


/* -- Footer ----------------------------------------------------- */
footer {
  background-color: var(--color01);
  color: var(--color05);
  margin-bottom: 0;
  padding-top: 3rem;
}

.brand-logo-footer {
  padding-top: 1rem;
  margin-left: 1rem;
}
.footer-logo-spotlight {
  display: block;
  position: absolute;
  background: var(--color06);
  box-shadow: 0 0 80px 80px var(--color06);
  border-radius: 300px;
  width: 60px;
  height: 5px;
  margin-left: 100px;
  margin-top: -50px;
}
.footer-logo-img {
  position: relative;
  z-index: 1;
}

.footer-links {
  padding-top: 2rem;
}

.footer-links ul {
  list-style: none;
  padding-left: 1.5rem;
}
.footer-links ul li {
  padding-bottom: 1.5rem;
}
.footer-links ul li a {
  text-decoration: none;
  color: var(--color05);
  font-weight: bold;
} 

.footer-powered-by {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--color05);
}

.footer-end {
  text-align: center;
  padding: 0 0 1rem 0;
  font-size: 0.9rem;
  color: var(--color05);
}
.footer-end p {
  margin: 0.2rem;
}

/* -- Other ------------------------------------------------------ */
/* Below are not displayed for mobile view */
#header-tail, #pc-sidebar {
  display: none;
}




/* =================================================================================== */
/* ========================= Styles for tablet screen start. ========================= */
@media screen and (min-width: 768px) {

  /* -- Header --------------------------------------------------- */
  /* Slightly taller header for tablet */
  .header {
    height: 160px;
  }

  /* -- Hamburger ------------------------------------------------ */
  /* Larger hamburger menu for tablet */
  .hamburger {
    width: 64px;
    height: 64px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 10px 10px rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  }
  .hamburger-bars,
  .hamburger-bars::before,
  .hamburger-bars::after {
    width: 32px;
    height: 3px;
    background: var(--color01);
  }
  .hamburger-bars::before { top: -9px; }
  .hamburger-bars::after  { top:  9px; }
  .hamburger:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--color01) 40%, white);
  }

  /* -- Navigation ----------------------------------------------- */
  /* Wider navigation for tablet with more space */
  .nav {
    grid-template-columns: 1fr 1fr 1fr 1fr; /* 4 columns layout for links */
  }
  .nav-form {
    grid-template-columns: 3fr 1fr; 
    align-items: center;
  }
  #navSearchForm {
    grid-column: span 4;
  }
  .album-select {
    grid-column: span 2;
    grid-row: 0 / 1;
  }
  .theme-changer {
    grid-column: span 2;
    grid-row: 0 / 1;
  }
  .nav a {
    grid-row: 1 / 2;
    margin-top: 12px;
    margin-bottom: 12px;
    text-align: center;
  }


  /* -- Album Navigation ----------------------------------------- */
  .breadcrumb.hybrid ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    margin-left: 1rem;
   }

  /* center-align the separator + label inside each li */
  .breadcrumb.hybrid li {
    display: inline-flex;
    align-items: center;
    padding-left: 0;
    margin: 0;
  }

  .breadcrumb.hybrid li + li::before {
    content: "\f105";
    font-family: "Font Awesome 7 Free","Font Awesome 6 Free","Font Awesome 5 Free",sans-serif;
    font-weight: 900;
    display: inline-block;
    line-height: 1;          /* avoid extra line box */
    margin: 0.25rem 0.8rem 0 0.5rem;
    color: var(--color01);
  }

  /* Make the text itself use a tight line-height too */
  .breadcrumb.hybrid a,
  .breadcrumb.hybrid [aria-current] { line-height: 1.6; }

  /* Keep hiding the leading inline arrows */
  .breadcrumb.hybrid [data-arrow] { display: none; }  

  
  /* -- Album list ----------------------------------------------- */
  .album-list {
    max-width: 900px;
  }
  .album-list-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
  }

  .album-card {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  } 


  /* -- Image ---------------------------------------------------- */
  .image-stage { --image-max-width: 950px; }


  /* -- Image description ---------------------------------------- */
  .image-description {
    width: 560px;
    padding-left: 0.25rem;
  }


  /* -- OpenStreetMap -------------------------------------------- */
  /* Larger screens: constrain to 70% */
  .osm-wrap { 
    width: 70%; 
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--color01);
  }


  /* -- Metadata ------------------------------------------------- */
  /* Desktop/tablet: two-column table with 40% label column */
  #imagemetadata td.label { width: 40%; }


  /* -- Footer --------------------------------------------------- */
  /* Footer layout for tablet: Use grid to make use of available space */
  footer {
    display: grid;
    grid-template-columns: 250px auto;
  }
  .footer-links ul {
    display: flex;
    justify-content: flex-end;
    margin-top: 0;
    margin-right: 2rem;
  }
  .footer-links ul li {
    padding-left: 2.5rem;
  }
  .footer-powered-by {
    grid-column: span 2;
    padding-top: 8.5rem;
    padding-bottom: 0;
  }
  .footer-end {
    grid-column: span 2;
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
  }


}
/* ========================= Styles for tablet screen end.   ========================= */




/* =================================================================================== */
/* ========================= Styles for desktop screen start. ======================== */
@media screen and (min-width: 1024px) {

  /* -- Scrollbar Styles ----------------------------------------- */
  /* Scrollbar background */
  ::-webkit-scrollbar {
    overflow:hidden;
    width: 12px;
    height:12px;
  }
  /* Scrollbar buttons */
  ::-webkit-scrollbar-button:start:decrement,
  ::-webkit-scrollbar-button:end:increment {
    width:  12px;
    height: 12px;
    overflow:hidden;
    -webkit-border-radius:6px;
    display: block;
  }
  ::-webkit-scrollbar-track-piece {
    -webkit-border-radius: 6px;
  }
  ::-webkit-scrollbar-thumb:vertical {
    height: 8px;
    -webkit-border-radius: 6px;
  }
  ::-webkit-scrollbar-thumb:horizontal {
    width: 6px;
    -webkit-border-radius: 6px;
  }
  ::-webkit-scrollbar-corner {
    -webkit-border-radius:0px;
    border-radius:0px;
  }
  /* Scrollbar colors */
  body {
    scrollbar-3dlight-color:    var(--color02);
    scrollbar-arrow-color:      var(--color01);
    scrollbar-darkshadow-color: var(--color02);
    scrollbar-face-color:       var(--color03);
    scrollbar-highlight-color:  var(--color04);
    scrollbar-shadow-color:     var(--color04);
    scrollbar-track-color:      var(--color01);
  }
  /* Scrollbar styles (for Chrome/Safari) ---- */
  /* Background area ----------- */
  ::-webkit-scrollbar {
    background:var(--color01);
  }
  /* Scrollbar buttons */
  ::-webkit-scrollbar-button:start:decrement,
  ::-webkit-scrollbar-button:end:increment {
    background-color: var(--color02);
  }
  /* Scrollbar bottom area */
  ::-webkit-scrollbar-track-piece {
    background-color: var(--color03);
  }
  /* Vertical scrollbar */
  ::-webkit-scrollbar-thumb:vertical {
    background-color: var(--color05);
  }
  /* Horizontal scrollbar */
  ::-webkit-scrollbar-thumb:horizontal {
    background-color: var(--color05);
  }
  /* Right bottom area */
  ::-webkit-scrollbar-corner {
    background:var(--color04);
  }


  /* -- General Styles ------------------------------------------- */
  body {
    background: var(--color02);
  }

  /* Main area - fixed to 950px */
  #main-wrapper {
    width: 950px;
    margin: 0 auto;
    border-left: solid 1px var(--color01);
    border-right: solid 1px var(--color01);
  }

  h1 {
    margin-left: auto;
    margin-right: auto;
    border-left: solid 1rem var(--color02);
    padding: 0.3rem 1rem 0.5rem;
    border-top: none;
    border-bottom: dashed 1px var(--color02);
    width: 90%;
  }


  /* -- Header Nav Styles ---------------------------------------- */
  #siteNav {
    width: 950px;
    margin: 0 auto;
    background-color: var(--color03);
    color: var(--color01);
  }


  /* -- Article Navigation Styles -------------------------------- */
  /* Article navigation changes to PC style */
  .article-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    margin: 8px;
  }


  /* -- Album list Styles ---------------------------------------- */
  .album-list {
    max-width: 950px;
    margin: 1rem auto 4rem;
    padding: 0 2rem;
  }

  .album-list-grid {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 1rem;
  }


  /* -- Image ---------------------------------------------------- */
  .image-stage { --image-max-width: 950px; }


  /* -- Metadata ------------------------------------------------- */
  /* Slightly larger on wide screens */
  #imagemetadata table { font-size: 1rem; }

  
}
/* ========================= Styles for desktop screen end.   ======================== */