.guide {
  --guide-ink: #152f3b;
  --guide-line: #c5cfcc;
  --guide-paper: #fcfcf9;
  color: var(--guide-ink);
  z-index: 6;
}
.guide[hidden], .guide [hidden] { display: none !important; }
.guide[data-dock="floating"] {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: max-content;
}
.guide[data-dock="header"] { position: relative; }
.guide[data-dock="header"] .guide-toggle { flex-direction: row; gap: 5px; }
.guide[data-dock="header"] .guide-stage { width: 34px; height: 40px; overflow: hidden; }
.guide[data-dock="header"] .guide-character { height: 82px; }
.guide[data-dock="header"] .guide-label {
  min-height: 32px; margin: 0; padding: 3px 4px; border: 0; box-shadow: none;
  background: transparent; color: var(--guide-ink);
}
.guide[data-dock="header"] .guide-panel {
  position: absolute; top: calc(100% + 6px); left: var(--guide-menu-left, 0); width: min(256px, calc(100vw - 16px));
  max-height: calc(100vh - 84px); max-height: calc(100dvh - 84px); overflow: auto; overscroll-behavior: contain;
}
.guide[data-dock="header"] .guide-label::after { transform: rotate(45deg); }
.guide[data-dock="header"] [aria-expanded="true"] .guide-label::after { transform: rotate(225deg); }
.guide-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 0 auto;
  padding: 0;
  min-height: 44px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.guide-stage { display: grid; position: relative; justify-items: center; }
.guide-character {
  display: block;
  position: relative;
  width: auto;
  height: clamp(149px, 20vh, 198px);
  aspect-ratio: 666 / 1536;
  flex: none;
  filter: drop-shadow(0 2px 2px #10283725);
}
.guide-character img { width: 100%; height: 100%; display: block; object-fit: contain; }
.guide[data-dock="floating"] .guide-stage::before {
  content: "";
  position: absolute;
  inset: auto 8% -1px;
  height: 7px;
  background: radial-gradient(ellipse, #253e4d52, transparent 69%);
}
.guide-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 31px;
  margin-top: 5px;
  padding: 5px 12px;
  border-radius: 18px;
  background: var(--guide-ink);
  color: white;
  border: 1px solid #f7faf8;
  box-shadow: 0 2px 7px #17313c26;
  font-size: .80rem;
  line-height: 1.35;
  font-weight: 600;
  white-space: nowrap;
}
.guide-label::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
  transform: translateY(1px) rotate(225deg);
}
.guide-toggle[aria-expanded="true"] .guide-label::after { transform: translateY(-1px) rotate(45deg); }
.guide[data-dock="floating"] .guide-toggle:hover .guide-label { background: #285060; }
.guide[data-minimised] .guide-stage, .guide[data-image-missing] .guide-stage { display: none; }
.guide[data-minimised] .guide-label { min-height: 38px; }
.guide-panel {
  display: grid;
  min-width: 0;
  border: 1px solid var(--guide-line);
  border-radius: 12px;
  background: var(--guide-paper);
  color: var(--guide-ink);
  box-shadow: 0 7px 32px #102b3c22, 0 1px 3px #102b3c0a;
  padding: 5px 14px;
}
.guide[data-dock="floating"] .guide-panel {
  position: absolute;
  right: calc(100% + 9px);
  bottom: min(9vh, 83px);
  width: 228px;
  max-height: 44vh;
  overflow-y: auto;
  border-bottom-right-radius: 3px;
}
.guide-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.guide-title strong { font-size: .99rem; line-height: 1.35; }
.guide-panel button { background: transparent; color: inherit; border: 0; cursor: pointer; font: inherit; }
.guide-title button {
  width: 44px;
  height: 44px;
  margin-right: -10px;
  font-size: 1.4rem;
  line-height: 1;
}
.guide-panel > a, .guide-panel > button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 1px;
  min-height: 44px;
  border-top: 1px solid #dde3df;
  font-size: .91rem;
  text-align: start;
}
.guide-panel > a::after { content: "→"; margin-left: auto; color: #5a7077; }
.guide-panel > a:hover, .guide-panel button:hover { color: #98413a; }
.guide-panel > button { color: #51676d; font-size: .79rem; }
.guide button:focus-visible, .guide a:focus-visible { outline: 2px solid #a44c29; outline-offset: 1px; }
.guide[data-dock="card"] { position: relative; padding: 0 var(--gutter, 20px); background: #e6edeb; }
.guide[data-dock="card"] .guide-toggle {
  width: 100%;
  flex-direction: row;
  justify-content: flex-start;
  gap: 11px;
}
.guide[data-dock="card"] .guide-stage {
  width: 49px;
  height: 52px;
  padding-top: 4px;
  overflow: hidden;
}
.guide[data-dock="card"] .guide-character { height: 104px; }
.guide[data-dock="card"] .guide-label {
  flex: 1;
  justify-content: space-between;
  color: var(--guide-ink);
  margin: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 4px 2px;
  font-size: .9rem;
}
.guide[data-dock="card"] .guide-label::after { transform: translateY(-1px) rotate(45deg); }
.guide[data-dock="card"] [aria-expanded="true"] .guide-label::after { transform: translateY(1px) rotate(225deg); }
.guide[data-dock="card"] .guide-panel { margin-block: 4px 12px; box-shadow: none; }
@media (max-width: 900px), (max-height: 550px) {
  .guide[data-dock="header"] .guide-toggle {
    display: grid; place-content: center; width: 44px; height: 44px;
    border-radius: 50%; background: transparent;
  }
  .guide[data-dock="header"] .guide-stage {
    width: 35px; height: 35px; background: #e8eeee;
    border: 1px solid #a7bbbd; border-radius: 50%;
  }
  .guide[data-dock="header"] .guide-character { height: 76px; }
  .guide[data-dock="header"] .guide-label { display: none; }
  .guide[data-dock="header"] .guide-toggle:hover .guide-stage,
  .guide[data-dock="header"] .guide-toggle[aria-expanded="true"] .guide-stage {
    border-color: #386376; background: #dce7e8;
  }
  .guide[data-dock="header"]:is([data-minimised], [data-image-missing]) .guide-toggle::after {
    content: "?"; display: grid; place-items: center; width: 27px; height: 27px;
    border: 1px solid #97aeb3; color: #244453; border-radius: 50%; font-weight: 650;
  }
}
@media (max-width: 440px) {
  .header-inner:has(.guide[data-dock="header"]) { gap: clamp(3px, 1vw, 6px); }
}
@media (prefers-reduced-motion: no-preference) {
  .guide[data-dock="floating"] .guide-panel:not([hidden]) { animation: guide-menu-in .18s ease-out both; }
  @keyframes guide-menu-in { from { opacity: 0; transform: translate(4px, 2px); } }
}
@media print { .guide { display: none !important; } }
