/* ===== review: tabs, dope card, menus, 44px targets ===== */
body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.tab { display: none; } .tab.on { display: block; }
#tabBar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 4px; max-width: 640px; margin: 0 auto; background: var(--card); border-top: 1px solid var(--border); padding: 4px 8px max(4px, env(safe-area-inset-bottom)); }
#tabBar button { flex: 1; margin: 0; min-height: 56px; padding: 2px 4px; background: none; color: var(--muted); font-size: 0.82rem; font-weight: 700; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
#tabBar button .i { width: 22px; height: 22px; display: flex; }
#tabBar button .i svg, svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#tabBar button .i svg { width: 22px; height: 22px; }
svg.ic { display: inline-block; vertical-align: -3px; flex: 0 0 auto; }
#tabBar button[aria-selected="true"] { color: var(--accent); background: var(--chip); box-shadow: 0 0 0 1px var(--chip-b) inset; }
#sheet { z-index: 28; }
#slSelBar { bottom: calc(70px + env(safe-area-inset-bottom)); }
#dopeCard { position: sticky; top: 0; z-index: 15; background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; padding: 6px 10px 8px; margin: 0 0 6px; box-shadow: 0 6px 14px rgba(0,0,0,.28); }
#dopeCard.stale .dcBig, #dopeCard.stale #dcBracket, #dopeCard.stale #dcInfo { opacity: .35; transition: opacity .12s; }
.stale#results, .stale.chart-container { opacity: .35; transition: opacity .12s; }
button.ic { width: 44px; min-width: 44px; height: 44px; flex: 0 0 44px; padding: 0; margin: 0; font-size: 1.15rem; border-radius: 10px; }
.dcBig { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; }
.dcBig > div { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 3px 4px 5px; min-width: 0; }
.dcBig .k { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.dcBig b { display: block; font-size: 1.9rem; line-height: 1.15; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dcBig .c { display: block; font-size: 0.8rem; color: var(--text); font-weight: 600; min-height: 1.15em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcDist { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.dcDist .stepper { flex: 1; }
.dcDist .stepper button { width: 64px; min-width: 64px; min-height: 50px; font-size: 1.8rem; font-weight: 700; }
.dcDist .stepper input { font-size: 1.55rem; font-weight: 800; min-height: 50px; padding-top: 4px; padding-bottom: 4px; }
.dcDist .u { font-weight: 700; color: var(--muted); }
#dopeCard .err:empty { display: none; }
#dcBracket { font-size: 0.8rem; text-align: center; margin-top: 5px; color: var(--text); font-variant-numeric: tabular-nums; }
#dcBracket b { color: var(--accent); }
#dcInfo { font-size: 0.76rem; text-align: center; color: var(--muted); margin-top: 2px; }
#dcInfo .w { color: var(--warn); font-weight: 700; } #dcInfo .bad { color: var(--err); font-weight: 700; }
#dcInfo button { margin-top: 4px; }
#status { margin: 0 0 8px; font-size: 0.78rem; }
details.section > summary { color: var(--accent); font-size: 1rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.advSum { color: var(--muted); font-size: 0.76rem; font-weight: 500; text-align: right; }
.pkMenuBtn { width: 52px; min-width: 52px; flex: 0 0 52px; margin: 0; padding: 0; font-size: 1.5rem; line-height: 1; border-radius: 10px; }
#tabGear, #gearSec, #gearNow, #gearList, #gearListBar { max-width: 100%; min-width: 0; }
#gearNow { margin: 0 0 8px; font-size: 0.82rem; line-height: 1.3; max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
#gearNow .k { display: block; font-size: 0.72rem; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
#gearNowNames { display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
#gearSwitch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 0 8px; width: 100%; min-width: 0; }
#gearSwitch button { min-width: 0; width: 100%; max-width: 100%; min-height: 44px; margin: 0; padding: 4px 4px 3px; font-size: 0.86rem; background: var(--input); color: var(--text); border: 1px solid var(--border); line-height: 1.15; display: flex; flex-direction: column; align-items: stretch; justify-content: center; overflow: hidden; }
#gearSwitch button > span, #gearSwitch button > small { display: block; min-width: 0; max-width: 100%; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#gearSwitch button small { font-size: 0.68rem; font-weight: 650; opacity: 0.85; line-height: 1.05; }
#gearSwitch button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
#gearBack { display: none; flex: 2 1 0; min-width: 0; justify-content: flex-start; gap: 6px; font-weight: 700; overflow: hidden; }
#gearBack span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tabGear[data-gearview="edit"] #gearNow { display: none !important; }
#tabGear[data-gearview="edit"] #gearBack { display: flex !important; }
#tabGear[data-gearview="edit"] #gearAllLoads { display: none !important; }
#gearListBar { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; }
#gearListBar button { flex: 1 1 0; min-width: 0; min-height: 44px; margin: 0; overflow: hidden; }
#gearList { display: flex; flex-direction: column; gap: 6px; }
.gearItem { display: flex; flex-direction: row; align-items: center; gap: 8px; width: 100%; min-height: 56px; height: auto; margin: 0; padding: 8px 10px; text-align: left; white-space: normal; line-height: 1.25; background: var(--input); color: var(--text); border: 1px solid var(--border); }
.gearItem .gMain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gearItem .gL1 { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.gearItem .gName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.gearItem .gWt { flex: none; white-space: nowrap; font-weight: 650; }
.gearItem .chip { flex: none; white-space: nowrap; max-width: none; overflow: visible; text-overflow: clip; padding: 1px 6px; border-radius: 999px; font-size: 0.68rem; font-weight: 750; line-height: 1.3; }
.gearItem .chip.inuse { background: var(--accent); color: var(--on-accent); }
.gearItem .chip.zero { background: var(--warn-b); color: var(--text); }
.gearItem .chip.mis { color: var(--warn); border: 1px solid var(--warn); background: transparent; }
.gearItem .gL2, .gearItem .gL3 { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--muted); font-size: 0.75rem; }
.gearItem .gL2.warn { color: var(--warn); }
.gearItem .chev { flex: none; }
.gearItem.dim { opacity: 0.72; }
.gearItem .unarch { align-self: flex-start; width: auto; min-height: 36px; margin: 2px 0 0; padding: 4px 10px; font-size: 0.78rem; }
#dcStack { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; min-width: 0; max-width: 100%; font-size: 0.78rem; font-weight: 650; }
#dcStackText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dcConfig { flex: none; min-height: 32px; margin: 0; padding: 2px 8px; }
.rzNote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; padding: 6px 8px; border: 1px solid var(--warn); border-radius: 8px; color: var(--warn); font-size: 0.78rem; min-width: 0; max-width: 100%; }
.rzNote .rzActs { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.rzNote button { flex: 0 1 auto; min-width: 0; min-height: 36px; margin: 0; padding: 4px 8px; }
#dcHold { margin: 4px 0 6px; font-weight: 700; }
#dcMag { margin: 0 0 8px; }
#holdBox textarea { width: 100%; min-height: 72px; }
.gearItem .unarch { align-self: flex-start; width: auto; min-height: 36px; margin: 2px 0 0; padding: 4px 10px; font-size: 0.78rem; }
#tabGear[data-gearview="list"] #gunPicker,
#tabGear[data-gearview="list"] #loadPicker,
#tabGear[data-gearview="list"] #rangePicker,
#tabGear[data-gearview="list"] #gearBack,
#tabGear[data-gearview="list"] #gearArchive { display: none !important; }
#tabGear[data-gearview="edit"] #gearList,
#tabGear[data-gearview="edit"] #gearAdd,
#tabGear[data-gearview="edit"] #gearArch { display: none !important; }
#tabGear[data-gearsect="gun"][data-gearview="edit"] #loadPicker { display: none !important; }
#tabGear[data-gearsect="load"][data-gearview="edit"] #gunPicker,
#tabGear[data-gearsect="load"][data-gearview="edit"] #rangePicker { display: none !important; }
#tabGear[data-gearsect="optic"][data-gearview="edit"] #loadPicker,
#tabGear[data-gearsect="optic"][data-gearview="edit"] #gunEss,
#tabGear[data-gearsect="optic"][data-gearview="edit"] #rifleDetails,
#tabGear[data-gearsect="optic"][data-gearview="edit"] #zeroFlag,
#tabGear[data-gearsect="optic"][data-gearview="edit"] #sampleNote,
#tabGear[data-gearsect="optic"][data-gearview="edit"] #gunPicker > .lbl,
#tabGear[data-gearsect="optic"][data-gearview="edit"] #gunPicker > .pkRow,
#tabGear[data-gearsect="optic"][data-gearview="edit"] #rifleSum,
#tabGear[data-gearsect="gun"][data-gearview="edit"] #opticBody,
#tabGear[data-gearsect="gun"][data-gearview="edit"] #rifleSum,
#tabGear[data-gearsect="gun"][data-gearview="edit"] #opticSum,
#tabGear[data-gearsect="load"][data-gearview="edit"] #loadSum,
#tabGear[data-gearsect="load"][data-gearview="edit"] #loadRecipe { display: none !important; }
#tabGear[data-gearview="edit"] .ctxRow,
#tabGear[data-gearview="edit"] #gearSec > h2,
#tabGear[data-gearsect="gun"][data-gearview="edit"] #opticPk > .lbl { display: none !important; }
#tabGear[data-gearview="edit"] #gearListBar { margin-bottom: 4px; }
#tabGear[data-gearview="edit"] #gunEss,
#tabGear[data-gearview="edit"] #loadBasic { gap: 4px 8px; }
#tabGear details > summary::before { display: none; }
#tabGear details > summary .chev,
#tabGear details[open] > summary .chev,
#tabGear details.more > summary .chev,
#tabGear details.more[open] > summary .chev { margin-left: auto; flex: 0 0 auto; transform: none; transition: none; }
#tabGear details.more > summary::before { display: none; }
#tabGear details.more > summary { justify-content: space-between; gap: 8px; }
#tabGear details.more > summary .rsum { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--muted); }
#tabGear details.more > summary .rsum:empty { display: none; }
#gearDlg { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
#gearDlg[hidden] { display: none !important; }
#gearDlg .box { width: min(420px, 100%); background: var(--card); color: var(--text); border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
#gearDlg .row { display: flex; gap: 8px; }
#gearDlg .row button { flex: 1; min-height: 44px; }
#pkMenu { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.5); display: none; align-items: flex-end; justify-content: center; }
#pkMenu.show { display: flex; }
#pkMenu .box { background: var(--card); width: 100%; max-width: 640px; border-radius: 16px 16px 0 0; border-top: 2px solid var(--accent); padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
#pkMenu h3 { margin: 4px 6px 6px; font-size: 0.95rem; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pkMenu .grp button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; color: var(--text); border: 0; border-radius: 10px; padding: 10px; margin: 0; font-size: 1rem; font-weight: 600; min-height: 48px; }
#pkMenu .grp button:active { background: var(--hover); }
#pkMenu .grp button.del { color: var(--err); }
#pkMenu .sep { height: 1px; background: var(--border); margin: 10px 0; }
#pkMenu #pkCancel { margin-top: 8px; }
#radarNo { margin: 6px 0 0; }
/* tap targets: 44px minimum */
button, select, summary, input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]) { min-height: 44px; }
details > summary { display: flex; align-items: center; gap: 6px; }
button.sm { min-height: 44px; padding: 8px 12px; }
.seg button { min-height: 44px; padding: 8px 12px; }
.stepper button { width: 44px; min-width: 44px; }
.tg { min-height: 44px; min-width: 44px; padding: 4px 9px; }
.x { width: 44px; min-height: 44px; }
#themeBar button { min-height: 52px; }
#toast.act button { min-height: 44px; }

