/* Home, New Round, Round History, Settings and Log in, styled to match the
   coaching app. Everything is scoped to .cx so the rest of the app keeps its look. */
body.coach #nav { display: none; }
body.coach { background: #1e1e1e; }
.cx { min-height: 100%; background: #1e1e1e; color: #fff; font-family: system-ui, sans-serif; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: max(50px, calc(env(safe-area-inset-top) + 40px)) 16px 70px; position: relative; box-sizing: border-box; }
.cx * { box-sizing: border-box; }
.cx.center { justify-content: center; }
.cx.top { justify-content: flex-start; }
.cx button { width: 100%; max-width: 320px; height: 44px; font-size: 15px; border-radius: 10px; border: none; font-weight: 600; cursor: pointer; white-space: nowrap; color: #fff; -webkit-tap-highlight-color: transparent; font-family: inherit; padding: 0; margin: 0; }
.cx button[disabled] { opacity: .35; cursor: default; }
.cx input { width: 100%; max-width: 320px; height: 44px; background: #282828; color: #fff; border-radius: 10px; border: none; text-align: center; font-size: 16px; padding: 0 10px; font-family: inherit; margin: 0; }
.cx input::placeholder { color: #9a9a9a; }
.cx select { font-family: inherit; }
.cx .row { display: flex; gap: 8px; width: 100%; max-width: 320px; }
.cx .row button { flex: 1; }
.cx .row input, .cx .row select { flex: 1; min-width: 0; }
.cx .selected { box-shadow: 0 0 0 3px #ffffffaa; }
.cx .holes9 { background: #007a52; }
.cx .holes9.genbook { background: #1c3a5e; margin-top: 8px; }
.cx .holes18 { background: #2d7abc; }
.cx .back-btn-top { position: fixed; top: auto; left: auto; right: max(8px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); width: 40px; height: 40px; min-width: 40px; max-width: 40px; background: #333; border-radius: 8px; display: flex; align-items: center; justify-content: center; z-index: 20; }
.cx .back-btn-top svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2; fill: none; }
/* The Back button sits in the bottom-right corner (one-handed): every page with one
   keeps room at its foot, so nothing ends up under it once you've scrolled down. */
.cx:has(> .back-btn-top), .cx :has(> .back-btn-top):not(.fixedhead):not(.pagehead) { padding-bottom: calc(66px + env(safe-area-inset-bottom)) !important; }
/* More see-through than the other glass buttons. */
.cx button.back-btn-top:not(.linkbtn):not(.link):not(.glass-skip) { background: rgba(255,255,255,.02) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cx .back-btn-top svg { opacity: .85; }
/* With the button gone from the top, those pages start higher. */
.cx:has(> .back-btn-top), .coachroot .page:has(> .back-btn-top) { padding-top: max(24px, calc(env(safe-area-inset-top) + 14px)); }
.cx .bigsel { width: 100%; max-width: 320px; height: 44px; background: #282828; color: #fff; border-radius: 10px; border: none; text-align: center; font-size: 15px; appearance: none; -webkit-appearance: none; padding: 0 10px; }
.cx .minisel { background: #282828; color: #fff; border: 1px solid #3d3d3d; border-radius: 6px; padding: 4px 6px; font-size: 11px; }
.cx .homebtn { display: flex; align-items: center; justify-content: flex-start; gap: 16px; height: auto; padding: 13px 15px 13px 20px; font-size: 15px; font-weight: 700; border-radius: 13px; text-align: left; max-width: none; }
.cx .homebtn .ic { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; }
.cx .homebtn .ic .ico { width: 34px; height: 34px; }
.cx .homebtn .t { font-size: .97rem; font-weight: 700; line-height: 1; }
.cx .homebtn .s { font-size: 10px; color: rgba(255,255,255,.45); margin-top: 3px; font-weight: 400; white-space: normal; }
.cx .iconbtn { width: 32px; height: 32px; min-width: 32px; max-width: 32px; background: #222; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.cx .iconbtn svg { width: 16px !important; height: 16px !important; }
.cx .iconbtn { color: #b0b0b0; }
.cx .iconrow { position: relative; margin-bottom: 4px; left: 50%; transform: translateX(-50%); width: 100vw; max-width: 460px; padding: 0 6px; display: flex; justify-content: space-between; pointer-events: none; }
.cx .iconrow button { pointer-events: auto; }
@media (max-width: 370px) { .cx .iconbtn { width: 28px; height: 28px; min-width: 28px; max-width: 28px; font-size: 13px; } .cx .iconrow { padding: 0 4px; } }
.cx .linkbtn { background: transparent; color: #44b8f0; font-size: 13px; text-decoration: underline; height: auto; padding: 4px; width: auto; }
.cx .section { margin-top: 6px; width: 100%; border-top: 1px solid #333; padding-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cx .section > .lab { font-size: 12px; color: #606060; }
.cx .msg { font-size: 12px; min-height: 14px; }
.cx .ok { color: #00b87a; } .cx .err { color: #d4706e; }
.cx .card { background: #282828; border-radius: 10px; padding: 12px; margin: 6px 0; text-align: left; border: 0; }
@keyframes cxpulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

/* Coaching (js/coaching): the coaching app's pages, shown one at a time inside .coachroot. */
.cx.coachroot { display: block; padding: 0; height: 100%; min-height: 0; overflow: hidden; }
.coachroot .page { display: none; height: 100%; padding: max(50px, calc(env(safe-area-inset-top) + 40px)) 16px 70px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; overflow-y: auto; position: relative; }
.coachroot .page.active { display: flex; }
.coachroot textarea, .coachroot select { font-family: inherit; }
.coachroot input[type="checkbox"], .coachroot input[type="radio"] { width: auto; height: auto; }

/* My Bag, Performance Analysis, Practice and Learning (js/bag, js/performance,
   js/practice, js/learn, js/combines): the coaching app's own styles, scoped
   to .coachroot. Its pages stay in the document; [hidden] takes them off screen. */
#coachroot { flex: 1; height: auto; }
#coachroot[hidden] { display: none; }
#view[hidden] { display: none; }
/* The app's own buttons are flex rows (css/app.css); here a button's lines stack, as the pages were written. */
.coachroot button { padding: 1px 6px; display: inline-block; }
.coachroot input { padding: 1px 2px; }
/* Step-back buttons inside a page: the top-left Back button presses them (appBack in core.js). */
.coachroot .stepback { display: none !important; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
.coachroot #pbvWrap input[type=range]::-webkit-slider-thumb { -webkit-appearance:none;appearance:none;width:26px;height:26px;border-radius:50%;background:#ffffff;cursor:pointer;box-shadow:0 1px 6px rgba(0,0,0,0.6); }
.coachroot #pbvWrap input[type=range]::-moz-range-thumb { width:26px;height:26px;border-radius:50%;background:#ffffff;cursor:pointer;border:none;box-shadow:0 1px 6px rgba(0,0,0,0.6); }
.coachroot .big { height:52px;font-size:16px; }
.coachroot .input-wrap { position:relative;width:100%;max-width:320px; }
.coachroot .input-wrap span { position:absolute;right:55px;top:50%;transform:translateY(-50%);color:#9a9a9a;pointer-events:none; }
.coachroot .back-wrap { position:fixed;bottom:10px;left:0;right:0;display:flex;justify-content:center;z-index:5; }
.coachroot .back { background:#282828;height:36px; }
.coachroot .stat { width:100%;max-width:360px;background:#282828;padding:8px 12px;border-radius:10px;font-size:14px;box-sizing:border-box; }
.coachroot .stat.center { text-align:center; }
.coachroot .stat-split { display:flex; }
.coachroot .stat-half { flex:1;text-align:center; }
.coachroot .stat-half.left { border-right:1px solid #333333; }
.coachroot .num { font-weight:700; }
.coachroot .comb-menu-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:8px; }
.coachroot #comb-table thead th { background:#282828; color:#606060; font-size:0.62rem; text-transform:uppercase; font-weight:600; padding:7px 3px; border:1px solid #333333; white-space:nowrap; text-align:center; }
.coachroot #comb-table tbody td { border:1px solid #333333; text-align:center; height:44px; padding:0; }
.coachroot .comb-hnum { background:#282828; font-weight:700; color:#ffffff; width:24px; font-size:0.8rem; }
.coachroot .comb-ro { background:rgba(255,255,255,.04); font-weight:700; font-size:0.85rem; padding:2px; }
.coachroot .comb-tap input { width:100%; height:44px; border:none; background:transparent; color:#9a9a9a; text-align:center; font-size:1rem; font-weight:600; padding:0 2px; }
.coachroot .comb-tap input:focus { background:#00402c; outline:2px solid #00b87a; }
.coachroot .comb-sel-cell { width:100%; height:44px; border:none; background:transparent; color:#9a9a9a; font-size:0.88rem; text-align:center; padding:0 2px; cursor:pointer; -webkit-appearance:none; appearance:none; max-width:none; }
.coachroot .comb-putt-grp { display:flex; gap:3px; padding:3px; align-items:center; height:44px; }
.coachroot .comb-pbtn { flex:1; height:36px; border:1px solid #333333; border-radius:6px; background:#282828; color:#606060; font-size:1rem; font-weight:700; cursor:pointer; touch-action:manipulation; max-width:none; width:auto; }
.coachroot .comb-pbtn:active { background:#00b87a; color:#ffffff; }
.coachroot .comb-pbtn.comb-on { background:#00b87a; color:#ffffff; border-color:#00b87a; }
.coachroot .comb-pos { color:#00b87a; font-weight:700; }
.coachroot .comb-neg { color:#d4706e; font-weight:700; }
.coachroot .comb-col-dist { width:66px; }
.coachroot .comb-col-score { width:68px; }
.coachroot .comb-col-lie { width:90px; }
.coachroot .comb-hist-card { background:#222222; border:1px solid #333333; border-radius:8px; padding:10px 12px; margin-bottom:8px; font-size:13px; }
.coachroot .comb-hist-card .ch-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:4px; }
.coachroot .comb-hist-card .ch-type { font-weight:700; color:#00b87a; font-size:14px; }
.coachroot .comb-hist-card .ch-date { font-size:11px; color:#606060; }
.coachroot .comb-hist-card .ch-score { font-size:22px; font-weight:800; }
.coachroot .comb-hist-card .ch-note { font-size:11px; color:#9a9a9a; margin-top:3px; font-style:italic; }
.coachroot .comb-hist-card .ch-meta { font-size:11px; color:#9a9a9a; margin-top:2px; }
.coachroot .comb-dimmed { opacity:.35; pointer-events:none; }
.coachroot #bagOptApp * { margin: 0; padding: 0; box-sizing: border-box; }
.coachroot #bagOptApp { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; padding: 0; }
.coachroot #bagOptApp .bo-header { background: #282828; padding: 12px; text-align: center; color: white; border-bottom: 2px solid #333; border-radius: 12px 12px 0 0; }
.coachroot #bagOptApp .bo-header h2 { font-size: 1.3em; margin:0; }
.coachroot #bagOptApp .bo-content { padding: 10px; }
.coachroot #bagOptApp .bo-control-group { margin-bottom: 12px; }
.coachroot #bagOptApp .bo-label { display: block; font-weight: 600; color: #ffffff; margin-bottom: 6px; font-size: 0.9em; }
.coachroot #bagOptApp select, .coachroot #bagOptApp input[type="number"] { width: 100%; padding: 9px; border: 2px solid #333; border-radius: 10px; font-size: 16px; transition: all 0.3s; background: #282828; color: #ffffff; font-family: inherit; }
.coachroot #bagOptApp select:focus, .coachroot #bagOptApp input[type="number"]:focus { outline: none; border-color: #ffffff; box-shadow: 0 0 0 3px rgba(255,255,255,0.2); }
.coachroot #bagOptApp input[type="number"] { font-weight: 600; }
.coachroot #bagOptApp .bo-input-hint { font-size: 0.72em; color: #9a9a9a; margin-top: 2px; }
.coachroot #bagOptApp .bo-input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.coachroot #bagOptApp .bo-input-column { display: flex; flex-direction: column; }
.coachroot #bagOptApp .bo-btn-group { display: grid; gap: 6px; margin-bottom: 6px; }
.coachroot #bagOptApp .bo-mode-buttons { grid-template-columns: 1fr 1fr 1fr; }
.coachroot #bagOptApp .bo-toggle-btn { padding: 9px; background: #282828; color: #9a9a9a; border: 2px solid #333; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s; text-align: center; font-family: inherit; }
.coachroot #bagOptApp .bo-toggle-btn:hover { border-color: #606060; color: #9a9a9a; }
.coachroot #bagOptApp .bo-toggle-btn.bo-active { background: #ffffff; color: #000000; border-color: #ffffff; }
.coachroot #bagOptApp .bo-slider-container { position: relative; padding: 5px 0; }
.coachroot #bagOptApp .bo-current-value-display { font-weight: 700; color: #ffffff; font-size: 1.05em; text-align: center; position: absolute; left: 0; right: 0; top: 0; }
.coachroot #bagOptApp .bo-slider-header { position: relative; margin-bottom: 8px; height: 18px; }
.coachroot #bagOptApp .bo-slider-label { font-weight: 600; color: #ffffff; font-size: 0.9em; margin: 0; position: relative; z-index: 1; }
.coachroot #bagOptApp .bo-value-display { display: flex; justify-content: space-between; margin-top: 4px; font-size: 0.8em; color: #9a9a9a; }
.coachroot #bagOptApp input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; background: #333; border-radius: 5px; outline: none; padding: 0; }
.coachroot #bagOptApp input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; background: #ffffff; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.3); transition: transform 0.2s; }
.coachroot #bagOptApp input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.coachroot #bagOptApp .bo-results { background: #282828; border-radius: 12px; padding: 10px; margin-bottom: 12px; border: 1px solid #333; }
.coachroot #bagOptApp .bo-results h3 { color: #ffffff; margin: 0 0 8px 0; font-size: 1.05em; text-align: center; text-transform: capitalize; }
.coachroot #bagOptApp .bo-results-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.coachroot #bagOptApp .bo-result-card { background: #1e1e1e; padding: 8px 4px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.3); text-align: center; border: 1px solid #333; }
.coachroot #bagOptApp .bo-result-label { font-size: 0.65em; color: #9a9a9a; margin-bottom: 2px; }
.coachroot #bagOptApp .bo-result-value { font-size: 1.2em; font-weight: 700; color: #ffffff; line-height: 1; }
.coachroot #bagOptApp .bo-result-unit { font-size: 0.55em; color: #9a9a9a; margin-left: 1px; }
.coachroot #bagOptApp .bo-distance-highlight { background: #ffffff; color: #000000; }
.coachroot #bagOptApp .bo-distance-highlight .bo-result-label { color: #606060; }
.coachroot #bagOptApp .bo-distance-highlight .bo-result-value { color: #000000; font-size: 1.4em; }
.coachroot #bagOptApp .bo-distance-highlight .bo-result-unit { color: #606060; }
.coachroot .dg-tab { padding:8px 4px;background:#282828;color:#9a9a9a;border:2px solid #333;border-radius:10px;font-size:11px;font-weight:600;cursor:pointer;transition:all 0.3s;text-align:center;font-family:inherit; }
.coachroot .dg-tab:hover { border-color:#606060;color:#9a9a9a; }
.coachroot .dg-tab-active { background:#ffffff;color:#000;border-color:#ffffff; }
.coachroot .dg-table-wrap { width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:10px;border:1px solid #333; }
.coachroot .dg-table { width:100%;border-collapse:collapse;font-size:12px;min-width:600px; }
.coachroot .dg-table.dg-table-simple { min-width:0; }
.coachroot .dg-table th { background:#282828;color:#9a9a9a;font-size:10px;font-weight:600;text-transform:uppercase;padding:8px 5px;text-align:center;border-bottom:2px solid #333;white-space:nowrap;position:sticky;top:0; }
.coachroot .dg-table th:first-child { text-align:left;position:sticky;left:0;z-index:2;background:#282828; }
.coachroot .dg-table td { padding:7px 5px;border-bottom:1px solid #282828;color:#fff;text-align:center; }
.coachroot .dg-table td:first-child { text-align:left;position:sticky;left:0;background:#1e1e1e;z-index:1; }
.coachroot .dg-table tr:nth-child(even) td:first-child { background:#282828; }
.coachroot .dg-table td:not(:first-child) { font-weight:600; }
.coachroot .dg-table tr:nth-child(even) { background:#282828; }
.coachroot .dg-table .dg-club-name { font-weight:600;white-space:nowrap; }
.coachroot .dg-section-header { background:#1a4a8a !important; }
.coachroot .dg-section-header td { color:#fff;font-weight:700;font-size:11px;text-transform:uppercase;letter-spacing:0.5px;background:#1a4a8a !important; }
.coachroot .dg-stat-box { background:#282828;border-radius:10px;padding:12px;margin-bottom:14px;display:flex;justify-content:space-around;text-align:center;border:1px solid #333; }
.coachroot .dg-stat-label { font-size:10px;color:#9a9a9a;text-transform:uppercase;margin-bottom:3px; }
.coachroot .dg-stat-value { font-size:1.3rem;font-weight:700;color:#fff; }

/* Student View: the "vs" level badge isn't shown. */
#studentViewHcpBadge { display: none !important; }

/* New Round / GPS Overview: a nine at a club with other nines asks 9 or 18. */
.cx .ninesbox { width: 100%; max-width: 320px; display: grid; gap: 6px; }
.cx .ninesbox[hidden] { display: none; }
.cx .ninesbox .ninesq { font-size: 13px; color: #bdbdbd; text-align: center; line-height: 1.35; }
.cx .ninesbox button { max-width: none; width: 100%; height: auto; min-height: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid #3d3d3d; background: #222; color: #fff; text-align: center; display: grid; justify-items: center; gap: 2px; }
.cx .ninesbox button b { font-size: 15px; } .cx .ninesbox button small { font-size: 12px; color: #9a9a9a; }
.cx .ninesbox button.on { border-color: #007a52; background: #0d3a29; }
/* Round type (New Round / GPS Overview): Casual or Tournament, side by side. */
.cx .roundtypes { width: 100%; max-width: 320px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.cx .roundtypes .ninesq { grid-column: 1 / -1; font-size: 13px; color: #bdbdbd; text-align: center; }
.cx .roundtypes button { max-width: none; width: 100%; height: auto; min-height: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid #3d3d3d; background: #222; color: #fff; display: grid; justify-items: center; gap: 2px; }
.cx .roundtypes button b { font-size: 15px; } .cx .roundtypes button small { font-size: 12px; color: #9a9a9a; }
.cx .roundtypes button.on { border-color: #007a52; background: #0d3a29; }
.cx .roundtypes button[data-v="Tournament"].on { border-color: #f0c830; background: #3a3210; }
/* GEN BOOK's setup page (style, tee box, format, what to show), over the screen
   in GPS Overview's look. */
.cx.setupov { position: fixed; inset: 0; z-index: 50; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.cx.setupov > * { flex: none; }
.cx .setupsub { font-size: 12px; color: #606060; margin-top: -4px; }
.cx .setuplab { margin-top: 10px; font-size: 13px; color: #bdbdbd; }
.cx .setuphint { width: 100%; max-width: 320px; font-size: 12px; color: #9a9a9a; line-height: 1.35; }
.cx .setupcard { width: 100%; max-width: 320px; background: #282828; border-radius: 10px; padding: 4px 10px; text-align: left; display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.cx .setupsw { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 0; font-size: 13px; line-height: 1.2; color: #fff; cursor: pointer; border-bottom: 1px solid #333; }
.cx .setupsw:nth-last-child(-n+2):nth-child(odd), .cx .setupsw:last-child { border-bottom: 0; }
.cx .setupsw input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.cx .setupsw i { flex: none; width: 38px; height: 22px; border-radius: 999px; background: #3d3d3d; position: relative; transition: background .15s; }
.cx .setupsw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.cx .setupsw input:checked + i { background: #2d7abc; }
.cx .setupsw input:checked + i::after { transform: translateX(16px); }
.cx .setupsw input:focus-visible + i { outline: 2px solid #fff; outline-offset: 2px; }
.cx .setupplain { background: #333; }
.cx.setupov .holes9.genbook { margin-top: 14px; }
.cx .setupnote { display: block; font-size: 11px; color: #9a9a9a; }
/* Yardage markers' editor and the saved books' list. */
.cx .markersbox { width: 100%; max-width: 320px; display: grid; gap: 6px; }
.cx .markersbox[hidden], .cx .markereditor[hidden] { display: none; }
.cx .markersbox > button { width: 100%; max-width: none; }
.cx .markereditor { background: #282828; border-radius: 10px; padding: 10px; display: grid; gap: 8px; justify-items: center; }
.cx .markerchips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cx .markerchip { width: auto; height: 32px; padding: 0 12px; background: #333; border: 1px solid #3d3d3d; border-radius: 999px; font-size: 14px; }
.cx .markereditor .row { max-width: none; }
.cx .markereditor input { background: #1e1e1e; }
.cx .savedlist { width: 100%; max-width: 320px; display: grid; gap: 8px; margin-top: 8px; }
.cx .savedbook { background: #282828; border-radius: 10px; padding: 10px; display: grid; gap: 8px; text-align: left; }
.cx .savedopen { text-align: left; display: grid; gap: 2px; }
.cx .savedopen b { font-size: 15px; } .cx .savedopen small { font-size: 12px; color: #9a9a9a; font-weight: 400; }
.cx .savedbook .row { max-width: none; } .cx .savedbook .row button { height: 36px; }
.cx .holes9.savedbooks { background: #333; }
.cx .markerpar { width: 100%; display: grid; gap: 6px; padding: 4px 0 10px; border-bottom: 1px solid #333; }
.cx .markerpar:last-child { border-bottom: 0; padding-bottom: 0; }
.cx .markerhead { display: flex; align-items: center; justify-content: space-between; }
.cx .markerhead b { font-size: 14px; } .cx .markerhead small { font-size: 12px; color: #9a9a9a; }
.cx .markerhead .linkbtn { padding: 0; font-size: 12px; }
.cx .markerpar .markerchips { justify-content: flex-start; }
.cx .markernone { font-size: 13px; color: #9a9a9a; }
.cx .markereditor { justify-items: stretch; }
.cx .savededit { background: #1c3a5e; }

/* Home: always fits the screen without scrolling. The page is exactly the
   screen's height and the buttons share what's left, shrinking on short screens. */
.cx.home { height: 100%; min-height: 0; overflow: hidden; padding: max(16px, calc(env(safe-area-inset-top) + 8px)) 16px max(12px, env(safe-area-inset-bottom)); }
.cx.home .homecol { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 7px; flex: 0 1 auto; min-height: 0; }
.cx.home .homecol > :first-child { flex: none; }
.cx.home .homehead > button, .cx.home .homehead > div:last-child { margin-top: 2px; }
.cx.home .homehead { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 6px; position: relative; left: 50%; transform: translateX(-50%); width: 100vw; max-width: 460px; padding: 0 6px; margin-bottom: 6px; }
.cx.home .homebrand { text-align: center; min-width: 0; }
.cx.home .hometitle { font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 900; letter-spacing: .5px; line-height: 36px; font-size: clamp(1.6rem, 9.6vw, 2.8rem); color: #fff; white-space: nowrap; }
.cx.home .homesub { display: flex; justify-content: center; gap: 6px; font-size: 11px; margin-top: 2px; }
.cx.home .homeuser { font-size: 11px; color: #606060; margin-top: 2px; }
.cx.home .homeuser:empty { display: none; }
.cx.home .homebtn { flex: 0 1 60px; min-height: 36px; padding-top: 0; padding-bottom: 0; overflow: hidden; }
@media (max-height: 640px) {
  .cx.home .homecol { gap: 5px; }
  .cx.home .homebtn .ic, .cx.home .homebtn .ic .ico { width: 28px; height: 28px; }
}
/* No rubber-band bounce or pull-to-refresh on Home. */
html:has(.cx.home), html:has(.cx.home) body, #view:has(> .cx.home) { overscroll-behavior: none; }
.cx.home { touch-action: none; }
/* No double-tap zoom anywhere, GPS screen included (scrolling and pinch still work).
   :where() keeps this at zero specificity so the maps and Home's own touch-action still win. */
:where(html, body, body *) { touch-action: manipulation; }

/* No scroll bars anywhere in the coaching pages (they still scroll): a bar that comes and goes
   with a tab's length narrows the page and shifts everything sideways. */
.coachroot, .coachroot * { scrollbar-width: none; -ms-overflow-style: none; }
.coachroot::-webkit-scrollbar, .coachroot *::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Performance Analysis > Combines: Putting and Wedge side by side, their cards
   sharing rows (subgrid) so each pair is the same height whatever wraps. */
#perfCombineGrid { align-items: stretch !important; row-gap: 6px !important; }
#perfCombineGrid > div { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
#perfCombineGrid > div > [id$="Focus"] > div, #perfCombineGrid > div > [id$="Overview"] > div { height: 100%; margin-bottom: 0 !important; box-sizing: border-box; }

/* Course requests: the Submit a New Course button, its form, the admin's list in Settings and the dot on Home's gear. */
.cx .reqbtn { margin-top: 6px; font-size: 14px; color: #9a9a9a; }
.cx .courseresults .reqhit { color: #44b8f0; font-weight: 700; }
.cx .iconbtn .reqdot { position: absolute; top: 1px; right: 1px; width: 9px; height: 9px; border-radius: 50%; background: #FF453A; box-shadow: 0 0 0 2px #232325; }
.cx.reqov { position: fixed; inset: 0; z-index: 60; min-height: 0; justify-content: center; padding: 16px; background: rgba(0,0,0,.55) !important; }
.cx .reqbox { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px 12px; border-radius: 22px; background: rgba(44,44,46,.92); border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.cx .reqlist { width: 100%; max-width: 320px; display: grid; gap: 8px; text-align: left; }
.cx .reqcard { padding: 10px 12px; border-radius: 14px; background: rgba(58,58,60,.38); border: 1px solid rgba(255,255,255,.08); display: grid; gap: 2px; font-size: 13px; }
.cx .reqcard[data-status="added"], .cx .reqcard[data-status="declined"] { opacity: .55; }
.cx .reqtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cx .reqtop b { font-size: 14px; min-width: 0; }
.cx .reqnotes { color: #9a9a9a; overflow-wrap: anywhere; }
.cx .rolebtn { flex: 1; height: 36px; font-size: 13px; }

/* Pages where only one list scrolls (Round History's rounds, the Stats Dashboard's Past rounds):
   the page fills the screen and doesn't move; the list scrolls inside it. */
.cx.fixedpage { height: 100%; min-height: 0; overflow: hidden; }
.cx.fixedpage .fixedcol { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cx.fixedpage .scrollpane { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
:is(.cx.fixedpage #dashContent, .svdashfixed #svDashContent) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
:is(.cx.fixedpage #dashContent, .svdashfixed #svDashContent) > div { flex-shrink: 0; }
:is(.cx.fixedpage #dashContent, .svdashfixed #svDashContent) > .dsubContent { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
:is(.cx.fixedpage, .svdashfixed) #dsub_0 { display: flex; flex-direction: column; overflow: hidden; }
:is(.cx.fixedpage, .svdashfixed) #dsub_0 > * { flex-shrink: 0; }
/* The bars and Past rounds scroll together under the heading ("Strokes gained · per round", the vs picker and Filter). */
:is(.cx.fixedpage, .svdashfixed) #dsub_0 > .dash0scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* New Round: fits the screen; scrolls only when it can't fit (small screens, browser bars, the 9-or-18 choice). */
.cx.noscroll { height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
.cx.noscroll::-webkit-scrollbar { display: none; }
.cx.noscroll > * { flex-shrink: 0; }
/* No scroll bars on these lists. */
.cx.fixedpage .scrollpane, :is(.cx.fixedpage, .svdashfixed) .dsubContent, :is(.cx.fixedpage, .svdashfixed) .dash0scroll { scrollbar-width: none; }
.cx.fixedpage .scrollpane::-webkit-scrollbar, :is(.cx.fixedpage, .svdashfixed) .dsubContent::-webkit-scrollbar, :is(.cx.fixedpage, .svdashfixed) .dash0scroll::-webkit-scrollbar { display: none; }
/* A category's detail page: its SG bar stays at the top; the stats under it scroll. */
:is(.cx.fixedpage #dashContent, .svdashfixed #svDashContent) > .dsubContent:has(> .dashdetail) { display: flex; flex-direction: column; overflow: hidden; }
:is(.cx.fixedpage, .svdashfixed) .dsubContent > * { flex-shrink: 0; }
:is(.cx.fixedpage, .svdashfixed) .dsubContent > .dashdetail { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
:is(.cx.fixedpage, .svdashfixed) .dashdetail::-webkit-scrollbar { display: none; }
/* A coach's view of a student, Dashboard tab: laid out like the Stats Dashboard (only Past rounds scrolls). */
.svdashfixed #studentViewScroll { overflow: hidden !important; padding-bottom: 0 !important; }
.svdashfixed #svDashTab { flex: 1; min-height: 0; display: flex !important; flex-direction: column; } /* the tab is shown with an inline display: block */
#svDashContent { text-align: left; }
.svdashfixed #svDashTab > * { flex-shrink: 0; }
/* Fixed pages (Round History, Stats Dashboard, a student's Dashboard tab): the list runs to the
   foot of the screen and keeps its own room at the end, so its last row still scrolls clear of
   the Back button instead of the page leaving an empty band. */
.cx.fixedpage, .coachroot .page.svdashfixed { padding-bottom: 0 !important; }
:is(.cx.fixedpage, .svdashfixed) :is(.scrollpane, .dash0scroll, .dashdetail) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
/* Coaching (coach side): Recent Activity runs to the foot of the screen; its own end room
   keeps the last item clear of the Back button. */
#coachingCoachView { margin-bottom: calc(-66px - env(safe-area-inset-bottom)); }
#coachingCoachView > div[style*="overflow-y:auto"] { padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
/* Desktop browsers: the Back button sits at the right edge of the app's column (under
   Home's Settings and Search), not far off in the window's corner. Phones keep the corner. */
@media (hover: hover) and (pointer: fine) {
  .cx .back-btn-top { right: max(16px, calc(50vw - 224px)); }
}
/* Offline imagery & backup (#/device): cards in a column like Settings. */
.cx.devicepage .card { width: 100%; max-width: 360px; box-sizing: border-box; padding: 16px; }
.cx.devicepage .card h3 { margin: 0 0 6px; }
.cx.devicepage .card p { margin: 0 0 10px; font-size: 13px; }
.cx.devicepage .card .row { display: flex; gap: 8px; }
.cx.devicepage .card button { max-width: none; }
.cx.devicepage .card button.danger { width: auto; height: 32px; padding: 0 14px; color: #d4706e; }
.cx.devicepage > p.small { max-width: 360px; font-size: 11px; color: #9a9a9a; }

/* Stats Dashboard (and a coach's view of a student): the heading, with the level to
   compare with and Filter right after it; Filter (css/glass.css) opens a box over the page (nothing moves). */
.cx .dashsghead { position: relative; display: flex; align-items: center; gap: 5px; max-width: 100%; margin: 14px 0 4px; padding-bottom: 4px; border-bottom: 2px solid #007a52; }
.cx select.dashhcpsel { flex: none; width: auto; max-width: none; min-width: 0; height: 36px; padding: 0 12px; font-size: 12px; font-weight: 700; border-radius: 18px; }

/* Performance Analysis: a detail panel's heading (Past Rounds and Combines alike). */
.cx .perfdetailhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 10px; }
.cx button.perfclose { flex: none; width: auto; max-width: none; height: 28px; margin: 0; padding: 0 12px; font-size: 12px; font-weight: 700; color: #d0d0d4; border-radius: 14px; }

/* Something a coach added while using the app as the student. */
.coachtag { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(240,200,48,.16); color: #f0c830; font-size: 10px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.cx button.svuseapp { width: auto; max-width: none; height: 30px; margin: 8px auto 2px; padding: 0 14px; font-size: 13px; font-weight: 700; border-radius: 15px; color: #f0c830; display: block; }
.cx .homebtn.stopacting { background: rgba(240,200,48,.14) !important; }
.cx .homebtn.stopacting .ic { color: #f0c830; }

/* Home: the profile button (under Settings) and its menu. */
.cx .iconbtn.profbtn.acting { box-shadow: 0 0 0 2px #f0c830 !important; color: #f0c830; }
.cx.home .profmenu { position: absolute; right: 6px; top: 76px; z-index: 40; width: min(280px, calc(100vw - 24px)); max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px; box-sizing: border-box; background: #2c2c2e; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08); text-align: left; touch-action: pan-y; }
.cx.home .profmenu[hidden] { display: none; }
.cx .profwho { display: flex; flex-direction: column; gap: 1px; padding: 0 2px 4px; }
.cx .profwho b { font-size: 15px; } .cx .profwho small { font-size: 12px; color: #9a9a9a; overflow-wrap: anywhere; }
.cx .profnow { font-size: 12px; color: #c8c8cc; padding: 6px 2px 0; border-top: 1px solid rgba(255,255,255,.08); }
.cx .profnow b { color: #f0c830; }
.cx .proflist { display: flex; flex-direction: column; gap: 6px; }
.cx .proflist:empty { display: none; }
.cx .proflab { font-size: 11px; font-weight: 700; color: #9a9a9a; text-transform: uppercase; letter-spacing: .04em; padding: 6px 2px 0; border-top: 1px solid rgba(255,255,255,.08); }
.cx .profmenu button { max-width: none; width: 100%; height: 38px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; }
.cx .profmenu button.profback { justify-content: center; color: #f0c830; }
.cx .profmenu button.profstudent small { font-size: 11px; color: #9a9a9a; font-weight: 500; }
.cx .profmenu button.profstudent.on small { color: #fff; }
.cx .profmenu button.profstudent[disabled] { opacity: 1; }
.cx.home .homehead { z-index: 5; } /* its profile menu opens over the buttons below */

.cx .dashsghead .fmenu { position: static; }
/* Coaching, coach's side: Home keeps the Students button at the top and the students
   list its search and Filter; the page scrolls under them (--over: their height). Other
   tabs have neither and fade under the title. */
#coachingCoachView > .coachbar { display: none; }
#coachingCoachView:is([data-tab="0"], :not([data-tab])) > #coachStudentsBar, #coachingCoachView[data-tab="4"] > #coachStudentSearchBar { display: block; }
#coachingCoachView > .undertop { --over: 0px; --gap: 20px; }
#coachingCoachView:is([data-tab="0"], :not([data-tab])) > .undertop { --over: 74px; --gap: 14px; }
#coachingCoachView[data-tab="4"] > .undertop { --over: 38px; --gap: 12px; }
/* Stats Dashboard, a category's detail: each section is a glass tile (no blur: the
   tiles scroll, and on iPhone blurred glass in a scrolling box draws past its edge). */
.cx .dashtile {
  position: relative; margin: 0 0 10px; padding: 12px 14px; border-radius: 22px; background: rgba(255,255,255,.05);
  box-shadow: inset 0 1.5px 2px rgba(255,255,255,.14), inset 0 -1.5px 2px rgba(255,255,255,.09), 0 2px 10px rgba(0,0,0,.35);
}
.cx .dashtile::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.4) 0%, rgba(255,255,255,.025) 30%, rgba(255,255,255,.025) 70%, rgba(255,255,255,.26) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.cx .dashtile > .dashhdr { margin: 0 0 6px !important; padding: 0 !important; border: 0 !important; font-size: 12px !important; letter-spacing: .04em; }
.cx .dashtile > :last-child, .cx .dashtile > :last-child tr:last-child td { border-bottom: 0 !important; }
.cx .dsubContent > .dashtile { margin-top: 6px; }
/* The category's bar at the top stays put and the detail scrolls under it, seen through
   it like History's search: frosted glass, with no line under the bar. */
.cx .dashtile.dashtop { background: var(--glass-fill); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.cx .dsubContent > .dashdetail.undertop { --gap: 10px; }
.cx .dashtile.dashtop > div { border-bottom: 0 !important; }
