/* A lightweight anchored dropdown: no backdrop, no page locking. */
.more-guides-trigger {
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 11;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  background: rgba(0,0,0,.65);
  color: #fff;
  padding: 9px 15px;
  font: 700 14px Arial,sans-serif;
}
.more-guides-trigger:hover,
.more-guides-trigger[aria-expanded="true"] { background: rgba(0,0,0,.86); }
.more-guides-trigger:focus-visible { outline: 3px solid #16a34a; outline-offset: 3px; }

.more-guides-dialog {
  position: fixed;
  z-index: 10011;
  box-sizing: border-box;
  width: min(540px, calc(100vw - 24px));
  max-height: min(66dvh, 620px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 15px;
  background: #fff;
  color: #181818;
  box-shadow: 0 10px 32px rgba(0,0,0,.20);
  transform-origin: bottom right;
  animation: guides-dropdown-in .15s ease-out;
  transition: opacity .16s ease, transform .16s ease;
}
.more-guides-dialog[hidden] { display: none !important; }
.more-guides-dialog.is-closing { opacity: 0; transform: translateY(5px) scale(.99); pointer-events: none; }
body.theme-dark .more-guides-dialog {
  background: #171a18;
  color: #fff;
  border-color: rgba(255,255,255,.16);
}
.more-guides-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px 9px;
  flex: none;
}
.more-guides-dialog-heading h2 { font-size: 16px; line-height: 1.25; margin: 0; }
.more-guides-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: 24px Arial,sans-serif;
  cursor: pointer;
}
.more-guides-close:hover { background: rgba(127,127,127,.13); }
.more-guides-close:focus-visible { outline: 2px solid #16a34a; }
.more-guides-list {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 13px 13px;
}
.more-guides-card {
  position: relative;
  display: block;
  flex: none;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  aspect-ratio: 3 / 1;
  background-size: cover;
  background-position: center;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(127,127,127,.2);
  box-shadow: inset 0 0 0 0 transparent;
  transition: box-shadow .15s ease;
  text-decoration: none;
}
.more-guides-card:hover,
.more-guides-card:focus-visible {
  /* Inset highlight is never clipped by the scroll container. */
  box-shadow: inset 0 0 0 2px #16a34a;
}
.more-guides-card:focus-visible { outline: 2px solid #16a34a; outline-offset: -3px; }
.more-guides-card-title {
  position: absolute;
  bottom: 12px;
  left: 15px;
  right: 12px;
  color: #fff;
  font-size: clamp(15px,2.4vw,23px);
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 1px 3px #000, 0 0 8px #000, 0 0 18px rgba(0,0,0,.7);
}
@keyframes guides-dropdown-in {
  from { opacity: 0; transform: translateY(6px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media(max-width:650px) {
  .more-guides-dialog { width: calc(100vw - 20px); max-height: min(65dvh, 540px); border-radius: 13px; }
  .more-guides-list { padding: 0 10px 12px; gap: 9px; }
  .more-guides-card-title { font-size: 18px; bottom: 9px; left: 11px; }
}
@media(prefers-reduced-motion:reduce) {
  .more-guides-dialog, .more-guides-card { animation: none; transition: none; }
}

/* Never create a second scrollbar when all cards fit. */
.more-guides-list { min-height: 0; scrollbar-gutter: auto; }
