/* ガイドブックDL popup — navy × gold × ivory */
.ninbai-guidebook_fab {
  position: fixed;
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  border: 2px solid #b88724;
  background: linear-gradient(135deg, #123c5a 0%, #0f5c8c 100%);
  color: #fffaf1;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(8, 35, 61, 0.28);
  cursor: pointer;
  animation: ninbaiGuideFabIn 0.5s ease-out;
}

@keyframes ninbaiGuideFabIn {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ninbai-guidebook_fab-label::before {
  content: "📘 ";
}

.ninbai-guidebook_modal[hidden] {
  display: none !important;
}

.ninbai-guidebook_modal {
  position: fixed;
  inset: 0;
  z-index: 950;
}

.ninbai-guidebook_overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(7, 29, 45, 0.55);
  cursor: pointer;
}

.ninbai-guidebook_sheet {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fffaf0;
  border: 2px solid #b88724;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(8, 35, 61, 0.35);
  padding: 24px 22px 22px;
}

.ninbai-guidebook_close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  color: #123c5a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 2px 8px rgba(18, 60, 90, 0.12);
}

.ninbai-guidebook_sheet-head {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: -8px -6px 12px;
  padding: 0 48px 4px 6px;
  background: #fffaf0;
}

.ninbai-guidebook_handle {
  display: none;
}

.ninbai-guidebook_back {
  display: none;
}

.ninbai-guidebook_body {
  position: relative;
}

.ninbai-guidebook_cover {
  width: 120px;
  height: 156px;
  border-radius: 8px;
  background: linear-gradient(145deg, #123c5a, #0c2d44);
  color: #f2d8a3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  border: 2px solid #b88724;
}

.ninbai-guidebook_kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f2d8a3;
  color: #123c5a;
  font-size: 12px;
  font-weight: 700;
}

.ninbai-guidebook_sheet h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.45;
  color: #123c5a;
}

.ninbai-guidebook_sub {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #526070;
}

#ninbai-guidebook-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #123c5a;
}

#ninbai-guidebook-form input[type="text"],
#ninbai-guidebook-form input[type="tel"],
#ninbai-guidebook-form input[type="email"],
#ninbai-guidebook-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid rgba(18, 60, 90, 0.2);
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
  color: #18202c;
  box-sizing: border-box;
}

.ninbai-guidebook_choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ninbai-guidebook_choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: 2px solid #e2c47d;
  border-radius: 16px;
  background: #fff;
  color: #18202c;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ninbai-guidebook_choice:hover,
.ninbai-guidebook_choice:focus-visible {
  border-color: #0b1f3a;
  background: #f8f2e8;
  outline: none;
  box-shadow: 0 8px 20px rgba(11, 31, 58, 0.08);
}

.ninbai-guidebook_choice.is-selected {
  border-color: #0b1f3a;
  background: #f8f2e8;
  box-shadow: 0 0 0 2px rgba(11, 31, 58, 0.12);
}

.ninbai-guidebook_choice-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(200, 155, 75, 0.18);
  color: #7a5a18;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.ninbai-guidebook_choice-title {
  color: #0b1f3a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.ninbai-guidebook_choice-sub {
  color: #18202c;
  font-size: 13px;
  line-height: 1.65;
}

.ninbai-guidebook_choice-cta {
  margin-top: 4px;
  color: #123c5a;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ninbai-guidebook_change-type {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #123c5a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ninbai-guidebook_step[hidden] {
  display: none !important;
}

@media (min-width: 897px) {
  .ninbai-guidebook_sheet:has(.ninbai-guidebook_step-select:not([hidden])) {
    width: min(720px, calc(100vw - 32px));
  }
}

@media (max-width: 896px) {
  .ninbai-guidebook_choices {
    grid-template-columns: 1fr;
  }

  .ninbai-guidebook_choice {
    min-height: 44px;
  }
}

body.ninbai-guidebook-open .pageTop,
body.ninbai-guidebook-open .ninbai-guidebook_fab {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.ninbai-guidebook_consent {
  font-weight: 400 !important;
  font-size: 13px !important;
  line-height: 1.6;
}

.ninbai-guidebook_privacy {
  font-size: 12px;
  line-height: 1.65;
  color: #607289;
  margin: 0 0 12px;
}

.ninbai-guidebook_error {
  color: #b83a3a;
  font-size: 13px;
  margin: 0 0 10px;
}

.ninbai-guidebook_submit {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fffaf0;
  background: linear-gradient(135deg, #b88724, #d4a843);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(184, 135, 36, 0.35);
}

.ninbai-guidebook_submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.ninbai-guidebook_hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.ninbai-guidebook-open {
  overflow: hidden;
}

body.ninbai-guidebook-open .ninbai-fixed-cta,
body.ninbai-guidebook-open .ninbai-jump-nav-toggle {
  visibility: hidden;
  pointer-events: none;
}

.ninbai-guidebook_inline {
  margin: 28px 0;
  padding: 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7f2e8, #fffaf1);
  border: 1px solid #d4c4a8;
}

.ninbai-guidebook_inline h3 {
  margin: 0 0 8px;
  color: #123c5a;
  font-size: 18px;
}

.ninbai-guidebook_inline p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #526070;
}

.ninbai-guidebook_inline button {
  border: 0;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  color: #fffaf0;
  background: #123c5a;
  cursor: pointer;
}

@media (max-width: 896px) {
  .ninbai-guidebook_fab {
    right: 12px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    padding: 10px 14px;
    font-size: 13px;
  }

  .ninbai-guidebook_sheet {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: min(85vh, 720px);
    border-radius: 16px 16px 0 0;
    padding: 8px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    animation: ninbaiGuideSheetUp 0.35s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
  }

  .ninbai-guidebook_sheet-head {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 4;
    margin: 0 0 8px;
    padding: 0 48px 8px 0;
    background: #fffaf0;
  }

  .ninbai-guidebook_handle {
    display: block;
    width: 42px;
    height: 4px;
    margin: 6px auto 10px;
    background: rgba(18, 60, 90, 0.18);
    border-radius: 999px;
  }

  .ninbai-guidebook_back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(18, 60, 90, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #123c5a;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .ninbai-guidebook_close {
    top: 4px;
    right: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(18, 60, 90, 0.16);
    font-size: 26px;
    z-index: 5;
  }

  .ninbai-guidebook_body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
  }

  @keyframes ninbaiGuideSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

@media (max-width: 767px) {
  body.ninbai-has-jump-nav .ninbai-guidebook_fab {
    right: auto;
    left: 14px;
    bottom: calc(104px + env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 910;
    max-width: calc(100vw - 88px);
    padding: 10px 12px;
    font-size: 12px;
  }

  body.ninbai-has-jump-nav .ninbai-guidebook_fab-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
