.walk-gates {
  position: absolute;
  display: grid;
}
.walk-fox {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.walk-fox-sprite {
  margin: auto;
}
.walk-fox-sprite svg {
  width: 100%;
  height: 100%;
}
.walk-road-tip {
  position: absolute;
  text-align: center;
  z-index: 5;
}
.walk-arrow {
  font: inherit;
  cursor: pointer;
}
.walk-gate {
  font: inherit;
  cursor: pointer;
}
.trail-game button:disabled {
  cursor: default;
}
@keyframes walkBob {
  50% {
    transform: translateY(-5px) rotate(3deg);
  }
}
.in-walk .sidebar,
.in-walk .topbar,
.in-walk .footer {
  display: none;
}
.in-walk .layout {
  display: block;
}
.in-walk .main {
  max-width: 820px;
  padding: 15px 22px 12px;
}
.trail-header {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.trail-header small {
  font-size: 10px;
  color: #88957b;
}
.trail-exit,
.trail-pause {
  padding: 7px 11px;
  border-radius: 8px;
  background: #e7eddd;
  font-size: 11px;
}
.trail-game {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 45px #193c3214;
  background: #fff;
}
.trail-hud {
  display: flex;
  justify-content: space-between;
  background: #193f35;
  color: #dce9c6;
  padding: 13px 24px;
  font-size: 12px;
}
.trail-combo {
  color: #dbea98;
}
.trail-progress {
  display: flex;
  gap: 4px;
  background: #193f35;
  padding: 0 24px 12px;
}
.trail-progress > span {
  height: 3px;
  flex: 1;
  background: #426452;
  border-radius: 4px;
  overflow: hidden;
}
.trail-progress i {
  height: 100%;
  background: #d5ed7a;
  display: block;
  transition: width 0.3s;
}
.trail-question {
  padding: 12px 16px 13px;
  text-align: center;
  background: #fafbef;
  min-height: 112px;
}
.trail-question .word {
  font-size: 32px;
  margin: 5px 0 5px;
}
.trail-question p {
  font-size: 11px;
  line-height: 1.6;
  color: #85916f;
}
.trail-question-tag {
  font-size: 10px;
  color: #718468;
  letter-spacing: 1px;
}
.trail-question-tag span {
  color: #a1aa91;
}
.trail-question-tag em {
  font-style: normal;
  background: #e5edd2;
  padding: 3px 7px;
  border-radius: 10px;
  margin-left: 8px;
  font-size: 9px;
}
.trail-field {
  height: calc(100dvh - 285px);
  min-height: 320px;
  max-height: 570px;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  background: #dce8c5;
}
.trail-field > svg {
  position: absolute;
  width: 100%;
  height: 100%;
}
.trail-flow {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 45px,
    #fff6 45px,
    #fff6 47px,
    transparent 47px,
    transparent 90px
  );
  clip-path: polygon(36% 0, 64% 0, 95% 100%, 5% 100%);
  opacity: 0.15;
}
.trail-field.moving .trail-flow {
  animation: trailFlow 0.65s linear infinite;
}
.trail-field.moving .walk-fox-sprite {
  animation: walkBob 0.23s ease-in-out infinite;
}
.trail-zone-label {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  color: #6d815f;
  letter-spacing: 1px;
  z-index: 1;
}
.biome-ruins .trail-zone-label,
.biome-ruins .walk-road-tip {
  color: #c1d7ae;
}
.trail-gates {
  left: 6%;
  width: 88%;
  gap: 6%;
  z-index: 3;
  transform-origin: 50% 50%;
  transition:
    top 0.06s linear,
    transform 0.06s linear;
}
.trail-gates .walk-gate {
  min-height: 110px;
  box-shadow: 0 8px 12px #2c482526;
}
.trail-gates .gate-top {
  font-size: 9px;
  letter-spacing: 2px;
}
.trail-gates .gate-word {
  font-size: 15px;
  min-height: 37px;
}
.trail-gates .gate-opening {
  height: 37px;
}
.trail-field .walk-fox {
  width: 85px;
  height: 100px;
  transition:
    left 0.16s ease,
    top 0.4s ease;
  z-index: 5;
}
.trail-field .walk-fox-sprite {
  width: 85px;
  height: 85px;
  position: relative;
  z-index: 2;
}
.trail-coin-line {
  position: absolute;
  top: 46%;
  height: 31%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  transform: translateX(-50%);
  color: #bd9d45;
  font-size: 17px;
  transition: left 0.16s ease;
  opacity: 0.75;
}
.trail-field.moving .trail-coin-line span {
  animation: coinShine 1s ease-in-out infinite;
  animation-delay: calc(var(--n) * 0.2s);
}
.trail-motes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.trail-motes i {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #dbef9a;
  border-radius: 50%;
  left: calc(var(--i) * 14%);
  top: calc(var(--i) * 12%);
  opacity: 0;
  box-shadow: 0 0 12px #edffaf;
}
.biome-ruins .trail-motes i,
.firefly-mode .trail-motes i {
  opacity: 0.7;
  animation: mote 2s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * 0.3s);
}
.fox-aura {
  position: absolute;
  inset: 5px;
  background: #d9f99a;
  border-radius: 50%;
  opacity: 0;
  filter: blur(11px);
}
.firefly-mode .fox-aura {
  opacity: 0.55;
  animation: mote 1s infinite alternate;
}
.firefly-mode .trail-combo {
  color: #f4ffaf;
}
.trail-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 11px 16px;
  background: #fafbef;
}
.trail-controls > div {
  display: grid;
  text-align: center;
  gap: 4px;
  min-width: 180px;
}
.trail-controls span {
  font-size: 10px;
  color: #7e8f6b;
}
.trail-fast {
  background: transparent;
  font-size: 11px;
  color: #3d6547;
  padding: 5px;
  font-weight: 700;
}
.trail-controls .walk-arrow {
  height: 42px;
  width: 48px;
}
.trail-bottom {
  font-size: 9px;
  color: #8d9b80;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 5px;
}
.trail-overlay {
  position: absolute;
  inset: 0;
  background: #1b3a3069;
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 15px;
}
.trail-dialog {
  background: #fbfcf0;
  border: 1px solid #e4ead6;
  width: min(380px, 100%);
  padding: 23px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 15px 60px #193c3240;
}
.trail-dialog-icon {
  font-size: 32px;
  margin-bottom: 10px;
}
.trail-dialog h2 {
  font-size: 21px;
  margin-bottom: 12px;
}
.trail-dialog p {
  font-size: 12px;
  color: #7b8b68;
  line-height: 1.9;
  margin-bottom: 18px;
}
.trail-dialog .btn {
  width: 100%;
  margin-top: 9px;
  gap: 8px;
  font-size: 13px;
  padding: 12px;
}
.trail-dialog .btn small {
  font-size: 9px;
  font-weight: 400;
  opacity: 0.7;
}
.trail-intro-note {
  font-size: 9px;
  color: #94a07f;
  line-height: 1.8;
  margin-top: 15px;
}
.trail-route {
  display: block;
  width: 100%;
  background: #eaf0dc;
  padding: 16px;
  margin-top: 11px;
  border: 1px solid #d6e0c1;
  border-radius: 12px;
  text-align: left;
}
.trail-route b {
  font-size: 13px;
  display: block;
  margin-bottom: 6px;
}
.trail-route span {
  font-size: 11px;
  color: #84926e;
}
.trail-route:hover {
  background: #dceabb;
  border-color: #9cae7c;
}
.trail-reveal {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(410px, 91%);
  background: #f8fceff5;
  border: 1px solid #c4d4a4;
  border-radius: 17px;
  padding: 15px 18px;
  text-align: center;
  z-index: 10;
  box-shadow: 0 10px 25px #27453130;
  line-height: 1.7;
}
.trail-reveal.bad {
  background: #fff6eaf5;
  border-color: #d5b893;
}
.trail-reveal strong {
  font-size: 12px;
  color: #53763a;
}
.trail-reveal.bad strong {
  color: #a37546;
}
.trail-reveal > div {
  font-size: 13px;
  margin-top: 6px;
}
.trail-reveal p {
  font-size: 10px;
  color: #81916e;
  margin: 5px 0 9px;
}
.trail-reveal .btn {
  font-size: 11px;
  padding: 8px 17px;
}
.trail-reveal > small {
  display: block;
  font-size: 8px;
  color: #9aa687;
  margin-top: 5px;
}
@keyframes trailFlow {
  to {
    background-position-y: 90px;
  }
}
@keyframes mote {
  to {
    transform: translateY(-12px);
    opacity: 0.3;
  }
}
@keyframes coinShine {
  50% {
    transform: scale(1.2);
    color: #fff5a5;
  }
}
@media (max-width: 640px) {
  .in-walk .main {
    padding: 5px 10px 6px;
  }
  .trail-header {
    height: 39px;
    font-size: 10px;
  }
  .trail-header small {
    font-size: 8px;
  }
  .trail-exit,
  .trail-pause {
    font-size: 10px;
    padding: 7px 9px;
  }
  .trail-game {
    border-radius: 16px;
  }
  .trail-hud {
    padding: 10px 15px;
    font-size: 11px;
  }
  .trail-progress {
    padding: 0 15px 9px;
  }
  .trail-question {
    min-height: 104px;
    padding: 10px 12px;
  }
  .trail-question .word {
    font-size: 28px;
  }
  .trail-question-tag {
    font-size: 9px;
  }
  .trail-question p {
    font-size: 10px;
  }
  .trail-field {
    height: calc(100dvh - 295px);
    min-height: 290px;
    max-height: 600px;
  }
  .trail-gates {
    left: 3%;
    width: 94%;
    gap: 3%;
  }
  .trail-gates .walk-gate {
    min-height: 97px;
    border-width: 3px;
  }
  .trail-gates .gate-top {
    font-size: 8px;
    letter-spacing: 0;
    padding: 6px 2px;
  }
  .trail-gates .gate-word {
    font-size: 12px;
    min-height: 38px;
    padding: 5px 3px;
  }
  .trail-gates .gate-opening {
    height: 31px;
  }
  .trail-field .walk-fox {
    width: 73px;
    height: 86px;
  }
  .trail-field .walk-fox-sprite {
    width: 73px;
    height: 73px;
  }
  .trail-controls {
    padding: 9px 12px;
    gap: 12px;
  }
  .trail-controls > div {
    min-width: 175px;
  }
  .trail-controls .walk-arrow {
    height: 38px;
    width: 43px;
  }
  .trail-bottom {
    font-size: 8px;
    padding: 7px 2px;
  }
  .trail-bottom > span:last-child {
    display: none;
  }
  .trail-dialog {
    padding: 20px 16px;
  }
  .trail-dialog h2 {
    font-size: 18px;
  }
  .trail-dialog p {
    font-size: 11px;
  }
  .trail-dialog .eyebrow {
    font-size: 8px;
  }
  .trail-dialog-icon {
    font-size: 29px;
  }
  .trail-dialog .btn {
    font-size: 12px;
    padding: 12px;
  }
  .trail-reveal {
    padding: 12px 14px;
    bottom: 10px;
  }
  .trail-zone-label {
    font-size: 8px;
    top: 9px;
  }
  .trail-field .walk-road-tip {
    font-size: 9px;
    bottom: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .trail-motes i,
  .trail-flow,
  .trail-coin-line span,
  .fox-aura {
    animation: none !important;
  }
}
.in-walk .main {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.in-walk .trail-header {
  flex: none;
}
.in-walk .trail-game {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.in-walk .trail-hud,
.in-walk .trail-progress,
.in-walk .trail-controls,
.in-walk .trail-bottom {
  flex: none;
}
.in-walk .trail-field {
  flex: 1;
  height: auto;
  min-height: 0;
  max-height: none;
}
.in-walk .trail-question {
  flex: none;
  min-height: 100px;
  max-height: 32dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.in-walk .trail-question.context-question .word,
.in-walk .trail-question.long-question .word {
  font-family: system-ui, sans-serif;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 0;
  font-weight: 700;
  margin: 5px 0;
}
.in-walk .trail-question.context-question p {
  font-size: 11px;
  line-height: 1.6;
  padding: 0 12px;
}
.in-walk .trail-dialog {
  max-height: 95%;
  overflow-y: auto;
}
@media (max-height: 650px) {
  .in-walk .trail-question {
    min-height: 82px;
    padding: 7px 8px;
    max-height: 34dvh;
  }
  .in-walk .trail-question .word {
    font-size: 27px;
  }
  .in-walk .trail-question.context-question .word,
  .in-walk .trail-question.long-question .word {
    font-size: 18px;
  }
  .in-walk .trail-controls {
    padding: 6px 8px;
  }
  .in-walk .trail-controls .walk-arrow {
    height: 36px;
  }
  .in-walk .trail-question p {
    line-height: 1.4;
  }
}
@media (max-height: 650px) {
  .in-walk .checkpoint-dialog {
    padding: 12px;
  }
  .in-walk .checkpoint-dialog .trail-dialog-icon,
  .in-walk .checkpoint-dialog .eyebrow {
    display: none;
  }
  .in-walk .checkpoint-dialog h2 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  .in-walk .checkpoint-dialog p {
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 8px;
  }
  .in-walk .checkpoint-dialog .trail-route {
    padding: 10px 12px;
    margin-top: 8px;
  }
  .in-walk .checkpoint-dialog .trail-route b {
    font-size: 12px;
    margin-bottom: 3px;
  }
  .in-walk .checkpoint-dialog .trail-route span {
    font-size: 10px;
  }
}
.in-walk .trail-gates .gate-word {
  left: 8%;
  width: 84%;
  height: auto;
  min-height: 28px;
  padding: 4px 5px;
  top: 14%;
  background: #f8e6be;
  border: 1px solid #947349;
  border-radius: 3px;
  box-shadow: 0 2px 0 #684b32;
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.in-walk .trail-gates .gate-word.long {
  font-size: 12px;
  line-height: 1.2;
}
@media (max-width: 400px) {
  .in-walk .trail-gates .gate-word {
    font-size: 12px;
    min-height: 25px;
  }
  .in-walk .trail-gates .gate-word.long {
    font-size: 11px;
  }
}
.in-walk .trail-gates .gate-word {
  white-space: normal;
}
.in-walk .trail-gates .walk-gate.correct .gate-word {
  background: #dbeecb;
  border-color: #73995b;
  color: #244c2b;
  box-shadow: 0 0 12px #bded91;
}
.in-walk .trail-gates .walk-gate.wrong .gate-word {
  background: #f1d5c2;
  border-color: #be7a59;
  color: #754730;
}
