/* Fun zone: hub, Mystery Tama, memory match, trivia, mystery egg, Flags practice, UFO shuffle */

/* Masthead link */
.fun-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #fff1c7;
  color: #6b4b00;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.fun-link:hover,
.fun-link[aria-current='page'] {
  background: #ffe39a;
}
.fun-star {
  font-size: 1.05rem;
  line-height: 1;
}
/* The label shows only where the bar has room for it. */
.fun-link {
  justify-content: center;
  min-width: 44px;
  padding: 9px 10px;
}
.fun-link .fun-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (min-width: 1241px) and (max-width: 1599px) {
  .fun-link {
    min-width: 0;
    padding: 9px 12px;
  }
  .fun-link .fun-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
}
/* Keep the compact navigation a little longer, so the Fun zone link fits beside it. */
@media (min-width: 1401px) and (max-width: 1599px) {
  .topbar {
    gap: 14px;
  }
  .navigation {
    gap: 2px;
  }
  .navigation a {
    padding: 10px 11px;
  }
  .navigation .desktop-label {
    display: none;
  }
}
@media (max-width: 760px) {
  .masthead .fun-link {
    margin-left: auto;
  }
  .masthead .fun-link + .search-guide-link {
    margin-left: 0;
  }
}
@media (max-width: 374px) {
  .masthead .fun-link {
    min-width: 38px;
    padding: 9px 6px;
  }
  .masthead .search-guide-link {
    gap: 6px;
    padding: 8px 8px;
  }
}
@media (min-width: 761px) and (max-width: 1030px) {
  .masthead .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .masthead .fun-link {
    grid-area: 1/2;
  }
  .masthead .search-guide-link {
    grid-area: 1/3;
  }
}
@media (max-width: 350px) {
  .masthead .brand-second {
    display: none;
  }
}

/* Hub page */
.arc-page {
  max-width: 920px;
}
.arc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 10px;
  margin: 6px 0 20px;
}
.arc-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 98px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
}
.arc-tile:hover {
  transform: translateY(-2px);
  border-color: #9db8ad;
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.08);
}
.arc-tile-text {
  min-width: 0;
}
.arc-tile strong {
  display: block;
  font: 750 1.12rem/1.15 var(--title);
  letter-spacing: -0.02em;
}
.arc-tile small {
  display: block;
  margin: 3px 0 4px;
  font-size: 0.86rem;
  line-height: 1.3;
  color: var(--muted);
}
.arc-tile em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  color: #246254;
}
.arc-art {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef3ea;
}
.arc-art i {
  font-style: normal;
}
.arc-art img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}
img.art-shadow {
  filter: brightness(0);
  opacity: 0.8;
}
html[data-theme='dark'] img.art-shadow {
  filter: brightness(0) invert(0.914);
}
.art-mystery {
  background: #fff1c7;
}
.art-quiz {
  background: #e3eefc;
}
.art-match {
  display: flex;
  justify-content: center;
  gap: 3px;
  background: #ffe5ed;
}
.art-trivia {
  background: #e6f1df;
}
.art-flags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: #b4f2a4;
}
.art-ufo {
  background: linear-gradient(#aeeef2 0 46%, #7fe17a 46%);
}
.art-egg {
  background: #ffead5;
}
.art-stickers {
  display: flex;
  justify-content: center;
  background: #eee5ff;
}
.art-stickers img {
  width: 30px;
  height: 30px;
  margin: 0 -4px;
}
.art-q {
  font: 800 2.1rem/1 var(--title);
  color: #7a5b00;
  transform: translateY(-6px);
}
.art-chip {
  position: absolute;
  bottom: 9px;
  width: 13px;
  height: 8px;
  border-radius: 3px;
  background: #cfd6d0;
}
.art-chip.c1 {
  left: 14px;
  background: #7fce8b;
}
.art-chip.c2 {
  left: 30px;
  background: #f0cf58;
}
.art-chip.c3 {
  left: 46px;
}
.art-card {
  display: grid;
  place-items: center;
  width: 19px;
  height: 27px;
  border: 2px solid #fff;
  border-radius: 4px;
  background: #3f8f84 repeating-linear-gradient(45deg, rgb(255 255 255 / 0.28) 0 3px, transparent 3px 6px);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}
.art-card.face {
  background: #fff;
  transform: translateY(-4px) rotate(5deg);
}
.art-card img {
  width: 15px;
  height: 15px;
}
.art-bubble {
  position: absolute;
  left: 12px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 2px solid #4f9f84;
  border-radius: 50%;
  background: #fff;
  font: 800 0.8rem var(--title);
  color: #246254;
}
.art-bubble.b {
  left: 35px;
  top: 10px;
  border-color: #e2a23a;
  color: #7a5b00;
}
.art-bubble.c {
  left: 24px;
  top: 34px;
  border-color: #c06c84;
  color: #7b2d45;
}
.mini-flag {
  position: relative;
  width: 3px;
  height: 28px;
  border-radius: 2px;
  background: #8a5a2b;
  transform: rotate(-28deg);
}
.mini-flag::after {
  content: '';
  position: absolute;
  top: 0;
  right: 3px;
  width: 13px;
  height: 9px;
  border: 2px solid #2a3a4a;
  background: #fff;
}
.mini-flag.red {
  transform: rotate(28deg);
}
.mini-flag.red::after {
  right: auto;
  left: 3px;
  background: #ff3d3d;
}
.art-flags img {
  width: 32px;
  height: 32px;
}
.mini-ufo {
  position: relative;
  width: 50px;
  height: 18px;
  border: 2px solid #1b1f6b;
  border-radius: 50%;
  background: linear-gradient(#4fc3ff, #1b88e0);
  transform: translateY(-8px);
}
.mini-ufo::before {
  content: '';
  position: absolute;
  left: 13px;
  bottom: 9px;
  width: 20px;
  height: 14px;
  border: 2px solid #1b1f6b;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #f04fb5;
}
.mini-ufo::after {
  content: '';
  position: absolute;
  left: 12px;
  top: 14px;
  width: 22px;
  height: 30px;
  background: linear-gradient(rgb(255 240 120 / 0.9), rgb(255 240 120 / 0.2));
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}
.mini-egg {
  display: block;
  width: 34px;
  height: 43px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background:
    radial-gradient(circle at 34% 26%, #fff 0 8%, transparent 9%),
    linear-gradient(160deg, #ffd9a8, #f0a04b);
  box-shadow: inset -4px -5px 0 rgb(0 0 0 / 0.08);
}
.mini-egg.big {
  width: 86px;
  height: 108px;
  box-shadow: inset -9px -11px 0 rgb(0 0 0 / 0.08);
}
.arc-fact,
.arc-shelf {
  margin: 0 0 20px;
}
.arc-fact {
  padding: 14px 16px;
  border: 1px solid #ead9a0;
  border-radius: 16px;
  background: #fffaea;
}
.arc-fact h2,
.arc-shelf h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}
.arc-fact p {
  margin: 0 0 8px;
  font-size: 1.02rem;
}
.arc-page-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

/* Home strip */
.fun-strip {
  margin: 14px 0 6px;
}
.fun-strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.fun-strip-head h2 {
  margin: 0 0 7px;
  font-size: 1.2rem;
}
.fun-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.fun-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 62px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.fun-chip:hover {
  border-color: #9db8ad;
  background: #f6f9f3;
}
.fun-chip .arc-art {
  margin: -14px;
  transform: scale(0.61);
}
.fun-chip > span:last-child {
  min-width: 0;
}
.fun-chip b {
  display: block;
  font-size: 0.92rem;
  line-height: 1.15;
}
.fun-chip small {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}
@media (max-width: 760px) {
  .fun-chips {
    grid-template-columns: 1fr 1fr;
  }
}

/* Shared game chrome */
.arc {
  display: grid;
  gap: 10px;
}
.arc > * {
  margin-top: 0;
  margin-bottom: 0;
}
.arc .overline {
  margin: 0;
}
.arc-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.arc-status {
  flex: 1;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.arc-sound {
  min-height: 40px;
  font-size: 0.86rem;
}
.match-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.9rem;
  color: var(--muted);
}
.match-bar b {
  font-size: 1.1rem;
  color: var(--ink);
}

/* Mystery Tama */
.share-box {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 0.9rem/1.35 var(--body);
  resize: none;
}
.puzzle-egg {
  position: relative;
  display: grid;
  place-items: center;
  height: 124px;
}
.puzzle-egg b {
  position: absolute;
  font: 800 2.6rem var(--title);
  color: #fff;
  text-shadow: 0 2px 0 rgb(0 0 0 / 0.18);
}
.puzzle-egg .mini-egg {
  animation: tama-bob 2.6s ease-in-out infinite;
}
.puzzle-left {
  text-align: center;
  color: var(--muted);
}
.guess-form {
  display: grid;
  gap: 6px;
}
.guess-form label {
  font-size: 0.9rem;
  font-weight: 650;
}
.guess-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
}
.guess-suggest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.guess-suggest p {
  grid-column: 1/-1;
  margin: 0;
  font-size: 0.9rem;
}
.suggest {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 650 0.95rem/1.15 var(--body);
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.suggest:hover {
  border-color: var(--ink);
}
.suggest img,
.guess-who img {
  flex: none;
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}
.clue-head,
.clues {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.clue-head {
  padding: 0 7px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}
.guesses {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.guess {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  animation: guess-in 0.3s ease-out;
}
.guess.is-answer {
  border-color: #3f8a5c;
  background: #f3fbf4;
}
@keyframes guess-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.guess-who {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 2px 6px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 0.95rem var(--body);
  cursor: pointer;
}
.clue {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 4px 3px;
  border-radius: 8px;
  background: #e9ece7;
  color: #44524f;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
}
.clue b {
  font-size: 0.72rem;
}
.clue-hit {
  background: #bfe6c5;
  color: #174a27;
}
.clue-near {
  background: #f7e3a1;
  color: #5b4300;
}
.clue-help .clue {
  display: inline-grid;
  min-height: 0;
  padding: 1px 8px;
}
.puzzle-reveal {
  position: relative;
  display: grid;
  place-items: center;
  height: 172px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--tile);
}
.puzzle-art {
  position: relative;
  width: 112px;
  height: 112px;
  object-fit: contain;
  image-rendering: pixelated;
  animation: quiz-pop 0.55s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.puzzle-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  text-align: center;
}
.puzzle-stats div {
  display: flex;
  flex-direction: column-reverse;
  padding: 6px 2px;
  border-radius: 10px;
  background: #f1f4ee;
}
.puzzle-stats dt {
  font-size: 0.72rem;
  color: var(--muted);
}
.puzzle-stats dd {
  margin: 0;
  font: 800 1.4rem/1.1 var(--title);
}
.puzzle-next {
  text-align: center;
  font-size: 0.88rem;
}

/* Memory match */
.mgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 560px) {
  .mgrid.size-hard {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.mcard {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}
.mcard:disabled {
  cursor: default;
}
.mcard-back,
.mcard-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  transition: transform 0.16s ease-in;
}
.mcard-back {
  border: 3px solid #fff;
  background: #3f8f84 repeating-linear-gradient(45deg, rgb(255 255 255 / 0.22) 0 6px, transparent 6px 12px);
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.16);
  transition-delay: 0.16s;
}
.mcard-back::after {
  content: '?';
  font: 800 1.5rem var(--title);
  color: rgb(255 255 255 / 0.9);
}
.mcard-face {
  border: 3px solid #fff;
  background: var(--tile);
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.16);
  transform: rotateY(90deg);
}
.mcard.open .mcard-back {
  transform: rotateY(90deg);
  transition-delay: 0s;
}
.mcard.open .mcard-face {
  transform: rotateY(0);
  transition-delay: 0.16s;
}
.mcard.done .mcard-face {
  border-color: #79c3a9;
  animation: card-match 0.4s ease-out 0.3s;
}
@keyframes card-match {
  50% {
    transform: scale(1.1);
  }
}
.mcard-face img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  image-rendering: pixelated;
}
.match-win {
  margin: 0;
}

/* Growth trivia */
.trivia-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.trivia-track {
  height: 6px;
  border-radius: 6px;
  background: #e6ebe4;
  overflow: hidden;
}
.trivia-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79c3a9, #4f9f84);
  transition: width 0.3s;
}
.trivia-q {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trivia-art {
  flex: none;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 14px;
  background: #eef3ea;
}
.trivia-art img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  image-rendering: pixelated;
}
.trivia-q h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}
.quiz-options.one-col {
  grid-template-columns: 1fr;
}
.trivia-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: left;
}
.quiz-options.with-art .trivia-option {
  justify-content: flex-start;
}
.trivia-option img {
  flex: none;
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}
.trivia-why {
  text-align: center;
  color: var(--muted);
}
.trivia-score {
  text-align: center;
  color: var(--muted);
}
.trivia-score b {
  display: block;
  font: 800 4.2rem/1 var(--title);
  color: var(--ink);
}
.trivia-best {
  text-align: center;
}

/* Mystery egg */
.egg-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 216px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--shell-tint, #ffead5);
}
.egg-button {
  padding: 12px;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}
.egg-shell {
  position: relative;
  display: block;
  width: 112px;
  height: 140px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background:
    radial-gradient(circle at 34% 26%, #fff 0 7%, transparent 8%),
    linear-gradient(160deg, color-mix(in srgb, var(--shell, #f0a04b) 45%, #fff), var(--shell, #f0a04b));
  box-shadow:
    inset -9px -11px 0 rgb(0 0 0 / 0.09),
    0 10px 0 -4px rgb(0 0 0 / 0.1);
}
.egg-button:hover .egg-shell {
  animation: egg-shake 0.5s;
}
.crack-1 .egg-shell,
.crack-2 .egg-shell {
  animation: egg-shake 0.45s 2;
}
@keyframes egg-shake {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-7deg);
  }
  75% {
    transform: rotate(7deg);
  }
}
.egg-crack {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 42%;
  height: 18%;
  background: #fff;
  opacity: 0;
  clip-path: polygon(0 50%, 10% 20%, 22% 70%, 34% 25%, 46% 75%, 58% 30%, 70% 78%, 82% 28%, 92% 65%, 100% 45%, 100% 58%, 92% 82%, 82% 46%, 70% 96%, 58% 48%, 46% 93%, 34% 44%, 22% 88%, 10% 40%, 0 64%);
}
.crack-1 .egg-crack {
  right: 46%;
  opacity: 0.95;
}
.crack-2 .egg-crack {
  opacity: 0.95;
}
.egg-count {
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}
.egg-half {
  position: absolute;
  left: calc(50% - 56px);
  width: 112px;
  height: 70px;
  background: var(--shell, #f0a04b);
}
.egg-half.top {
  top: calc(50% - 76px);
  border-radius: 56px 56px 0 0 / 62px 62px 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 88% 78%, 75% 100%, 62% 78%, 50% 100%, 38% 78%, 25% 100%, 12% 78%, 0 100%);
  animation: egg-top 0.75s ease-out forwards;
}
.egg-half.bottom {
  top: calc(50% + 6px);
  border-radius: 0 0 56px 56px / 0 0 44px 44px;
  clip-path: polygon(0 22%, 12% 0, 25% 22%, 38% 0, 50% 22%, 62% 0, 75% 22%, 88% 0, 100% 22%, 100% 100%, 0 100%);
  animation: egg-bottom 0.75s ease-out forwards;
}
@keyframes egg-top {
  to {
    transform: translate(-52px, -58px) rotate(-30deg);
    opacity: 0;
  }
}
@keyframes egg-bottom {
  to {
    transform: translate(44px, 62px) rotate(20deg);
    opacity: 0;
  }
}
.egg-baby {
  position: relative;
  width: 106px;
  height: 106px;
  object-fit: contain;
  image-rendering: pixelated;
  animation: quiz-pop 0.6s 0.15s both cubic-bezier(0.3, 1.5, 0.5, 1);
}

/* Flags practice */
.flag-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 190px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60px 18px at 50% 78%, rgb(0 0 0 / 0.12), transparent 70%),
    linear-gradient(#8df07f, #63de60);
}
.flag-tama {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  object-fit: contain;
  image-rendering: pixelated;
}
.flag {
  position: absolute;
  top: calc(50% - 72px);
  width: 6px;
  height: 78px;
  border-radius: 3px;
  background: #8a5a2b;
  transform-origin: 50% 100%;
  transition: transform 0.12s ease-out;
}
.flag::after {
  content: '';
  position: absolute;
  top: 1px;
  width: 44px;
  height: 30px;
  border: 3px solid #26384a;
  border-radius: 3px;
}
.flag.white {
  left: calc(50% - 52px);
  transform: rotate(-128deg);
}
.flag.white::after {
  right: 6px;
  background: #fff;
}
.flag.red {
  left: calc(50% + 46px);
  transform: rotate(128deg);
}
.flag.red::after {
  left: 6px;
  background: #ff3d3d;
}
.pose-L .flag.white,
.pose-T .flag.white {
  transform: rotate(-38deg);
}
.pose-R .flag.red,
.pose-T .flag.red {
  transform: rotate(38deg);
}
.flag-status {
  min-height: 1.5em;
  text-align: center;
  font-weight: 650;
}
.flag-timer {
  height: 6px;
  border-radius: 6px;
  background: #e6ebe4;
  overflow: hidden;
}
.flag-timer i {
  display: block;
  width: 100%;
  height: 100%;
  background: #e2a23a;
  transform: scaleX(0);
  transform-origin: left;
}
.flag-timer.run i {
  animation: flag-count 2.3s linear forwards;
}
@keyframes flag-count {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}
.flag-pad {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.flag-key {
  display: grid;
  place-items: center;
  min-height: 66px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.flag-key b {
  font: 800 1.15rem/1.1 var(--title);
}
.flag-key span {
  font-size: 0.8rem;
  color: var(--muted);
}
.flag-key:active:not(:disabled) {
  background: #eef3ea;
  transform: translateY(2px);
}
.flag-key:disabled {
  opacity: 0.5;
  cursor: default;
}
.flag-tip {
  font-size: 0.86rem;
  text-align: center;
}

/* UFO shuffle */
.ufo-sky {
  position: relative;
  height: 236px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 46% 17% at 18% 46%, #8be59a 0 99%, transparent 100%),
    radial-gradient(ellipse 40% 14% at 84% 46%, #7ddf8e 0 99%, transparent 100%),
    linear-gradient(#b8f1f4 0 45%, #62dc5f 45%);
}
.ufo-ship {
  position: absolute;
  top: 26px;
  left: calc(4% + var(--slot) * 31%);
  width: 30%;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: none;
  cursor: pointer;
  transition: left 0.3s ease-in-out;
  touch-action: manipulation;
}
.ufo-ship:disabled {
  cursor: default;
  opacity: 1;
}
.ufo-dome {
  position: absolute;
  left: 24%;
  right: 24%;
  top: 8px;
  height: 28px;
  border: 3px solid #1b1f6b;
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: radial-gradient(circle at 50% 72%, #ffd92e 0 20%, #b3570a 21% 26%, transparent 27%), #f04fb5;
}
.ufo-rim {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 30px;
  height: 24px;
  border: 3px solid #1b1f6b;
  border-radius: 50%;
  background: linear-gradient(#4fc3ff, #1b88e0);
}
/* No hover or focus colours on the ships: a ship that looks different before the pick reads as a giveaway. */
.ufo-sky:focus,
.quiz-options:focus,
.flag-pad:focus,
.mgrid:focus {
  outline: none;
}
.ufo-beam {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 48px;
  height: 160px;
  background: linear-gradient(rgb(255 246 150 / 0.9), rgb(255 246 150 / 0.3));
  clip-path: polygon(32% 0, 68% 0, 100% 100%, 0 100%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.ufo-ship.beam .ufo-beam {
  opacity: 1;
}
.ufo-ship.wrong {
  animation: ufo-shake 0.3s 2;
}
@keyframes ufo-shake {
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
.ufo-sky[data-phase='pick'] .ufo-dome,
.ufo-sky[data-phase='pick'] .ufo-rim {
  animation: ufo-hover 1.2s ease-in-out infinite;
}
@keyframes ufo-hover {
  50% {
    transform: translateY(-4px);
  }
}
.ufo-tama {
  position: absolute;
  bottom: 16px;
  left: calc(4% + var(--slot, 1) * 31% + 15% - 25px);
  width: 50px;
  height: 50px;
  object-fit: contain;
  image-rendering: pixelated;
  transition: opacity 0.3s;
}
.ufo-tama.rising {
  animation: ufo-rise 1.2s ease-in forwards;
}
@keyframes ufo-rise {
  0%,
  30% {
    transform: none;
    opacity: 1;
  }
  100% {
    transform: translateY(-118px) scale(0.4);
    opacity: 0;
  }
}
.ufo-tama.up {
  opacity: 0;
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .arc-tile,
  .puzzle-egg .mini-egg,
  .guess,
  .puzzle-art,
  .egg-shell,
  .egg-baby,
  .mcard.done .mcard-face,
  .ufo-sky[data-phase='pick'] .ufo-dome,
  .ufo-sky[data-phase='pick'] .ufo-rim {
    animation: none !important;
    transition: none;
  }
  .egg-half {
    display: none;
  }
}
@media print {
  .fun-strip,
  .fun-link,
  .arc-foot {
    display: none !important;
  }
}
@media (max-width: 340px) {
  .masthead .navigation a {
    font-size: 0.76rem;
    white-space: nowrap;
  }
}
