/* tanthu.css: Tiên Lộ Chỉ Dẫn (js/ui/tanthu.js): the guide card in Tiên Trấn, locked menu buttons, the in-run goal chip */

.tt-guide {
  position: fixed;
  top: 96px;
  right: 10px;
  z-index: 21;
  width: 250px;
  pointer-events: auto;
  color: #4f2a10;
  background: linear-gradient(180deg, #fffdf4, #f4e2b8);
  border: 2.5px solid #c98624;
  border-radius: 12px;
  box-shadow: 0 3px 0 #7a4a1c, 0 8px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.tt-guide.ready {
  animation: ttg-glow 1.6s ease-in-out infinite;
}
@keyframes ttg-glow {
  50% {
    box-shadow: 0 3px 0 #7a4a1c, 0 0 0 3px rgba(255, 214, 74, 0.75), 0 8px 18px rgba(0, 0, 0, 0.35);
  }
}
.ttg-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  background: linear-gradient(180deg, #9a6034, #6c3e1d);
  color: #ffe9b0;
  font: 700 12.5px system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
}
.ttg-head span {
  flex: 1;
}
.ttg-head em {
  font-style: normal;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 7px;
  border-radius: 999px;
}
.ttg-head .snav-dot {
  position: static;
}
.ttg-caret {
  font-style: normal;
  font-size: 10px;
}
.tt-guide.min .ttg-body {
  display: none;
}
.tt-guide.min {
  width: auto;
}
.ttg-body {
  padding: 8px 10px 9px;
  font-size: 12px;
  line-height: 1.4;
}
.ttg-title {
  display: block;
  font-size: 14px;
  color: #7a2e08;
  margin-bottom: 3px;
}
.ttg-desc {
  margin: 0 0 6px;
}
.ttg-bar {
  position: relative;
  height: 13px;
  margin: 0 0 6px;
  background: #e2c98f;
  border-radius: 999px;
  overflow: hidden;
}
.ttg-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4fc78d, #2c9a6a);
}
.ttg-bar em {
  position: absolute;
  inset: 0;
  font: 700 10px/13px system-ui, sans-serif;
  font-style: normal;
  text-align: center;
  color: #23140a;
}
.ttg-open {
  margin: 0 0 4px;
  color: #1f6b4a;
  font-weight: 700;
}
.ttg-rw {
  margin: 0 0 7px;
  padding: 4px 7px;
  background: rgba(201, 134, 36, 0.14);
  border-radius: 7px;
  font-weight: 600;
}
.ttg-acts {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ttg-btn {
  flex: 1;
  padding: 6px 10px;
  border: 2px solid #7a4a1c;
  border-radius: 8px;
  font: 700 13px system-ui, sans-serif;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #e0913a, #b0601c);
  box-shadow: 0 2px 0 #6a3a12;
}
.ttg-btn.claim {
  background: linear-gradient(180deg, #4fc78d, #23875a);
  border-color: #1a5c3e;
  box-shadow: 0 2px 0 #134430;
}
.ttg-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}
.ttg-skip {
  border: 0;
  background: none;
  color: #8a6c4c;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

/* left menu: features the guide has not opened yet, and the one the current step needs */
.town-left-menu .tlm-btn.tlm-lock {
  filter: grayscale(0.9);
  opacity: 0.5;
}
.town-left-menu .tlm-btn.tlm-lock {
  position: relative;
}
.town-left-menu .tlm-btn.tlm-lock::after {
  content: '🔒';
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
}
.town-left-menu .tlm-btn.tut-pulse {
  animation: tut-pulse 1.2s ease-in-out infinite;
}
@keyframes tut-pulse {
  50% {
    box-shadow: 0 0 0 3px #ffd54a, 0 0 12px rgba(255, 213, 74, 0.9);
  }
}

.tt-modal .box a {
  color: #b0601c;
  font-weight: 700;
}

/* goal during a Bí Cảnh run */
#tt-run-goal {
  position: fixed;
  left: 50%;
  bottom: max(14px, calc(env(safe-area-inset-bottom) + 10px));
  transform: translateX(-50%);
  z-index: 9;
  max-width: min(86vw, 480px);
  padding: 5px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
  color: #fff3c4;
  background: rgba(24, 16, 8, 0.78);
  border: 1.5px solid #d6a456;
  border-radius: 12px;
  font: 12px system-ui, sans-serif;
  cursor: pointer;
  pointer-events: auto;
}
#tt-run-goal b {
  color: #ffd54a;
  font-size: 12.5px;
}
#tt-run-goal.hidden,
body:not(.in-run) #tt-run-goal {
  display: none;
}

@media (max-width: 720px), (max-height: 520px) {
  .tt-guide {
    top: 88px;
    width: 196px;
  }
  .ttg-body {
    padding: 6px 8px 7px;
    font-size: 11px;
  }
  .ttg-title {
    font-size: 12.5px;
  }
  .ttg-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ttg-btn {
    padding: 4px 8px;
    font-size: 12px;
  }
  #tt-run-goal {
    bottom: auto;
    top: max(84px, calc(env(safe-area-inset-top) + 80px));
    font-size: 11px;
  }
}
@media (max-height: 520px) {
  .tt-guide {
    top: 84px;
  }
  .ttg-desc {
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
  }
  .ttg-rw {
    margin-bottom: 4px;
    padding: 2px 6px;
    font-size: 10.5px;
  }
}
