/* हस्तरेखा विश्लेषण UI — v10 */
.hr-wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 64px; }

.hr-note {
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(135deg, #fffdf5, #faf3e0);
  border: 1px solid var(--gold-light, #f2c14e); border-left: 4px solid var(--maroon, #6b0f1a);
  border-radius: 12px; padding: 14px 16px; margin: 18px 0;
}
.hr-note span { font-size: 1.2rem; line-height: 1.3; }
.hr-note p { font-size: .9rem; line-height: 1.6; color: var(--ink-soft, #5a4636); margin: 0; }
.hr-note strong { color: var(--maroon, #6b0f1a); }

.hr-card {
  background: #fff; border: 1px solid var(--gold-light, #e8d9a0);
  border-radius: 16px; padding: 24px; margin: 18px 0;
  box-shadow: 0 10px 30px rgba(107, 15, 26, .07);
}
.hr-card h2 { font-family: var(--font-display, 'Rozha One', serif); color: var(--maroon, #6b0f1a); margin-bottom: 12px; font-size: 1.4rem; }
.hr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 680px) { .hr-grid2 { grid-template-columns: 1fr; } }
.hr-label { display: block; font-weight: 600; margin: 8px 0 4px; font-size: .9rem; color: var(--maroon, #6b0f1a); }
.hr-input, .hr-select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--gold-light, #e8d9a0);
  border-radius: 9px; font-family: inherit; font-size: 1rem; background: #fffdfa;
}
.hr-input:focus, .hr-select:focus { outline: none; border-color: var(--maroon, #6b0f1a); box-shadow: 0 0 0 3px rgba(107,15,26,.08); }

.hr-btn {
  background: var(--maroon, #6b0f1a); color: #fff; border: none;
  padding: 12px 22px; border-radius: 9px; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: transform .12s, box-shadow .2s, opacity .2s;
}
.hr-btn:hover { opacity: .94; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(107,15,26,.18); }
.hr-btn:active { transform: translateY(0); }
.hr-btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.hr-btn.alt { background: var(--saffron-deep, #b8860b); }
.hr-btn.outline { background: #fff; color: var(--maroon, #6b0f1a); border: 2px solid var(--maroon, #6b0f1a); }
.hr-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.hr-muted { color: #777; font-size: .85rem; }

.hr-hand-hint {
  background: linear-gradient(135deg, #fffdf5, #faf3e0);
  border: 1px solid #e8d9a0; border-radius: 10px; padding: 14px 16px;
  margin: 12px 0; font-size: .95rem; line-height: 1.65;
}
.hr-hand-hint strong { color: var(--maroon, #6b0f1a); }

.hr-tips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.hr-tips span {
  font-size: .8rem; background: #faf3e0; color: var(--ink-soft, #5a4636);
  border: 1px solid #efe2bc; padding: 5px 11px; border-radius: 99px;
}

.hr-upload-zone {
  border: 2px dashed var(--gold-light, #e8d9a0); border-radius: 12px;
  padding: 32px 20px; text-align: center; cursor: pointer; transition: .2s; background: #fffdf8; margin-top: 12px;
}
.hr-upload-zone:hover, .hr-upload-zone.drag { border-color: var(--maroon, #6b0f1a); background: #fffdf5; }
.hr-upload-zone .icon { font-size: 2.5rem; margin-bottom: 8px; }

.hr-camera-box { position: relative; border-radius: 14px; overflow: hidden; background: #111; max-width: 100%; margin-top: 14px; }
.hr-camera-box video { width: 100%; display: block; max-height: 440px; object-fit: cover; }
#liveOverlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.hr-live-guide {
  position: absolute; left: 10%; right: 10%; top: 10%; bottom: 16%;
  border: 2px dashed rgba(255, 235, 150, .8); border-radius: 42% 42% 32% 32%;
  pointer-events: none; z-index: 1; box-shadow: inset 0 0 40px rgba(0,0,0,.18); transition: border-color .2s;
}
.hr-live-guide.ready { border-color: #66bb6a; border-style: solid; box-shadow: inset 0 0 30px rgba(102, 187, 106, .25); }
.hr-live-status {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.74); color: #fff; padding: 8px 14px; border-radius: 8px;
  font-size: .88rem; z-index: 3; max-width: 92%; text-align: center; line-height: 1.4;
}
.hr-live-meter { position: absolute; top: 8px; left: 10px; right: 10px; height: 6px; background: rgba(255,255,255,.25); border-radius: 99px; z-index: 3; overflow: hidden; }
.hr-live-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb74d, #66bb6a); border-radius: 99px; transition: width .15s ease; }
.hr-live-count { position: absolute; top: 18px; right: 12px; z-index: 3; background: rgba(46,125,50,.88); color: #fff; font-weight: 700; font-size: .8rem; padding: 4px 10px; border-radius: 99px; }

.hr-preview { text-align: center; margin: 16px 0; }
.hr-preview img, .hr-preview canvas { max-width: 100%; border-radius: 12px; border: 1px solid #e8d9a0; box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.hr-legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 14px 0; font-size: .88rem; }
.hr-legend span { display: flex; align-items: center; gap: 6px; }
.hr-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.hr-dot.good { background: #2e7d32; }
.hr-dot.bad { background: #9e9e9e; }
.hr-dot.warn { background: #e65100; }

.hr-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hr-lines-table { width: 100%; border-collapse: collapse; font-size: .98rem; margin-top: 12px; min-width: 600px; }
.hr-lines-table th, .hr-lines-table td { border: 1px solid #e8d9a0; padding: 10px 12px; text-align: left; vertical-align: top; line-height: 1.5; }
.hr-lines-table th { background: #faf3e0; color: var(--maroon, #6b0f1a); position: sticky; top: 0; }
.hr-lines-table .ok { color: #2e7d32; font-weight: 700; }
.hr-lines-table .bad { color: #9e9e9e; font-weight: 700; }
.hr-lines-table .warn { color: #e65100; font-weight: 700; }
.hr-progress { height: 8px; background: #f3ead0; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.hr-progress span { display: block; height: 100%; background: linear-gradient(90deg, #2e7d32, #66bb6a); border-radius: 99px; }

.hr-step { display: none; }
.hr-step.active { display: block; }
.hr-steps-nav { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.hr-step-pill { padding: 7px 15px; border-radius: 99px; font-size: .82rem; font-weight: 600; background: #f3ead0; color: #888; transition: .2s; }
.hr-step-pill.done { background: #e8f5e9; color: #2e7d32; }
.hr-step-pill.current { background: var(--maroon, #6b0f1a); color: #fff; }

.hr-result { display: none; }
.hr-result.show { display: block; animation: hrFade .4s ease; }
@keyframes hrFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hr-score-ring {
  width: 108px; height: 108px; border-radius: 50%; border: 7px solid #2e7d32;
  display: grid; place-items: center; font-family: var(--font-display, 'Rozha One', serif);
  font-size: 1.7rem; color: var(--maroon, #6b0f1a); margin: 0 auto 12px; transition: border-color .3s;
}
.hr-loading { text-align: center; padding: 44px 20px; }
.hr-loading .spin { width: 50px; height: 50px; border: 4px solid #e8d9a0; border-top-color: var(--maroon, #6b0f1a); border-radius: 50%; animation: hrSpin .8s linear infinite; margin: 0 auto 14px; }
@keyframes hrSpin { to { transform: rotate(360deg); } }

.hr-hidden { display: none !important; }
@media print {
  .site-header, .site-footer, .hr-no-print, .hr-steps-nav, .hr-step:not(.hr-print-only) { display: none !important; }
  .hr-result { display: block !important; }
}
