/* DrMate — Health Center */
.hc-page { padding: 6px 0 96px; max-width: 1180px; margin: 0 auto; }

@media (min-width: 900px) {
  body:has(.hc-page) #app {
    width: min(1180px, calc(100vw - 32px));
    max-width: min(1180px, calc(100vw - 32px));
  }
  body:has(.hc-page) .bottom-nav,
  body:has(.hc-page) .topbar {
    width: min(1180px, calc(100vw - 32px));
    max-width: min(1180px, calc(100vw - 32px));
  }
  .hc-sol-card { padding: 14px 13px 11px; gap: 6px; border-radius: 16px; }
  .hc-sol-ic { width: 30px; height: 30px; border-radius: 10px; }
  .hc-sol-tag { font-size: 8.5px; }
  .hc-sol-title { font-size: 13px; }
  .hc-sol-prob { font-size: 10.5px; }
  .hc-sol-action { font-size: 10.5px; }
  .hc-sol-foot i { font-size: 8.5px; }
  .hc-sol-foot strong { font-size: 9.5px; }
}

.hc-hero {
  border-radius: 22px; padding: 18px 16px 14px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(16,185,129,.18), transparent 55%),
    radial-gradient(120% 120% at 0% 100%, rgba(99,102,241,.18), transparent 55%),
    var(--bg-card, #121826);
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}
.hc-hero-top { display: flex; align-items: center; gap: 12px; }
.hc-hero-ic {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 8px 20px rgba(16,185,129,.35); flex: 0 0 auto;
}
.hc-hero h1 { font-size: 20px; font-weight: 900; margin: 0; color: var(--text-primary, #f8fafc); }
.hc-hero p { font-size: 11.5px; color: var(--text-muted, #94a3b8); margin: 3px 0 0; line-height: 1.7; }

.hc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 14px; }
.hc-stat {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px; padding: 9px 8px; text-align: center;
}
.hc-stat b { display: block; font-size: 18px; font-weight: 900; color: var(--text-primary, #f8fafc); }
.hc-stat span { font-size: 9.5px; color: var(--text-muted, #94a3b8); }

.hc-privacy { font-size: 10px; color: var(--text-muted, #94a3b8); margin: 10px 2px 0; opacity: .9; }

.hc-chips { display: flex; gap: 7px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: none; }
.hc-chips::-webkit-scrollbar { display: none; }
.hc-chip {
  flex: 0 0 auto; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04);
  color: var(--text-muted, #94a3b8); font-size: 11px; font-weight: 800; padding: 7px 13px;
  border-radius: 999px; cursor: pointer; font-family: inherit;
}
.hc-chip.on { background: rgba(16,185,129,.16); color: #34d399; border-color: rgba(16,185,129,.45); }

.hc-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 6px; }
.hc-card {
  display: flex; gap: 10px; align-items: flex-start; text-decoration: none;
  background: var(--bg-card, #121826); border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px; padding: 12px 11px; min-height: 92px; position: relative;
  transition: transform .16s ease, border-color .16s ease;
}
.hc-card:active { transform: scale(.985); border-color: rgba(16,185,129,.45); }
.hc-ic {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto;
}
.hc-ic.lg { width: 46px; height: 46px; border-radius: 15px; }
.hc-card-body { display: flex; flex-direction: column; min-width: 0; }
.hc-card-body b { font-size: 12.5px; font-weight: 900; color: var(--text-primary, #f8fafc); line-height: 1.5; }
.hc-card-body small { font-size: 10px; color: var(--text-muted, #94a3b8); line-height: 1.6; margin-top: 2px; }
.hc-card-body em { font-style: normal; font-size: 9px; color: #34d399; margin-top: 5px; min-height: 11px; }
.hc-go { position: absolute; inset-inline-end: 9px; bottom: 8px; font-size: 16px; color: var(--text-muted, #64748b); }

.hc-disclaimer {
  margin-top: 16px; padding: 11px 13px; border-radius: 14px; font-size: 10px; line-height: 1.9;
  color: #fbbf24; background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25);
}

.hc-mhead { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.hc-back {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  color: var(--text-primary, #f8fafc); text-decoration: none; font-size: 22px; line-height: 1; flex: 0 0 auto;
}
.hc-mhead h1 { font-size: 17px; font-weight: 900; margin: 0; color: var(--text-primary, #f8fafc); }
.hc-mhead p { font-size: 10.5px; color: var(--text-muted, #94a3b8); margin: 2px 0 0; }

.hc-mini { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hc-mini span {
  font-size: 10px; color: var(--text-muted, #94a3b8); background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07); padding: 5px 10px; border-radius: 999px;
}
.hc-mini b { color: var(--text-primary, #f8fafc); font-weight: 900; }

.hc-two { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.hc-box {
  background: var(--bg-card, #121826); border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px; padding: 13px;
}
.hc-box h2 { font-size: 12px; font-weight: 900; margin: 0 0 10px; color: var(--text-primary, #f8fafc); }

.hc-field { margin-bottom: 9px; }
.hc-lbl { display: block; font-size: 10px; font-weight: 700; color: var(--text-muted, #94a3b8); margin-bottom: 4px; }
.hc-lbl i { font-style: normal; opacity: .7; font-size: 9px; }
.hc-inp {
  width: 100%; box-sizing: border-box; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1); border-radius: 11px; color: var(--text-primary, #f8fafc);
  font-size: 12px; padding: 9px 10px; font-family: inherit; outline: none;
}
.hc-inp:focus { border-color: rgba(16,185,129,.55); background: rgba(16,185,129,.06); }
select.hc-inp { appearance: none; }
.hc-btn {
  width: 100%; border: 0; border-radius: 12px; padding: 10px; font-size: 12px; font-weight: 900;
  font-family: inherit; color: #04120d; cursor: pointer;
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 8px 18px rgba(16,185,129,.22);
}
.hc-btn:disabled { opacity: .6; }
.hc-btn.ghost { background: rgba(255,255,255,.05); color: var(--text-primary, #f8fafc); border: 1px solid rgba(255,255,255,.1); box-shadow: none; margin-top: 8px; }

.hc-chart { min-height: 88px; display: flex; align-items: flex-end; }
.hc-bars { display: flex; align-items: flex-end; gap: 5px; width: 100%; height: 100px; }
.hc-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.hc-bar i { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; display: block; opacity: .9; }
.hc-bar span { font-size: 8px; color: var(--text-muted, #94a3b8); white-space: nowrap; }
.hc-empty { font-size: 10.5px; color: var(--text-muted, #94a3b8); margin: 8px 0; line-height: 1.8; }

.hc-list { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow-y: auto; }
.hc-row {
  display: flex; gap: 8px; justify-content: space-between; align-items: flex-start;
  padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}
.hc-row-main { display: flex; flex-direction: column; min-width: 0; }
.hc-row-main b { font-size: 11px; font-weight: 800; color: var(--text-primary, #f8fafc); }
.hc-row-main span { font-size: 10px; color: var(--text-muted, #94a3b8); margin-top: 2px; }
.hc-row-main em { font-style: normal; font-size: 9.5px; color: var(--text-muted, #64748b); margin-top: 3px; }
.hc-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.hc-row-side time { font-size: 8.5px; color: var(--text-muted, #64748b); white-space: nowrap; }
.hc-del {
  width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(239,68,68,.3);
  background: rgba(239,68,68,.08); color: #f87171; font-size: 13px; line-height: 1; cursor: pointer;
}

.hc-settings { margin-top: 10px; }
.hc-check { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted, #94a3b8); margin: 6px 0; }
.hc-check input { accent-color: #10b981; width: 15px; height: 15px; }
.hc-note {
  margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 10px; line-height: 1.85;
  color: #93c5fd; background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.22);
}

@media (max-width: 720px) {
  .hc-two { grid-template-columns: 1fr; }
  .hc-page { padding: 4px 0 90px; }
}
@media (max-width: 380px) {
  .hc-grid { grid-template-columns: 1fr; }
}

.hc-export {
  margin-top: 10px; width: 100%; border-radius: 12px; padding: 9px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  color: var(--text-muted, #94a3b8); font-family: inherit; font-size: 10.5px; font-weight: 800; cursor: pointer;
}
.hc-export:hover { border-color: rgba(16,185,129,.45); color: #34d399; }

.hc-today {
  margin: 0 0 12px; padding: 12px; border-radius: 16px;
  background: rgba(16,185,129,.06); border: 1px solid rgba(16,185,129,.16);
}
.hc-today-h { font-size: 11px; font-weight: 900; color: #34d399; margin-bottom: 8px; }
.hc-today-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.hc-today-list::-webkit-scrollbar { display: none; }
.hc-today-item {
  flex: 0 0 auto; display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; border-radius: 11px; text-decoration: none;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  color: var(--text, #e2e8f0); font-size: 11px; font-weight: 700;
}
.hc-today-item b { font-size: 10px; color: #f59e0b; }
.hc-today-item.done { border-color: rgba(16,185,129,.35); }
.hc-today-item.done b { color: #34d399; }
.hc-today-ic { width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }

.hc-delta b { color: #34d399; }
.hc-delta.down b { color: #f87171; }

/* --- v4 additions --- */
.hc-hubbar {
  display: flex; align-items: center; gap: 9px; margin: 2px 0 10px;
  font-size: 11px; font-weight: 800; color: var(--text-muted, #94a3b8);
}
.hc-hubbar > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-hubbar .hc-back { width: 32px; height: 32px; font-size: 20px; }
.hc-print-link {
  flex: 0 0 auto; text-decoration: none; font-size: 10px; font-weight: 800;
  color: #34d399; background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3);
  padding: 6px 10px; border-radius: 999px;
}

.hc-about {
  background: var(--bg-card, #121826); border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px; padding: 12px 13px; margin-bottom: 10px;
}
.hc-about details summary {
  cursor: pointer; font-size: 11.5px; font-weight: 900; color: var(--text-primary, #f8fafc);
  list-style: none; margin-bottom: 6px;
}
.hc-about details summary::-webkit-details-marker { display: none; }
.hc-about details summary::before { content: "▸ "; color: #34d399; }
.hc-about details[open] summary::before { content: "▾ "; }
.hc-about p { font-size: 10.5px; line-height: 1.9; color: var(--text-muted, #94a3b8); margin: 4px 0 6px; }
.hc-about ul { margin: 0; padding-inline-start: 16px; }
.hc-about li { font-size: 10.5px; line-height: 1.9; color: var(--text-muted, #94a3b8); }
.hc-red {
  margin-top: 10px; padding: 9px 11px; border-radius: 12px;
  background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.24);
}
.hc-red b { display: block; font-size: 10.5px; color: #f87171; margin-bottom: 3px; }
.hc-red p { color: #fca5a5; font-size: 10px; margin: 0; }

.hc-module .hc-two { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); align-items: start; }
.hc-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 8px; }
.hc-field.wide { grid-column: 1 / -1; }
.hc-field .hc-inp { margin-top: 0; }
.hc-range { display: flex; align-items: center; gap: 8px; }
.hc-range input[type="range"] { flex: 1; min-width: 0; padding: 0; accent-color: #10b981; background: transparent; border: 0; height: 30px; }
.hc-range output {
  min-width: 30px; text-align: center; font-size: 11px; font-weight: 900;
  color: #34d399; background: rgba(16,185,129,.1); border-radius: 8px; padding: 3px 6px;
}
.hc-form-actions { display: flex; gap: 8px; margin-top: 4px; }
.hc-form-actions .hc-btn { flex: 1; margin-top: 0; }
.hc-form-actions .hc-btn.ghost { flex: 0 0 auto; padding-inline: 12px; }

.hc-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hc-insights { display: flex; flex-direction: column; gap: 6px; }
.hc-ins {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 8px; align-items: baseline;
  padding: 7px 9px; border-radius: 10px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}
.hc-ins.k { font-size: 10px; color: var(--text-muted, #94a3b8); }
.hc-ins b { font-size: 11px; font-weight: 900; color: var(--text-primary, #f8fafc); text-align: end; }
.hc-ins small { grid-column: 1 / -1; font-size: 9px; line-height: 1.6; color: var(--text-muted, #64748b); }
.hc-ins.alert { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.06); }
.hc-ins.alert b { color: #f87171; }

.hc-chart { display: block; min-height: 0; position: relative; }
.hc-svg { width: 100%; height: 150px; display: block; overflow: visible; }
.hc-chart-x { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--text-muted, #64748b); margin-top: 4px; }
.hc-chart-y {
  position: absolute; inset-inline-end: 0; top: 0; bottom: 18px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  font-size: 8px; color: var(--text-muted, #64748b); pointer-events: none; opacity: .8;
}
.hc-chart-note { font-size: 9px; color: var(--text-muted, #64748b); margin-top: 5px; min-height: 12px; }

.hc-count { font-style: normal; font-size: 9px; font-weight: 800; color: #34d399; margin-top: 4px; }
.hc-edit {
  width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04); color: var(--text-muted, #94a3b8);
  font-size: 11px; line-height: 1; cursor: pointer;
}

.hc-passport { margin-top: 10px; }
.hc-pass-row {
  display: flex; justify-content: space-between; gap: 8px; padding: 6px 0;
  border-bottom: 1px dashed rgba(255,255,255,.07); font-size: 10.5px;
}
.hc-pass-row:last-child { border-bottom: 0; }
.hc-pass-row span { color: var(--text-muted, #94a3b8); }
.hc-pass-row b { color: var(--text-primary, #f8fafc); font-weight: 800; text-align: end; }

#hc-print { display: none; }
@media print {
  body { background: #fff !important; }
  body > *:not(#hc-print) { display: none !important; }
  #hc-print {
    display: block !important; color: #111; background: #fff;
    font-family: Tahoma, Arial, sans-serif; padding: 18px; direction: rtl;
  }
  #hc-print h1 { font-size: 18px; margin: 0 0 4px; }
  #hc-print .hc-print-head { border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 12px; }
  #hc-print .hc-print-head p { margin: 2px 0; font-size: 10px; color: #444; }
  #hc-print .hc-print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-bottom: 14px; }
  #hc-print .hc-print-grid div { font-size: 10.5px; border-bottom: 1px dotted #bbb; padding: 4px 0; }
  #hc-print table { width: 100%; border-collapse: collapse; margin-top: 8px; }
  #hc-print th, #hc-print td { border: 1px solid #ccc; padding: 4px 6px; font-size: 9.5px; text-align: start; }
  #hc-print th { background: #f2f2f2; }
  #hc-print .hc-print-dis { margin-top: 14px; font-size: 9px; color: #555; border-top: 1px solid #ccc; padding-top: 6px; }
}

@media (max-width: 720px) {
  .hc-module .hc-two { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .hc-fields { grid-template-columns: 1fr; }
}


/* --- v5: live data, charts, heatmap --- */
.hc-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.hc-hero-actions .hc-export { margin-top: 0; }
.hc-box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.hc-box-head h2 { margin: 0; }
.hc-box-sub { font-size: 9px; color: var(--text-muted, #64748b); }
.hc-mini-btn {
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  color: var(--text-muted, #94a3b8); font-family: inherit; font-size: 9.5px; font-weight: 800;
  border-radius: 8px; padding: 5px 8px; cursor: pointer; flex: 0 0 auto;
}
.hc-mini-btn:hover { color: #34d399; border-color: rgba(16,185,129,.4); }

.hc-activity { margin: 12px 0; }
.hc-heat { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; grid-auto-columns: 11px; gap: 3px; overflow-x: auto; padding-bottom: 3px; }
.hc-heat-cell { width: 100%; min-width: 8px; aspect-ratio: 1; border-radius: 3px; background: rgba(255,255,255,.05); display: block; }
.hc-heat-cell.l0 { background: rgba(255,255,255,.05); }
.hc-heat-cell.l1 { background: rgba(16,185,129,.28); }
.hc-heat-cell.l2 { background: rgba(16,185,129,.5); }
.hc-heat-cell.l3 { background: rgba(16,185,129,.75); }
.hc-heat-cell.l4 { background: #10b981; }
.hc-heat-cell.future { background: transparent; }
.hc-heat-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 6px; font-size: 8px; color: var(--text-muted, #64748b); }
.hc-heat-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hc-heat-legend .l0 { background: rgba(255,255,255,.05); }
.hc-heat-legend .l1 { background: rgba(16,185,129,.28); }
.hc-heat-legend .l2 { background: rgba(16,185,129,.5); }
.hc-heat-legend .l3 { background: rgba(16,185,129,.75); }
.hc-heat-legend .l4 { background: #10b981; }

.hc-search { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 11px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: var(--text-muted, #64748b); }
.hc-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text-primary, #f8fafc); font-family: inherit; font-size: 12px; }
.hc-search input::placeholder { color: var(--text-muted, #64748b); }

.hc-when { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,.08); }
.hc-form-actions { margin-top: 8px; }

.hc-chart-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hc-schips { display: flex; gap: 5px; flex-wrap: wrap; }
.hc-schip {
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); color: var(--text-muted, #94a3b8);
  font-family: inherit; font-size: 9px; font-weight: 800; border-radius: 999px; padding: 4px 8px; cursor: pointer;
}
.hc-schip::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c, #34d399); margin-inline-end: 4px; opacity: .5; }
.hc-schip.on { color: var(--text-primary, #f8fafc); border-color: var(--c, #34d399); background: color-mix(in srgb, var(--c, #34d399) 14%, transparent); }
.hc-schip.on::before { opacity: 1; }
.hc-rangechips { display: flex; gap: 3px; }
.hc-rchip {
  border: 1px solid rgba(255,255,255,.08); background: transparent; color: var(--text-muted, #64748b);
  font-family: inherit; font-size: 8.5px; border-radius: 7px; padding: 3px 6px; cursor: pointer;
}
.hc-rchip.on { color: #34d399; border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.1); }
.hc-marker { max-width: 140px; padding: 5px 7px; font-size: 10px; }

.hc-cstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 5px; margin-top: 8px; }
.hc-cstat { border-top: 2px solid var(--c, #34d399); background: rgba(255,255,255,.03); border-radius: 8px; padding: 6px 7px; }
.hc-cstat span { display: block; font-size: 8.5px; color: var(--text-muted, #94a3b8); }
.hc-cstat b { display: block; font-size: 12px; color: var(--text-primary, #f8fafc); margin: 1px 0; }
.hc-cstat small { display: block; font-size: 7.5px; color: var(--text-muted, #64748b); }

.hc-adh { display: flex; align-items: flex-end; gap: 2px; height: 100px; }
.hc-adh i { flex: 1; display: flex; flex-direction: column-reverse; border-radius: 2px; overflow: hidden; background: rgba(255,255,255,.04); min-width: 2px; }
.hc-adh u { display: block; background: #10b981; width: 100%; }
.hc-adh s { display: block; background: rgba(239,68,68,.55); width: 100%; }
.hc-adh-sum { font-size: 10px; color: var(--text-muted, #94a3b8); margin-top: 7px; }
.hc-adh-sum b { font-size: 18px; color: #34d399; }
.hc-adh-sum span { display: block; font-size: 9px; margin-top: 2px; }

.hc-monthly { display: flex; align-items: flex-end; gap: 5px; height: 120px; overflow-x: auto; }
.hc-month { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.hc-month i { width: 100%; max-width: 28px; background: linear-gradient(180deg, #94a3b8, #475569); border-radius: 4px 4px 2px 2px; }
.hc-month b { font-size: 8px; color: var(--text-muted, #94a3b8); white-space: nowrap; }
.hc-month small { font-size: 7.5px; color: var(--text-muted, #64748b); white-space: nowrap; }

.hc-ring { width: 110px; height: 110px; margin: 6px auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#10b981 calc(var(--p, 0) * 1%), rgba(255,255,255,.07) 0); position: relative; }
.hc-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg-card, #121826); }
.hc-ring > span { position: relative; text-align: center; }
.hc-ring b { display: block; font-size: 20px; color: #34d399; }
.hc-ring small { font-size: 8px; color: var(--text-muted, #94a3b8); }

.hc-pipe { display: flex; flex-direction: column; gap: 6px; }
.hc-pipe-row { display: grid; grid-template-columns: 90px 1fr 22px; align-items: center; gap: 6px; font-size: 9.5px; color: var(--text-muted, #94a3b8); }
.hc-pipe-row i { height: 7px; background: rgba(255,255,255,.05); border-radius: 999px; overflow: hidden; }
.hc-pipe-row u { display: block; height: 100%; background: linear-gradient(90deg, #0891b2, #34d399); border-radius: 999px; }
.hc-pipe-row b { color: var(--text-primary, #f8fafc); text-align: end; }
.hc-tl-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.07); font-size: 10.5px; }
.hc-tl-row span { color: var(--text-muted, #94a3b8); }
.hc-tl-row b { color: var(--text-primary, #f8fafc); text-align: end; }

.hc-live { border-color: rgba(6,182,212,.25); background: linear-gradient(180deg, rgba(6,182,212,.05), transparent 60%), var(--bg-card, #121826); }
.hc-live-badge { font-size: 8px; font-weight: 900; color: #22d3ee; background: rgba(6,182,212,.12); border: 1px solid rgba(6,182,212,.3); border-radius: 999px; padding: 3px 7px; }
.hc-live-search { display: flex; gap: 6px; }
.hc-live-search .hc-inp { flex: 1; min-width: 0; }
.hc-live-btn { width: auto; flex: 0 0 auto; padding: 8px 12px; font-size: 10px; }
.hc-live-hint { font-size: 9px; color: var(--text-muted, #64748b); margin-top: 6px; min-height: 12px; line-height: 1.7; }
.hc-live-list { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; max-height: 250px; overflow-y: auto; }
.hc-live-item { text-align: start; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.03); border-radius: 10px; padding: 7px 9px; cursor: pointer; font-family: inherit; color: var(--text-primary, #f8fafc); }
.hc-live-item:hover { border-color: rgba(6,182,212,.4); background: rgba(6,182,212,.05); }
.hc-live-item b { display: block; font-size: 10.5px; }
.hc-live-item span { display: block; font-size: 9px; color: var(--text-muted, #94a3b8); }
.hc-live-item small { display: block; font-size: 8.5px; color: var(--text-muted, #64748b); margin-top: 2px; }
.hc-live-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.hc-live-cell { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); border-radius: 9px; padding: 6px; text-align: center; }
.hc-live-cell span { display: block; font-size: 8px; color: var(--text-muted, #64748b); }
.hc-live-cell b { display: block; font-size: 10px; color: var(--text-primary, #f8fafc); margin-top: 2px; }
.hc-live-note { font-size: 8.5px; color: var(--text-muted, #64748b); line-height: 1.7; margin: 7px 0 0; }
.hc-live .hc-btn.ghost { margin-top: 8px; }

.hc-row-btns { display: flex; gap: 4px; }
.hc-copy-summary { display: none; }

/* --- v5.1: compact form + help/support panel --- */
.hc-form-hint {
  margin: -2px 0 8px; font-size: 9.5px; line-height: 1.7;
  color: var(--text-muted, #94a3b8);
}
.hc-more {
  margin: 8px 0 2px; padding: 8px 9px; border-radius: 12px;
  border: 1px dashed var(--hc-border, rgba(255,255,255,.12));
  background: rgba(255,255,255,.02);
}
.hc-more summary {
  cursor: pointer; list-style: none; font-size: 10px; font-weight: 800;
  color: #34d399; font-family: inherit;
}
.hc-more summary::-webkit-details-marker { display: none; }
.hc-more summary::before { content: "+ "; font-weight: 900; }
.hc-more[open] summary::before { content: "− "; }
.hc-more[open] summary { margin-bottom: 8px; }

.hc-help { margin-top: 10px; }
.hc-help .hc-box-head { align-items: flex-start; }
.hc-help .hc-box-sub { max-width: 48%; text-align: end; line-height: 1.6; }
.hc-sol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hc-sol-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  gap: 4px; min-width: 0; padding: 11px 8px 8px; border-radius: 14px;
  text-decoration: none; border: 1px solid var(--hc-border, rgba(255,255,255,.08));
  background: linear-gradient(180deg, rgba(16,185,129,.055), transparent 62%), var(--hc-soft, rgba(255,255,255,.03));
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.hc-sol-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, #6366f1, #10b981);
}
.hc-sol-card:hover { border-color: rgba(16,185,129,.45); box-shadow: 0 8px 20px rgba(2,6,23,.08); }
.hc-sol-card:active { transform: scale(.99); }
.hc-sol-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hc-sol-ic {
  width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center;
  flex: 0 0 auto; color: #34d399; background: rgba(16,185,129,.1);
}
.hc-sol-tag {
  margin-inline-start: auto; padding: 2px 6px; border-radius: 999px;
  font-style: normal; font-size: 7px; font-weight: 900; color: #34d399;
  background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.25);
  white-space: nowrap;
}
.hc-sol-title {
  font-size: 10.5px; font-weight: 900; line-height: 1.45;
  color: var(--text-primary, #f8fafc);
}
.hc-sol-prob {
  font-size: 8px; line-height: 1.55; color: var(--text-muted, #94a3b8);
  border-inline-start: 2px solid rgba(245,158,11,.45); padding-inline-start: 5px;
}
.hc-sol-action {
  flex: 1 1 auto; font-size: 8.2px; line-height: 1.65;
  color: var(--text-primary, #f8fafc);
}
.hc-sol-action i { font-style: normal; font-weight: 900; color: #34d399; }
.hc-sol-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 4px;
  margin-top: auto; padding-top: 5px; border-top: 1px dashed var(--hc-border, rgba(255,255,255,.1));
}
.hc-sol-foot i { font-style: normal; font-size: 7px; line-height: 1.35; color: var(--text-muted, #94a3b8); }
.hc-sol-foot strong { font-size: 7.8px; line-height: 1.35; color: #34d399; text-align: end; }

.hc-help .hc-sol-cost { border-color: rgba(16,185,129,.32); }
.hc-sol-cost::before { background: linear-gradient(90deg, #10b981, #34d399); }
.hc-help .hc-sol-spec { border-color: rgba(59,130,246,.30); }
.hc-sol-spec::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.hc-sol-spec .hc-sol-ic { color: #60a5fa; background: rgba(59,130,246,.12); }
.hc-help .hc-sol-support { border-color: rgba(245,158,11,.30); }
.hc-sol-support::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.hc-sol-support .hc-sol-ic { color: #fbbf24; background: rgba(245,158,11,.12); }
.hc-sol-support .hc-sol-tag { color: #fbbf24; background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.25); }
.hc-sol-support .hc-sol-foot strong { color: #fbbf24; }

/* --- theme-aware surfaces (light + dark) --- */
.hc-page {
  --hc-border: var(--border, #e5e7eb);
  --hc-soft: var(--bg-soft, #f1f5f9);
}
html[data-theme='dark'] .hc-page {
  --hc-border: rgba(255, 255, 255, .1);
  --hc-soft: rgba(255, 255, 255, .05);
}
.hc-hero, .hc-card, .hc-box, .hc-about { border-color: var(--hc-border); }
.hc-hero { box-shadow: 0 10px 26px rgba(2, 6, 23, .08); }
html[data-theme='dark'] .hc-hero { box-shadow: 0 14px 34px rgba(0, 0, 0, .22); }
.hc-stat, .hc-chip, .hc-back, .hc-mini span, .hc-row, .hc-ins, .hc-edit,
.hc-search, .hc-schip, .hc-rchip, .hc-cstat, .hc-live-item, .hc-live-cell,
.hc-today-item, .hc-mini-btn, .hc-export, .hc-sol-card, .hc-more,
.hc-heat-cell.l0, .hc-heat-legend .l0 {
  border-color: var(--hc-border);
  background-color: var(--hc-soft);
}
.hc-inp, .hc-btn.ghost, .hc-live-search .hc-inp {
  background: var(--hc-soft);
  border-color: var(--hc-border);
  color: var(--text-primary, #0f172a);
}
.hc-inp:focus { background: rgba(16, 185, 129, .06); }
.hc-row, .hc-live-item, .hc-cstat { background: var(--hc-soft); }
.hc-adh i, .hc-pipe-row i, .hc-heat-cell, .hc-heat-cell.l0 { background: var(--hc-soft); }
.hc-ring::before { background: var(--bg-card, #fff); }
.hc-monthly .hc-month i { background: linear-gradient(180deg, #94a3b8, #64748b); }
html:not([data-theme='dark']) .hc-export { color: #1e3a5f; background: #f1f5f9; border-color: #cbd5e1; }
html:not([data-theme='dark']) .hc-disclaimer { color: #b45309; background: rgba(245, 158, 11, .09); }
html:not([data-theme='dark']) .hc-note { color: #1d4ed8; }
html:not([data-theme='dark']) .hc-red b { color: #dc2626; }
html:not([data-theme='dark']) .hc-red p { color: #b91c1c; }
html:not([data-theme='dark']) .hc-hero h1,
html:not([data-theme='dark']) .hc-box h2,
html:not([data-theme='dark']) .hc-mhead h1,
html:not([data-theme='dark']) .hc-card-body b,
html:not([data-theme='dark']) .hc-stat b,
html:not([data-theme='dark']) .hc-cstat b,
html:not([data-theme='dark']) .hc-live-cell b,
html:not([data-theme='dark']) .hc-ins b,
html:not([data-theme='dark']) .hc-row-main b,
html:not([data-theme='dark']) .hc-sol-title { color: #0f172a; }

@media (max-width: 720px) {
  .hc-hero-actions { grid-template-columns: 1fr; }
  .hc-live-grid { grid-template-columns: repeat(2, 1fr); }
  .hc-when { grid-template-columns: 1fr; }
}

@media (max-width: 340px) {
  .hc-sol-grid { grid-template-columns: 1fr; }
}
