/* ============================================================
   PEPBUG LAB — the ranch (orders, breeding, hatching, pen)
   Builds on style.css (same science-lab look).
   ============================================================ */
.hud-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--cyan); background: transparent;
  font-size: 1.1rem; cursor: pointer; align-self: center;
}
.hud-btn:hover { background: rgba(25,195,214,.25); }
.hud-btn:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }
.hud-stats { align-items: center; }
.mono { font-family: var(--font-mono); }

/* intro + summary */
.intro { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 24px 0; }
.intro-title { font: 800 2.1rem var(--font-display); text-transform: uppercase; line-height: 1.05; }
.intro-body {
  background: #fff; border: 3px solid var(--ink); border-radius: 20px; padding: 18px;
  box-shadow: 6px 6px 0 var(--violet); text-align: left; max-width: 460px; width: 100%;
  line-height: 1.5;
}
.intro-body p + p, .intro-body p + .key, .intro-body .key + p, .intro-body .steps + p { margin-top: 12px; }
.steps { padding-left: 1.3rem; }
.steps li { margin: 4px 0; }
.intro .btn { min-width: 230px; }
.intro-body .key { margin-bottom: 0; }
.sum-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: center; margin-bottom: 12px; }
.sum-stats div { background: var(--violet-soft); border-radius: 12px; padding: 8px; }
.sum-stats .hud-label { color: var(--violet); }
.sum-stats b { font: 700 1.4rem var(--font-mono); }

/* customer order */
.order { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; }
.order-who { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 74px; flex: none; text-align: center; font-size: .72rem; line-height: 1.15; }
.face { display: grid; place-items: center; width: 60px; height: 60px; font-size: 2rem; background: var(--lime); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); }
.order-bubble {
  position: relative; flex: 1; background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  padding: 12px 14px; box-shadow: 5px 5px 0 var(--violet); font-size: 1.05rem; line-height: 1.35;
}
.order-bubble::before {
  content: ''; position: absolute; left: -11px; top: 22px; width: 16px; height: 16px; background: #fff;
  border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg);
}
.order-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.order-art { width: 70px; }
.reward { font: 700 1.2rem var(--font-mono); background: var(--lime); border: 3px solid var(--ink); border-radius: 10px; padding: 2px 10px; box-shadow: 3px 3px 0 var(--ink); }

/* breeding station */
.station { margin-top: 22px; background: var(--violet-soft); border: 3px solid var(--ink); border-radius: 20px; padding: 14px; box-shadow: 6px 6px 0 var(--ink); }
.station-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.times { font: 700 1.6rem var(--font-mono); color: var(--magenta); }
.slot {
  position: relative; flex: 1; max-width: 150px; min-height: 120px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 10px 6px;
}
.slot--empty { border-style: dashed; background: transparent; border-color: rgba(30,27,75,.5); }
.slot-label { position: absolute; top: 6px; left: 8px; font: 700 .8rem var(--font-mono); color: var(--violet); }
.slot-hint { font: 600 .8rem var(--font-mono); opacity: .6; }
.slot-bug {
  width: 66px; padding: 5px; border: 3px solid var(--ink); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #e3f9fc 55%, #b9eef5 100%);
}
.slot-name { font-size: .95rem; }
.station-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.station-btns .btn { padding: .55rem 1.1rem; font-size: 1.05rem; }
.station-btns small { font: 700 .8rem var(--font-mono); }
.station-hint { text-align: center; margin-top: 8px; font: 600 .8rem var(--font-mono); opacity: .7; }

/* hatch area */
.hatch { margin-top: 18px; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 20px; padding: 16px; box-shadow: var(--hard); }
.hatch--idle { background: transparent; border-style: dashed; box-shadow: none; border-color: rgba(30,27,75,.4); font: 600 .9rem var(--font-mono); }
.hatch--baby.win, .hatch--done { background: var(--good); }
.egg { font-size: 4rem; display: inline-block; animation: wobble .5s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg) scale(1.05); } }
.baby-bug {
  width: 120px; margin: 4px auto 8px; padding: 10px; border: 3px solid var(--ink); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #e3f9fc 55%, #b9eef5 100%); box-shadow: 3px 3px 0 var(--ink);
  animation: hatchpop .5s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes hatchpop { from { transform: scale(.2) rotate(-30deg); opacity: 0; } }
.new-tag { display: inline-block; font: 700 .8rem var(--font-mono); background: var(--magenta); color: #fff; border: 3px solid var(--ink); border-radius: 8px; padding: 2px 10px; transform: rotate(-2deg); box-shadow: 3px 3px 0 var(--ink); margin-bottom: 6px; }
.baby-name { font-size: 1.15rem; }
.baby-pheno { font: 600 .85rem var(--font-mono); margin-bottom: 6px; }
.verdict { font-weight: 700; margin: 8px 0 12px; }
.hatch-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hatch-btns .btn { padding: .55rem 1.1rem; font-size: 1.05rem; }
.party { font-size: 3rem; animation: hatchpop .5s cubic-bezier(.34, 1.56, .64, 1); }
.done-title { font-size: 1.2rem; margin-bottom: 6px; }
.note { font-size: .92rem; line-height: 1.45; margin-top: 6px; text-align: left; }
.hatch--done .note { text-align: center; }
.hatch--done .hatch-btns { margin-top: 12px; }

/* pen */
.pen { margin-top: 24px; }
.pen-title { font: 800 1.2rem var(--font-display); margin-bottom: 12px; }
.pen-title span { font: 700 .9rem var(--font-mono); color: var(--violet); }
.pen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 12px; }
.pcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 8px 6px; box-shadow: var(--hard-sm); }
.pcard.selected { background: var(--lime); box-shadow: 4px 4px 0 var(--violet); }
.pcard-slot { position: absolute; top: -10px; left: -8px; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; background: var(--violet); color: #fff; border: 3px solid var(--ink); border-radius: 8px; font: 700 .85rem var(--font-mono); }
.pcard-main { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.pcard-main:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; border-radius: 12px; }
.pcard-bug { width: 72px; padding: 5px; border: 3px solid var(--ink); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0, #e3f9fc 55%, #b9eef5 100%); transition: transform .12s; }
.pcard-main:hover .pcard-bug { transform: scale(1.06) rotate(-3deg); }
.pcard-name { font-size: .95rem; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.chip { font: 700 .8rem var(--font-mono); letter-spacing: .05em; border: 2px solid var(--ink); border-radius: 6px; padding: 0 5px; color: #fff; }
.chip.dom { background: var(--violet); }
.chip.rec { background: var(--magenta); }
.chip.unk { background: #fff; color: var(--ink); border-style: dashed; }
.pcard-btns { display: flex; gap: 4px; }
.mini { font: 700 .72rem var(--font-mono); background: var(--cyan); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: 2px 6px; cursor: pointer; }
.mini--sell { background: #fff; }
.mini:hover { transform: translateY(-1px); box-shadow: 2px 2px 0 var(--ink); }
.mini:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30; max-width: 90vw; text-align: center;
  background: var(--ink); color: #fff; border: 3px solid var(--lime); border-radius: 14px; padding: 10px 16px;
  font: 600 .9rem var(--font-mono); box-shadow: 4px 4px 0 rgba(0,0,0,.3);
}

/* modals: assistant + dex */
.modal-box--wide { max-width: 520px; }
.assist-pair { text-align: center; font-size: 1.1rem; }
.assist-order { text-align: center; margin-top: 4px; }
.assist-chance { text-align: center; margin: 8px 0 4px; font-size: 1.1rem; }
.assist-chance b { font: 700 1.4rem var(--font-mono); color: var(--violet); }
.assist-chance span { font: 500 .85rem var(--font-mono); }
.assist-sq { margin-top: 14px; padding-top: 12px; border-top: 3px dashed rgba(30,27,75,.25); }
.assist-sq h3 { font: 800 1rem var(--font-display); text-align: center; }
.tag { font: 700 .65rem var(--font-mono); background: var(--lime); border: 2px solid var(--ink); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.assist-sq .note { text-align: center; }
.assist-sq .cell { min-height: 78px; font-size: 1.4rem; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.dex-card { text-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 4px; box-shadow: var(--hard-sm); font: 700 .72rem var(--font-mono); line-height: 1.3; }
.dex-card .bug-box { width: 64px; margin: 0 auto 4px; }
.dex-card.locked .bug-box { filter: brightness(0) opacity(.22); }
.dex-card.locked { box-shadow: none; border-style: dashed; }

@media (max-width: 480px) {
  .order-who { width: 62px; }
  .face { width: 52px; height: 52px; font-size: 1.7rem; }
  .pen-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
  .pcard-bug { width: 64px; }
}

/* Time-filter tabs (shared component, themed for the lab) */
.mp-tabs {
  --mp-tab-font: var(--font-mono);
  --mp-tab-ink: var(--ink);
  --mp-tab-bg: #fff;
  --mp-tab-radius: 8px;
  --mp-tab-on-bg: var(--violet);
  --mp-tab-on-fg: #fff;
  --mp-tab-on-shadow: 2px 2px 0 var(--ink);
  --mp-tab-hover: var(--violet-soft);
  --mp-tab-focus: var(--magenta);
}
.mp-tab { letter-spacing: .02em; }

/* BETA markers: the game is still being built */
.beta-note { max-width: 340px; font: 600 .85rem/1.4 var(--font-mono); background: #fff; border: 3px dashed var(--ink); border-radius: 12px; padding: 8px 12px; }
.beta-note b { display: inline-block; margin-right: 8px; padding: 0 7px; font-weight: 700; letter-spacing: .1em; background: var(--lime); border: 2px solid var(--ink); border-radius: 6px; transform: rotate(-2deg); }
.beta-chip { display: inline-block; margin-left: 8px; padding: 1px 6px; vertical-align: middle; font: 700 .62rem/1.3 var(--font-mono); letter-spacing: .12em; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); border-radius: 6px; transform: rotate(-2deg); }
