/* ── Birthday page layout ─────────────────────────────────────────── */

body.bd-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--page-bg);
  color: var(--txt);
  line-height: 1.45;
}

/* star field canvas — fixed behind all content */
#bdStars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

body.bd-page > .bd-layout {
  position: relative;
  z-index: 1;
}

body.bd-page > .site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* transparent header — nav chips float in the starfield */
body.bd-page .site-header {
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  backdrop-filter: none;
}

.bd-header-search {
  margin-left: auto;
}

body.bd-page .nuclear-search-dialog-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--control-hover-border);
  border-radius: 999px;
  background: var(--control-hover-bg);
  color: var(--acc-strong);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

body.bd-page .nuclear-search-dialog-trigger:hover,
body.bd-page .nuclear-search-dialog-trigger:focus-visible {
  background: var(--control-active-bg);
}

.bd-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  overflow: hidden;
  min-height: 0;
  transition: grid-template-columns 0.25s ease;
}

.bd-layout.is-card-max {
  grid-template-columns: 1fr 0px;
}

.bd-layout.is-map-max {
  grid-template-columns: 0px 1fr;
}

/* ── Left column: birthday content ─────────────────────────────────── */

.bd-main {
  overflow-y: auto;
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  min-width: 0;
}

.bd-layout.is-map-max .bd-main {
  display: none;
}

/* ── Right column: sidebar (controls + map + next birthday) ─────────── */

.bd-sidebar {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--brd);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.bd-layout.is-card-max .bd-sidebar {
  display: none;
}

/* Controls bar */
.bd-sidebar-controls {
  display: flex;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--brd);
  flex-shrink: 0;
  background: var(--surf);
}

.bd-event-filter-wrap {
  flex: 1.15;
  min-width: 0;
  display: flex;
}

.bd-event-filter {
  width: 100%;
  min-width: 0;
  padding: 5px 22px 5px 9px;
  border: 1px solid var(--brd);
  border-radius: 999px;
  background: var(--surf2);
  color: var(--mut);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.bd-event-filter:hover,
.bd-event-filter:focus-visible {
  border-color: var(--control-hover-border);
  color: var(--control-hover-text);
  outline: none;
}

.bd-ctrl-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid var(--brd);
  border-radius: 999px;
  background: var(--surf2);
  color: var(--mut);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-ctrl-btn:hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  color: var(--control-hover-text);
}

.bd-ctrl-btn.is-active {
  border-color: var(--acc);
  background: var(--accent-soft);
  color: var(--acc-strong);
}

.bd-live-timer {
  flex-shrink: 0;
  padding: 6px 10px;
  border-bottom: 1px solid var(--brd);
  background: color-mix(in srgb, var(--surf) 88%, var(--acc) 12%);
  color: var(--mut);
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.bd-live-timer strong {
  color: var(--txt);
  font-weight: 800;
}

.bd-live-timer[hidden] {
  display: none;
}

/* Main-map iframe */
.bd-map-frame {
  flex: 1;
  min-height: 0;
  background: var(--bg);
  display: block;
  width: 100%;
  border: none;
}

.bd-map-frame.is-bd-focus-pulse {
  animation: bdMapFocusPulse 1.35s ease;
}

@keyframes bdMapFocusPulse {
  0% { outline: 0 solid rgba(250, 204, 21, 0); box-shadow: inset 0 0 0 0 rgba(250, 204, 21, 0); }
  28% { outline: 3px solid rgba(250, 204, 21, 0.9); box-shadow: inset 0 0 0 4px rgba(250, 204, 21, 0.22); }
  100% { outline: 0 solid rgba(250, 204, 21, 0); box-shadow: inset 0 0 0 0 rgba(250, 204, 21, 0); }
}

/* Sidebar bottom: upcoming week list */
.bd-sidebar-bottom {
  flex-shrink: 0;
  border-top: 1px solid var(--brd);
  background: var(--surf);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 42vh;
}

/* ── Birthday celebration card ───────────────────────────────────────── */

.bd-card {
  background: var(--surf);
  border: 1px solid var(--brd);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}

/* Hero banner */
.bd-hero {
  padding: 22px 24px 20px;
  background: linear-gradient(140deg, #041f13 0%, #0a1f42 55%, #061428 100%);
  position: relative;
  overflow: hidden;
}

.bd-hero::before {
  content: "⚛";
  position: absolute;
  right: -28px;
  top: -28px;
  font-size: 140px;
  opacity: 0.07;
  animation: bdAtomSpin 16s linear infinite;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.bd-hero::after {
  content: "⚛";
  position: absolute;
  left: -30px;
  bottom: -40px;
  font-size: 100px;
  opacity: 0.04;
  animation: bdAtomSpin 24s linear infinite reverse;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

@keyframes bdAtomSpin {
  to { transform: rotate(360deg); }
}

.bd-card.is-idle .bd-hero {
  background:
    repeating-linear-gradient(118deg, rgba(250, 204, 21, 0.08) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, rgba(5, 22, 38, 0.96) 0%, rgba(12, 54, 43, 0.96) 46%, rgba(44, 29, 8, 0.96) 100%);
}

.bd-card.is-idle .bd-hero::before {
  opacity: 0.11;
}

.bd-card.is-idle .bd-hero::after {
  opacity: 0.07;
}

.bd-hero.bd-hero-grid {
  background: linear-gradient(140deg, #061a33 0%, #063f5d 54%, #082849 100%);
}

.bd-card.is-grid-anniversary .bd-age-number {
  color: #38bdf8;
  text-shadow: 0 0 60px rgba(56, 189, 248, 0.35), 0 0 20px rgba(56, 189, 248, 0.2);
}

.bd-card.is-grid-anniversary .bd-age-label {
  color: #bae6fd;
}

/* Tag pill */
.bd-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 13px 4px 9px;
  border: 1px solid rgba(134, 239, 172, 0.35);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.1);
  color: #86efac;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.bd-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: bdPulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

.bd-tag-idle {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
}

.bd-tag-idle .bd-tag-dot {
  background: #facc15;
  animation: bdPulseAmber 1.45s ease-in-out infinite;
}

.bd-tag-grid {
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(56, 189, 248, 0.13);
  color: #bae6fd;
}

.bd-tag-grid .bd-tag-dot {
  background: #38bdf8;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5);
}

@keyframes bdPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50% { opacity: 0.7; transform: scale(0.75); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); }
}

@keyframes bdPulseAmber {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.55); }
  50% { opacity: 0.75; transform: scale(0.72); box-shadow: 0 0 0 5px rgba(250, 204, 21, 0); }
}

.bd-idle-notice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 0 20px;
  padding: 20px;
  border: 1px solid rgba(250, 204, 21, 0.32);
  border-radius: 16px;
  background: linear-gradient(110deg, rgba(250, 204, 21, 0.17), rgba(45, 212, 191, 0.12) 52%, rgba(244, 114, 182, 0.1));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

.bd-idle-notice::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  pointer-events: none;
  animation: bdIdleFrame 3.2s ease-in-out infinite;
}

.bd-idle-lead {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.bd-idle-signal-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 150px;
}

.bd-idle-main-signal {
  --bd-signal-size: 150px;
}

.bd-idle-countdown-badge {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 50px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(4, 14, 25, 0.72);
  color: #fff7ed;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.bd-idle-countdown-badge strong {
  color: #fde047;
  font-size: 25px;
  font-weight: 950;
  line-height: 0.9;
}

.bd-idle-countdown-badge span {
  color: rgba(255, 247, 237, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bd-idle-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.bd-idle-kicker {
  color: #fef3c7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.bd-idle-title {
  color: #fff7ed;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 6px;
}

.bd-idle-text {
  color: rgba(255, 247, 237, 0.86);
  font-size: 15px;
  line-height: 1.45;
  max-width: 620px;
}

.bd-idle-text strong {
  color: #fde047;
  font-weight: 900;
}

.bd-idle-next-link {
  color: #a7f3d0;
  font-weight: 850;
  text-decoration: none;
  border-bottom: 1px solid rgba(167, 243, 208, 0.42);
}

.bd-idle-next-link:hover {
  color: #ecfeff;
  border-bottom-color: rgba(236, 254, 255, 0.7);
}

.bd-idle-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bd-idle-fact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(4, 14, 25, 0.36);
  color: rgba(255, 247, 237, 0.78);
  font: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.bd-idle-fact:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 243, 208, 0.42);
  background: rgba(4, 14, 25, 0.52);
}

.bd-idle-fact:focus-visible {
  outline: 2px solid rgba(250, 204, 21, 0.72);
  outline-offset: 3px;
}

.bd-idle-fact.is-pinging {
  animation: bdIdleFactPing 0.9s ease;
}

@keyframes bdIdleFactPing {
  0% { transform: translateY(0) scale(1); border-color: rgba(250, 204, 21, 0.24); }
  35% { transform: translateY(-2px) scale(1.02); border-color: rgba(250, 204, 21, 0.92); box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.13); }
  100% { transform: translateY(0) scale(1); border-color: rgba(255, 255, 255, 0.13); box-shadow: none; }
}

.bd-idle-fact-signal {
  --bd-signal-size: 46px;
  grid-row: 1 / 4;
}

.bd-idle-fact-label {
  color: rgba(255, 247, 237, 0.54);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

.bd-idle-fact strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff7ed;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.bd-idle-fact > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 247, 237, 0.66);
  font-size: 11px;
}

.bd-idle-map-note {
  position: absolute;
  left: 20px;
  bottom: 12px;
  z-index: 1;
  max-width: calc(100% - 40px);
  min-height: 27px;
  padding: 5px 10px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.11);
  color: #fde68a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
}

.bd-idle-map-note.is-visible {
  animation: bdIdleMapNote 2.8s ease forwards;
}

@keyframes bdIdleMapNote {
  0% { opacity: 1; transform: translateY(-5px); }
  16%, 82% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0.72; transform: translateY(0); }
}

@keyframes bdIdleFrame {
  0%, 100% { opacity: 0.58; transform: scale(1); }
  50% { opacity: 1; transform: scale(0.985); }
}

/* Age display */
.bd-age-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.bd-age-number {
  font-size: 80px;
  font-weight: 900;
  line-height: 0.9;
  color: #4ade80;
  letter-spacing: -3px;
  text-shadow: 0 0 60px rgba(74, 222, 128, 0.35), 0 0 20px rgba(74, 222, 128, 0.2);
}

.bd-age-label {
  font-size: 24px;
  font-weight: 700;
  color: #a7f3d0;
  letter-spacing: 0.01em;
}

/* Unit & plant info */
.bd-unit-name {
  font-size: 26px;
  font-weight: 800;
  color: #f0f9ff;
  margin-bottom: 6px;
  line-height: 1.15;
}

.bd-plant-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 13px;
  color: rgba(186, 230, 253, 0.75);
  margin-bottom: 2px;
}

.bd-country-flag {
  display: inline-flex;
  width: 25px;
  height: 17px;
  font-size: 17px;
  line-height: 1;
}

.bd-country-flag .common-country-flag,
.bd-other-flag .common-country-flag,
.bd-week-unit-flag .common-country-flag,
.bd-next-hint-text > .common-country-flag {
  display: block;
  width: 1.5em;
  height: 1em;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(2, 8, 16, 0.22);
}

/* Status pill */
.bd-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bd-status-pill.is-operating {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.bd-status-pill.is-shutdown,
.bd-status-pill.is-decommissioned {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.bd-status-pill.is-construction {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.bd-status-pill.is-suspended {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Date/btype info row */
.bd-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.bd-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(186, 230, 253, 0.85);
}

/* ── Metrics grid ──────────────────────────────────────────────────── */

/* ── Other birthday units ──────────────────────────────────────────── */

.bd-others {
  padding: 14px 20px 12px;
  border-top: 1px solid var(--brd);
}

.bd-others-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 8px;
}

.bd-other-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--brd);
  font-size: 13px;
  width: 100%;
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.bd-other-item:hover { background: var(--subtle-hover-bg); }

.bd-other-item:first-of-type { border-top: none; }

.bd-other-flag { display: inline-flex; font-size: 14px; line-height: 1; }
.bd-other-name { font-weight: 600; color: var(--txt); min-width: 0; }
.bd-other-country { font-size: 11px; color: var(--mut); }
.bd-other-age { margin-left: auto; font-size: 12px; color: var(--mut); white-space: nowrap; padding-left: 8px; }
.bd-other-status { font-size: 10px; color: var(--op); font-weight: 600; }

.bd-event-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 1px 6px;
  border: 1px solid rgba(74, 222, 128, 0.26);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.09);
  color: var(--op);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
}

.bd-event-badge.is-grid {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(56, 189, 248, 0.11);
  color: #0284c7;
}

.bd-card.is-grid-anniversary .bd-meta-event-chip {
  border-color: rgba(125, 211, 252, 0.3);
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
}

/* ── Next birthday hint (left column footer) ───────────────────────── */

.bd-next-hint {
  background: var(--surf2);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.bd-next-hint-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mut);
  flex-shrink: 0;
}

.bd-next-hint-text {
  font-size: 13px;
  color: var(--txt);
  min-width: 0;
}

.bd-next-hint-countdown {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--control-hover-border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--acc-strong);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Upcoming week list (sidebar bottom) ───────────────────────────── */

.bd-week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px 7px;
  border-bottom: 1px solid var(--brd);
  flex-shrink: 0;
}

.bd-week-header:focus {
  outline: 2px solid rgba(250, 204, 21, 0.68);
  outline-offset: -2px;
}

.bd-week-header-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mut);
}

.bd-week-header-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--acc);
}

.bd-week-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.bd-week-group {
  border-bottom: 1px solid var(--brd);
}

.bd-week-group:last-child { border-bottom: none; }

.bd-week-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px 4px;
  background: var(--surf2);
  position: sticky;
  top: 0;
  z-index: 1;
}

.bd-week-group-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--txt);
}

.bd-week-group-when {
  font-size: 10px;
  color: var(--acc);
  font-weight: 600;
}

.bd-week-units {
  padding: 2px 0 6px;
}

.bd-week-unit-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  font-size: 12px;
  line-height: 1.3;
}

button.bd-week-unit-link {
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.bd-week-unit-row:hover { background: var(--subtle-hover-bg); }

.bd-week-op-dot {
  font-size: 8px;
  color: var(--op);
  flex-shrink: 0;
  line-height: 1;
}

.bd-week-unit-flag { font-size: 13px; flex-shrink: 0; }

.bd-week-unit-name {
  font-weight: 600;
  color: var(--txt);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-week-unit-meta {
  margin-left: auto;
  font-size: 10px;
  color: var(--mut);
  white-space: nowrap;
  padding-left: 6px;
  flex-shrink: 0;
}

.bd-last-mini {
  padding: 11px 14px 13px;
  border-top: 1px solid var(--brd);
  background: var(--surf);
}

.bd-last-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.bd-last-mini-label {
  color: var(--mut);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bd-last-mini-ago {
  color: var(--acc);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

button.bd-last-mini-row.bd-week-unit-link {
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: var(--surf2);
  padding: 7px 10px;
}

button.bd-last-mini-row.bd-week-unit-link:hover {
  border-color: var(--control-hover-border);
  background: var(--subtle-hover-bg);
}

.bd-last-mini-plant {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--mut);
  font-size: 11px;
}

.bd-last-mini-more {
  display: inline-flex;
  margin-top: 7px;
  color: var(--mut);
  font-size: 11px;
}

/* ── Sim-date banner (inserted as first child of .bd-main) ──────────── */

.bd-sim-banner {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  flex-shrink: 0;
}

/* ── Hero links ──────────────────────────────────────────────────────── */

.bd-hero-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(167, 243, 208, 0.3);
  transition: border-color 0.12s, color 0.12s;
}

.bd-hero-link:hover {
  color: #86efac;
  border-bottom-color: rgba(167, 243, 208, 0.8);
}

.bd-hero-link-country {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-bottom: none;
  text-decoration: underline;
  text-decoration-color: rgba(167, 243, 208, 0.25);
  text-underline-offset: 3px;
}

.bd-hero-link-country:hover {
  color: #86efac;
  text-decoration-color: rgba(167, 243, 208, 0.7);
}

/* Meta chips that are links */
.bd-meta-chip-link {
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
  cursor: pointer;
}

.bd-meta-chip-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
  color: #f0f9ff;
}

/* ── Linked metric cells ─────────────────────────────────────────────── */

a.bd-metric-link {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surf);
  position: relative;
}

a.bd-metric-link .bd-metric {
  background: transparent;
  height: 100%;
}

a.bd-metric-link::after {
  content: "↗";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  color: var(--mut);
  opacity: 0;
  transition: opacity 0.12s;
}

a.bd-metric-link:hover .bd-metric {
  background: var(--subtle-hover-bg);
}

a.bd-metric-link:hover::after {
  opacity: 1;
}

/* ── Preview card (upcoming birthday, shown temporarily) ─────────────── */

.bd-hero-preview {
  background: linear-gradient(140deg, #0a1f42 0%, #041c3a 55%, #061428 100%);
}

.bd-tag-preview {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
}

.bd-tag-preview .bd-tag-dot {
  background: #38bdf8;
  animation: bdPulseBlue 1.6s ease-in-out infinite;
}

@keyframes bdPulseBlue {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); }
  50% { opacity: 0.7; transform: scale(0.75); box-shadow: 0 0 0 4px rgba(56, 189, 248, 0); }
}

/* ── Loading / error ────────────────────────────────────────────────── */

.bd-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 60px 20px;
  color: var(--mut);
  text-align: center;
  background: var(--surf);
  border: 1px solid var(--brd);
  border-radius: 18px;
  box-shadow: var(--shadow-panel);
}

.bd-spinner {
  font-size: 40px;
  animation: bdAtomSpin 2s linear infinite;
  display: block;
}

/* ── Mobile ─────────────────────────────────────────────────────────── */

@media (max-width: 780px) {
  body.bd-page .site-header {
    min-height: calc(52px + env(safe-area-inset-top, 0px));
  }

  body.bd-page .site-header-link {
    display: none;
  }

  .bd-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .bd-layout.is-card-max { grid-template-rows: 1fr 0px; }
  .bd-layout.is-map-max  { grid-template-rows: 0px 1fr; }

  .bd-sidebar {
    border-left: none;
    border-top: 1px solid var(--brd);
    max-height: 38vh;
  }

  .bd-layout.has-idle-card .bd-sidebar {
    max-height: 32vh;
  }

  body.bd-page.has-nuclear-mobile-dock .bd-layout.has-idle-card .bd-sidebar {
    max-height: max(150px, calc(32vh - var(--mobile-dock-space, 82px)));
  }

  .bd-layout.is-card-max .bd-sidebar,
  .bd-layout.is-map-max .bd-main {
    display: none;
  }

  .bd-age-number { font-size: 56px; }
  .bd-unit-name  { font-size: 20px; }
  .bd-age-label  { font-size: 18px; }

  .bd-idle-notice {
    gap: 10px;
    padding: 12px;
  }

  .bd-idle-lead {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .bd-idle-signal-wrap {
    min-width: 76px;
  }

  .bd-idle-main-signal {
    --bd-signal-size: 76px;
  }

  .bd-idle-countdown-badge {
    min-width: 38px;
    min-height: 34px;
    padding: 5px 6px;
    border-radius: 10px;
  }

  .bd-idle-countdown-badge strong {
    font-size: 18px;
  }

  .bd-idle-countdown-badge span {
    font-size: 8px;
  }

  .bd-idle-title {
    font-size: 20px;
  }

  .bd-idle-text {
    font-size: 13px;
    line-height: 1.4;
  }

  .bd-idle-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .bd-idle-fact {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    justify-items: center;
    text-align: center;
    row-gap: 2px;
    padding: 7px 5px;
  }

  .bd-idle-fact-signal {
    --bd-signal-size: 34px;
    grid-row: auto;
  }

  .bd-idle-fact-label {
    font-size: 7px;
  }

  .bd-idle-fact strong {
    font-size: 11px;
    white-space: normal;
  }

  .bd-idle-fact > span:last-child {
    font-size: 9px;
  }

  .bd-last-mini {
    padding: 9px 14px 10px;
  }

  .bd-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .bd-metric-value { font-size: 18px; }
}

@media (max-width: 420px) {
  body.bd-page .site-header {
    gap: 8px;
    padding: 0 10px;
  }

  body.bd-page .site-brand-text {
    display: none;
  }

  body.bd-page .site-brand::after {
    display: none;
  }

  body.bd-page .site-header-link {
    padding: 6px 9px;
  }

  body.bd-page .nuclear-search-dialog-trigger {
    padding: 6px 9px;
  }

  .bd-metrics { grid-template-columns: 1fr 1fr; }
  .bd-hero { padding: 18px 16px 16px; }
  .bd-age-number { font-size: 48px; }
  .bd-idle-signal-wrap { min-width: 68px; }
  .bd-idle-main-signal { --bd-signal-size: 68px; }
  .bd-idle-title { font-size: 19px; }
  .bd-idle-notice { margin-bottom: 14px; }
}

/* Nur für Screenreader — u. a. das Label des Jubiläumsfilters. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .bd-idle-notice::before,
  .bd-tag-idle .bd-tag-dot,
  .bd-map-frame.is-bd-focus-pulse,
  .bd-idle-fact.is-pinging,
  .bd-idle-map-note.is-visible {
    animation: none;
  }
}
