.capture-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:12px 0}.capture-actions button,.file-action,#shutter,#clearPhoto,#relocate{border:1px solid var(--line);border-radius:6px;padding:10px 14px;min-height:44px;background:var(--soft);color:var(--text);font:inherit;cursor:pointer}.file-action{position:relative;display:inline-flex;align-items:center;overflow:hidden}.file-action input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.file-action:focus-within{outline:3px solid var(--tech)}button:disabled,.file-action:has(input:disabled){opacity:.5;cursor:wait}.palm-preview{display:grid;grid-template-columns:1fr 1fr;gap:12px}.palm-preview figure{margin:0;min-width:0}.palm-preview canvas,.result-stage canvas{display:block;width:100%;height:auto;border-radius:8px;background:#18242b}.palm-preview figcaption{font-size:12px;text-align:center;color:var(--muted);margin-top:7px}#adjustments label{display:flex;gap:12px;align-items:center;min-height:44px}#adjustments input[type=range]{flex:1;min-width:0}.result-stage{position:relative;max-width:512px;margin:auto}.result-stage #resultLines{position:absolute;inset:0;background:transparent;pointer-events:none}#liveArea video{display:block;width:100%;max-height:60vh;background:#111}#liveArea[hidden],section[hidden],[hidden]{display:none!important}#captureStatus,#qualityStatus,#locateStatus,#matchStatus{line-height:1.8}#captureStatus{color:var(--tech)}#lineSummary p{border-left:4px solid var(--swatch);padding:8px 12px;background:var(--soft)}select{background:var(--surface);color:var(--text);padding:10px;border:1px solid var(--line);border-radius:6px;font:inherit}input[type=range]{max-width:100%}@media(max-width:480px){.palm-preview{grid-template-columns:1fr}.palm-preview figure:first-child{max-width:180px;margin:auto}.surface{padding:15px}.capture-actions button,.file-action{flex:1;text-align:center;justify-content:center;font-size:14px}}

#palmReadingSection{margin-top:28px;border-top:1px solid var(--line);padding-top:20px}.palm-reading-card{margin:16px 0;padding:16px;border:1px solid var(--line);border-left:4px solid var(--reading-color);border-radius:8px;background:var(--soft)}.palm-reading-card h3{margin:0 0 12px;font-size:1.15em}.palm-reading-card p{line-height:1.85;margin:12px 0}.palm-reading-card strong{display:block;font-weight:600}

.pair-photos{display:grid;grid-template-columns:1fr 1fr;gap:12px}.pair-photos figure{margin:0;min-width:0}.pair-photos figcaption{font-weight:600;margin-bottom:10px}.result-stage .pair-overlay{position:absolute;inset:0;background:transparent;pointer-events:none}.palm-reading-card details{font-size:.88em;color:var(--muted);margin-top:16px}.palm-reading-card summary{cursor:pointer}.capture-actions select{max-width:100%}.capture-actions label{min-width:0}#handConvention{width:100%}
.wizard-step{color:var(--tech);font-weight:600}.wizard-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.wizard-pair figure{margin:0;min-width:0}.wizard-pair figcaption,.hand-label{font-weight:700;margin:0 0 10px}.wizard-pair canvas,#capturePreview{display:block;width:100%;border-radius:8px}#capturePreview{max-width:420px;margin:auto}.wizard-pair select{width:100%;margin-top:8px}#choicePanel label{display:block;margin:20px 0}#choicePanel select{display:block;width:100%;margin-top:8px}.reading-row .palm-reading-card{margin:14px 0 0;min-width:0;padding:12px}.pair-conclusion{background:var(--soft);padding:4px 14px;border-radius:6px;margin:8px 0 20px}.wizard-privacy{font-size:.8em;text-align:center}.capture-actions #confirmPhoto,.capture-actions #confirmLines,.capture-actions #confirmReading{background:var(--tech);color:#10212a;font-weight:700}.hand-label{color:var(--muted);font-size:.85em}@media(max-width:480px){.wizard-pair{gap:8px}.reading-row .palm-reading-card{padding:9px;font-size:14px}.reading-row .palm-reading-card h3{font-size:16px}.wizard-pair select{font-size:14px;padding:8px 4px}}
.palm-tabs{display:flex;gap:10px;margin:12px 0 18px}.palm-tabs button{flex:1;min-height:46px;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--text);font:inherit;cursor:pointer}.palm-tabs button[aria-pressed=true]{background:var(--tech);color:#10212a;font-weight:700}#analysisPanel{height:calc(100vh - 170px);height:calc(100dvh - 170px);min-height:420px;display:flex;flex-direction:column;gap:8px;overflow:hidden;box-sizing:border-box;padding:14px}#analysisPanel>h2{margin:0;font-size:1.2em}#analysisBasis{margin:0;font-size:.9em}#analysisPanel>p.subtle{margin:0;font-size:.75em}#analysisPanel .fixed-hand-photos{flex:none;max-width:650px;align-self:center;width:100%}#analysisPanel .fixed-hand-photos canvas{max-height:25vh;max-height:25dvh;width:auto;max-width:100%;margin:auto;object-fit:contain}#analysisPanel .fixed-hand-photos figcaption{text-align:center;margin-bottom:4px;font-size:.9em}#pairedReading{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;border-top:1px solid var(--line);padding:8px 4px 16px;scrollbar-gutter:stable}#pairedReading:focus-visible{outline:2px solid var(--tech);outline-offset:-2px}#analysisPanel>.capture-actions{flex:none;margin:0}#analysisPanel>.capture-actions button{padding:6px 10px;min-height:40px;font-size:.85em}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}#analysisPanel{height:calc(100dvh - 135px);padding-top:10px}#analysisPanel .fixed-hand-photos canvas{max-height:23dvh}.reading-row .palm-reading-card{align-self:start}#pairedReading .pair-conclusion{line-height:1.85}

.palm-layer-buttons{display:flex;gap:6px;flex:none;margin:8px 0}.palm-layer-buttons button{flex:1;padding:7px 3px;font-size:.85rem}.palm-layer-buttons button[aria-pressed="true"]{background:#80b9c2;color:#10232a}.extra-reading-row .palm-reading-card{padding:10px}.extra-reading-row{align-items:start}

.extra-item{display:block;width:100%;text-align:left;padding:10px 8px;margin:7px 0;font-size:.9rem;line-height:1.5;white-space:normal}.extra-item[aria-pressed="true"]{border-color:#ffd675;background:#324553;color:#fff}.extra-item:focus-visible{outline:2px solid #ffd675;outline-offset:2px}

/* Keep a readable text area when the viewport or enlarged controls need more room. */
#analysisPanel{overflow-y:auto}
#pairedReading{min-height:180px}
#analysisPanel>.capture-actions button,.palm-layer-buttons button{min-height:44px;white-space:normal}
@media(max-height:600px){#analysisPanel{height:auto;min-height:0;overflow:visible}#pairedReading{flex:none;height:45vh;height:45dvh;min-height:180px}#analysisPanel .fixed-hand-photos canvas{max-height:28vh;max-height:28dvh}}
