.hasha-delegation-hint {
  position: fixed;
  z-index: 900;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100vw - 16px);
  padding: 10px 13px;
  border: 2px solid #926535;
  border-radius: 9px;
  background: linear-gradient(#fff5d7, #efdab0);
  box-shadow: 0 3px 8px #20100340;
  color: #492608;
  font: 500 13px / 1.6 sans-serif;
  white-space: pre-line;
  cursor: pointer;
}
.hasha-delegation-hint::after {
  content: '';
  position: absolute;
  left: var(--hint-tail);
  bottom: -8px;
  width: 12px;
  height: 12px;
  border-right: 2px solid #926535;
  border-bottom: 2px solid #926535;
  background: #efdab0;
  transform: translateX(-50%) rotate(45deg);
}

.hasha-guide-board {
  position: fixed;
  inset: auto;
  box-sizing: border-box;
  width: min(480px, calc(100% - 24px));
  max-width: none;
  max-height: none;
  aspect-ratio: 3 / 2;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: visible;
  container-type: inline-size;
  background: transparent url('../images/beginner-guide-board.png') center / contain no-repeat;
  color: #492608;
  filter: drop-shadow(0 5px 5px #20100380);
}

.hasha-guide-board::backdrop {
  background: rgb(25 15 5 / 24%);
}

.hasha-guide-rule-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.hasha-guide-rule-layer::backdrop { background: transparent; }

.hasha-guide-board h2 {
  position: absolute;
  inset: 11.5% 21% auto;
  display: grid;
  place-items: center;
  height: 14%;
  margin: 0;
  color: #fff5d7;
  font: 800 6.2cqw / 1.05 serif;
  text-align: center;
  text-shadow: 0 1px 2px #5e210d;
}

.hasha-guide-text {
  position: absolute;
  inset: 27% 13% auto;
  font: 400 3.8cqw / 1.11 sans-serif;
}

.hasha-guide-text p {
  margin: 0 0 1.2cqw;
  white-space: pre-line;
}

.hasha-guide-text .hasha-guide-note {
  margin: 0;
  padding-top: 0.8cqw;
  border-top: 1px solid #926535;
  font-size: 0.87em;
}

.hasha-guide-board:lang(en) .hasha-guide-text {
  font-size: 4cqw;
  line-height: 1.19;
}

.hasha-guide-strategist h2 {
  font-size: 4.2cqw;
  white-space: nowrap;
}

.hasha-guide-domestic h2 { font-size: 4.4cqw; white-space: nowrap; }
.hasha-guide-domestic .hasha-guide-text { inset: 27% 11% auto; font-size: 3.6cqw; line-height: 1.18; }
.hasha-guide-domestic:lang(en) .hasha-guide-text { font-size: 3.4cqw; line-height: 1.15; }
.hasha-guide-domestic .hasha-guide-text p { margin-bottom: .5cqw; }

.hasha-guide-battle h2 { font-size: 4.2cqw; white-space: nowrap; }
.hasha-guide-battle .hasha-guide-text { font-size: 3.35cqw; line-height: 1.2; inset: 26% 9% auto; }
.hasha-guide-battle:lang(en) .hasha-guide-text { font-size: 3.35cqw; line-height: 1.2; }
.hasha-guide-battle .hasha-guide-note { font-size: .8em; font-weight: inherit; }
.hasha-guide-battle .hasha-guide-text p { margin-bottom: .35cqw; }
.hasha-guide-battle .hasha-guide-text .hasha-guide-note { margin-bottom: 0; }
.hasha-guide-battle .hasha-guide-text .hasha-guide-note { max-width: 76%; margin-top: 1cqw; line-height: 1.3; }
.hasha-guide-board.hasha-guide-battle > button { bottom: 10%; left: 59%; transform: none; width: 30%; min-width: 0; min-height: 44px; font-size: 4.6cqw; }
.hasha-guide-board.hasha-guide-battle .hasha-guide-rules { bottom: 10%; left: 11%; width: 44%; min-width: 0; min-height: 44px; padding: 3px 6px; border: 1px solid #d6bb72; border-radius: 5px; background: linear-gradient(#277bb5,#06436b); box-shadow: 0 2px 3px #0004; color: white; font-size: 3.3cqw; text-decoration: none; }

.hasha-guide-strategist .hasha-guide-text {
  top: 29%;
}

.hasha-guide-strategist .hasha-guide-note {
  font-weight: inherit;
}

.hasha-guide-board button {
  position: absolute;
  left: 50%;
  bottom: 9.5%;
  transform: translateX(-50%);
  box-sizing: border-box;
  min-width: 37%;
  min-height: 44px;
  padding: 3px 12px;
  border: 3px solid #e3c471;
  border-radius: 9px;
  background: linear-gradient(#286940, #104627);
  box-shadow: inset 0 0 0 1px #ffedb080, 0 2px 4px #65401c80;
  color: #fff7d9;
  font: 800 clamp(16px, 5.6cqw, 26px) / 1.1 sans-serif;
  cursor: pointer;
}

.hasha-guide-board button:focus-visible {
  outline: 2px solid #fff5d4;
  outline-offset: -5px;
}

.hasha-guide-board button:active {
  transform: translateX(-50%);
}

.hasha-guide-board.hasha-guide-battle > button:active {
  transform: none;
}

.hasha-guide-arrow {
  position: absolute;
  top: calc(100% - 8px);
  width: 38px;
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(0 2px 2px #3e150d99);
}

.hasha-guide-arrow.points-right {
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center top;
}

.hasha-guide-arrow::before,
.hasha-guide-arrow::after {
  position: absolute;
  inset: 0;
  content: '';
  background: #fff0c8;
  clip-path: polygon(27% 0, 73% 0, 73% calc(100% - 20px), 100% calc(100% - 20px), 50% 100%, 0 calc(100% - 20px), 27% calc(100% - 20px));
}

.hasha-guide-arrow::after {
  inset: 2px 4px 4px;
  background: linear-gradient(#d23725, #a6150b);
  clip-path: polygon(28% 0, 72% 0, 72% calc(100% - 15px), 100% calc(100% - 15px), 50% 100%, 0 calc(100% - 15px), 28% calc(100% - 15px));
}

@media (max-width: 360px) {
  .hasha-guide-board .hasha-guide-text {
    font-size: 3.6cqw;
  }

  .hasha-guide-strategist:lang(en) .hasha-guide-text {
    font-size: 3.65cqw;
  }
}

