.first-dive {
  position: fixed;
  z-index: 500;
  inset: 0;
  color: #eef7fb;
  font-family: var(--jp, "Yu Gothic UI", sans-serif);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease-out, visibility 260ms ease-out;
}

.first-dive.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html.first-dive-active,
html.first-dive-active body {
  overscroll-behavior: none;
}

html.first-dive-active body {
  overflow: hidden !important;
}

.first-dive-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.first-dive-highlight {
  position: fixed;
  z-index: 1;
  border: 1px solid rgba(173, 225, 248, .72);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(177, 228, 250, .1),
    0 0 24px rgba(111, 203, 244, .2),
    inset 0 0 20px rgba(144, 216, 248, .06);
  pointer-events: none;
  transition: left 320ms ease-out, top 320ms ease-out, width 320ms ease-out, height 320ms ease-out, opacity 180ms ease-out;
}

.first-dive-panel {
  position: fixed;
  z-index: 2;
  width: min(340px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 20px 21px 18px;
  border: 1px solid rgba(190, 225, 241, .22);
  background:
    linear-gradient(145deg, rgba(12, 26, 38, .97), rgba(3, 10, 16, .96));
  box-shadow: 0 20px 64px rgba(0, 0, 0, .52);
  backdrop-filter: blur(14px);
  opacity: 1;
  transition: opacity 180ms ease-out, transform 260ms ease-out;
}

.first-dive-panel.is-changing {
  opacity: .12;
}

.first-dive-panel.is-centered {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.first-dive-step {
  margin: 0 0 10px;
  color: rgba(164, 216, 240, .58);
  font: 700 8px/1 var(--mono, monospace);
  letter-spacing: .24em;
}

.first-dive-title {
  margin: 0;
  color: #f3f9fc;
  font: 500 24px/1.1 var(--mono, monospace);
  letter-spacing: .12em;
}

.first-dive-copy {
  margin: 15px 0 0;
  color: rgba(224, 238, 245, .82);
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: .055em;
}

.first-dive-note {
  display: block;
  margin-top: 6px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.first-dive-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.first-dive-panel.is-centered .first-dive-actions {
  justify-content: center;
}

.first-dive-next,
.first-dive-skip {
  border: 0;
  color: inherit;
  font-family: var(--mono, monospace);
  cursor: pointer;
}

.first-dive-next {
  min-width: 112px;
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid rgba(159, 220, 247, .56);
  background: rgba(130, 205, 252, .1);
  color: #dff4fd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.first-dive-next:hover,
.first-dive-next:focus-visible {
  border-color: rgba(211, 242, 255, .92);
  background: rgba(130, 205, 252, .18);
  outline: 1px solid rgba(211, 242, 255, .45);
  outline-offset: 3px;
}

.first-dive-skip {
  padding: 8px 2px;
  background: transparent;
  color: rgba(190, 211, 221, .58);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .2em;
}

.first-dive-skip:hover,
.first-dive-skip:focus-visible {
  color: #fff;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-tool-panel .first-dive-open {
  position: relative;
  width: 72px;
  height: 58px;
  min-height: 58px;
  display: grid;
  grid-template-rows: 22px 14px;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px 4px;
  border: 1px solid rgba(244, 247, 250, .28);
  background: rgba(5, 10, 17, .84);
  color: #f4f7fa;
  cursor: pointer;
}

.header-tool-panel .first-dive-menu-icon {
  position: absolute;
  left: 50%;
  top: calc(50% - 3px);
  display: grid;
  place-items: center;
  width: auto;
  height: 22px;
  translate: -50% -50%;
  font: 500 22px/1 var(--mono, monospace);
}

.header-tool-panel .predict-button > span,
.header-tool-panel .fight-library-open > span,
.header-tool-panel .video-add-open > span,
.header-tool-panel .ambient-art-open > span,
.header-tool-panel .orb-drop-open > span,
.header-tool-panel .official-editor-open > span {
  top: calc(50% - 3px);
}

.header-tool-panel .first-dive-open b {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: auto;
  white-space: nowrap;
  font-family: "Bahnschrift Condensed", "Arial Narrow", var(--mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: .04em !important;
}

.header-tool-panel .first-dive-open:hover,
.header-tool-panel .first-dive-open:focus-visible {
  border-color: rgba(255, 255, 255, .68);
  background: rgba(12, 20, 29, .94);
  outline: none;
}

@media (max-width: 760px) {
  .first-dive-panel {
    left: 12px !important;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    top: auto !important;
    width: auto;
    padding: 17px 18px 15px;
    transform: none !important;
    text-align: left !important;
  }

  .first-dive-title {
    font-size: 20px;
  }

  .first-dive-copy {
    margin-top: 11px;
    font-size: 11px;
    line-height: 1.7;
  }

  .first-dive-actions,
  .first-dive-panel.is-centered .first-dive-actions {
    justify-content: space-between;
    margin-top: 15px;
  }

  .first-dive-next {
    min-height: 40px;
  }

  .header-tool-panel .first-dive-open {
    width: 58px;
    height: 42px;
    min-height: 42px;
    padding: 4px;
  }

  .header-tool-panel .first-dive-menu-icon {
    height: auto;
    font-size: 20px;
  }

  .header-tool-panel .first-dive-open b {
    bottom: 3px;
  }
}

@media (max-width: 360px) {
  .first-dive-panel {
    left: 9px !important;
    right: 9px;
    padding: 15px 15px 13px;
  }

  .first-dive-step {
    margin-bottom: 8px;
  }

  .first-dive-title {
    font-size: 18px;
  }

  .first-dive-copy {
    font-size: 10.5px;
  }

  .header-actions.is-menu-open .header-tool-panel {
    gap: 4px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .header-tool-panel .predict-button,
  .header-tool-panel .fight-library-open,
  .header-tool-panel .video-add-open,
  .header-tool-panel .ambient-art-open,
  .header-tool-panel .orb-drop-open,
  .header-tool-panel .official-editor-open,
  .header-tool-panel .first-dive-open {
    width: calc((100% - 16px) / 5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .first-dive,
  .first-dive-panel,
  .first-dive-highlight {
    transition: none !important;
  }
}
