.head-hud { gap: 8px; }
.head-hud .location-button { min-width: 0; }
#spot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.head-actions, .fm-head-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
}

.guide-button {
  --plate-rim: #a1dfce;
  --plate-top: #235759;
  --plate-bottom: #17354b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 7px 12px;
  font-size: clamp(17px,1.7vw,24px);
  white-space: nowrap;
}

.guide-button img {
  flex: none;
  width: 24px;
  height: auto;
}

#menu-layer .fm-guide-toggle {
  min-height: 44px;
  padding-inline: 10px;
  color: #d7f5e8;
  border-color: #6b9b9d;
  white-space: nowrap;
}

.fm-guide {
  display: grid;
  gap: 19px;
  width: min(100%,760px);
  margin-inline: auto;
}

.guide-start {
  border-color: #76ae9c;
  background:
    linear-gradient(95deg,#0e2d41 18%,#102f43ed 55%,#102f438c),
    url("assets/ocean.jpg") center 46% / cover;
}

.guide-start ol {
  margin: 12px 0 16px;
  padding-inline-start: 22px;
}

.guide-start li { padding-inline-start: 4px; }
.guide-start li + li { margin-top: 7px; }
.guide-start li::marker { color: var(--fm-mint); font-weight: 700; }
#menu-layer .guide-start .fm-button { min-height: 44px; }

.guide-reference {
  display: grid;
  gap: 7px;
}

#menu-layer .guide-reference h2 {
  margin-bottom: 4px;
  font-size: clamp(20px,2.4vw,27px);
}

.guide-topic {
  min-width: 0;
  border: 1px solid var(--fm-edge);
  background: #112f40;
  box-shadow: 2px 2px #081b2a;
  scroll-margin-top: 9px;
}

.guide-topic[open] { border-color: #6fafaa; }

.guide-topic summary {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 12px;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 8px 13px;
  list-style: none;
  cursor: pointer;
}

.guide-topic summary::-webkit-details-marker { display: none; }
.guide-topic summary:hover, .guide-topic[open] summary { background: #1c4652; }
.guide-topic summary:focus-visible { outline: 2px solid var(--fm-gold); outline-offset: -3px; }

.guide-topic summary::after {
  content: "";
  justify-self: center;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--fm-mint);
  border-bottom: 2px solid var(--fm-mint);
  transform: translateY(-2px) rotate(45deg);
}

.guide-topic[open] summary::after { transform: translateY(2px) rotate(225deg); }
.guide-topic summary img { object-fit: contain; image-rendering: pixelated; }
.guide-topic summary strong { display: block; font: 19px/1.2 var(--fm-pixel); }
.guide-topic summary small { display: block; margin-top: 2px; color: var(--fm-muted); }

.guide-topic-body { padding: 10px 14px 14px; }
.guide-topic-body dl { display: grid; gap: 9px; }
.guide-topic-body dt { color: #fff0c9; font-weight: 750; }
.guide-topic-body dd { color: #c8e0df; }
.guide-topic-body .fm-actions { margin-top: 12px; }
#menu-layer .guide-topic-body .fm-button { min-height: 44px; }

@media (max-width: 630px) {
  .guide-button { min-height: 45px; padding-inline: 9px; }
  .guide-button img { width: 20px; }
  .fm-guide { gap: 15px; }
  .guide-start { background-image: linear-gradient(100deg,#0e2d41f5,#102f43dd),url("assets/ocean.jpg"); }
  .guide-topic summary { gap: 8px; padding-inline: 9px; }
}

.fishing-touch .guide-button { min-height: 46px; font-size: clamp(16px,4.15vw,24px); }

@media (max-width: 390px) {
  .head-hud, .head-actions, .fm-head-actions { gap: 4px; }
  .guide-button { padding-inline: 8px; }
  #menu-layer .fm-guide-toggle { padding-inline: 7px; }
}

@media (max-width: 360px) {
  .fishing-touch .head-hud :is(.location-button, .wallet-button) { padding-inline: 7px; }
  .fishing-touch .head-hud :is(.compass, .wallet-button img) { width: 20px; height: 20px; margin-right: 4px; }
  .fishing-touch #spot-name { font-size: 14px; }
}

.tutorial-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #fff2d2;
  background: #132f40f5;
  border: 1px solid #bc9b60;
  border-left: 3px solid #ffd274;
  box-shadow: 2px 3px #071b29a1;
  font: 14px/1.35 system-ui,sans-serif;
}

#boat-tutorial {
  position: absolute;
  top: calc(var(--gutter) + 63px);
  left: var(--gutter);
  width: min(360px,calc(100% - 2 * var(--gutter)));
  z-index: 3;
}

#catch-card > #boat-tutorial {
  position: static;
  flex: none;
  width: auto;
  max-width: none;
  margin-top: 6px;
}

#menu-layer .tutorial-tip {
  flex: none;
  width: min(760px,calc(100% - 26px));
  margin: 8px auto 0;
}

.tutorial-copy { flex: 1; min-width: 0; }
.tutorial-step { display: block; color: #ffd274; font-size: 11px; font-weight: 750; }
.tutorial-title { display: block; margin: 2px 0 3px; font: 18px/1.15 var(--pixel); }
.tutorial-hint { margin: 0; color: #d0e5e3; }
.tutorial-tip button, #menu-layer .tutorial-tip button {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid #6f8a94;
  background: #0c2537;
  color: #fff2d2;
  font: 650 13px/1.2 system-ui,sans-serif;
}

.tutorial-tip button:hover, #menu-layer .tutorial-tip button:hover { background: #24505b; }

#fishing-screen .tutorial-target {
  --plate-rim: #ffdc76;
  outline: 2px solid #ffdc76;
  outline-offset: -3px;
  filter: brightness(1.14);
}

#menu-layer .tutorial-target { outline: 2px solid #ffdc76; outline-offset: -3px; }
#fishing-screen.cinematic #boat-tutorial, .mini-window #boat-tutorial { display: none; }

@media (max-width: 630px) {
  #boat-tutorial { top: calc(var(--gutter) + 49px); }
  .tutorial-tip { font-size: 13px; }
  .tutorial-title { font-size: 16px; }
}

@media (max-width: 630px) and (max-height: 550px) {
  #boat-tutorial { top: 57px; }
}

.fishing-touch #boat-tutorial {
  top: calc(var(--touch-top) + 51px);
  left: var(--touch-leading);
  right: var(--touch-trailing);
  width: auto;
  max-width: 360px;
}

.fishing-touch #menu-layer .tutorial-tip {
  width: min(760px,calc(100% - var(--touch-leading) - var(--touch-trailing)));
}

.fishing-touch #fishing-screen .catch-card:has(> .tutorial-tip:not([hidden])) {
  max-height: calc(100% - var(--catch-bottom) - var(--touch-top) - 51px);
}
