.dash-body {
  overflow-y: auto;
  background: linear-gradient(170deg, #241a33 0%, #1b1b26 60%);
  padding: 0 20px 60px;
  padding-top: max(20px, env(safe-area-inset-top));
}

.dash-header {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 18px 0 6px;
}
.dash-logo { font-size: 34px; }
.dash-header h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }

/* ------------------------------------------------- the shared headline */
.family { text-align: center; margin: 26px auto 34px; max-width: 640px; }
.family-lead { margin: 0; font-size: 17px; color: var(--ink-soft); font-weight: 700; }
.family-number {
  font-size: clamp(72px, 18vw, 132px); font-weight: 900; line-height: 0.95;
  background: linear-gradient(180deg, #FFD966, #FF9A3D);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 5px 0 rgba(0,0,0,0.25));
  margin: 2px 0;
}

.goal { margin-top: 26px; }
.goal-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 14px; color: var(--ink-soft); margin-bottom: 7px; font-weight: 700;
}
.goal-label strong { color: var(--accent); }
.goal-bar {
  height: 22px; background: rgba(0,0,0,0.35); border-radius: 999px;
  overflow: hidden; box-shadow: inset 0 2px 5px rgba(0,0,0,0.4);
}
.goal-fill {
  height: 100%; width: 0;
  background: repeating-linear-gradient(45deg, #7FC8A9 0 12px, #6BB897 12px 24px);
  border-radius: 999px; transition: width 0.6s cubic-bezier(.2,1,.3,1);
}

/* ------------------------------------------------------------- cards */
.factories {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px; max-width: 900px; margin: 0 auto 34px;
}
.factory-card {
  display: block; width: 100%; text-align: left;
  background: var(--panel); border-radius: 26px; padding: 22px;
  box-shadow: 0 7px 0 rgba(0,0,0,0.3);
  transition: transform 0.1s, box-shadow 0.1s;
  border-top: 5px solid var(--accent);
}
.factory-card:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0,0,0,0.3); }
.factory-avatar { font-size: 42px; }
.factory-card h2 { margin: 6px 0 14px; font-size: 21px; }

.factory-facts { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.factory-facts > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.factory-facts dt { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.factory-facts dd { margin: 0; font-size: 16px; text-align: right; }

.factory-play {
  display: block; margin-top: 16px; font-size: 14px; color: var(--accent);
}
.factory-empty { color: var(--ink-soft); font-size: 15px; font-weight: 600; }
.dash-error { text-align: center; color: var(--ink-soft); grid-column: 1 / -1; }

/* -------------------------------------------------------------- feed */
.feed-wrap { max-width: 900px; margin: 0 auto; }
.feed-title {
  font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); margin: 0 0 12px;
}
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feed-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border-radius: 16px; padding: 12px 16px; font-size: 15px;
  border-left: 4px solid var(--accent);
}
.feed-item.theme-hazel   { border-left-color: #FF6FB5; }
.feed-item.theme-bennett { border-left-color: #E8342F; }
.feed-icon { font-size: 21px; }
.feed-when { margin-left: auto; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.feed-empty { color: var(--ink-soft); text-align: center; padding: 22px; font-weight: 600; }

/* ---------------------------------------------------------- pin pad */
.pin-card { max-width: 340px; }
.pin-avatar { font-size: 52px; }
.pin-card h2 { margin: 4px 0 16px; font-size: 21px; }

.pin-dots { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; min-height: 18px; }
.pin-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.pin-dot.is-on { background: var(--accent); }

.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-pad button {
  background: var(--panel-hi); border-radius: 18px;
  font-size: 26px; font-weight: 800; padding: 14px 0;
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
.pin-pad button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,0.3); }
.pin-go { background: var(--good) !important; color: #06301f; font-size: 19px !important; }
.pin-util { font-size: 21px !important; }
.pin-cancel { margin-top: 16px; color: var(--ink-soft); font-size: 15px; }
