/* Painted slots measured from map-frame-v1 (1672 × 941), matching Fauna Pedia. */
#faunaraMap {
  padding: 0;
  z-index: 1100;
  background: #123737;
  backdrop-filter: none;
  color: #314a3f;
  font-family: Georgia, serif;
}
#faunaraMap .faunara-map-card {
  position: relative;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  display: block;
  overflow: hidden;
  border: 0;
  outline: 0;
  border-radius: 0;
  box-shadow: none;
  background: #f4ecd7 url("./assets/ui/faunara/map-frame-v1.png") center/100%
    100% no-repeat;
}
#faunaraMap .faunara-map-head {
  position: absolute;
  left: 4.5%;
  top: 1.5%;
  width: 60.5%;
  height: 8%;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
}
#faunaraMap h2 {
  margin: 0;
  max-width: 49%;
  font:
    italic bold clamp(24px, 2.65vw, 43px) / 1 Georgia,
    serif;
  color: #fff1d0;
  letter-spacing: -0.035em;
  text-shadow: 0 2px 2px #0b2e2e;
}
#faunaraMap .faunara-map-head p {
  position: absolute;
  left: 0.2%;
  bottom: 3%;
  margin: 0;
  color: #d8ccaa;
  font:
    clamp(7px, 0.58vw, 10px) / 1 Georgia,
    serif;
  letter-spacing: 0.18em;
}
#faunaraMapClose {
  margin-left: auto !important;
  min-height: 36px;
  min-width: 62px;
  font:
    15px Georgia,
    serif !important;
  background: #f4e6c4 !important;
  border: 1px solid #ab9166 !important;
  color: #28463e !important;
  box-shadow: 0 2px 5px #09252766;
}
.map-tabs {
  position: absolute;
  left: 34%;
  top: 2%;
  width: 21%;
  height: 7.5%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
}
.map-tabs button {
  min-width: 74px;
  padding: 5px 16px;
  border: 1px solid transparent;
  border-radius: 3px 3px 9px 9px;
  background: transparent;
  color: #e9dcbc;
  font:
    16px Georgia,
    serif;
  cursor: pointer;
}
.map-tabs button[aria-pressed="true"] {
  color: #23473d;
  background: linear-gradient(#fff8e5, #eddec0);
  border-color: #b99e6e;
  box-shadow: 0 3px 6px #0a26264d;
}
.map-location {
  position: absolute;
  left: 4.5%;
  top: 12.5%;
  width: 67%;
  height: 4.3%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #354d3e;
}
.map-location strong {
  flex: none;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font:
    italic bold clamp(16px, 1.35vw, 25px) Georgia,
    serif;
}
.map-status {
  font:
    clamp(10px, 0.85vw, 14px) / 1.3 Georgia,
    serif;
  color: #5e6551;
  text-align: right;
}
.exploration-layout {
  display: contents;
}
.exploration-main {
  position: absolute;
  left: 2.96%;
  top: 18.6%;
  width: 69.78%;
  height: 64.72%;
  overflow: hidden;
  background: #bec4ac;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px #776d4959;
}
.exploration-main canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  outline-offset: -3px;
}
.exploration-main canvas:active {
  cursor: grabbing;
}
.map-toolbar {
  position: absolute;
  left: 27.8%;
  top: 88.1%;
  width: 45.2%;
  height: 7%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: none;
}
.map-spacer {
  display: none;
}
.map-toolbar button {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid #b5a17c;
  border-radius: 6px;
  background: #fff7e1b8;
  color: #314a3f;
  font:
    14px Georgia,
    serif;
  box-shadow: 0 2px 3px #6a50351a;
  cursor: pointer;
}
.map-toolbar button:hover {
  background: #fff9e9;
  box-shadow: 0 0 0 1px #aa9873;
}
.map-toolbar button:active,
.map-tabs button:active,
.exploration-side button:active {
  transform: translateY(1px);
}
#faunaraMap button:focus-visible,
#faunaraMap summary:focus-visible,
.exploration-main canvas:focus-visible {
  outline: 2px solid #70c4b7;
  outline-offset: 2px;
}
.exploration-side {
  position: absolute;
  left: 76.2%;
  top: 14%;
  width: 20.1%;
  height: 68%;
  overflow: auto;
  padding: 0 1%;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  color: #344638;
  font:
    clamp(13px, 1.05vw, 18px) / 1.45 Georgia,
    serif;
  scrollbar-width: thin;
  scrollbar-color: #b09b77 transparent;
}
.exploration-side h3 {
  margin: 0 0 10px;
  font:
    italic bold clamp(20px, 1.7vw, 29px) / 1.12 Georgia,
    serif;
  color: #2e4437;
}
.exploration-side p {
  margin: 8px 0 14px;
  color: #667058;
  font: inherit;
}
.exploration-side button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin: 7px 0;
  border: 1px solid #c5b493;
  border-radius: 7px;
  background: #fff8e5a3;
  color: #345346;
  box-shadow: 0 2px 3px #705f3d17;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.exploration-side button:hover {
  background: #dbebe0;
  border-color: #7bafa1;
}
.exploration-side button:disabled {
  opacity: 0.55;
  cursor: default;
  background: #e8e0cd;
}
.exploration-side .map-travel-button {
  background: #2b6156;
  color: #fff4d4;
  border-color: #224c43;
  text-align: center;
  font-weight: bold;
}
.exploration-side .map-travel-button:disabled {
  background: #9eac99;
  color: #fff9e6;
}
.exploration-side details {
  margin-top: 18px;
  padding: 12px 0;
  border-top: 1px solid #c6b591;
  font-size: 12px;
}
.exploration-side summary {
  cursor: pointer;
  color: #54674e;
}
.exploration-side a {
  color: #326d63;
}
#faunaraJourney {
  display: block;
  padding: 0;
  overflow: visible;
  color: #52624a;
  font: inherit;
}
#faunaraJourney > .town[data-map-town] {
  display: none;
}
#faunaraJourney .town,
#faunaraJourney .route {
  padding: 12px 0;
  margin: 12px 0;
  border: 0;
  border-top: 1px solid #c6b591;
  border-radius: 0;
  background: transparent;
  font: inherit;
  color: #52624a;
}
#faunaraJourney button {
  margin: 7px 0;
  background: #eee1c5;
  color: #355548;
  border: 1px solid #c5b493;
  font: inherit;
}
.map-legend {
  position: absolute;
  left: 81.5%;
  top: 89%;
  width: 15.5%;
  height: 5.8%;
  display: grid;
  align-content: center;
  text-align: center;
  white-space: pre-line;
  color: #f1e5c7;
  font:
    clamp(10px, 0.9vw, 15px) / 1.5 Georgia,
    serif;
}
.map-pin-hud {
  position: fixed;
  bottom: 105px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: #f1e7d0e8;
  border: 1px solid #9c8964;
  color: #34564a;
  border-radius: 20px;
  padding: 7px 14px;
  pointer-events: none;
  font:
    13px Georgia,
    serif;
}
@media (max-width: 720px) and (orientation: portrait) {
  #faunaraMap .faunara-map-card {
    background-image: url("./assets/ui/faunara/map-frame-mobile-v1.png");
  }
  #faunaraMap .faunara-map-head {
    left: 8%;
    top: 5.1%;
    width: 84%;
    height: 5.3%;
    gap: 5px;
  }
  #faunaraMap h2 {
    font-size: clamp(22px, 6vw, 35px);
    max-width: 73%;
  }
  #faunaraMap .faunara-map-head p {
    display: none;
  }
  #faunaraMapClose {
    min-width: 46px;
    min-height: 30px;
    padding: 5px 8px !important;
    font-size: 13px !important;
  }
  .map-tabs {
    left: 6%;
    top: 12.2%;
    width: 34%;
    height: 3.4%;
    gap: 2px;
    align-items: center;
  }
  .map-tabs button {
    min-width: 0;
    flex: 1;
    font-size: 13px;
    padding: 5px 8px;
    border-radius: 4px;
  }
  .map-location {
    left: 43%;
    top: 12%;
    width: 49%;
    height: 3.8%;
    display: flex;
  }
  .map-location strong {
    max-width: 100%;
    font-size: 15px;
  }
  .map-status {
    position: fixed;
    left: 43%;
    top: 62.6%;
    width: 50%;
    height: 3.7%;
    font-size: 11px;
    color: #eee0be;
    text-align: right;
  }
  .exploration-main {
    left: 5.05%;
    top: 17.3%;
    width: 89.75%;
    height: 44%;
  }
  .exploration-side {
    left: 7%;
    top: 68.2%;
    width: 86%;
    height: 20.6%;
    font-size: 14px;
    padding: 0 2%;
    scrollbar-width: thin;
  }
  .exploration-side h3 {
    font-size: 21px;
    margin-bottom: 5px;
  }
  .exploration-side p {
    margin: 4px 0 8px;
  }
  .exploration-side button {
    padding: 9px 12px;
  }
  .map-toolbar {
    left: 7%;
    top: 91.4%;
    width: 86%;
    height: 5.1%;
    gap: 6px;
  }
  .map-toolbar button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
    color: #f4e8c9;
    background: #194940c9;
    border-color: #9d986f;
  }
  .map-toolbar button:hover {
    background: #356e5c;
  }
  .map-legend {
    display: none;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  #faunaraMap h2 {
    font-size: 24px;
  }
  .map-tabs button {
    font-size: 13px;
    min-width: 55px;
    padding: 3px 8px;
  }
  .map-toolbar button {
    min-height: 28px;
    font-size: 11px;
    padding: 4px 8px;
  }
  .map-toolbar {
    gap: 5px;
  }
  .exploration-side {
    font-size: 12px;
  }
  .exploration-side h3 {
    font-size: 19px;
  }
  .map-status {
    font-size: 9px;
  }
  #faunaraMapClose {
    min-height: 28px;
    padding: 4px 8px !important;
    font-size: 12px !important;
  }
}
/* Let the painted compass overlap the aperture without cutting its illustrated rim. */
.exploration-main{clip-path:polygon(0 0,100% 0,100% 100%,11% 100%,10% 98%,7% 95%,3.6% 93.7%,0 94%)}
@media(max-width:720px) and (orientation:portrait){.map-tabs button{color:#34584b}.exploration-main{clip-path:polygon(0 0,100% 0,100% 100%,11% 100%,8% 98%,4% 96.5%,0 97%)}}
