/* Bam4u Inbox-Widget */
.wm {
  --wm-primary: #0b5fff;
  --wm-primary-d: #0846bf;
  --wm-brand-indigo: #5B6CF0;
  --wm-brand-indigo-d: #4453E0;
  --wm-brand-violet: #8B5CF6;
  --wm-brand-grad: linear-gradient(120deg, var(--wm-brand-indigo) 0%, var(--wm-brand-violet) 100%);
  --wm-brand-grad-hover: linear-gradient(120deg, var(--wm-brand-indigo-d) 0%, var(--wm-brand-violet) 100%);
  --wm-accent: #16c784;
  --wm-ink: #0e1726;
  --wm-muted: #5b6676;
  --wm-line: #e3e8ef;
  --wm-bg: #ffffff;
  --wm-bg-soft: #f5f7fa;
  --wm-danger: #e5484d;
  --wm-shadow: 0 18px 44px rgba(14, 20, 36, .12);
  --wm-radius: 10px;

  box-sizing: border-box;
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  color: var(--wm-ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.wm *,
.wm *::before,
.wm *::after {
  box-sizing: border-box;
}

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

.wm-card,
.wm-app-head {
  background: var(--wm-bg);
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(14, 20, 36, .05);
}

.wm-mode-compact {
  max-width: 620px;
  overflow-x: clip;
}

.wm-mode-compact .wm-card {
  padding: 20px;
  box-shadow: var(--wm-shadow);
}

.wm-mode-compact .wm-addr-wrap,
.wm-mode-compact .wm-actions {
  min-width: 0;
  max-width: 100%;
}

.wm-card-label {
  margin-bottom: 8px;
  color: var(--wm-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wm-addr-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--wm-bg-soft);
  border: 1px dashed #c7d0dd;
  border-radius: 8px;
}

.wm-addr {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--wm-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  user-select: all;
}

.wm-mode-compact .wm-addr {
  font-size: clamp(16px, 4.2vw, 22px);
}

.wm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wm-btn {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--wm-bg-soft);
  color: var(--wm-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}

.wm-btn:hover {
  opacity: .9;
}

.wm-btn-accent {
  background: var(--wm-primary);
  color: #fff;
}

.wm-btn-accent:hover {
  background: var(--wm-primary-d);
  opacity: 1;
}

.wm-btn-copy {
  flex: 0 1 auto;
  min-height: 38px;
  max-width: 100%;
  padding: 8px 14px;
  background: var(--wm-brand-grad);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(91, 108, 240, .22);
}

.wm-btn-copy:hover {
  background: var(--wm-brand-grad-hover);
  opacity: 1;
}

.wm-btn-outline {
  border: 1px solid var(--wm-line);
  background: transparent;
}

.wm-btn-danger {
  border: 1px solid rgba(229, 72, 77, .35);
  background: #fff;
  color: var(--wm-danger);
}

.wm-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--wm-line);
  background: var(--wm-bg-soft);
}

.wm-btn-back::before {
  content: "←";
  font-weight: 900;
}

.wm-btn-small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.wm-btn-inline {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.wm-btn.is-copied {
  background: var(--wm-accent);
  color: #fff;
}

.wm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-height: 18px;
  margin-top: 10px;
  color: var(--wm-muted);
  font-size: 12px;
}

.wm-expiry-warn {
  color: var(--wm-danger);
  font-weight: 800;
}

.wm-expiry-track {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
}

.wm-expiry-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--wm-accent);
  transition: width .25s ease, background-color .2s ease;
}

.wm-expiry-fill.wm-expiry-high {
  background: var(--wm-accent);
}

.wm-expiry-fill.wm-expiry-mid {
  background: #f59e0b;
}

.wm-expiry-fill.wm-expiry-low {
  background: var(--wm-danger);
}

.wm-extension {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #bd2f37;
  border-radius: 8px;
  background: linear-gradient(135deg, #e5484d 0%, #c92f38 100%);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 12px 26px rgba(229, 72, 77, .24);
}

.wm-extension.is-visible {
  display: flex;
}

.wm-extension-text {
  min-width: 0;
  flex: 1 1 auto;
  color: #fff;
  font-weight: 800;
}

.wm-btn-extend {
  flex: 0 0 auto;
  white-space: normal;
}

.wm-extension .wm-btn-extend {
  background: var(--wm-accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 199, 132, .28);
}

.wm-extension .wm-btn-extend:hover {
  background: #0fa56c;
  opacity: 1;
}

.wm-status {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 32px);
  min-height: 0;
  padding: 7px 10px;
  border: 1px solid rgba(11, 95, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 22px rgba(14, 20, 36, .08);
  color: var(--wm-muted);
  font-size: 13px;
  line-height: 1.2;
  pointer-events: none;
}

.wm-status:empty {
  display: none;
}

.wm-status:not(:empty)::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid rgba(11, 95, 255, .2);
  border-top-color: var(--wm-primary);
  border-radius: 999px;
  animation: wm-spin .75s linear infinite;
}

.wm-status.wm-error,
.wm-error {
  color: var(--wm-danger);
}

.wm-status.wm-error {
  pointer-events: auto;
}

.wm-status.wm-error::before {
  display: none;
}

.wm-status.wm-expired-status {
  position: static;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-color: rgba(229, 72, 77, .2);
  border-radius: 8px;
  background: #fff7f7;
  box-shadow: none;
  line-height: 1.35;
}

.wm-status-text {
  min-width: 0;
  flex: 1 1 220px;
}

.wm-expired-status .wm-btn-inline {
  flex: 0 0 auto;
  background: #fff;
}

@keyframes wm-spin {
  to {
    transform: rotate(360deg);
  }
}

.wm-body {
  position: relative;
  display: block;
  min-height: 520px;
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #edf5ff 0%, #f6faff 100%);
  border: 1px solid #bfd5f0;
  border-radius: var(--wm-radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.wm-mode-compact .wm-body {
  min-height: 252px;
  margin-top: 14px;
  padding: 12px;
}

.wm-list,
.wm-detail {
  min-width: 0;
}

.wm-list {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  overflow: hidden;
  background: var(--wm-bg);
  border: 1px solid #b6cdea;
  border-radius: var(--wm-radius);
  box-shadow: 0 10px 24px rgba(43, 84, 132, .10);
}

.wm-mode-compact .wm-list {
  min-height: 180px;
}

.wm-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border-bottom: 1px solid #c4d7ef;
  background: linear-gradient(180deg, #dfeeff 0%, #eef6ff 100%);
}

.wm-list-title {
  min-width: 0;
}

.wm-list-head h3,
.wm-detail-title h3 {
  margin: 0;
  color: var(--wm-ink);
  font-size: 16px;
  line-height: 1.25;
}

.wm-list-head h3 {
  font-size: 17px;
  font-weight: 850;
  color: #0b3f78;
}

.wm-list-sub {
  display: block;
  margin-top: 3px;
  color: var(--wm-muted);
  font-size: 12px;
  line-height: 1.2;
}

.wm-list-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wm-count {
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--wm-primary);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.wm-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid var(--wm-line);
  border-radius: 999px;
  background: #fff;
  color: var(--wm-primary);
  font-size: 16px;
}

.wm-empty {
  display: grid;
  align-content: center;
  min-height: 180px;
  padding: 30px 16px;
  color: var(--wm-muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.wm-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  border: 1px solid #cfe0f7;
  border-radius: 999px;
  background: #f2f7ff;
  color: var(--wm-primary);
  font-weight: 900;
}

.wm-empty-title {
  margin-bottom: 4px;
  color: var(--wm-ink);
  font-weight: 800;
}

.wm-empty-text {
  max-width: 300px;
  margin: 0 auto;
}

.wm-empty-check {
  margin-top: 10px;
  color: var(--wm-muted);
  font-size: 12px;
}

.wm-skeleton {
  padding: 12px 14px;
}

.wm-skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  border-bottom: 1px solid var(--wm-line);
}

.wm-skeleton-row:last-child {
  border-bottom: 0;
}

.wm-skeleton-avatar,
.wm-skeleton-line {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef3f8 0%, #f8fbff 48%, #eef3f8 100%);
  background-size: 220% 100%;
  animation: wm-shimmer 1.1s ease-in-out infinite;
}

.wm-skeleton-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.wm-skeleton-lines {
  display: grid;
  gap: 8px;
  flex: 1;
}

.wm-skeleton-line {
  height: 10px;
}

.wm-skeleton-line-a {
  width: 64%;
}

.wm-skeleton-line-b {
  width: 42%;
}

@keyframes wm-shimmer {
  to {
    background-position: -220% 0;
  }
}

.wm-rows {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.wm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 78px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--wm-line);
  border-radius: 0;
  padding: 12px 14px;
  background: #fff;
  color: inherit;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.wm-avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--wm-primary);
  font-size: 14px;
  font-weight: 900;
}

.wm-row-main {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  flex: 1;
}

.wm-row:last-child {
  border-bottom: 0;
}

.wm-row:hover,
.wm-row:focus {
  background: var(--wm-bg-soft);
  opacity: 1;
  outline: none;
}

.wm-row.wm-active {
  background: rgba(11, 95, 255, .08);
}

.wm-row.wm-unread .wm-subj {
  font-weight: 800;
}

.wm-row.wm-unread .wm-from::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--wm-accent);
  vertical-align: 1px;
}

.wm-row-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.wm-from,
.wm-time,
.wm-preview,
.wm-detail-meta,
.wm-detail-to {
  color: var(--wm-muted);
  font-size: 13px;
}

.wm-from {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-time {
  flex: 0 0 auto;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-subj {
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: var(--wm-ink);
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-preview {
  max-width: 100%;
  margin-top: 3px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wm-detail {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 23, 38, .54);
}

.wm.wm-has-detail .wm-detail {
  display: flex;
}

.wm-detail-dialog {
  display: flex;
  flex-direction: column;
  width: min(96vw, 1100px);
  max-height: 90vh;
  min-height: min(760px, 90vh);
  overflow: hidden;
  background: var(--wm-bg);
  border: 1px solid rgba(227, 232, 239, .9);
  border-radius: var(--wm-radius);
  box-shadow: 0 28px 80px rgba(14, 23, 38, .32);
}

.wm-detail-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--wm-line);
  background: #fff;
}

.wm-detail-title {
  flex: 1;
  min-width: 0;
}

.wm-detail-head .wm-btn-danger {
  flex-shrink: 0;
}

.wm-detail-title h3 {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.wm-detail-meta,
.wm-detail-to {
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.wm-code {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 14px;
  padding: 14px;
  border: 1px solid #bfe9dc;
  border-radius: 8px;
  background: #f0fbf7;
}

.wm-code-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wm-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.wm-help-dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid #cfe0f7;
  border-radius: 999px;
  background: #fff;
  color: var(--wm-primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.wm-help-dot:hover,
.wm-help-dot:focus {
  border-color: var(--wm-primary);
  background: #f2f7ff;
  opacity: 1;
  outline: none;
}

.wm-code-value {
  min-width: 0;
  color: var(--wm-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .08em;
  overflow-wrap: anywhere;
}

.wm-detail-loading .wm-skeleton-line {
  margin: 12px auto 0;
}

.wm-detail-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: auto;
}

.wm-frame {
  display: block;
  width: 100%;
  min-height: 620px;
  height: 100%;
  border: 0;
  background: #fff;
}

.wm-mode-compact .wm-frame {
  min-height: 620px;
}

.wm-upsell {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(11, 95, 255, .05);
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius);
  color: var(--wm-muted);
  font-size: 13px;
}

.wm-link {
  color: var(--wm-primary);
  font-weight: 800;
  text-decoration: none;
}

.wm-link:hover {
  color: var(--wm-primary-d);
}

@media (max-width: 760px) {
  .wm {
    max-width: 100%;
  }

  .wm-body {
    min-height: 420px;
  }

  .wm-detail {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .wm-detail-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .wm-btn-back {
    display: inline-flex;
    align-items: center;
  }

  .wm-detail-head {
    position: sticky;
    top: 0;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 12px;
  }

  .wm-detail-title {
    flex-basis: calc(100% - 112px);
  }

  .wm-code {
    grid-template-columns: 1fr;
    margin: 12px;
  }

  .wm-detail-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wm-frame {
    min-height: calc(100dvh - 170px);
  }
}

@media (max-width: 460px) {
  .b-hero .b-hero-grid > .b-hero-head,
  .b-hero .b-hero-grid > .b-hero-card,
  .b-hero .b-hero-grid > .b-hero-rest,
  .b-hero .b-inbox-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .b-hero .b-inbox-card {
    overflow-x: clip;
  }

  .b-hero .b-inbox-card .bam4u-inbox.wm.wm-mode-compact {
    width: 100%;
    min-width: 0;
    max-width: 100% !important;
    margin-left: 0;
    margin-right: 0;
  }

  .wm-card,
  .wm-app-head {
    padding: 14px;
  }

  .wm-actions {
    flex-direction: column;
  }

  .wm-btn {
    width: 100%;
  }

  .wm-list-tools .wm-btn {
    width: 30px;
  }

  .wm-btn-copy {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.15;
    white-space: normal;
  }

  .wm-extension {
    align-items: stretch;
    flex-direction: column;
  }

  .wm-btn-extend {
    width: 100%;
  }

  .wm-row-top {
    align-items: flex-start;
  }

  .wm-status {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
    justify-content: center;
  }

  .wm-detail-head {
    gap: 8px;
  }

  .wm-detail-title {
    flex-basis: 100%;
    order: 3;
  }

  .wm-detail-head .wm-btn-back,
  .wm-detail-head .wm-btn-danger {
    width: auto;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .wm-detail-head .wm-btn-danger {
    margin-left: auto;
  }

  .wm-frame {
    min-height: calc(100dvh - 210px);
  }
}

/* Permanent mailbox app (Family Streamer). Kept here so the shortcode is styled
   even outside the bam4u marketing theme. */
.bpm-app {
  --bpm-line: #dbe4f0;
  --bpm-soft: #f4f8fc;
  --bpm-ink: #0e1726;
  --bpm-muted: #617084;
  color: var(--bpm-ink);
  max-width: 980px;
  margin: 0 auto;
}

.bam4u-family-hidden {
  display: none !important;
}

body.bam4u-family-app-active .bam4u-family-app-section {
  padding-top: clamp(24px, 4vw, 48px) !important;
}

.bpm-app * {
  box-sizing: border-box;
}

.bpm-status,
.bpm-panel,
.bpm-login,
.bpm-empty,
.bpm-detail {
  background: #fff;
  border: 1px solid var(--bpm-line);
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(16, 24, 40, .08);
}

.bpm-status {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px;
  margin-bottom: 18px;
}

.bpm-status-minimal {
  justify-content: flex-end;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bpm-status-minimal > div {
  display: none;
}

.bpm-account-status {
  align-items: center;
  padding: 14px 16px;
  border-color: rgba(0, 23, 230, .14);
  background: linear-gradient(180deg, #fff, #f7f9ff);
  box-shadow: 0 14px 35px rgba(16, 24, 40, .08);
}

.bpm-account-status h3 {
  margin-bottom: 2px;
  font-size: clamp(1rem, 2vw, 1.18rem);
  overflow-wrap: anywhere;
}

.bpm-account-status p {
  font-size: .92rem;
}

.bpm-logout-link {
  flex: 0 0 auto;
}

.bpm-detail-account {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.bpm-detail-account span {
  max-width: 220px;
  overflow: hidden;
  color: var(--bpm-muted);
  font-size: .86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bpm-kicker {
  margin: 0 0 6px;
  color: var(--b-indigo, #6e56f7);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bpm-status h3,
.bpm-panel h3,
.bpm-login h3 {
  margin: 0 0 8px;
}

.bpm-status p,
.bpm-panel p,
.bpm-login p {
  margin: 0;
  color: var(--bpm-muted);
}

.bpm-link,
.bpm-primary,
.bpm-create button,
.bpm-actions button,
.bpm-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--bpm-line);
  background: #fff;
  color: var(--b-indigo, #6e56f7);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.bpm-primary,
.bpm-create button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, var(--b-indigo, #6e56f7));
}

.bpm-notice {
  padding: 12px 14px;
  margin: 0 0 18px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #b7ead4;
  color: #116149;
  font-weight: 700;
}

.bpm-panel {
  padding: 20px;
  margin-bottom: 18px;
}

.bpm-setup {
  position: relative;
  margin-bottom: 18px;
}

.bpm-setup-card {
  padding: 22px;
  border: 1px solid #c8d8f3;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f4f8ff);
  box-shadow: 0 22px 65px rgba(16, 24, 40, .12);
}

.bpm-setup-card > ol,
.bpm-setup-card > .bpm-setup-actions:last-child {
  display: none;
}

.bpm-setup-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 18px;
}

.bpm-setup-steps span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--bpm-line);
  border-radius: 999px;
  background: #fff;
  color: var(--bpm-muted);
  font-size: .84rem;
  font-weight: 850;
  text-align: center;
}

.bpm-setup-steps span.is-active {
  border-color: var(--b-indigo, #6e56f7);
  background: #eef2ff;
  color: var(--b-indigo, #6e56f7);
}

.bpm-setup-choice-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.bpm-setup-choice {
  width: 100%;
  padding: 16px;
  border: 1px solid #dbe7f6;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bpm-setup-choice:hover,
.bpm-setup-choice:focus-visible {
  border-color: var(--b-indigo, #6e56f7);
  box-shadow: 0 0 0 3px rgba(91, 108, 240, .14);
  outline: 0;
}

.bpm-setup-choice strong,
.bpm-setup-choice span {
  display: block;
}

.bpm-setup-choice span {
  margin-top: 5px;
  color: var(--bpm-muted);
  font-size: .94rem;
}

.bpm-setup-step h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.bpm-setup-step p {
  margin: 0 0 14px;
  color: var(--bpm-muted);
}

.bpm-field,
.bpm-setup-row {
  display: grid;
  gap: 7px;
}

.bpm-field span {
  color: var(--bpm-muted);
  font-size: .86rem;
  font-weight: 800;
}

.bpm-field input,
.bpm-setup-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--bpm-line);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
}

.bpm-count-field input {
  max-width: 120px;
}

.bpm-add-wrap {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.bpm-add-wrap .bpm-add-next {
  width: auto;
  max-width: 100%;
  min-height: 40px;
  padding: 9px 14px;
  line-height: 1.2;
  white-space: normal;
}

.bpm-generated-list,
.bpm-pin-rows,
.bpm-forwarding-rows {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.bpm-generated-item,
.bpm-setup-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, .7fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dbe7f6;
  border-radius: 14px;
  background: #fff;
}

.bpm-generated-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.bpm-pin-setup-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.bpm-forwarding-setup-row {
  grid-template-columns: minmax(0, 1fr);
}

.bpm-pin-setup-row code,
.bpm-pin-setup-row .bpm-link,
.bpm-forwarding-setup-row code {
  grid-column: 1 / -1;
}

.bpm-pin-setup-row label,
.bpm-forwarding-setup-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bpm-pin-setup-row label span,
.bpm-forwarding-setup-row label span {
  color: var(--bpm-muted);
  font-size: .82rem;
  font-weight: 850;
}

.bpm-generated-item code,
.bpm-setup-row code {
  min-width: 0;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bpm-generated-item span {
  color: #b42318;
  font-size: .8rem;
  font-weight: 850;
}

.bpm-generated-item.is-blocked {
  border-color: #fecaca;
  background: #fff7f7;
}

.bpm-setup-state {
  min-height: 22px;
  font-weight: 800;
}

.bpm-setup-state.is-ok {
  color: #047857 !important;
}

.bpm-setup-state.is-error {
  color: #b42318 !important;
}

.bpm-setup-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

.bpm-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.bpm-create {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto;
  gap: 10px;
  min-width: min(100%, 440px);
}

.bpm-create input {
  min-height: 44px;
  min-width: 0;
  border: 1px solid var(--bpm-line);
  border-radius: 12px;
  padding: 0 13px;
  font: inherit;
}

.bpm-create button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.bpm-limit {
  margin: 0 0 14px !important;
  color: #b42318 !important;
  font-weight: 800;
}

.bpm-mailboxes,
.bpm-message-list {
  display: grid;
  gap: 12px;
}

.bpm-mailbox {
  padding: 16px;
  border: 1px solid var(--bpm-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.bpm-mailbox.is-selected {
  border-color: var(--b-indigo, #6e56f7);
  box-shadow: 0 0 0 3px rgba(91, 108, 240, .14);
}

.bpm-mailbox code {
  font-size: 1rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.bpm-mailbox p {
  margin: 8px 0 14px;
  color: var(--bpm-muted);
}

.bpm-mailbox-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  padding: 13px 14px;
}

.bpm-mailbox-compact .bpm-mailbox-top,
.bpm-mailbox-compact p {
  min-width: 0;
}

.bpm-mailbox-compact p {
  margin: 0;
}

.bpm-mailbox-compact .bpm-actions {
  grid-row: 1 / span 2;
  grid-column: 2;
  justify-content: flex-end;
}

.bpm-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: #c8d2df;
}

.bpm-dot.is-on {
  background: #16c784;
}

.bpm-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bpm-actions form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.bpm-actions button,
.bpm-actions a {
  min-height: 36px;
  background: #fff;
  color: var(--b-indigo, #6e56f7);
  font-size: .92rem;
}

.bpm-danger,
.bpm-actions form button:last-child {
  color: #b42318;
}

.bpm-mailbox-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bpm-empty {
  padding: 20px;
  color: var(--bpm-muted);
  text-align: center;
}

.bpm-login {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px;
  text-align: center;
}

.bpm-login .bpm-primary {
  margin: 18px 0 10px;
}

.bpm-login a.bpm-primary,
.bpm-login a.bpm-primary:link,
.bpm-login a.bpm-primary:visited,
.bpm-login a.bpm-primary:hover,
.bpm-login a.bpm-primary:focus-visible {
  color: #fff !important;
  text-decoration: none !important;
}

.bpm-login small {
  display: block;
  color: var(--bpm-muted);
}

.bpm-error {
  margin-top: 8px;
  color: #b42318 !important;
}

.bpm-inbox {
  background: linear-gradient(180deg, #eef7ff 0%, #f8fbff 100%);
  border-color: #bfd8f2;
}

.bpm-inbox[hidden] {
  display: none !important;
}

.bpm-inbox:not([hidden]) {
  position: fixed;
  inset: 20px;
  z-index: 999997;
  display: flex;
  flex-direction: column;
  width: min(96vw, 1040px);
  max-height: 90dvh;
  margin: auto;
  overflow: auto;
  box-shadow: 0 24px 80px rgba(9, 14, 28, .28);
}

.bpm-inbox:not([hidden])::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(9, 14, 28, .58);
  backdrop-filter: blur(4px);
}

.bpm-inbox .bpm-panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px;
  border: 1px solid #c9ddf2;
  border-radius: 14px;
  background: #fff;
}

.bpm-message {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--bpm-line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.bpm-message:hover,
.bpm-message:focus-visible {
  border-color: var(--b-indigo, #6e56f7);
  box-shadow: 0 0 0 3px rgba(91, 108, 240, .14);
  outline: 0;
}

.bpm-message span,
.bpm-message small {
  color: var(--bpm-muted);
  overflow-wrap: anywhere;
}

.bpm-detail {
  margin-top: 16px;
  overflow: hidden;
}

.bpm-detail-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--bpm-line);
  background: var(--bpm-soft);
}

.bpm-detail-head h4 {
  margin: 0 0 4px;
}

.bpm-detail-head p {
  margin: 0;
  color: var(--bpm-muted);
  overflow-wrap: anywhere;
}

.bpm-detail iframe {
  display: block;
  width: 100%;
  min-height: 520px;
  border: 0;
  background: #fff;
}

.bpm-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bpm-app [hidden] {
  display: none !important;
}

.bpm-notice.is-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.bpm-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.bpm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 14, 28, .62);
  backdrop-filter: blur(4px);
}

.bpm-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
}

.bpm-modal-dialog .bpm-detail-head {
  flex: 0 0 auto;
}

.bpm-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.bpm-frame-wrap iframe {
  min-height: 68dvh;
}

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

body.bpm-inbox-open {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .bpm-panel-head {
    flex-direction: column;
  }

  .bpm-setup-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .bpm-setup-row code,
  .bpm-setup-row .bpm-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .bpm-status,
  .bpm-panel-head,
  .bpm-detail-head {
    flex-direction: column;
  }

  .bpm-create {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
  }

  .bpm-create button,
  .bpm-primary,
  .bpm-link {
    width: 100%;
    white-space: normal;
  }

  .bpm-panel,
  .bpm-login {
    padding: 16px;
    border-radius: 14px;
  }

  .bpm-detail iframe {
    min-height: 70vh;
  }

  .bpm-head-actions {
    width: 100%;
  }

  .bpm-head-actions .bpm-link {
    flex: 1 1 100%;
  }

  .bpm-setup-card {
    padding: 16px;
    border-radius: 14px;
  }

  .bpm-setup-steps {
    grid-template-columns: 1fr;
  }

  .bpm-generated-item,
  .bpm-setup-row {
    grid-template-columns: 1fr;
  }

  .bpm-setup-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bpm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .bpm-actions button,
  .bpm-actions a {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .bpm-modal {
    padding: 0;
    place-items: stretch;
  }

  .bpm-modal-dialog {
    width: 100vw;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .bpm-modal-dialog .bpm-detail-head {
    gap: 10px;
  }

  .bpm-frame-wrap iframe {
    min-height: calc(100dvh - 170px);
  }
}

/* Family Streamer v1.6: setup, sharing, forwarding and PIN access. */
.bpm-manager .bpm-panel-head {
  align-items: stretch;
}

.bpm-create {
  align-self: start;
  width: min(100%, 520px);
  grid-template-columns: minmax(0, 1fr);
}

.bpm-create input,
.bpm-create button {
  min-width: 0;
  width: 100%;
  white-space: normal;
}

.bpm-share-panel {
  background: linear-gradient(180deg, #f7fbff 0%, #eef8f1 100%);
  border-color: #cfe8d6;
}

.bpm-share-create {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.bpm-share-create label,
.bpm-pin-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--bpm-muted);
  font-size: 13px;
  font-weight: 700;
}

.bpm-share-create input,
.bpm-pin-form input,
.bpm-forwarding input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--bpm-line);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}

.bpm-share-profile,
.bpm-forwarding {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--bpm-line);
  border-radius: 12px;
  background: #fff;
}

.bpm-forwarding {
  margin-top: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.bpm-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bpm-share-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.bpm-share-profile-compact p {
  margin: 8px 0 10px;
  color: var(--bpm-muted);
}

.bpm-share-addresses {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bpm-share-addresses code {
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 8px;
  background: #f4f8fc;
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bpm-forwarding-panel details {
  border: 1px solid #dbe7f6;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.bpm-forwarding-panel summary {
  padding: 14px 16px;
  font-weight: 850;
  cursor: pointer;
}

.bpm-forwarding-panel details > p {
  margin: 0;
  padding: 0 16px 12px;
  color: var(--bpm-muted);
}

.bpm-forwarding-settings {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.bpm-forwarding-setting {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--bpm-line);
  border-radius: 12px;
  background: #f8fbff;
}

.bpm-forwarding-setting code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bpm-forwarding-setting input[type="email"] {
  min-width: 0;
  border: 1px solid var(--bpm-line);
  border-radius: 10px;
  padding: 10px 11px;
  font: inherit;
}

.bpm-setup {
  position: fixed;
  inset: 0;
  z-index: 999998;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 14, 28, .58);
  backdrop-filter: blur(4px);
}

.bpm-setup-card {
  position: relative;
  width: min(96vw, 980px);
  max-height: 96dvh;
  overflow: hidden;
  padding: 24px 64px 24px 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(9, 14, 28, .22);
}

.bpm-setup-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
  font: 900 20px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.bpm-setup-x:hover,
.bpm-setup-x:focus-visible {
  border-color: rgba(0, 23, 230, .35);
  background: #eef2ff;
  color: #0017e6;
  outline: 0;
}

.bpm-setup-logout {
  position: absolute;
  top: 18px;
  right: 60px;
  z-index: 2;
  color: var(--b-indigo, #6e56f7);
  font-size: .9rem;
  font-weight: 850;
  text-decoration: none;
}

.bpm-setup-logout:hover,
.bpm-setup-logout:focus-visible {
  text-decoration: underline;
  outline: 0;
}

.bpm-setup-card h3,
.bpm-setup-card h4,
.bpm-setup-choice strong,
.bpm-field span,
.bpm-setup-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.bpm-setup-card > ol,
.bpm-setup-card > .bpm-setup-actions:last-child,
.bpm-setup-steps {
  display: none;
}

.bpm-help {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 23, 230, .22);
  background: rgba(0, 23, 230, .07);
  color: #0017e6;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.bpm-help:focus-visible {
  outline: 2px solid rgba(0, 23, 230, .35);
  outline-offset: 2px;
}

.bpm-setup-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bpm-pin-page {
  padding: clamp(28px, 6vw, 72px) 16px;
  background: #f6f8fb;
}

.bpm-pin-app {
  max-width: 960px;
  margin: 0 auto;
}

.bpm-pin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.bpm-pin-mailbox {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bpm-line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  font: inherit;
  font-weight: 800;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.bpm-pin-mailbox.is-selected {
  border-color: #6e56f7;
  background: #f2f0ff;
}

@media (max-width: 1180px) {
  .bpm-status,
  .bpm-panel-head {
    align-items: stretch;
  }

  .bpm-create,
  .bpm-share-create,
  .bpm-pin-form {
    grid-template-columns: 1fr;
  }

  .bpm-create button,
  .bpm-share-create button,
  .bpm-pin-form button {
    width: 100%;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .bpm-forwarding {
    grid-template-columns: 1fr;
  }

  .bpm-share-checks {
    grid-template-columns: 1fr;
  }

  .bpm-setup {
    padding: 0;
    place-items: stretch;
  }

  .bpm-setup-card {
    width: 100vw;
    max-height: 100dvh;
    min-height: 100dvh;
    overflow: auto;
    padding: 20px 54px 20px 18px;
    border-radius: 0;
  }

  .bpm-setup-x {
    top: 12px;
    right: 12px;
  }

  .bpm-account-status {
    align-items: stretch;
  }

  .bpm-account-status .bpm-logout-link {
    width: 100%;
  }

  .bpm-detail-account {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .bpm-detail-account span {
    max-width: min(58vw, 260px);
  }

  .bpm-setup-logout {
    top: 18px;
    right: 58px;
    max-width: calc(100vw - 110px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bpm-setup-actions .bpm-primary,
  .bpm-setup-actions .bpm-link {
    width: 100%;
  }

  .bpm-pin-setup-row,
  .bpm-forwarding-setting,
  .bpm-mailbox-compact {
    grid-template-columns: 1fr;
  }

  .bpm-mailbox-compact .bpm-actions {
    grid-row: auto;
    grid-column: auto;
    justify-content: stretch;
  }

  .bpm-mailbox-compact .bpm-actions button,
  .bpm-forwarding-setting button {
    width: 100%;
    white-space: normal;
  }

  .bpm-inbox:not([hidden]) {
    inset: 0;
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  .bpm-add-wrap {
    justify-content: stretch;
  }

  .bpm-add-wrap .bpm-add-next {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
  }

  .bpm-generated-item code,
  .bpm-setup-row code,
  .bpm-forwarding-setting code,
  .bpm-share-addresses code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
