@media(min-height:950px) {
  main {
    padding-top: 40px;
    padding-bottom: 40px
  }

  .briefbody {
    gap: 16px
  }

  .stat {
    padding: 25px
  }

  .home {
    gap: 29px
  }
}

@media(max-height:760px) and (orientation:landscape) {
  header {
    height: 66px
  }

  main {
    padding-top: 16px;
    padding-bottom: 16px
  }

  .home {
    gap: 14px
  }

  .lead h1 {
    font-size: 34px
  }

  .lead p {
    font-size: 14px
  }

  .briefbody {
    gap: 7px;
    padding: 13px 17px
  }

  .briefbody h2 {
    font-size: 23px
  }

  .stat {
    padding: 10px 16px
  }

  .statart {
    height: 44px;
    width: 44px
  }

  .statart svg {
    width: 35px;
    height: 35px
  }

  .loghead {
    margin-bottom: 9px
  }

  .cardhead {
    height: 43px
  }

  .mapfoot {
    height: 32px
  }

  .game,
  .screen {
    gap: 7px
  }

  .gamepanel {
    gap: 4px;
    padding: 8px 14px
  }

  .gfoot {
    min-height: 64px
  }

  .modelnote {
    font-size: 12px
  }

  .artbanner {
    min-height: 60px
  }
}

@media(max-width:1050px) {
  .navwrap {
    gap: 8px
  }

  .nav button,
  .utility {
    padding: 0 10px
  }

  .nav {
    gap: 0
  }

  .brand {
    font-size: 23px
  }

  .brand svg {
    width: 40px
  }

  .missiongrid {
    gap: 13px;
    grid-template-columns: minmax(0, 1.85fr) minmax(250px, 1fr)
  }

  .briefbody p {
    font-size: 13px
  }

  .cardhead,
  .mapfoot {
    padding: 0 15px
  }

  .stats {
    gap: 11px
  }

  .pname small {
    font-size: 8px
  }

  .parenttabs {
    gap: 5px
  }

  .parenttabs button {
    padding: 0 9px
  }

  .stat {
    gap: 11px
  }

  .rank {
    padding: 0
  }

  .navwrap,
  main {
    padding-left: 22px;
    padding-right: 22px
  }
}

@media(max-height:580px) and (orientation:landscape) {
  header {
    height: 58px
  }

  .lead h1 {
    font-size: 25px;
    margin-bottom: 2px
  }

  .rank svg {
    width: 36px;
    height: 36px
  }

  .home {
    gap: 7px
  }

  main {
    padding: 8px 15px
  }

  .briefbody {
    padding: 8px 12px;
    gap: 3px
  }

  .briefbody p {
    display: none
  }

  .artbanner {
    min-height: 24px
  }

  .loghead {
    display: none
  }

  .stat {
    padding: 5px 10px
  }

  .statart {
    height: 35px;
    width: 35px
  }

  .stat strong {
    font-size: 20px
  }

  .statlabel {
    font-size: 11px;
    margin: 0
  }

  .gamepanel {
    position: relative
  }

  .game .screenhead .secondary,
  .gfoot button {
    min-height: 64px
  }

  .game .screenhead h1 {
    font-size: 18px
  }

  .game .screenhead {
    height: 50px
  }

  .prompt .iconbtn {
    height: 45px
  }

  .numberline,
  .stepsvg {
    max-height: 40px
  }

  .gamepanel {
    padding-bottom: 8px
  }

  .game .answer {
    min-width: 64px;
    font-size: 19px
  }

  .modelspace {
    gap: 1px
  }

  .game {
    gap: 3px
  }

  .modelnote {
    font-size: 11px
  }

  .mapfoot {
    height: 24px
  }

  .worldtag {
    top: 5px;
    left: 8px
  }

  .cardhead {
    height: 34px
  }
}

@media(orientation:portrait) {
  main {
    overflow: auto
  }

  .home {
    height: auto;
    min-height: 100%
  }

  .missiongrid {
    display: flex;
    flex-direction: column
  }

  .mapcard {
    height: 350px;
    flex: none
  }

  .brief {
    display: grid;
    grid-template-columns: 35% 65%;
    min-height: 200px
  }

  .artbanner {
    border-bottom: none
  }

  .navwrap {
    padding: 0 10px
  }

  .nav button {
    font-size: 0;
    min-width: 64px
  }

  .nav button .icon {
    width: 23px
  }

  .brand {
    font-size: 20px
  }

  .utilities {
    gap: 0
  }

  .utility {
    font-size: 0;
    min-width: 64px
  }

  .rank {
    display: none
  }

  .stats {
    grid-template-columns: 1fr
  }

  .stat {
    min-height: 64px
  }

  .statart {
    width: 42px;
    height: 42px
  }

  .bookgrid {
    grid-template-columns: repeat(2, 1fr)
  }

  .parentrow {
    grid-template-columns: 1fr auto
  }

  .parentrow>div:nth-child(2) {
    display: none
  }

  .answers {
    gap: 6px;
    flex-wrap: wrap
  }

  .game .tools button {
    font-size: 0
  }

  .bins {
    flex-wrap: wrap
  }

  .game .screenhead h1 {
    font-size: 20px
  }

  .answer {
    min-width: 64px
  }

  .portrait {
    display: block;
    color: #a7b3c8;
    font-size: 12px
  }

  .lead h1 {
    font-size: 35px
  }

  .navwrap {
    gap: 1px
  }

  .screenhead .secondary {
    padding: 0 10px
  }
}

@media(prefers-reduced-motion:reduce) {

  *,
  *:before {
    animation: none !important;
    transition: none !important
  }
}

.hopline {
  display: flex;
  position: relative;
  width: min(100%, 820px);
  min-height: 78px;
  align-items: stretch;
  flex: none
}

.hopline:before {
  content: "";
  position: absolute;
  top: 47px;
  left: 4.5%;
  right: 4.5%;
  height: 2px;
  background: #698b9f
}

.hopspot {
  min-height: 78px;
  min-width: 64px;
  flex: 1;
  position: relative;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  padding: 50px 0 0;
  color: #d5e4f1;
  font-size: 16px
}

.hopspot:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8ca8b8;
  left: calc(50% - 3.5px);
  top: 44px
}

.hopspot svg {
  position: absolute;
  left: 50%;
  top: 1px;
  width: 46px;
  height: 46px;
  transform: translateX(-50%);
  animation: gentlehop 2.3s infinite
}

.hopspot.picked {
  background: #7be8cc18;
  border-radius: 12px
}

.bin.picked {
  outline: 2px solid var(--aqua)
}

.blockbin {
  min-width: 145px
}

.bin .stepsvg {
  width: 135px;
  height: clamp(64px, 11vh, 110px)
}

.guidearrow {
  color: #83c9b8;
  animation: guideflow 1.8s infinite
}

.bin .kindart {
  width: 44px;
  height: 44px
}

.piecepile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 100px
}

.piecepile svg {
  width: 23px;
  height: 23px
}

.modelspace {
  position: relative
}

.countdemo {
  position: absolute;
  inset: 0;
  background: #1a293cfa;
  border: 1px solid #466174;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-direction: column;
  pointer-events: none
}

.demopieces {
  display: flex;
  flex-wrap: wrap;
  max-width: min(70%, 480px);
  justify-content: center;
  gap: 4px
}

.demopieces svg {
  width: 36px;
  height: 36px
}

.demopieces .off {
  opacity: .15
}

.modelnote {
  line-height: 1.5
}

.gamepanel .modelspace {
  gap: clamp(5px, 1.3vh, 13px)
}

.stargrade {
  color: #ffcd76;
  display: inline-flex;
  gap: 2px
}

.stargrade .icon {
  width: 16px;
  height: 16px
}

.stargrade .filled {
  fill: #ffcd76
}

.gamepanel {
  background-image: radial-gradient(ellipse at 48% 62%, #1c3241, #131c30 76%)
}

.groupcaption {
  color: #bed1de;
  font-weight: 600
}

@keyframes gentlehop {

  0%,
  75%,
  100% {
    translate: 0 0
  }

  86% {
    translate: 0 -4px
  }
}

@keyframes guideflow {

  0%,
  100% {
    opacity: .55;
    translate: 0 0
  }

  50% {
    opacity: 1;
    translate: 3px 0
  }
}

@media(max-height:660px) and (orientation:landscape) {
  .gamepanel .modelspace {
    gap: 2px
  }

  .gamepanel .equation {
    font-size: 23px
  }

  .gamepanel .prompt h2 {
    font-size: 19px
  }

  .gamepanel .prompt .iconbtn {
    min-height: 64px
  }

  .gamepanel .modelnote {
    font-size: 12px
  }

  .hopline,
  .hopspot {
    min-height: 66px
  }

  .bin .stepsvg {
    height: 64px
  }

  .gamepanel .prompt {
    flex: none
  }

  .game .gamepanel {
    gap: 2px
  }

  .game .screenhead {
    min-height: 64px
  }
}

@media(max-width:800px) {
  .hopline {
    width: 100%
  }

  .hopspot {
    min-width: 0
  }

  .bin.wide {
    min-width: 64px
  }

  .rank {
    display: none
  }
}

@media(prefers-reduced-motion:reduce) {

  .hopspot svg,
  .guidearrow {
    animation: none
  }
}

.distribution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%
}

.distribution .wide {
  max-width: 145px;
  min-width: 72px
}

.distribution .bins {
  gap: 7px
}

.distribution .bin b {
  font-size: 17px
}

.distribution .piecepile {
  max-width: 75px
}

.distribution .object {
  flex: none
}

.gamepanel .blockbin {
  padding: 2px 8px
}

.gamepanel:has(.hopline) .modelspace {
  gap: 4px
}

.gamepanel:has(.hopline) .stepsvg {
  height: 74px
}

.gamepanel:has(.hopline) .moveinstruction {
  font-size: 12px
}

.gamepanel:has(.hopline) .prompt {
  min-height: 64px
}

@media(max-height:680px) and (orientation:landscape) {
  .gamepanel:has(.hopline) .modelspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    align-content: center
  }

  .gamepanel:has(.hopline) .modelspace>.modelnote:first-child {
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    padding: 4px
  }

  .gamepanel:has(.hopline) .toolrow {
    grid-row: 1 / 3;
    grid-column: 2
  }

  .gamepanel:has(.hopline) .hopline {
    grid-row: 3;
    grid-column: 1 / 3;
    margin: auto
  }

  .gamepanel:has(.hopline) .moveinstruction {
    grid-row: 2;
    grid-column: 1;
    align-self: start
  }

  .gamepanel:has(.hopline) .stepsvg {
    height: 64px
  }

  .gamepanel:has(.hopline) .prompt {
    min-height: 64px
  }

  .gamepanel .modelspace {
    gap: 3px
  }

  .gamepanel .moveinstruction {
    font-size: 11px
  }
}

@media(min-height:581px) and (max-height:680px) and (orientation:landscape) {
  .game:has(.hopline) {
    gap: 3px
  }

  .gamepanel:has(.hopline) {
    padding-top: 4px;
    padding-bottom: 4px
  }
}
.bin.frame {
  display: block;
  min-height: 64px;
  padding: 0
}

.bin.frame > svg {
  width: 100%;
  height: auto;
  max-height: 116px
}

@media(max-height:680px) and (orientation:landscape) {
  .bin.frame > svg {
    max-height: 84px
  }

  .stat {
    min-height: 64px
  }
}

@media(max-width:520px) {
  .gamepanel .toolrow {
    max-width: 100%
  }

  .gamepanel .blockbin {
    min-width: 64px
  }

  .blockbin .stepsvg {
    max-width: 100%
  }

  .distribution {
    flex-wrap: wrap
  }

  .distribution .guidearrow {
    rotate: 90deg
  }

  .distribution .bins {
    flex: 0 0 100%;
    flex-wrap: wrap
  }

  .gfoot {
    flex-wrap: wrap
  }
}
