:root {
  --bp-ink: #102a2e;
  --bp-muted: #65777b;
  --bp-line: rgba(16, 42, 46, 0.12);
  --bp-primary: #164e63;
  --bp-teal: #0f766e;
  --bp-green: #22c55e;
  --bp-bg: rgba(247, 251, 251, 0.82);
}

body.bp-common-header-page:not(.bp-header-ready) .top-notice,
body.bp-common-header-page:not(.bp-header-ready) header.site-header,
body.bp-common-header-page:not(.bp-header-ready) header.topbar {
  display: none !important;
}

body.bp-modal-open {
  overflow: hidden;
}

.bp-top-notice {
  position: relative;
  z-index: 1001;
  color: #eafffa;
  background: linear-gradient(90deg, var(--bp-primary), var(--bp-teal));
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.bp-partnership-modal[hidden] {
  display: none !important;
}

.bp-partnership-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.bp-partnership-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 31, 36, 0.48);
  backdrop-filter: blur(6px);
}

.bp-partnership-dialog {
  position: relative;
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(16, 42, 46, 0.14);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(8, 31, 36, 0.26);
}

.bp-partnership-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--bp-line);
  border-radius: 999px;
  color: var(--bp-primary);
  background: #f7fbfb;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.bp-partnership-eyebrow {
  margin: 0 0 8px;
  color: var(--bp-teal);
  font-size: 13px;
  font-weight: 850;
}

.bp-partnership-dialog h2 {
  margin: 0 40px 18px 0;
  color: var(--bp-ink);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.22;
  letter-spacing: 0;
}

.bp-partnership-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bp-partnership-form label {
  display: grid;
  gap: 7px;
  color: var(--bp-primary);
  font-size: 13px;
  font-weight: 800;
}

.bp-partnership-form input,
.bp-partnership-form select,
.bp-partnership-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(16, 42, 46, 0.16);
  border-radius: 8px;
  color: var(--bp-ink);
  background: #fff;
  outline: 0;
}

.bp-partnership-form textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
}

.bp-partnership-form input:focus,
.bp-partnership-form select:focus,
.bp-partnership-form textarea:focus {
  border-color: var(--bp-teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.bp-partnership-wide,
.bp-partnership-message,
.bp-partnership-actions {
  grid-column: 1 / -1;
}

.bp-partnership-message {
  display: none;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.bp-partnership-message.is-info {
  display: block;
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.bp-partnership-message.is-error {
  display: block;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.bp-partnership-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.bp-top-notice-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 44px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 14px;
}

.bp-top-notice strong { color: #fff; }

.bp-notice-links {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  opacity: 0.96;
}

.bp-notice-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.34);
}

.bp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--bp-line);
  background: var(--bp-bg);
  backdrop-filter: blur(16px);
}

.bp-top-notice,
.bp-header {
  animation: bpHeaderFade 0.12s ease both;
}

@keyframes bpHeaderFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bp-nav {
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.bp-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.bp-brand img {
  width: 169px;
  height: auto;
  display: block;
}

.bp-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 auto;
}

.bp-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 13px;
  border-radius: 999px;
  color: #314e53;
  font-size: 15px;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bp-menu a:hover,
.bp-menu a.is-active {
  color: var(--bp-primary);
  background: rgba(15, 118, 110, 0.08);
  transform: translateY(-1px);
}

.bp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 820;
  text-decoration: none;
  white-space: nowrap;
}

.bp-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--bp-teal), var(--bp-primary));
  box-shadow: 0 16px 30px rgba(15, 76, 84, 0.22);
}

.bp-btn-ghost {
  color: var(--bp-primary);
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.14);
}

.bp-member {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bp-member-name {
  color: var(--bp-primary);
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
}

.bp-member-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bp-member-name.has-my-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f766e;
}

.bp-my-alert-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.bp-toggle {
  display: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--bp-line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  place-items: center;
}

.bp-toggle span,
.bp-toggle span::before,
.bp-toggle span::after {
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 99px;
  background: var(--bp-ink);
  content: "";
}

.bp-toggle span::before { transform: translateY(-6px); }
.bp-toggle span::after { transform: translateY(4px); }

.bp-mobile-panel {
  display: none;
  border-top: 1px solid var(--bp-line);
  background: #fff;
}

.bp-mobile-panel.is-open { display: block; }

.bp-mobile-inner {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 18px;
  display: grid;
  gap: 12px;
}

.bp-mobile-menu {
  display: grid;
  gap: 8px;
}

.bp-mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border-radius: 16px;
  color: var(--bp-ink);
  background: #f5faf9;
  font-weight: 780;
  text-decoration: none;
}

.bp-mobile-menu a::after {
  content: "›";
  color: var(--bp-muted);
}

.bp-mobile-inner .bp-member {
  width: 100%;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.bp-mobile-inner .bp-member-name {
  font-size: 15px;
}

.bp-mobile-inner .bp-btn {
  min-height: 42px;
}

.bp-mobile-link {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--bp-ink);
  background: #f7fbfb;
  font-weight: 800;
  text-decoration: none;
}

.bp-footerbar {
  display: none;
}

.bp-site-footer {
  margin-top: 56px;
  padding: 28px 20px 34px;
  border-top: 1px solid var(--bp-line);
  background: rgba(255, 255, 255, 0.92);
}

.bp-site-footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  color: #65777b;
  font-size: 14px;
  line-height: 1.6;
}

.bp-site-footer-inner p {
  margin: 0 0 12px;
}

.bp-footer-credit {
  color: #8a9ea2;
  font-size: 13px;
}

.bp-footer-credit a {
  color: #102a2e;
  font-weight: 900;
  text-decoration: none;
}

.bp-footer-credit a:hover {
  text-decoration: underline;
}

@media (max-width: 1040px) {
  body {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }
  .bp-menu { display: none; }
  .bp-actions { display: none; }
  .bp-toggle { display: grid; }
  .bp-top-notice { display: none; }
  .bp-footerbar {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    z-index: 1001;
    width: 100%;
    max-width: 640px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    padding: 7px max(7px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-right));
    border-top: 1px solid var(--bp-line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    box-shadow: 0 -10px 30px rgba(16, 42, 46, 0.08);
  }
  .bp-footer-link {
    min-width: 0;
    min-height: 62px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    border-radius: 15px;
    color: #314e53;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
  }
  .bp-footer-link img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
  }
  .bp-footer-link span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bp-footer-link.is-active {
    color: var(--bp-primary);
    background: #eef7f5;
  }
  .bp-footer-link.is-active img {
    transform: translateY(-1px) scale(1.06);
  }
}

@media (max-width: 720px) {
  .bp-partnership-modal {
    padding: 12px;
    align-items: end;
  }
  .bp-partnership-dialog {
    max-height: calc(100vh - 24px);
    padding: 24px 16px 18px;
    border-radius: 10px 10px 0 0;
  }
  .bp-partnership-form {
    grid-template-columns: 1fr;
  }
  .bp-partnership-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  body {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }
  .bp-nav { width: min(100% - 24px, 1180px); min-height: 68px; }
  .bp-brand img { width: 143px; }
  .bp-mobile-inner {
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .bp-mobile-inner > .bp-btn {
    flex: 1 1 120px;
  }
  .bp-mobile-inner .bp-member {
    justify-content: center;
  }
  .bp-footerbar {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    z-index: 1001;
    width: 100%;
    max-width: 520px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    border-top: 1px solid var(--bp-line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    box-shadow: 0 -10px 30px rgba(16, 42, 46, 0.08);
  }
  .bp-footer-link {
    min-width: 0;
    min-height: 62px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border-radius: 14px;
    color: #314e53;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
  }
  .bp-footer-link img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
  }
  .bp-footer-link span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bp-footer-link.is-active {
    color: var(--bp-primary);
    background: #eef7f5;
  }
  .bp-footer-link.is-active img {
    transform: translateY(-1px) scale(1.06);
  }
}

@media (max-width: 380px) {
  .bp-footerbar {
    gap: 0;
    padding-inline: 4px;
  }
  .bp-footer-link {
    min-height: 58px;
    font-size: 9px;
    border-radius: 12px;
  }
  .bp-footer-link img {
    width: 28px;
    height: 28px;
  }
}
