/* The illustration fills the viewport. Its landmarks use the same centered cover scale. */
.app:has(.home.active) {
  min-height: 0;
}
.home.active {
  --harbor-zoom: 1;
  --edge: clamp(12px, 2vw, 32px);
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  container-type: size;
  background: #e3ede4;
}
.home .home-art, .home .boat-entrances, .home .home-vignette, .home .home-header {
  position: absolute;
  inset: 0;
}
.home .home-art {
  background: url("assets/harbor-jade-watercolor.webp") center / cover no-repeat;
  transform: scale(var(--harbor-zoom));
  filter: saturate(1.10);
}
.home .home-vignette {
  background: radial-gradient(ellipse 270px 150px at 0 0, #153c39a8, transparent);
  pointer-events: none;
}
.home .home-header {
  padding: max(var(--edge), env(safe-area-inset-top)) max(var(--edge), env(safe-area-inset-right)) 0 max(var(--edge), env(safe-area-inset-left));
  align-items: flex-start;
  pointer-events: none;
}
.home .logo {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.12;
  color: #fff8e8;
  text-shadow: 0 1px 5px #203e38, 0 2px 12px #29483bc2;
}
.home .logo span {
  margin-top: 4px;
  color: #fff0c4;
  font-size: clamp(13px, 1.2vw, 16px);
}
.home .home-status, .home .home-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #f9f3df;
  border-radius: 24px;
  background: #fffaf0f5;
  box-shadow: 0 2px 10px #203f3929;
  color: #294c41;
}
.home .home-status {
  pointer-events: auto;
  position: absolute;
  bottom: max(var(--edge), env(safe-area-inset-bottom));
  left: max(var(--edge), env(safe-area-inset-left));
}
.home .home-status button {
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #315849;
  font-size: 19px;
}
.home .home-status output {
  min-width: 36px;
  font: 600 13px/1 system-ui,sans-serif;
  text-align: center;
}
.home .home-status button:disabled { opacity: .45; }
.home .home-tools {
  position: absolute;
  inset: max(var(--edge), env(safe-area-inset-top)) max(var(--edge), env(safe-area-inset-right)) auto auto;
  width: auto;
  flex-direction: row;
  z-index: 7;
}
.home .home-tools > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 3px 10px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  box-shadow: none;
  color: #294c41;
  white-space: nowrap;
}
.home .home-tools > button:hover, .home .home-status button:hover:enabled {
  background: #e5eddf;
  transform: none;
}
.home .home-tools img, .home .home-tools img.coach-icon {
  width: 26px;
  height: 26px;
  margin: 0;
}
.home .home-tools img.coach-icon { border: 1px solid #c7bd9e; }
.home .home-tools span:last-child { font-size: 14px; }
.home .home-tools .school-menu { margin: 0; }
.home .school-menu summary { padding: 9px 12px; }
.home .boat-entrances {
  /* One percent of the landscape picture after background-size: cover. */
  --art-x: max(1cqw, 1.77683cqh);
  --art-y: max(1cqh, .5628cqw);
}
.home .scene-culture { --dx: -34; --dy: 10; }
.home .scene-skill { --dx: -2; --dy: 25; }
.home .scene-race { --dx: 24; --dy: -2; }
.home .scene-link {
  left: clamp(58px, calc(50% + var(--dx) * var(--art-x) * var(--harbor-zoom)), calc(100% - 58px));
  top: clamp(72px, calc(50% + var(--dy) * var(--art-y) * var(--harbor-zoom)), calc(100% - 68px));
  transform: translate(-50%, -50%);
  width: max-content;
  min-height: 44px;
  padding: 0;
  white-space: nowrap;
  filter: none;
}
.home .scene-link > span + span {
  min-width: 0;
  max-width: none;
  padding: 7px 13px;
  background: #fffbebf5;
  color: #2d4437;
  border: 1px solid #b5ab86;
  border-radius: 9px;
  box-shadow: 0 2px 8px #2b443936;
}
.home .scene-link b { font-size: clamp(15px, 1.25vw, 19px); white-space: nowrap; }
.home .scene-link .beacon, .home .scene-link small { display: none; }
.home .scene-link:hover > span + span { background: #fffdf4; }
.home button:focus-visible, .home summary:focus-visible { outline: 3px solid #994820; outline-offset: 2px; }

@media (orientation: portrait) {
  .home .home-art { background-image: url("assets/harbor-portrait.webp"); }
  .home .boat-entrances {
    --art-x: max(1cqw, .5628cqh);
    --art-y: max(1cqh, 1.77683cqw);
  }
  .home .scene-culture { --dx: -23; --dy: -1; }
  .home .scene-skill { --dx: 2; --dy: 22; }
  .home .scene-race { --dx: 25; --dy: -18; }
  .home .home-status {
    inset: max(var(--edge), env(safe-area-inset-top)) max(var(--edge), env(safe-area-inset-right)) auto auto;
  }
  .home .home-tools {
    inset: auto auto max(var(--edge), env(safe-area-inset-bottom)) 50%;
    transform: translateX(-50%);
    width: min(470px, calc(100% - 2 * var(--edge)));
    justify-content: space-around;
  }
  .home .home-tools > button { min-height: 44px; padding: 2px 4px; }
  .home .home-tools span:last-child, .home .school-menu { font-size: 13px; }
  .home .school-menu summary { padding: 10px 8px; }
  .home .school-menu-list { top: auto; bottom: calc(100% + 8px); }
}
@media (max-width: 385px) and (orientation: portrait) {
  .home .home-tools > button img { display: none; }
}
@media (max-height: 420px) and (orientation: landscape) {
  .home .home-header, .home.active { --edge: 8px; }
  .home .logo { font-size: 25px; }
  .home .home-tools > button { min-height: 36px; }
}
