/* Forgotten Fortunes / Home Editorial Refresh v1.1.0
   Homepage-only. Preserve map, country/era actions and existing story cards. */
main.ff-home.ffher-ready .ffher-explorer {
  margin-block: 18px 34px;
  padding: clamp(15px,2.1vw,28px);
  border-color: rgba(220,187,119,.4);
  box-shadow: 0 16px 36px rgba(0,0,0,.11);
}
main.ff-home.ffher-ready .ffher-explorer > header {
  display:flex; flex-direction:column;gap:3px;
  margin-bottom:17px;
}
main.ff-home.ffher-ready .ffher-explorer > header h2 {margin:3px 0 2px;}
main.ff-home.ffher-ready .ffher-explorer .ffher-open-archive {
  color:#e8c784;font:600 13px/1.4 system-ui,sans-serif;
  text-decoration:none;border-bottom:1px solid rgba(225,184,105,.52);
  align-self:flex-start; padding-bottom:3px;margin-top:10px;
}
main.ff-home.ffher-ready .ffher-explorer .ffher-open-archive:hover,
main.ff-home.ffher-ready .ffher-explorer .ffher-open-archive:focus-visible {color:#fff0c9;border-color:#fff0c9;}
main.ff-home.ffher-ready .ffher-explorer .ffher-discovery-layout {display:grid;gap:clamp(13px,1.8vw,25px);align-items:start;}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col,
main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col {min-width:0;}
main.ff-home.ffher-ready .ffher-explorer .ffher-stories-heading {
  color:#e9d5ac; font:normal 22px/1.3 Georgia,serif; margin:0 0 9px;
}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-atlas-section {
  margin:0;padding:12px;background:rgba(4,21,16,.72);
}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-atlas-topline h3 {font-size:clamp(19px,1.5vw,24px);}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-atlas-help {font-size:12px;margin:7px 0 10px;}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-atlas-scroll {overflow:hidden;}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-atlas-world {
  width:100%;height:auto;max-height:none;min-width:0;
}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-explorer-controls {
  display:flex;flex-direction:column;align-items:stretch;gap:10px;margin-top:13px;
}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-era-switch {max-width:100%;flex-wrap:nowrap;overflow-x:auto;}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-country-label,
main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-country-label select {width:100%;box-sizing:border-box;}
main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-count {margin:0 0 10px;}
main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-entry a {padding:13px;min-height:132px;}
main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-entry strong {font-size:clamp(15px,1.2vw,19px);line-height:1.33;}
main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-grid {display:grid;gap:10px;}
main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-more {margin:14px auto 0;}
main.ff-home.ffher-ready .ffher-explorer .ffher-map-toggle {display:none;}
@media (min-width:1100px) {
  main.ff-home.ffher-ready .ffher-explorer .ffher-discovery-layout {grid-template-columns:minmax(0,42fr) minmax(0,58fr);}
  main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (min-width:780px) and (max-width:1099px) {
  main.ff-home.ffher-ready .ffher-explorer .ffher-discovery-layout {grid-template-columns:minmax(0,44fr) minmax(0,56fr);}
  main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-grid {grid-template-columns:1fr;}
  main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-entry a {min-height:99px;}
}
@media (max-width:779px) {
  main.ff-home.ffher-ready .ffher-explorer .ffher-discovery-layout {grid-template-columns:minmax(0,1fr);}
  main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col {grid-row:1;}
  main.ff-home.ffher-ready .ffher-explorer .ffher-map-col {grid-row:2;}
  main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  main.ff-home.ffher-ready .ffher-explorer .ffher-map-toggle {
    display:block;width:100%;text-align:left;padding:12px 15px;margin:0 0 7px;
    background:#19392b;color:#e9d5ac;border:1px solid rgba(220,187,119,.65);
    font:600 14px/1.4 system-ui,sans-serif;cursor:pointer;
  }
  main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-atlas-section {display:none;}
  main.ff-home.ffher-ready .ffher-explorer.ffher-map-open .ffher-map-col .ff-atlas-section {display:block;}
  main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-explorer-controls {margin-top:12px;}
  main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-atlas-scroll {overflow-x:auto;}
  main.ff-home.ffher-ready .ffher-explorer .ffher-map-col .ff-atlas-world {min-width:640px;width:640px;max-height:460px;}
}
@media(max-width:520px) {
  main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-grid {grid-template-columns:minmax(0,1fr);}
  main.ff-home.ffher-ready .ffher-explorer .ffher-stories-col .ff-explorer-entry a {min-height:88px;}
  main.ff-home.ffher-ready .ffher-explorer > header h2 {font-size:26px;}
}
@media(prefers-reduced-motion:reduce) {
 main.ff-home.ffher-ready .ffher-explorer * {scroll-behavior:auto!important;}
}

/* === v1.1.0 / Finder rail containment fix ===
 * Original theme sticks the finder inside the first paper section, so the rail
 * ends when that section ends. Keep the finder attached to <body> on homepage.
 * A narrow desktop receives a compact, expandable search tab instead.
 */
@media(min-width:1024px) {
  body.ffher-finder-docked .ff-v528-discovery-grid.ffher-finder-source {
    display:block!important; grid-template-columns:none!important;
  }
  body.ffher-finder-docked .ffher-finder-source > .ff-v528-main-content {
    width:100%!important; max-width:100%!important; min-width:0;
  }
  body.ffher-finder-docked > .ffher-finder-dock {
    display:flex; flex-direction:column; align-items:flex-end;
    position:fixed; right:clamp(12px,2vw,38px);top:100px;
    width:min(260px,calc(100vw - 30px)); z-index:180;
    pointer-events:none; max-height:calc(100dvh - 118px);
  }
  body.ffher-finder-docked .ffher-finder-trigger {
    display:block;pointer-events:auto;flex:0 0 auto;
    padding:9px 13px;margin:0 0 7px;cursor:pointer;
    background:#0c2a20;color:#ead3a2;border:1px solid rgba(213,180,106,.7);
    border-radius:5px;font:600 12px/1.4 system-ui,sans-serif;
    box-shadow:0 8px 22px rgba(0,0,0,.24);
  }
  body.ffher-finder-docked .ffher-finder-trigger:hover,
  body.ffher-finder-docked .ffher-finder-trigger:focus-visible {
    background:#1a4130;outline:2px solid #d5b46a;outline-offset:2px;
  }
  body.ffher-finder-docked > .ffher-finder-dock .ff-v528-finder {
    display:block!important;position:static!important;top:auto!important;
    width:100%;min-width:0;max-height:calc(100dvh - 168px);
    overflow-y:auto;box-sizing:border-box;pointer-events:auto;
    border:1px solid rgba(213,180,106,.45);border-radius:4px;
    padding:18px 15px;background:linear-gradient(155deg,#0a291f,#102e24);
    color:#e8e1d0;box-shadow:0 12px 28px rgba(0,0,0,.24);
  }
  body.ffher-finder-docked > .ffher-finder-dock[data-open="false"] .ff-v528-finder {display:none!important;}
  body.ffher-finder-docked .ffher-finder-dock .ff-v528-kicker {
    color:#d5b46a;font:700 10px/1.5 system-ui,sans-serif;letter-spacing:.1em;margin:0 0 9px;
  }
  body.ffher-finder-docked .ffher-finder-dock h2 {
    font:normal 24px/1.12 Georgia,serif!important;color:#f3e1bb;margin:0 0 22px;
  }
  body.ffher-finder-docked .ffher-finder-dock label {
    display:block;margin:0 0 8px;color:#d7c7aa;font:600 11px/1.4 system-ui,sans-serif;
  }
  body.ffher-finder-docked .ffher-finder-dock .ff-v528-search-row {
    display:flex;align-items:stretch;border:1px solid rgba(213,180,106,.48);
  }
  body.ffher-finder-docked .ffher-finder-dock .ff-v528-search-row input {
    width:100%;min-width:0;flex:1 1 auto;background:#071d17!important;color:#f1e8d8!important;
    border:0!important;padding:10px 9px!important;font:12px/1.4 system-ui,sans-serif;min-height:40px;
  }
  body.ffher-finder-docked .ffher-finder-dock .ff-v528-search-row button {
    flex:0 0 38px;background:#cfaf6c;border:0;color:#0b2019;cursor:pointer;font-size:22px;
  }
  body.ffher-finder-docked .ffher-finder-dock .ff-v528-country {
    border-top:1px solid rgba(213,180,106,.2);margin-top:23px;padding-top:19px;
  }
  body.ffher-finder-docked .ffher-finder-dock .ff-v528-country select {
    width:100%;max-width:100%;min-height:39px;padding:7px;background:#0d2c21;
    border:1px solid rgba(213,180,106,.4);color:#f1e8d8;font:12px/1.4 system-ui,sans-serif;
  }
  body.ffher-finder-docked .ffher-finder-dock .ff-v528-country-results {
    padding:0;margin:10px 0 0;list-style:none;display:grid;gap:2px;
  }
  body.ffher-finder-docked .ffher-finder-dock .ff-v528-country-results a {
    display:block;padding:9px 0;border-bottom:1px solid rgba(213,180,106,.13);
    color:#dccb9c!important;font:12px/1.45 system-ui,sans-serif;text-decoration:none!important;
  }
}
@media (max-width:1023px) {
  body.ffher-finder-docked > .ffher-finder-dock{display:none!important;}
}
