/* ==============================================
   ASTROMED — MENTAL HEALTH · OVERVIEW · PROTOCOLS
   Add AFTER style.css
============================================== */

.am-page { width: 100%; padding: 10px 0 36px; color: #fff; box-sizing: border-box; }
.am-page[hidden] { display: none !important; }

.am-heading { margin-bottom: 24px; }
.am-heading h2 { margin: 0 0 10px; font-size: 32px; line-height: 1.2; font-weight: 700; color: #fff; }
.am-heading p { margin: 0; font-size: 14px; color: #c6d8f0; max-width: 70ch; }

.am-panel {
  margin-bottom: 18px;
  padding: 22px;
  background: #fff;
  color: #173057;
  border-radius: 20px;
  box-shadow: 0 14px 35px rgba(10, 30, 70, 0.18);
}
.am-panel h3 { margin: 0 0 14px; font-size: 18px; letter-spacing: -0.3px; color: #215d9f; }
.am-panel p { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: #4a6283; }

/* ---------- mood ---------- */

.am-moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.am-mood {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px;
  background: #f5f9ff; color: #245a9d;
  border: 2px solid transparent; border-radius: 14px;
  font-size: 12px; font-weight: 650;
  transition: border-color .2s ease, background .2s ease;
}
.am-mood span { font-size: 30px; line-height: 1; }
.am-mood:hover { border-color: #9fc1e9; background: #fff; }
.am-mood.selected { border-color: #2866bf; background: #eaf2fb; }
.am-reply { margin: 14px 0 0 !important; min-height: 20px; color: #245a9d !important; font-weight: 600; }

/* ---------- tabs ---------- */

.am-tabs { display: flex; gap: 8px; margin: 6px 0 14px; flex-wrap: wrap; }
.am-tab {
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.12); color: #e3ecff;
  border: 0; border-radius: 999px; font-size: 13px; font-weight: 650;
}
.am-tab:hover { background: rgba(255, 255, 255, 0.22); }
.am-tab.active { background: #edf3ff; color: #2866bf; }

/* ---------- questions ---------- */

.am-q { padding: 14px 0; border-bottom: 1px solid #e6ecf4; }
.am-q:last-of-type { border-bottom: 0; }
.am-q p { margin: 0 0 10px !important; color: #173057 !important; font-weight: 600; }
.am-q-row { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; align-items: center; padding: 9px 0; }
.am-q-row p { margin: 0 !important; font-weight: 500; }

.am-cat { margin: 22px 0 4px; font-size: 14px; color: #173057; }

.am-opts { display: grid; gap: 8px; }
.am-opts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.am-opts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.am-opts label { position: relative; display: block; }
.am-opts input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.am-opts span {
  display: block; padding: 9px 6px; text-align: center;
  background: #f5f9ff; color: #345779;
  border: 1px solid #d9e6f5; border-radius: 10px;
  font-size: 12px; line-height: 1.3;
  transition: background .15s ease, border-color .15s ease;
}
.am-opts label:hover span { border-color: #9fc1e9; background: #fff; }
.am-opts input:checked + span { background: #2866bf; border-color: #2866bf; color: #fff; font-weight: 650; }
.am-opts input:focus-visible + span { outline: 3px solid #77c6f0; outline-offset: 2px; }

/* ---------- buttons ---------- */

.am-btn {
  text-decoration: none;
  display: inline-block; margin-top: 16px; padding: 12px 22px;
  background: #2866bf; color: #fff;
  border: 0; border-radius: 12px; font-size: 13px; font-weight: 700;
  transition: background .2s ease;
}
.am-btn:hover { background: #1d56a9; }
.am-btn-soft { background: #ecf3fc; color: #245a9d; margin-top: 8px; }
.am-btn-soft:hover { background: #dbeafa; }
.am-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.am-actions .am-btn { margin-top: 0; }

/* ---------- results ---------- */

.am-result {
  margin-top: 20px; padding: 18px;
  background: #f5f9ff; border-left: 5px solid #a6b2c3; border-radius: 12px;
}
.am-result strong { display: block; margin-bottom: 8px; font-size: 20px; color: #173057; }
.am-small { font-size: 12px !important; color: #7c8da4 !important; }
.am-ok { border-left-color: #24a879; }
.am-review { border-left-color: #edb43f; }
.am-alert { border-left-color: #e35252; }
.am-urgent { padding: 12px; background: #fdeeee; border-radius: 10px; color: #8a2b2b !important; }

/* ---------- overview ---------- */

.am-doc { display: flex; gap: 18px; align-items: center; }
.am-doc-face {
  flex: none; width: 64px; height: 64px; display: grid; place-items: center;
  background: #e8f1fc; border-radius: 50%; font-size: 32px;
}
.am-doc h3 { margin-bottom: 8px; }
.am-doc p { margin: 0; }

.am-group { margin: 26px 0 12px; font-size: 18px; color: #fff; }

.am-entry {
  margin-bottom: 12px; padding: 16px 18px;
  background: #fff; color: #173057;
  border-left: 6px solid #a6b2c3; border-radius: 14px;
}
.am-entry h4 { margin: 0 0 8px; font-size: 14px; }
.am-entry p { margin: 0 0 6px; font-size: 13px; line-height: 1.6; color: #4a6283; }
.am-entry p b { color: #173057; }

.am-urgent-box {
  margin-bottom: 18px; padding: 18px;
  background: #fdeeee; border: 2px solid #e35252; border-radius: 20px;
}
.am-urgent-box h3 { margin: 0 0 12px; color: #a32a2a; font-size: 18px; }

/* ---------- protocols ---------- */

.am-saved { margin: 0; padding: 0; list-style: none; }
.am-saved li {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid #e6ecf4; font-size: 13px; color: #4a6283;
}
.am-saved li:last-child { border-bottom: 0; }
.am-saved b { color: #173057; text-align: right; font-weight: 650; }
.am-saved .am-btn { margin: 0; padding: 8px 16px; }

.am-consult { border: 2px solid #82b4f4; }

.am-report {
  width: 100%; height: 520px; margin-top: 16px;
  border: 1px solid #d9e6f5; border-radius: 12px; background: #fff;
}

/* ---------- responsive ---------- */

@media (max-width: 850px) {
  .am-moods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .am-opts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-q-row { grid-template-columns: 1fr; gap: 8px; }
  .am-doc { flex-direction: column; align-items: flex-start; }
}

@media print {
  .nav, .footer { display: none !important; }
}

/* ---------- tablet fix: don't shift the checkup card over the sidebar ---------- */
@media (max-width: 1180px) {
  #checkupPage .detail-card { transform: none !important; }
}

/* ---------- progress charts ---------- */
.pg-controls { display: flex; gap: 14px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.pg-field { display: grid; gap: 6px; font-size: 12px; color: #4a6283; }
.pg-field span { font-weight: 650; }
.pg-field select, .pg-field input { min-width: 220px; padding: 10px 12px; border: 1px solid #d9e6f5; border-radius: 10px; background: #f5f9ff; color: #173057; font: inherit; font-size: 13px; }
.pg-seg { display: inline-flex; background: #ecf3fc; border-radius: 999px; padding: 4px; }
.pg-seg button { padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; color: #245a9d; font-size: 12px; font-weight: 650; }
.pg-seg button.on { background: #2866bf; color: #fff; }
.pg-title { margin: 14px 0 4px !important; }
.pg-title small { color: #7c8da4; font-weight: 500; font-size: 13px; }
.pg-svg { width: 100%; height: auto; display: block; }
.pg-tick { font-size: 11px; fill: #7c8da4; }
.pg-note { font-size: 11px; fill: #24a879; }
.pg-empty { font-size: 14px; fill: #7c8da4; }
.pg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.pg-stats div { padding: 12px 14px; background: #f5f9ff; border-radius: 12px; }
.pg-stats small { display: block; font-size: 11px; color: #7c8da4; }
.pg-stats b { font-size: 20px; color: #173057; }
.pg-up { color: #b9791a !important; }
.pg-down { color: #245a9d !important; }
.pg-flat { color: #7c8da4 !important; }
.pg-add { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.pg-add .am-btn { margin-top: 0; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pg-card { position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 20px; text-align: left; background: #f5f9ff; border: 1px solid #d9e6f5; border-radius: 12px; color: #173057; }
.pg-card:hover { background: #fff; border-color: #9fc1e9; }
.pg-card i { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 12px 0 0 12px; }
.pg-card span { font-size: 12px; color: #4a6283; }
.pg-card b { font-size: 18px; }
.pg-card small { font-size: 11px; color: #7c8da4; font-weight: 500; }
.pg-card em { font-style: normal; font-size: 12px; font-weight: 700; }
@media (max-width: 850px) { .pg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pg-field select, .pg-field input { min-width: 0; width: 100%; } }

/* ---------- environment ---------- */
.env-places { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.env-place { display: grid; gap: 2px; justify-items: center; padding: 14px 8px; background: #f5f9ff; color: #245a9d; border: 2px solid transparent; border-radius: 14px; text-align: center; transition: border-color .2s ease, background .2s ease; }
.env-place span { font-size: 30px; line-height: 1.1; }
.env-place b { font-size: 14px; color: #173057; }
.env-place small { font-size: 11px; color: #7c8da4; }
.env-place:hover { border-color: #9fc1e9; background: #fff; }
.env-place.on { border-color: #2866bf; background: #eaf2fb; }
.env-custom { margin-top: 14px; }
.env-custom input { width: 100%; max-width: 360px; }
.env-facts { margin-top: 16px; padding: 14px 18px; background: #f5f9ff; border-left: 5px solid #2866bf; border-radius: 12px; }
.env-facts h4 { margin: 0 0 8px; font-size: 14px; color: #173057; }
.env-facts ul { margin: 0; padding-left: 18px; color: #4a6283; font-size: 13px; line-height: 1.6; }
.env-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.env-field { display: grid; gap: 6px; align-content: start; }
.env-lab { font-size: 12px; font-weight: 650; color: #173057; }
.env-lab small { font-weight: 500; color: #7c8da4; }
.env-field input { padding: 10px 12px; border: 1px solid #d9e6f5; border-radius: 10px; background: #f5f9ff; color: #173057; font: inherit; font-size: 14px; }
.env-field em { font-style: normal; font-size: 11px; line-height: 1.45; color: #7c8da4; }
.env-row { display: flex; gap: 12px; padding: 12px 14px; margin-top: 10px; background: #f5f9ff; border-left: 6px solid #a6b2c3; border-radius: 12px; }
.env-row.ok { border-left-color: #24a879; }
.env-row.review { border-left-color: #edb43f; background: #fffaf0; }
.env-row.alert { border-left-color: #e35252; background: #fdf0f0; }
.env-row i, .env-pop-item i { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-weight: 800; font-size: 13px; color: #fff; background: #a6b2c3; }
.env-row.ok i { background: #24a879; }
.env-row.review i, .env-pop-item.review i { background: #edb43f; }
.env-row.alert i, .env-pop-item.alert i { background: #e35252; }
.env-row p { margin: 4px 0 4px !important; }
.env-row small { color: #7c8da4; font-size: 11px; }
.env-pop { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 16px; background: rgba(5, 12, 30, 0.7); }
.env-pop-card { width: min(560px, 100%); max-height: 86vh; overflow: auto; padding: 22px; background: #fff; color: #173057; border-radius: 20px; border-top: 8px solid #edb43f; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.env-pop-card.alert { border-top-color: #e35252; }
.env-pop-card h3 { margin: 0 0 12px; font-size: 20px; }
.env-pop-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e6ecf4; }
.env-pop-item p { margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: #4a6283; }
@media (max-width: 850px) { .env-places { grid-template-columns: repeat(2, minmax(0, 1fr)); } .env-fields { grid-template-columns: 1fr; } }

/* ---------- environment pictures (transparent PNGs floating in space) ---------- */
.env-place span { display: grid; place-items: center; height: 58px; }
.env-place img { max-width: 70px; max-height: 56px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(10, 30, 70, 0.35)); }
.env-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 16px; margin-top: 16px; align-items: stretch; }
.env-info .env-facts { margin-top: 0; }
.env-space {
  position: relative; display: grid; place-items: center; min-height: 240px; overflow: hidden; border-radius: 16px;
  background:
    radial-gradient(1.2px 1.2px at 12% 22%, #fff, transparent 60%),
    radial-gradient(1px 1px at 28% 78%, #cfe0ff, transparent 60%),
    radial-gradient(1.4px 1.4px at 44% 12%, #fff, transparent 60%),
    radial-gradient(1px 1px at 63% 64%, #fff, transparent 60%),
    radial-gradient(1.2px 1.2px at 78% 28%, #cfe0ff, transparent 60%),
    radial-gradient(1px 1px at 88% 82%, #fff, transparent 60%),
    radial-gradient(1px 1px at 8% 60%, #fff, transparent 60%),
    radial-gradient(1.2px 1.2px at 92% 8%, #fff, transparent 60%),
    radial-gradient(1px 1px at 52% 90%, #cfe0ff, transparent 60%),
    radial-gradient(circle at 30% 20%, #10275a 0%, #060f2b 70%);
}
.env-space img { width: 78%; max-height: 210px; object-fit: contain; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55)); animation: envFloat 7s ease-in-out infinite; }
.env-space-emoji { font-size: 84px; }
@keyframes envFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-8px) rotate(1.2deg); } }
@media (prefers-reduced-motion: reduce) { .env-space img { animation: none; } }
@media (max-width: 850px) { .env-info { grid-template-columns: 1fr; } }

/* ---------- profile + nutrition ---------- */
.pf-card { max-width: 560px; }
.pf-sub, .pf-note, .nu-note { font-size: 13px; color: #4b6a90; margin: 0 0 12px; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-wide { grid-column: 1 / -1; }
.pf-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #245a9d; font-weight: 600; }
.pf-f input, .pf-f select { padding: 9px 10px; border: 1px solid #c5d6ec; border-radius: 8px; font: inherit; font-size: 14px; color: #12305a; background: #fff; }
.pf-actions { display: flex; gap: 10px; align-items: center; }
.pf-actions .am-btn-soft { margin-top: 0; }
@media (max-width: 520px) { .pf-grid { grid-template-columns: 1fr; } }
.astronaut-mission-info:hover { filter: brightness(1.15); }

.nu-daybar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nu-daybar .am-btn-soft { margin-top: 0; }
.nu-day { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.nu-day b { font-size: 16px; color: #12305a; }
.nu-day span { font-size: 13px; color: #4b6a90; }
.nu-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.nu-kpis > div { background: #f4f8fe; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.nu-kpis small { color: #4b6a90; font-size: 12px; }
.nu-kpis b { font-size: 20px; color: #12305a; }
.nu-kpis span { font-size: 12px; color: #4b6a90; }
.nu-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.nu-bars { display: grid; gap: 14px; }
.nu-top { display: flex; justify-content: space-between; color: #12305a; font-size: 14px; }
.nu-top small { color: #4b6a90; }
.nu-track { position: relative; height: 10px; background: #e6eef9; border-radius: 6px; margin: 6px 0 4px; overflow: hidden; }
.nu-fill { position: absolute; inset: 0 auto 0 0; background: #2f7be0; border-radius: 6px; opacity: .92; }
.nu-row.ok .nu-fill { background: #1f9d6b; }
.nu-row.review .nu-fill { background: #e0a526; }
.nu-band { position: absolute; top: 0; bottom: 0; background: rgba(18,48,90,.16); border-left: 2px solid #12305a; border-right: 2px solid #12305a; z-index: 2; }
.nu-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #12305a; z-index: 2; }
.nu-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #4b6a90; flex-wrap: wrap; }
.nu-sub em { font-style: normal; font-weight: 600; }
.nu-row.review .nu-sub em { color: #9a6a00; }
.nu-row.ok .nu-sub em { color: #187a53; }
.nu-gaps.has { border-left: 4px solid #e0a526; }
.nu-gaps.none { border-left: 4px solid #1f9d6b; }
.nu-gaps ul, .nu-src ul { margin: 0; padding-left: 20px; color: #28466f; font-size: 14px; display: grid; gap: 6px; }
.nu-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.nu-name { grid-column: span 2; }
.nu-wide { grid-column: 1 / -1; }
.nu-form .am-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.nu-form .am-btn-soft { margin-top: 0; }
.nu-list { display: grid; gap: 8px; }
.nu-item { display: flex; align-items: center; gap: 10px; background: #f4f8fe; border-radius: 10px; padding: 10px 12px; color: #12305a; font-size: 14px; flex-wrap: wrap; }
.nu-item > div { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.nu-item small { color: #4b6a90; }
.nu-item > span { font-size: 13px; color: #28466f; }
.nu-del { border: 0; background: #e1ebf8; color: #245a9d; width: 28px; height: 28px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.nu-del:hover { background: #f6d6d6; color: #a42424; }
.nu-tw { overflow-x: auto; }
.nu-table { width: 100%; border-collapse: collapse; font-size: 14px; color: #12305a; }
.nu-table th, .nu-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #e3ecf8; }
.nu-table tbody tr { cursor: pointer; }
.nu-table tbody tr:hover, .nu-table tbody tr.on { background: #eaf2fc; }
.nu-src ul { font-size: 13px; color: #4b6a90; }
.nu-form { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.nu-form .pg-field { min-width: 0; }
.nu-form .pg-field input, .nu-form .pg-field select { width: 100%; min-width: 0; box-sizing: border-box; }
.nu-item > div > span { display: block; }

/* ---------- missions ---------- */
.mi-note { font-size: 13px; color: #4a6283; margin: 0 0 12px; }
.mi-small { font-size: 13px; color: #4a6283; font-weight: 600; letter-spacing: 0; margin-left: 8px; }
.mi-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.mi-who { display: flex; align-items: center; gap: 12px; }
.mi-av { font-size: 34px; }
.mi-who b { display: block; font-size: 18px; color: #12305a; }
.mi-who small, .mi-lv small, .mi-hk small, .mi-kpis small { color: #4a6283; font-size: 12px; }
.mi-lv { display: grid; gap: 6px; min-width: 200px; }
.mi-prog { height: 10px; border-radius: 6px; background: #e1eaf6; overflow: hidden; margin: 2px 0 14px; }
.mi-lv .mi-prog { margin: 0; }
.mi-prog i { display: block; height: 100%; background: linear-gradient(90deg, #2f7be0, #1f9d6b); border-radius: 6px; transition: width .4s; }
.mi-hk { display: flex; gap: 18px; }
.mi-hk > div, .mi-kpis > div { display: flex; flex-direction: column; }
.mi-hk b, .mi-kpis b { font-size: 20px; color: #12305a; }
.mi-hk b.up { color: #187a53; } .mi-hk b.down { color: #a85a00; }
@media (max-width: 900px) { .mi-hero { grid-template-columns: 1fr; } }
.mi-tabs { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.mi-tab { border: 1px solid rgba(255,255,255,.25); background: transparent; color: #dce9fb; padding: 9px 16px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer; }
.mi-tab.on { background: #fff; color: #12305a; font-weight: 700; }
.mi-tasks { display: grid; gap: 8px; }
.mi-task { display: flex; align-items: center; gap: 12px; background: #f4f8fe; border-radius: 12px; padding: 11px 14px; cursor: pointer; }
.mi-task input { position: absolute; opacity: 0; pointer-events: none; }
.mi-task:has(input:disabled) { cursor: default; }
.mi-task:has(input:focus-visible) { outline: 2px solid #2f7be0; }
.mi-chk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #9db6d6; display: grid; place-items: center; color: #fff; font-size: 14px; flex: none; }
.mi-task.done { background: #e6f6ee; }
.mi-task.done .mi-chk { background: #1f9d6b; border-color: #1f9d6b; }
.mi-tx { flex: 1; display: flex; flex-direction: column; color: #12305a; font-size: 14px; }
.mi-tx small { color: #4a6283; font-size: 12px; }
.mi-pts { font-size: 12px; color: #245a9d; font-weight: 700; white-space: nowrap; }
.mi-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-bottom: 8px; }
.mi-bcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.mi-bcol i { width: 100%; background: #b7cbe6; border-radius: 4px 4px 0 0; }
.mi-bcol i.ok { background: #1f9d6b; }
.mi-bcol small { font-size: 10px; color: #4a6283; }
.mi-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.mi-badge { width: 92px; text-align: center; padding: 10px 6px; border-radius: 12px; background: #eef3fa; filter: grayscale(1); opacity: .5; }
.mi-badge.on { background: #fff4d6; filter: none; opacity: 1; }
.mi-badge span { font-size: 26px; display: block; }
.mi-badge small { font-size: 11px; color: #12305a; }
.mi-eqtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mi-eqtab { border: 1px solid #d0def1; background: #f4f8fe; color: #245a9d; padding: 8px 12px; border-radius: 10px; font: inherit; font-size: 13px; cursor: pointer; }
.mi-eqtab.on { background: #2f7be0; color: #fff; border-color: #2f7be0; }
.mi-eq { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .mi-eq { grid-template-columns: 1fr; } }
.mi-scene { background: radial-gradient(circle at 50% 30%, #1d3b6e, #0a1630); border-radius: 16px; padding: 12px; }
.mi-scene svg { width: 100%; height: auto; display: block; }
.mi-steps ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; color: #4a6283; font-size: 14px; }
.mi-steps li { padding: 6px 10px; border-radius: 8px; transition: background .3s, color .3s; }
.mi-steps li.on { background: #e3efff; color: #12305a; font-weight: 600; }
.mi-steps li.past { color: #187a53; }
.beat, .blink { animation: miBeat 1s infinite; }
.ecg { stroke-dasharray: 220; animation: miEcg 2s linear infinite; }
.cuff { transform-origin: 131px 113px; animation: miCuff 3s ease-in-out infinite; }
.drop { animation: miDrop 2s ease-in infinite; }
.merc { animation: miMerc 3s ease-out infinite alternate; }
.spin { animation: miSpin 4s linear infinite; }
.num { animation: miBeat 2s infinite; }
@keyframes miBeat { 50% { opacity: .25; } }
@keyframes miEcg { from { stroke-dashoffset: 220; } to { stroke-dashoffset: -220; } }
@keyframes miCuff { 50% { transform: scale(1.12); } }
@keyframes miDrop { 0% { transform: translateY(-30px); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
@keyframes miMerc { to { width: 130px; } }
@keyframes miSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .beat, .blink, .ecg, .cuff, .drop, .merc, .spin, .num { animation: none; } }
.mi-kpis { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 14px; }
.mi-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.mi-form .pg-field input, .mi-form .pg-field select { min-width: 0; width: 100%; box-sizing: border-box; }
.mi-form .am-btn-soft { margin-top: 0; }
.mi-switch { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #12305a; }
.mi-toast { position: fixed; right: 20px; bottom: 20px; z-index: 9999; max-width: 340px; background: #fff; color: #12305a; border-left: 5px solid #e0a526; border-radius: 12px; padding: 14px 40px 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); display: grid; gap: 4px; font-size: 14px; }
.mi-toast button { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 20px; color: #4a6283; cursor: pointer; }
.mi-form + .am-panel .pg-svg, #missionsPage .pg-svg { max-height: 240px; }

/* ---------- radiation ---------- */
.rd-gauge { position: relative; height: 18px; border-radius: 9px; background: linear-gradient(90deg, #d7efe3 0 50%, #fbeccb 50% 80%, #f7d3d3 80% 100%); overflow: hidden; }
.rd-fill { position: absolute; inset: 0 auto 0 0; background: #1f9d6b; opacity: .85; border-radius: 9px; transition: width .4s; }
.rd-gauge.review .rd-fill { background: #e0a526; }
.rd-gauge.alert .rd-fill { background: #d64545; }
.rd-gauge i { position: absolute; top: 0; bottom: 0; width: 2px; background: #12305a; opacity: .5; }
.rd-scale { display: flex; justify-content: space-between; font-size: 11px; color: #4a6283; margin-top: 4px; }
.rd-st { padding: 10px 12px; border-radius: 10px; background: #eef3fa; color: #12305a !important; }
.rd-st.ok { background: #e6f6ee; } .rd-st.review { background: #fff4d6; } .rd-st.alert { background: #fbe0e0; }
.rd-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.rd-tools .pg-field input { min-width: 0; width: 100%; box-sizing: border-box; }
.rd-steps { margin: 0 0 10px; padding-left: 22px; color: #28466f; font-size: 14px; display: grid; gap: 6px; }
.rd-spe { border-left: 4px solid #e0a526; }
