@media (orientation: portrait) {
  /* 4.1  max-device-width: 600px Bigger controls – what looks good on a 375×667 phone */
  :root {
    --btn-size: 3.2rem; /* 30 px @ 16 px base font */
    --btn-pad: 0.9rem 1.2rem;
    --icon-size: 1.5rem;
    --slider-width: 300px; /* wider slider so you can touch easier */
    --control-bar-gap: 0.75rem;
    --control-bar-top: 0.8rem; /* keep it closer to the top edge */
    --control-bar-left: 0.8rem;

    --nav-link-fontsize: x-large;

    --default-icon-size: 54px;
    --default_fontsize: 1.8rem;

    --collection_column_max: 2;
    --collection_column_medium: 2;
    --collection_column_small: 1;
    --collection_column_min: 1;
    --collection_card_info_fontsize_title: 2.5rem;
    --collection_card_info_left: 50px;
  }
}

@media (orientation: landscape) {
  :root {
    /* min-device-width: 601px default desktop sizes */
    --btn-size: 1.8rem; /* width & height of every button */
    --btn-pad: 0.4rem 0.7rem; /* padding inside the button (for text) */
    --icon-size: 1.2rem; /* icon font‑size (if you use an icon font) */
    --slider-width: 140px; /* width of the zoom slider */
    --control-bar-gap: 0.5rem; /* spacing between control‑bar items */
    --control-bar-top: 1rem; /* distance from the top of the viewport */
    --control-bar-left: 1rem; /* distance from the left of the viewport */
    --nav-link-fontsize: large;
    --default-icon-size: 36px;
    --default_fontsize: 0.9rem;
    --collection_column_max: 5;
    --collection_column_medium: 4;
    --collection_column_small: 3;
    --collection_column_min: 2;
    --collection_card_indent: 0rem;
    --collection_card_info_left: 10px;
    --collection_card_info_fontsize_title: 1.15rem;
  }
}

/* ───────  Basic header reset  ─────── */
.site-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e5e5e5;
  padding: 0; /* we'll add row‑specific padding below */
  display: flex;
  flex-direction: column; /* two vertical rows */
  align-items: center; /* center each row horizontally */
}

/* ───────  Logo row  ─────── */
.logo-row {
  padding: 0.5rem 1rem; /* space around the logo */
  width: auto; /* full width to keep the logo centered */
  margin-bottom: 5px;
}

.logo {
  height: 75px; /* big logo */
  width: auto;
  display: block;
}

/* ───────  Nav row  ─────── */
.nav-row {
  width: 100%; /* take full header width */
  padding: 0 1rem; /* match header padding horizontally */
}

.main-nav ul {
  list-style: none;
  flex-direction: row;
  display: flex;
  width: 100%;
  justify-content: center; /*  centre the nav links (change to flex-start if you prefer left‑align) */
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

/* ────  Divider between nav items ──── */
.main-nav ul li:not(:last-child)::after {
  content: "|";
  color: #e5e5e5;
  margin-left: 0.6rem;
  margin-right: 0.6rem;
  font-weight: lighter;
  font-size: 1.4rem;
  line-height: 1;
}

.nav-link {
  position: relative; /* for the pseudo‑element */
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--nav-link-fontsize);
  padding: 0.5rem 0; /* some vertical padding */
  transition: color 0.2s ease; /* subtle colour change if you wish */
}

/* ───────  The sliding underline  ─────── */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px; /* thickness of underline */
  width: 100%;
  background: currentColor; /* same colour as the text */
  transform: scaleX(0); /* start hidden */
  transform-origin: left; /* default – will be overridden for .active */
  transition: transform 0.3s ease;
}

/* ───────  Short underline for the *currently* active item ─────── */
.nav-link.active::after {
  transform: scaleX(0.3); /* 20 % of the text width */
  /* keep it centred under the word */
}

/* ───────  Hover – always full width, regardless of active state ─────── */
.nav-link:hover::after,
.nav-link.active:hover::after {
  transform: scaleX(1); /* reveal full width */
  transform-origin: left; /* restore the normal origin for a smooth grow */
}

.lang-toggle-wrapper {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
.lang-toggle-btn {
  background: #fff;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 0.4rem 0.8rem;
  font-size: var(--default_fontsize);
}

body {
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  margin: 0;
  padding: 2rem;
}

h1 {
  color: #333;
}

/* The wrapper holds the input and the two icon spans */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 1rem;
  font-family: system-ui, sans-serif;
}

/* 1️⃣  The input itself – underline only, no other borders  */
.search-wrapper input {
  flex: 1 1 auto;
  width: auto;
  padding: 0.5rem 1.8rem 0.5rem 0;
  border: none;
  border-bottom: 2px solid #000;
  font-size: var(--default_fontsize);
  color: #000;
  background: transparent;
  outline: none;
  transition: border-bottom 0.2s ease;
}

/* 2️⃣  When the field receives focus → thick black underline   */
.search-wrapper input:focus {
  border-bottom: 4px solid #000;
}

/* 3️⃣  The hint that sits to the left of the field   */
.search-wrapper input::placeholder {
  color: #999; /* light‑grey hint inside the field */
}

/* 4️⃣  The two icons (magnifier & cross) are absolutely positioned */
.search-wrapper .icon {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* 5️⃣  Show magnifier first, hide cross */
/*.search-wrapper .icon‑magnify { opacity: 1;  pointer-events: auto; }
/*.search-wrapper .icon‑clear   { opacity: 0;  pointer-events: none; } */

/* 6️⃣  When the input has a value (placeholder is no longer shown) …  */
.search-wrapper input:not(:placeholder-shown) + .icon‑magnify {
  opacity: 0;
  pointer-events: none;
}
/*.search-wrapper input:not(:placeholder-shown) + .icon‑magnify + .icon‑clear { opacity: 1;  pointer-events: auto; } */

/* 7️⃣  (Optional) make the cross visible only while the field is focused */
/*.search-wrapper input:focus:not(:placeholder-shown) + .icon‑magnify { opacity: 0; } */
/*.search-wrapper input:focus:not(:placeholder-shown) + .icon‑magnify + .icon‑clear { opacity: 1; } */

.sort-btn {
  width: var(--default-icon-size);
  height: var(--default-icon-size);
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  src: url("../images/icons/sortOptions.jpg");
}

/* ── 1️⃣  The sort‑options drop‑down ──────────────────────── */
.sort-options {
  position: absolute;
  margin-left: 4px;
  top: 100%; /* right under the button */
  left: 50%; /* horizontally centered */
  transform: translateX(-50%) translateY(-8px); /* pulled up a bit */
  display: flex;
  flex-direction: column; /* stack vertically */
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

/* ── 2️⃣  When the menu is open ──────────────────────────── */
.sort-options.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0); /* slide straight down */
}

/* ── 3️⃣  Icons inside the menu ──────────────────────────── */
.sort-options img {
  width: var(--default-icon-size);
  height: var(--default-icon-size);
  align-items: center;
  cursor: pointer;
  filter: grayscale(1);
  transition: filter 0.15s ease;
}
.sort-options img:hover {
  filter: grayscale(0);
}

.sort-options small {
  display: block; /* or inline-block if you prefer */
  font-weight: normal; /* ensures we override it below */
  color: #999;
}

.sort-options img.selected + small {
  font-weight: bold;
  color: #000;
}

.filter-buttons {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin-right: 0.8rem;
  width: 100%;
}

/* each icon + label pair is a flex item */
.filter-item {
  display: flex;
  flex-direction: row;
  align-items: center; /* center icon and text */
  flex: 1; /* grow so all items share the space */
  min-width: 0; /* allow shrinkage on narrow screens */
}

.filter-icon {
  width: var(--default-icon-size);
  height: var(--default-icon-size);
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid transparent;
  flex-shrink: 0; /* keep the icon at its natural size */
}

/* Base style for the label */
.filter-label {
  margin-left: 5px;
  overflow: hidden; /* hide overflow */
  text-overflow: ellipsis; /* (…) if you want a hint */
  flex: 1 1 auto; /* shrinkable, growable */
  min-width: 0; /* allows shrinking to 0 */
  color: #999;
  font-weight: normal;
  text-transform: capitalize;
}

/* Bold the label when its preceding icon is active */
.filter-icon.active + .filter-label {
  color: black;
}

@media (max-device-width: 600px) {
  .filter-label {
    display: none;
  }
}

#search-info {
  margin: 1 0 1rem; /* space below the bar * font-style: oblique;*/
  font-size: var(--default_fontsize);

  color: #333;
}

/* ----- scroll‑to‑top button ----- */
/* Basic button styling */
.scroll-btn {
  width: var(--default-icon-size); /* pick whatever size you want */
  height: var(--default-icon-size);
  border: none;
  cursor: pointer;
  background: url("../images/icons/scrollToTop.jpg") no-repeat center center;
  background-size: contain;
  position: fixed;
  bottom: 20px;
  right: 20px;
  transition: opacity 0.3s ease;
  /* keep the button out of the flow – it’s absolutely positioned
     by the JS, so we just hide it by default */
}

/* show / hide helpers – used by the JS */
.scroll-btn.show {
  opacity: 1;
  pointer-events: auto;
}
.scroll-btn.hide {
  opacity: 0;
  pointer-events: none;
}

/* “pressed” state – changes the background image */
.scroll-btn:active {
  background-image: url("../images/icons/scrollToTopPressed.jpg");
}

/* ----------------------------------------------------
   1️⃣  Grid container – the cards live inside #imageContainer.grid
   ---------------------------------------------------- */
#imageContainer.grid {
  /* 5 columns at full width by default */
  display: grid;
  grid-template-columns: repeat(
    var(--collection_column_max),
    minmax(200px, 1fr)
  );

  /* Space between columns and rows (20 px rows, 40 px columns) */
  row-gap: 20px; /* vertical gap between rows   */
  column-gap: 40px; /* horizontal gap between thumbnails */

  /* Optional – space around the whole grid */
  padding: 40px 0;

  /* No need to centre items – the cards simply occupy the whole column */
}

/* ----------------------------------------------------
   2️⃣  Responsive column counts
   ---------------------------------------------------- */
@media (max-width: 1200px) {
  #imageContainer.grid {
    grid-template-columns: repeat(var(--collection_column_medium), 1fr);
  }
}
@media (max-width: 800px) {
  #imageContainer.grid {
    grid-template-columns: repeat(var(--collection_column_small), 1fr);
  }
}
@media (max-width: 500px) {
  #imageContainer.grid {
    grid-template-columns: repeat(var(--collection_column_min), 1fr);
  }
}
@media (max-width: 400px) {
  #imageContainer.grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* ----------------------------------------------------
   3️⃣  Hide scrollbars (if you add .no-scroll class)
   ---------------------------------------------------- */
#imageContainer.grid.no-scroll {
  overflow: hidden; /* hides scrollbars & disables scrolling */
}

/* ----------------------------------------------------
   4️⃣  Card layout
   ---------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  margin-top: 10%;
  padding-top: 10%;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: visible;
  transform-origin: center center;
  transition: transform 0.4s ease;
}

.card:hover {
  transform: scale(1.1);
}

/* -------------------------------------------------------------
   5️⃣  wrapper that keeps the image from changing layout
   ------------------------------------------------------------- */
.card .image-wrapper {
  position: relative;
  width: 80%; /* 80 % of parent */
  min-width: 150px; /* keep it at least 150 px wide */
  height: 0;
  padding-top: 10%;
  padding-bottom: 80%; /* 80 % of its width → height */
  overflow: visible; /* clip when image scales */
  margin-left: auto; /* <-- this centers the wrapper inside the card */
  margin-right: auto; /* <-- the same for the right side */
}

/* ----------------------------------------------------
   5️⃣  Image inside the card
   ---------------------------------------------------- */
.card .image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto; /* center */
  width: 90%; /* keep the horizontal minimum */
  height: auto; /* keep the natural vertical size */
  max-height: 100%; /* never exceed container height */
  object-fit: contain; /* show the whole picture */
}

/* ----------------------------------------------------
   6️⃣  Info block – the metadata shown under the image
   ---------------------------------------------------- */
.card .info {
  padding: 8px 12px;
  margin-left: var(--collection_card_info_left);
  font-family: system-ui, sans-serif;
  font-size: var(--default_fontsize);
  line-height: 1.4;
}

.card .info h2 {
  margin: 0 0 4px 0;
  font-weight: bold;
  font-size: var(--default_fontsize);
}

.card .info p {
  margin: 0 0 2px 0;
  color: #555;
}

/* ---------- Overlay / modal container ---------- */
.lightbox {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none; /* hidden until open */
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  z-index: 9998;
  overflow: hidden; /* no scrollbars on the modal */
  pointer-events: auto; /* do not allow clicks to pass through */
  touch-action: none;
}

/* ---------- The image ---------- */
.lightbox img {
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
  max-width: 95vw;
  max-height: 95vh;
  transition: transform 0.2s ease;
  cursor: crosshair;
  pointer-events: auto; /* needed so dragging works */
}

/* ---------- Control bar ---------- */
.lightbox .control-bar {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  opacity: 0; /* start hidden */
  transition: opacity 0.3s ease;
  pointer-events: auto; /* allow clicks */
  pointer-events: auto; /* override the overlay */
  z-index: 9999;
  place-items: center;
}

/* ---------- Buttons ---------- */
.lightbox .control-bar button {
  background: #fff;
  border: none;
  padding: 0.4rem 0.7rem;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1; /* keep the icon centred */
}

/* --------- New close‑button wrapper --------- */
.close-btn {
  /* --- Generic button styles (background colour, border, etc.) --- */
  background: #f8f9fa; /* keep the light‑grey background */
  border: 1px solid #ced4da;
  border-radius: 0.3rem;
  cursor: pointer;
  width: var(--btn-size);
  height: var(--btn-size);
  /* --- Size – padding gives the button a visible square --- */
  padding: 0.3rem 0.4rem; /* 1st line of padding */
  font-size: 1.8rem; /* keep the icon centred if any text */
  line-height: 1;

  /* --- Position over the image --- */
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;

  /* --- Image styles (overrides the background colour) --- */
  background-image: url("../images/icons/close.jpg");
  background-repeat: no-repeat;
  background-size: contain; /* scale to the button size */
  background-position: center;
  appearance: none; /* reset UA appearance */

  /* Make the button transparent so only the image shows */
  color: transparent;
}

/* ---------- Pressed state ---------- */
.lightbox .close-btn:active {
  background-image: url("../images/icons/closePressed.jpg");
}

/* ---------- Hide close button in true full‑screen ---------- */
.lightbox.fullscreen .close-btn {
  display: none;
}

/* ---------- Focus outline (optional) ---------- */
.lightbox .close-btn:focus {
  outline: none;
}

/* All “interactive” elements that should fade */
.lightbox .control-bar,
.lightbox .close-btn {
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  opacity: 1; /* default – fully visible */
  visibility: visible; /* keep it in the layout so clicks still work */
}

/* The “hidden” state – fully transparent and non‑interactive */
.lightbox .control-bar.hidden,
.lightbox .close-btn.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* make sure it can’t capture clicks while hidden */
}

/* ---------- Zoom control ---------- */
.zoom-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  /* make it look like a ruler */
  background: linear-gradient(
    to right,
    #ccc 0%,
    #ccc 50%,
    transparent 50%,
    transparent 100%
  );
  background-size: 4px 100%; /* tick marks every 4px */
  height: 1.4rem; /* same height as the other buttons */
  padding: 0.3rem 0.5rem; /* give it some padding so the thumb isn't clipped */
  border-radius: 0.4rem;
  box-sizing: border-box;
}

/* -------- Zoom‑in / Zoom‑out button styles -------- */
.lightbox .control-bar .zoom-in-btn,
.lightbox .control-bar .zoom-out-btn {
  /* basic button reset */
  appearance: none; /* Chrome/Safari */
  -webkit-appearance: none; /* Safari */
  -moz-appearance: none; /* Firefox */
  background: none; /* clear default bg */
  border: none; /* no border */
  padding: 0; /* no padding */
  margin: 0; /* no margin */

  /* size – same as the other control‑bar buttons (1.4rem ≈ 22px) */
  width: var(--btn-size);
  height: var(--btn-size);

  /* background image handling */
  background-repeat: no-repeat;
  background-size: contain; /* keep the image inside the button */
  cursor: pointer; /* keep pointer cursor */
}

.lightbox .control-bar .zoom-in-btn {
  background-image: url("../images/icons/zoomIn.jpg");
}
.lightbox .control-bar .zoom-out-btn {
  background-image: url("../images/icons/zoomOut.jpg");
}
.lightbox .control-bar .zoom-in-btn:active {
  background-image: url("../images/icons/zoomInPressed.jpg");
}
.lightbox .control-bar .zoom-out-btn:active {
  background-image: url("../images/icons/zoomOutPressed.jpg");
}

/* ---------- Reset button ---------- */
/* Must be placed after `.lightbox .control-bar button` */
.lightbox .control-bar .reset-btn {
  /* clear the generic white background */
  appearance: none; /* chrome / safari */
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none; /* no UA background */
  border: none; /* no border */
  width: var(--btn-size); /* same size as the other controls */
  height: var(--btn-size);
  padding: 0;
  margin: 0;
  cursor: pointer;

  /* default (not pressed) icon */
  background-image: url("../images/icons/reset.jpg");
  background-repeat: no-repeat;
  background-size: contain;
}

/* pressed state */
.lightbox .control-bar .reset-btn:active {
  background-image: url("../images/icons/resetPressed.jpg");
}

/* ---------- The slider (input[type=range]) ---------- */
.zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 140px; /* width of the ruler */
  height: 4px;
  background: transparent; /* we’ll style the track separately */
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

/* Track */
.zoom-slider::-webkit-slider-runnable-track,
.zoom-slider::-moz-range-track {
  height: 4px;
  background: #eee;
  border-radius: 2px;
}

/* Thumb – this is the “dot” that moves along the track */
.zoom-slider::-webkit-slider-thumb,
.zoom-slider::-moz-range-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #007bff;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
  margin-top: -4px; /* center the thumb vertically */
}

.zoom-slider:focus::-webkit-slider-thumb,
.zoom-slider:focus::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.3);
}

/* ---------- Full‑screen toggle ---------- */
.lightbox .control-bar .fullscreen-btn {
  /* Reset the button so the image shows */
  appearance: none; /* Chrome / Safari */
  -webkit-appearance: none; /* Safari */
  -moz-appearance: none; /* Firefox */
  background: none; /* no UA background */
  border: none; /* no border */
  width: var(--btn-size); /* same size as the other controls */
  height: var(--btn-size);
  padding: 0;
  margin: 0;
  background-image: url("../images/icons/fullScreen.jpg");
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;
}

/* When the overlay has the .fullscreen class */
.lightbox.fullscreen .fullscreen-btn {
  /* Remove the default white background */
  background: none; /* ← this line is essential */
  /* Image for the fullscreen state */
  background-image: url("../images/icons/fullScreenInverted.jpg");
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer; /* keep the pointer */
}

.lightbox .control-bar .fullscreen-btn:active {
  transform: scale(1.4);
}

.lightbox.fullscreen .fullscreen-btn:active {
  transform: scale(0.6);
}
/* minimap.css – keep the wrapper size flexible */
.minimap-wrapper {
  position: absolute;
  bottom: 20px;
  left: 20px;
  max-width: 120px; /* the maximum width we want */
  border: 1px solid #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

/* 2️⃣  The thumbnail fills the wrapper, *but never crops* */
.minimap-wrapper img {
  width: 100%; /* fit width of wrapper */
  height: auto; /* preserve aspect ratio */
  object-fit: contain; /* fallback for browsers that support it */
  transform-origin: center;
}

.minimap-marker {
  position: absolute;
  border: 2px solid #ff0000;
  background: rgba(255, 0, 0, 0.25);
  pointer-events: all;
  transform-origin: center;
  cursor: move;
  z-index: 1;
  box-sizing: border-box;
}

.painting-info strong {
  font-size: 1.25em; /* 25 % larger than the surrounding text */
  font-weight: 600; /* a bit bolder if you like */
}

.click-blocker {
  display: none; /* hidden until ready */
  position: fixed;
  inset: 0;
  top: 160px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 24px;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  z-index: 1001;
  flex-direction: column; /* stack vertical  justify-content: center; text-align: center;  white-space: pre-wrap;*/

  align-items: center;
}

/* ----  Show the overlay once JS tells us it's ready ---- */
.click-blocker.show {
  display: flex;
}

/* ----  Central "Click to Enter" text ---- */
.central {
  margin-top: 1.5rem;
  font-weight: 600;
}

/* ----  <details> styling  ---- */
.howto-details {
  width: 90%;
  max-width: 480px;
  align-items: start;
  margin: 0 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem;
  border-radius: 8px;
}

.howto-summary {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  display: flex;
  gap: 0.1rem;
}

.howto-details[open] .howto-summary::after {
  content: "▲";
  font-size: 0.9rem;
}

.howto-details:not([open]) .howto-summary::after {
  content: "▼";
}

.instructions {
  margin-top: 0;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

#esc-hint {
  position: fixed;
  bottom: 10px;
  left: 10px; /* same corner */
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-family: monospace;
  font-size: 0.9rem;
  z-index: 999; /* below the blocker */
  display: none; /* hidden by default   */
}

#pdf-wrapper {
  margin-top: 15px;
  width: 80%;
  height: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent; /* or your site‑background color */
}

#pdf-viewer canvas {
  /* keep the canvas portrait */
  width: 100%;
  height: 100%;
}

.pdf-controls {
  margin-top: 0.75rem;
}

.pdf-controls img {
  cursor: pointer;
  transition: transform 0.1s ease;
}
.pdf-controls img:hover:not([src*="Inactive"]) {
  transform: scale(1.1);
}

#summary-wrapper {
  margin-top: 15px;
  width: 80%;
  height: 80%;
  align-items: center;
  justify-content: center;
}

#summary-wrapper summary {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #111;
  font-family: "Hiragino Kaku Gothic ProN", sans-serif;
}

#summary-wrapper p {
  margin-left: 15%;
  margin-right: 15%;
  font-size: 1rem;
  line-height: 1.5;
  text-align: justify;
  color: #111;
  font-family: "Hiragino Kaku Gothic ProN", sans-serif;
}

/* ------------------------------------------------------------------
   About page section styles
------------------------------------------------------------------ */
#about-wrapper .section-title {
  margin-top: 2rem;
  margin-bottom: 1rem;
  margin-left: 15%;
  margin-right: 15%;
  font-size: 1.75rem;
  font-weight: 600;
  color: #111;
  font-family: "Hiragino Kaku Gothic ProN", sans-serif;
}

#about-wrapper .section-text {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
  margin-left: 15%;
  margin-right: 15%;
  font-size: 1.25rem;
  line-height: 1.5;
  text-align: justify;
  color: #111;
  font-family: "Hiragino Kaku Gothic ProN", sans-serif;
}
