/* Touch navigation owns only its shell; business components keep their layout. */
.cg-touch { --cg-device-bottom:calc(66px + env(safe-area-inset-bottom,0px)); --cg-device-rail:88px; }
.cg-touch body { padding-bottom:var(--cg-device-bottom); }
.cg-touch [data-desktop-hidden] { display:none !important; }
.cg-device-header { display:grid;grid-template-columns:72px minmax(0,1fr) 72px;align-items:center;gap:8px;min-height:56px;padding:4px max(12px,env(safe-area-inset-right,0px)) 4px max(12px,env(safe-area-inset-left,0px));border-bottom:1px solid var(--cr-border,#e5e5e7);background:var(--cr-bg-card,#fff);color:var(--cr-text,#1d1d1f);font:600 15px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;position:relative;z-index:30; }
.cg-device-header *,.cg-device-nav *,.cg-device-tools * { box-sizing:border-box; }
.cg-device-header strong { text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px; }
.cg-device-header a { display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;color:inherit;text-decoration:none;gap:4px; }
.cg-device-brand { width:44px; }.cg-device-brand img { width:30px;height:30px;object-fit:contain; }
.cg-device-actions { display:flex;justify-content:flex-end; }.cg-device-actions svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8; }
.cg-device-back { justify-self:start;white-space:nowrap;font-size:14px; }
.cg-device-nav { position:fixed;z-index:500;inset:auto 0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));height:var(--cg-device-bottom);padding:5px env(safe-area-inset-right,0px) calc(5px + env(safe-area-inset-bottom,0px)) env(safe-area-inset-left,0px);border-top:1px solid var(--cr-border,#e5e5e7);background:var(--cr-bg-card,#fff);color:#646a67;box-shadow:0 -2px 12px #00000006;font:500 12px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.cg-device-nav a { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:44px;text-decoration:none;color:inherit;border-radius:10px; }
.cg-device-nav svg { width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }
.cg-device-nav span { white-space:nowrap; }.cg-device-nav a[aria-current=page] { color:#27563d;background:#edf3ee;font-weight:700; }
.cg-device-header a:focus-visible,.cg-device-nav a:focus-visible,.cg-device-tools :focus-visible { outline:3px solid #32664c;outline-offset:-3px; }
.cg-device-tools { margin:16px 0 24px;padding:16px;border:1px solid var(--cr-border,#e5e5e7);border-radius:12px;background:var(--cr-bg-card,#fff);color:var(--cr-text,#1d1d1f); }
.cg-device-tools h2 { font-size:16px;margin:0 0 12px; }.cg-device-tools > div { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
.cg-device-tools a,.cg-device-tools button { display:flex;align-items:center;justify-content:center;min-height:48px;padding:10px 8px;border:1px solid var(--cr-border,#e5e5e7);border-radius:8px;background:var(--cr-bg-card,#fff);color:inherit;text-decoration:none;font:600 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;white-space:nowrap; }
.cg-touch .cg-desktop-intro { display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin:0 0 20px;color:var(--cr-text,#1d1d1f); }
.cg-touch .cg-desktop-intro h1 { font-size:23px;line-height:1.4;margin:0 0 6px; }.cg-touch .cg-desktop-intro p { margin:0;font-size:14px;line-height:1.6;color:#646a67; }
.cg-touch .cg-desktop-shortcuts { display:flex;flex-wrap:wrap;gap:8px; }.cg-touch .cg-desktop-shortcuts a,.cg-touch .cg-desktop-shortcuts button { display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;background:var(--cr-bg-card,#fff);border:1px solid var(--cr-border,#cfdad2);border-radius:8px;color:#27563d;font:600 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-decoration:none; }
.cg-touch .account-wrap { margin:20px 12px;padding:18px;max-width:720px;background:var(--cr-bg-card,#fff);color:var(--cr-text,#1d1d1f); }
.cg-touch .account-wrap #desktop-account-info > .cg-desktop-shortcuts { display:none; }
.cg-touch #cg-login-context { margin-bottom:18px;color:var(--cr-text,#1d1d1f); }.cg-touch #cg-login-context h2 { font-size:20px;margin:0 0 8px; }.cg-touch #cg-login-context p,.cg-touch #cg-login-context div { font-size:14px;line-height:1.7; }.cg-touch #cg-login-context button { min-height:44px;padding:4px 8px;border:0;background:transparent;color:#27563d;font:inherit; }
.cg-touch.cg-device-focus body { padding-bottom:0; }.cg-device-editing .cg-device-nav { display:none; }
.cg-touch body.cg-news-page { box-sizing:border-box;padding-bottom:var(--cg-device-bottom); }
.cg-touch #cg-news-view { min-height:0; }
html[data-device-layout=rail]:not(.cg-device-focus) body { padding-left:var(--cg-device-rail);padding-bottom:0; }
html[data-device-layout=rail] .cg-device-nav { inset:0 auto 0 0;width:var(--cg-device-rail);height:100dvh;padding:76px 8px max(12px,env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:12px;border-top:0;border-right:1px solid var(--cr-border,#e5e5e7);box-shadow:none; }
html[data-device-layout=rail] .cg-device-nav a { flex:none;min-height:64px; }
html[data-device-layout=rail] body.cg-news-page { padding-bottom:0; }
html[data-device-layout=rail] .cg-device-tools > div { grid-template-columns:repeat(4,minmax(0,1fr)); }
html.cg-touch.cg-device-editing .cg-device-nav { display:none; }
html[data-theme=dark] .cg-device-nav a[aria-current=page] { background:#253e30;color:#a7d9b7; }
html[data-theme=dark] .cg-device-nav,html[data-theme=dark] .cg-touch .cg-desktop-intro p { color:#b7c0bb; }
html[data-theme=dark] .cg-touch .cg-desktop-shortcuts a,html[data-theme=dark] .cg-touch .cg-desktop-shortcuts button,html[data-theme=dark] .cg-touch #cg-login-context button { color:#a7d9b7; }

/* Personal content stays on My; existing account controls live in settings. */
.cg-touch .cg-personal-summary { color:var(--cr-text,#1d1d1f);text-align:left; }
.cg-touch .cg-personal-identity { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.cg-touch .cg-personal-avatar { width:52px;height:52px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;background:#edf3ee;color:#27563d;font-size:23px;font-weight:700; }
.cg-touch .cg-personal-identity > div:nth-child(2) { flex:1;min-width:0; }
.cg-touch .cg-personal-role { margin:0 0 4px;font-size:12px;color:#646a67; }
.cg-touch .cg-personal-summary h1 { margin:0 0 6px;font-size:21px;line-height:1.4;overflow-wrap:anywhere; }
.cg-touch .cg-personal-description,.cg-touch .cg-personal-coach p { margin:0;color:#646a67;font-size:14px;line-height:1.6; }
.cg-touch .cg-edit-profile { flex-shrink:0;min-height:44px;padding:8px 12px;border:1px solid var(--cr-border,#cfdad2);border-radius:8px;background:var(--cr-bg-card,#fff);color:var(--cr-text,#1d1d1f);font:600 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.cg-touch .cg-personal-links { display:flex;flex-direction:column;gap:4px;margin-top:20px;border-top:1px solid var(--cr-border,#e5e5e7);padding-top:12px; }
.cg-touch .cg-personal-links a,.cg-touch .cg-personal-coach a { display:flex;align-items:center;justify-content:space-between;min-height:48px;text-decoration:none;color:var(--cr-text,#1d1d1f);font-size:15px;font-weight:600; }
.cg-touch .cg-personal-coach { margin-top:20px; }.cg-touch #profileContent.profile-card { padding:20px;margin-bottom:20px; }
.cg-touch .cg-settings-dialog.cr-modal-box { box-sizing:border-box;width:760px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;overflow:hidden;background:var(--cr-bg-card,#fff);color:var(--cr-text,#1d1d1f);border-radius:12px; }
.cg-touch .cg-settings-dialog .cr-modal-title { padding:16px;margin:0;border-bottom:1px solid var(--cr-border,#e5e5e7);font-size:20px;text-align:left; }
.cg-touch .cg-settings-content { display:flex;flex-direction:column;height:510px;max-height:calc(100dvh - 156px);min-height:100px; }
.cg-touch .cg-settings-tabs { flex-shrink:0;display:flex;gap:4px;padding:8px;background:var(--cr-bg,#f5f6f5);border-bottom:1px solid var(--cr-border,#e5e5e7); }
.cg-touch .cg-settings-tabs button { flex:1;min-width:0;min-height:44px;padding:8px 4px;border:0;border-radius:6px;background:transparent;color:inherit;font:600 13px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap; }
.cg-touch .cg-settings-tabs button[aria-selected=true] { background:#edf3ee;color:#27563d; }
.cg-touch .cg-settings-panels { overflow-y:auto;overscroll-behavior:contain;padding:16px;min-width:0;min-height:0; }
.cg-touch .cg-settings-panels [hidden] { display:none !important; }.cg-touch .cg-settings-dialog > div:last-child { margin:0 !important;padding:10px 16px;border-top:1px solid var(--cr-border,#e5e5e7);text-align:right !important; }
.cg-touch .cg-account-section { margin:0 0 20px;padding-bottom:18px;border-bottom:1px solid var(--cr-border,#e5e5e7); }.cg-touch .cg-account-section:last-child { border:0;margin:0; }.cg-touch .cg-account-section h3 { margin:0 0 12px;font-size:16px; }
.cg-touch .cg-account-section label { display:block;font-size:13px;margin:12px 0 6px; }.cg-touch .cg-account-row { display:flex;align-items:center;gap:8px;flex-wrap:wrap; }
.cg-touch .cg-account-row input { flex:1;min-width:120px;width:100%;padding:10px;border:1px solid var(--cr-border,#d8ddda);border-radius:6px;color:inherit;background:var(--cr-bg-card,#fff);font-size:16px;min-height:44px;box-sizing:border-box; }
.cg-touch .cg-settings-panels button { min-height:44px;border:1px solid var(--cr-border,#cfdad2);border-radius:6px;background:var(--cr-bg-card,#fff);color:inherit;padding:8px 10px;font:600 13px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.cg-touch .cg-settings-panels button:disabled { opacity:.55; }.cg-touch .cg-account-value,.cg-touch .cg-account-phone-value { overflow-wrap:anywhere; }.cg-touch .cg-settings-description,.cg-touch .cg-account-status { font-size:13px;line-height:1.6; }.cg-touch .cg-account-status:empty { display:none; }
.cg-touch .cg-account-status.is-error { color:#a72f2f; }.cg-touch .cg-account-status.is-success,.cg-touch .cg-account-verified { color:#27563d; }
.cg-touch .cg-settings-dialog :focus-visible { outline:3px solid #32664c;outline-offset:2px; }
html[data-theme=dark] .cg-touch .cg-settings-tabs button[aria-selected=true] { background:#253e30;color:#a7d9b7; }
html[data-theme=dark] .cg-touch .cg-personal-role,html[data-theme=dark] .cg-touch .cg-personal-description,html[data-theme=dark] .cg-touch .cg-personal-coach p { color:#b7c0bb; }
html[data-theme=dark] .cg-touch .cg-account-status.is-success,html[data-theme=dark] .cg-touch .cg-account-verified { color:#a7d9b7; }html[data-theme=dark] .cg-touch .cg-account-status.is-error { color:#ffaba3; }
