/* Shop label treatment adapted from tests/room-preview-navigation.css,
   MERCHLOCK commit 74c18a7. Keep the label fixed while its box changes pose. */
.essentials {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  padding: 0;
  justify-self: stretch;
  justify-content: center;
  overflow: visible;
}
.essentials .essentials-link {
  position: relative;
  isolation: isolate;
  z-index: 2;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 25px;
  color: #fcf2da;
  background: transparent;
  border: 0;
  text-shadow: 0 1px 1px #15300e, -1px 0 #15300e, 1px 0 #15300e;
  transform: none;
}
.essentials .essentials-link::before,
.inner-page .shop-shortcut::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px 17px;
  background: #34992d;
  border: 1px solid #80c774;
  box-shadow: 0 2px 0 #12250c;
  transform: translate(-.2em,.05em) rotate(1.1deg);
  pointer-events: none;
}
.essentials .essentials-link:hover::before,
.essentials .essentials-link:focus-visible::before,
.inner-page .shop-shortcut:hover::before,
.inner-page .shop-shortcut:focus-visible::before {
  background: #3daa34;
  border-color: #b1ec89;
  box-shadow: 0 0 14px #71d43a55;
}
.essentials .essentials-link:hover strong { color: #fcf2da; }
.essentials .keychain {
  position: absolute;
  top: calc(50% - 5px);
  width: 76px;
  height: 152px;
  max-width: none;
  z-index: 1;
  pointer-events: none;
  animation: none !important;
}
.essentials .keychain-left {
  left: calc(50% - 184px);
  right: auto;
  transform: translateY(-50%) rotate(-8deg);
}
.essentials .keychain-right {
  right: calc(50% - 184px);
  left: auto;
  top: calc(50% + 3px);
  transform: translateY(-50%) rotate(11deg);
}
.essentials .arrow-from-below {
  left: calc(50% - 49px);
  top: calc(50% + 14px);
  width: 72px;
  height: 66px;
  z-index: 3;
}
@keyframes home-shop-box {
  0%,100% { transform: translate(-.2em,.05em) rotate(1.1deg); }
  33.333333% { transform: translate(.2em,-.05em) rotate(-1.1deg); }
  66.666667% { transform: translate(0,.1em) rotate(.3deg); }
}
@media (prefers-reduced-motion:no-preference) {
  .essentials .essentials-link::before,
  .inner-page .shop-shortcut::before {
    animation: home-shop-box 2s steps(1,end) infinite !important;
  }
}
@media (min-width:761px) and (min-height:761px) {
  .landing { grid-template-rows: clamp(132px,20dvh,190px) minmax(0,1fr) 160px 90px; }
}
@media (min-width:761px) and (min-height:501px) and (max-height:760px) {
  .landing { grid-template-rows: 126px minmax(0,1fr) 118px 70px; }
  .essentials .keychain { width: 57px; height: 114px; }
  .essentials .keychain-left { left: calc(50% - 158px); }
  .essentials .keychain-right { right: calc(50% - 158px); }
  .essentials .arrow-from-below { width: 52px; height: 48px; left: calc(50% - 36px); top: calc(50% + 12px); }
}
@media (max-width:760px) {
  .essentials .essentials-link { padding: 9px 18px; min-height: 42px; }
  .essentials .essentials-link::before { inset: 5px 12px; }
  .essentials .keychain { width: 47px; height: 94px; top: calc(50% - 3px); }
  .essentials .keychain-left { left: calc(50% - 135px); }
  .essentials .keychain-right { right: calc(50% - 135px); top: calc(50% + 3px); }
  .essentials .arrow-from-below { width: 45px; height: 42px; left: calc(50% - 31px); top: calc(50% + 13px); }
}
@media (max-width:380px) {
  .essentials .keychain { width: 39px; height: 78px; }
  .essentials .keychain-left { left: calc(50% - 118px); }
  .essentials .keychain-right { right: calc(50% - 118px); }
  .essentials .essentials-link { padding-inline: 15px; }
  .essentials .essentials-link::before { inset-inline: 10px; }
  .essentials .arrow-from-below { width: 35px; height: 32px; left: calc(50% - 24px); top: calc(50% + 12px); }
}
@media (min-width:761px) and (max-height:500px) {
  .essentials .essentials-link { min-height: 32px; padding: 5px 20px; }
  .essentials .essentials-link::before { inset: 3px 12px; }
  .essentials .keychain { width: 25px; height: 50px; top: calc(50% - 3px); }
  .essentials .keychain-left { left: calc(50% - 119px); }
  .essentials .keychain-right { right: calc(50% - 119px); top: calc(50% + 2px); }
  .essentials .arrow-from-below { width: 29px; height: 26px; left: calc(50% - 20px); top: calc(50% + 9px); }
}
@media (prefers-reduced-motion:reduce) {
  .essentials .essentials-link::before,
  .inner-page .shop-shortcut::before { animation: none !important; }
}

/* Give homepage portraits a little more height without moving the shell. */
@media (min-width:761px) and (min-height:761px) {
  body:not(.inner-page) .landing { grid-template-rows: clamp(132px,20dvh,190px) minmax(0,1fr) 136px 90px; }
}
@media (min-width:761px) and (min-height:501px) and (max-height:760px) {
  body:not(.inner-page) .landing { grid-template-rows: 126px minmax(0,1fr) 94px 70px; }
}
@media (max-width:760px) {
  body:not(.inner-page) .landing { grid-template-rows: 116px minmax(0,1fr) 84px 104px; }
}
@media (max-width:760px) and (max-height:720px) {
  body:not(.inner-page) .landing { grid-template-rows: 96px minmax(0,1fr) 68px 80px; }
}
