/* Range home: high contrast labels and borders, with color as an accent. */
.range-home{background:#edf2f6}
.range-home .topbar{display:block;padding:14px 20px 10px;border-bottom:6px solid #dca746;background:linear-gradient(110deg,#102438,#244d68);min-height:0}
.range-home .brand{display:block;position:relative;width:100%;max-width:650px;aspect-ratio:2172/566;margin:auto;overflow:hidden;background:#fff;border-radius:10px}
/* Clip only excess background: 64px above and 94px below the original 2172×724 image. */
.range-home .brand-logo{position:absolute;top:-11.30742%;left:0;display:block;width:100%;max-width:none;height:auto;max-height:none;margin:0;padding:0;background:#fff;border-radius:0}
.range-home .privacy{border:0;border-radius:0;max-width:none;text-align:center;padding:7px 0 0;font-size:11px;letter-spacing:.08em;color:#fff}
.range-home main{max-width:850px;padding-top:16px}
.range-home .start-panel{margin-top:0}
.range-home .start-panel h1{margin-top:0;font-size:24px}
.range-home .start-button{min-height:60px;font-size:20px}
.range-home #moreOptions{margin:12px 0}
.range-home .range-step{border:1px solid #8297a8;border-radius:14px;padding:16px;margin:16px 0;box-shadow:0 3px 12px #1b374511}
.range-home .range-step.complete{border-width:1px}
.range-home .range-step>.range-heading{display:flex;align-items:center;gap:12px;margin:-16px -16px 16px;padding:13px 16px;background:#183b55;color:#fff;border-radius:13px 13px 0 0;border-bottom:3px solid #dca746;font-size:20px;font-weight:800;line-height:1.25}
.range-number{display:grid;place-items:center;flex:none;width:34px;height:34px;background:#fff;color:#122c40;border-radius:50%;font-size:20px;font-weight:850;border:2px solid #fff}
.range-heading-action{display:flex;align-items:center;gap:12px;background:none;border:0;color:inherit;font:inherit;text-align:left;width:100%;padding:0;min-height:34px}
.range-heading:has(.range-heading-action){padding:0!important}
.range-heading .range-heading-action{padding:13px 16px;border-radius:13px 13px 0 0}
.range-home .range-step select{min-height:54px;border:2px solid #587389;font-size:18px;font-weight:700;text-overflow:ellipsis}
.range-home #showAddRifle,.range-home #showAddAmmo{width:auto;min-height:44px;font-size:16px;margin:10px 0;background:#fff;border:1px solid #587389}
.range-distance{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #c9d6df;padding-top:12px;margin-top:4px;font-size:16px}
.range-distance input{width:110px;min-height:48px;margin:0;border:2px solid #587389;font-size:18px;font-weight:700}
.range-home #profileSetup{border-top:1px solid #c9d6df;margin-top:6px}
.range-home #profileSetup>summary{padding-left:0;font-size:15px}
.range-home #profileSetup label:not(.upload){display:block;margin:14px 0}
.range-home #profileSetup .button{min-height:48px}
.range-selection{margin:4px 0 12px;font-size:18px;font-weight:750}
.range-home #garminChoice{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.range-home #garminChoice .button{margin:0;min-height:54px;font-size:18px}
.range-home #changeGarminChoice{width:auto;min-height:44px;font-size:16px;margin:4px 0}
.range-home #garminRangeHelp{font-size:15px;line-height:1.5;margin-bottom:8px}
.range-note{font-size:14px;line-height:1.5;color:#344b5c}
.range-home #rangeStep6 .capture{padding:0;border:0;margin:0;background:none}
.range-home #rangeStep6 .capture>p{margin:0 0 14px;font-size:16px;line-height:1.5}
.range-home #cameraStart{min-height:68px;font-size:21px;background:#183b55;border:2px solid #0b2335}
.range-home #otherPhotoSources,.range-home #photoOptions{padding:0;margin-top:8px;border:0;box-shadow:none;background:none}
.range-home #otherPhotoSources>summary,.range-home #photoOptions>summary{padding-left:0;font-size:16px}
.range-home .secondary-capture{margin:0;display:grid;gap:10px}
.range-home .secondary-capture .button{width:100%;min-height:48px}
.range-home .photo-options-body{padding:0;border:0}
.range-home .practice-option{border:1px solid #8195a5;font-size:16px}
.range-home .autostatus.idle{padding:0;background:none;font-size:14px;font-weight:500}
.range-home #rangeStep7 .garmin-import-panel{border:0;padding:0;margin-top:12px;border-top:1px solid #c9d6df}
.range-home #rangeStep7 .review{border:0;padding:0;margin:0;gap:10px}
.range-home .quick-results{width:100%;padding:0 0 12px;border-bottom:1px solid #c9d6df}
.range-home .quick-results h2{font-size:17px;margin:0 0 8px}
.range-home .target-identity{border:0;padding:0;font-size:16px;font-weight:650;color:#344b5c;line-height:1.5;margin:8px 0}
.range-home .quick-secondary{grid-template-columns:repeat(2,minmax(0,1fr))}
.range-home .quick-secondary #quickCorrectShot{grid-column:1/-1}
.range-home .quick-secondary .button{font-size:16px;min-height:48px}
.range-home #flowImport{min-height:48px;font-size:17px;margin:0 0 12px;border:1px solid #587389;background:#fff;color:#183b55}
.range-home #resultShareOptions>summary{padding-left:0;font-size:16px}
.range-home #resultShareOptions .button{min-height:48px;margin:4px 0}
.range-home #quickVelocity:empty{display:none}
.range-home .button{white-space:normal}
.range-home #resultPlaceholder{line-height:1.5;color:#344b5c}
@media(max-width:420px){.range-home .topbar{padding:12px 14px 8px}.range-home main{padding:14px 12px 40px}.range-home .range-step{padding:14px}.range-home .range-step>.range-heading{margin:-14px -14px 14px}.range-home .range-heading{font-size:19px!important}}

/* v0.9.32: result-first layout, with optional tools outside the main actions. */
.section-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 8px;flex-wrap:wrap}
.section-tools strong{font-size:18px}.section-tools .button{min-height:48px}
.range-home #homeSavedResults{background:#183b55;color:#fff}
.range-home #quickActions{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;margin:12px 0}
.range-home #quickActions #quickCorrectShot{grid-column:1/-1;min-height:48px;font-size:17px;background:#fff;color:#183b55;border:1px solid #587389}
.range-home #quickActions #nextTargetAfterReview,.range-home #quickActions #doneAfterReview{min-height:60px;font-size:20px;margin:0}
.range-home #quickResults{padding-bottom:8px;margin-bottom:0;border:0}
.range-home #quickResults #acceptAnalysis{min-height:48px;font-size:17px;margin:10px 0 0;background:#fff;color:#183b55;border:1px solid #587389}
.range-home #quickSaved{margin:8px 0;font-size:16px;min-height:24px}
.range-home #reviewContinueHint{font-size:14px;line-height:1.5;color:#344b5c;margin:8px 0}
.range-home #reviewZoomPanel:not(.expanded-target)>:not(#reviewViewport){display:none!important}
.range-home #reviewViewport{max-height:65vh}
.range-home #resultMoreOptions{width:100%;border-top:1px solid #c9d6df;margin-top:12px;padding-top:4px}
.range-home #resultMoreOptions>summary{padding-left:0;font-size:17px}
.range-home #resultMoreOptions .button{min-height:48px;font-size:16px;margin:6px 0}
.range-home #garminStep{display:none!important}
.range-home #rangeSourceFilter{margin-bottom:14px}
.range-home #rangeTargetList .target-group-heading{font-size:18px;margin:20px 0 8px;border-bottom:2px solid #183b55;padding:8px 0}

/* Stable section colors supplement the written labels and distinct line icons. */
[data-section-theme="rifle"]{--section-accent:#f2aa66}
[data-section-theme="development"]{--section-accent:#76cda2}
[data-section-theme="report"]{--section-accent:#7dbff2}
[data-section-theme="sessions"]{--section-accent:#c7a0ee}
.range-home #rangeWelcome .start-button{display:grid;grid-template-columns:38px minmax(0,1fr) 14px;align-items:center;gap:13px;width:100%;min-height:84px;margin:12px 0;padding:16px 14px;border:2px solid #0c2639;border-left:10px solid var(--section-accent);border-radius:10px;background:#183b55;color:#fff;text-align:left;box-shadow:0 2px 5px #10243820}
.range-home #rangeWelcome .start-button:hover{background:#214c69}
.range-home #rangeWelcome .start-button:active{background:#102b40;box-shadow:inset 0 0 0 2px #fff}
.range-home #rangeWelcome .start-button:focus-visible{outline:3px solid #102438;outline-offset:3px;box-shadow:inset 0 0 0 2px #fff}
.home-choice-icon{display:block;width:36px;height:36px}
.home-choice-label{font-size:20px;line-height:1.3;font-weight:800;letter-spacing:0;overflow-wrap:break-word}
.home-choice-chevron{font-size:30px;line-height:1;color:#fff;font-weight:500}
.range-home .themed-section-heading{display:flex;align-items:center;gap:12px;background:#183b55;color:#fff;border-left:8px solid var(--section-accent);border-radius:8px;padding:14px 16px;font-size:21px;line-height:1.3}
.themed-section-heading img{width:30px;height:30px;flex:none}
.range-home #rangeWorkflow>.section-tools{background:#183b55;color:#fff;border-left:8px solid var(--section-accent);border-radius:8px;padding:12px}
.workflow-title{display:flex;align-items:center;gap:10px;flex:1 1 220px;min-width:0}
.workflow-title img{width:30px;height:30px;flex:none}
.range-home #rangeWorkflow .range-step>.range-heading{border-bottom-color:var(--section-accent)}
.range-home #sectionSavedTargets{background:#fff;color:#183b55;border:2px solid #fff;font-size:15px}
@media(max-width:360px){.range-home #rangeWelcome .start-button{grid-template-columns:32px minmax(0,1fr) 12px;gap:10px;padding:14px 10px;border-left-width:9px}.home-choice-icon{width:31px;height:31px}.home-choice-label{font-size:18px}.range-home .themed-section-heading{font-size:19px;padding:12px}}

/* The menu heading uses the same restrained type and gold detail as the brand. */
.range-home #rangeWelcome .session-menu-heading{color:#183b55;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;font-size:22px;font-weight:850;line-height:1.3;letter-spacing:.07em;text-transform:uppercase;margin:4px 0 22px}
.range-home #rangeWelcome .session-menu-heading::after{content:"";display:block;width:56px;height:3px;background:#c99a20;margin-top:12px}
@media(max-width:360px){.range-home #rangeWelcome .session-menu-heading{font-size:19px;letter-spacing:.055em}}

/* Keep a complete section title in view when entering a session. */
.range-home :is(#rangeWorkflow,#developmentSetup,#rifleReportSetup,#todayTargets,#ammoHistory){scroll-margin-top:24px}
.range-home #rangeWorkflow{display:flow-root}
.range-home #rangeWorkflow[hidden]{display:none}
/* Anchors need a real button box so wrapped print links cannot overlap. */
.range-home a.button:not([hidden]){display:inline-flex;align-items:center;justify-content:center;text-decoration:none;max-width:100%;line-height:1.4}
.range-home #rangeStep1>.button:not([hidden]){display:flex;align-items:center;justify-content:center;width:100%;margin:12px 0;padding:12px 14px}

/* v0.9.36: complete, consistently sized session headers. */
.range-home :is(#developmentSetup,#rifleReportSetup,#todayTargets,#ammoHistory){display:flow-root}
.range-home :is(#developmentSetup,#rifleReportSetup,#todayTargets,#ammoHistory)[hidden]{display:none}
.range-home .themed-section-heading,.range-home #rangeWorkflow .workflow-title strong{font-size:22px!important;line-height:1.35;font-weight:800}
.range-home :is(#developmentSetup,#rifleReportSetup,#todayTargets)>h2{margin-top:0}
/* Keep the exit from correction visible while the user scrolls. */
.range-home #reviewZoomPanel.expanded-target #reviewEditToggle{position:sticky;top:0;z-index:3;display:block!important;min-height:56px;background:#183b55;color:white;border:3px solid white;box-shadow:0 2px 8px #10243840}
.range-home #reviewZoomPanel.expanded-target{scroll-padding-top:72px}
.range-home #reviewZoomPanel.expanded-target #reviewViewport{max-height:42dvh;height:42dvh}
.range-home #captureReceipt{padding:12px;border:2px solid #183b55;border-radius:8px;font-weight:700;line-height:1.45}

/* Clear saved-target notice, independent of color perception. */
.range-home #autoStatus.restored{background:#fff;color:#183b55;border:2px solid #183b55;border-radius:10px;padding:16px;font-weight:700;line-height:1.5}
.range-home #viewRestoredResults{display:block;width:100%;min-height:60px;margin:12px 0 20px;font-size:21px;background:#183b55;color:#fff;border:2px solid #102b3e}
.range-home #viewRestoredResults[hidden]{display:none}
.range-home #restoredCalibrationReminder,.range-home #practiceActiveNote{color:#183b55;line-height:1.5}

/* Comparisons remain readable on a narrow phone without horizontal scrolling. */
.range-home #rangeComparison{scroll-margin-top:24px;margin:12px 0}
.range-home #rangeComparison h3{margin:0 0 12px;font-size:20px;line-height:1.35}
.target-comparison-table{width:100%;border-collapse:collapse;table-layout:fixed}
.target-comparison-table th,.target-comparison-table td{padding:10px 6px;border-bottom:1px solid #9cb0bf;text-align:left;vertical-align:top;overflow-wrap:anywhere}
.target-comparison-table th{background:#183b55;color:#fff;font-size:14px}
.target-comparison-table th:first-child{width:52%}
.target-comparison-table td:not(:first-child){font-weight:800;font-variant-numeric:tabular-nums}
.target-comparison-table small{display:block;margin-top:6px;line-height:1.45;color:#344b5c}
/* Range results: equal, readable measurements and optional deeper review. */
.result-stat-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;font-variant-numeric:tabular-nums}
.result-stat-pair>div{background:#eef3f6;border:1px solid #b8c8d3;border-top:3px solid #183b55;border-radius:6px;padding:12px 8px;min-width:0}
.result-stat-pair .quick-moa{font-size:clamp(24px,6.4vw,46px);overflow-wrap:anywhere}
.result-stat-pair span{display:block;font-size:13px;color:#344b5c;margin-top:5px}
.result-stat-pair .button{white-space:normal;width:100%;font-size:14px;margin-top:10px;padding:8px 5px;min-height:44px}
.range-home #quickActions #nextTargetAfterReview,.range-home #quickActions #doneAfterReview{font-size:17px;white-space:normal;line-height:1.3}
.ai-review{width:100%;margin:14px 0;border:1px solid #aebfcb;border-radius:8px;padding:12px;background:#f5f8fa}
.ai-review summary{font-weight:800;min-height:32px;cursor:pointer}
.ai-review p,.ai-review textarea{font-size:14px;line-height:1.5}
.ai-review .button{white-space:normal;margin:10px 6px 0 0}
.combined-result{border:1px solid #aebfcb;border-radius:8px;padding:12px;margin:10px 0;background:#f5f8fa}
.combined-result h4{margin:0;font-size:16px}.combined-result p,.result-method,.chart-note{font-size:13px;line-height:1.5}
.combined-result .result-stat-pair{font-size:20px}
.result-target-link{display:inline;text-align:left;border:0;background:none;color:#163e58;text-decoration:underline;font-weight:800;padding:8px 4px;min-height:44px;overflow-wrap:anywhere}
.target-comparison-table input[type=checkbox]{width:22px;height:22px;margin:6px;vertical-align:middle}
.metric-chart{margin:0 0 12px;overflow-x:auto;border:1px solid #b8c8d3;border-radius:6px;background:#f8fafc;padding:6px}
.metric-chart figcaption{font-weight:800;font-size:15px;padding:4px 6px}
.metric-chart svg{display:block;width:100%;min-width:340px;max-height:none}
.metric-chart svg g[role=button]{cursor:pointer}.metric-chart svg g:focus{outline:2px solid #bd6824}
.session-graphs{width:100%;margin:12px 0}.session-graphs:empty{display:none}
#sessionSummary,#developmentResults{scroll-margin-top:24px}
#sessionSummary>.button{white-space:normal;margin:10px 8px 0 0}
/* Recipe lookup remains readable without relying on color. */
#loadRecipeDialog{box-sizing:border-box;width:min(94vw,640px);max-height:90vh;overflow:auto;border:3px solid #111d2a;border-radius:12px;padding:20px;background:#fff;color:#111d2a}
#loadRecipeDialog::backdrop{background:rgba(0,0,0,.65)}
#loadRecipeDialog label{display:block;margin:12px 0;font-weight:700}
#loadRecipeDialog select{display:block;width:100%;min-height:48px;font-size:18px}
#recipeDetails dt{font-weight:700;margin-top:14px}
#recipeDetails dd{margin:4px 0;font-size:20px;overflow-wrap:anywhere}
#loadRecipeDialog button{min-height:48px;margin:8px 4px 0 0}
