* { box-sizing: border-box }
body { margin: 0; background: radial-gradient(75% 28rem at 75% 10%, #e2ecff, transparent), #f6f8fc; color: #0f172a; font: 16px/1.5 Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif }
main, header > div { max-width: 1200px; margin: auto; padding: 20px }
header { background: #ffffffc9; border-bottom: 1px solid #e2e8f0 }
header > div, .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap }
header a { display: inline-flex; align-items: center; gap: 12px }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #1d5ce8; color: white }
header strong { font-size: 1.4rem; letter-spacing: -.04em }
a { color: #1d5ce8 }
h1 { font-size: clamp(2rem, 6vw, 4.5rem); line-height: 1.04; letter-spacing: -.06em; margin: 12px 0 }
h2, h3 { margin: 0 0 8px; line-height: 1.25 }
button, select, input, .button { font: inherit; border-radius: 14px; padding: 11px 16px; border: 1px solid #dce5f0; background: white; color: #0f172a }
input, select { width: 100%; min-width: 0; background: #f5f7fa }
button, .button { cursor: pointer; display: inline-block; text-decoration: none; font-weight: 700; transition: background .18s, transform .18s }
button:active, .button:active { transform: scale(.98) }
button:disabled { cursor: wait; opacity: .6 }
.primary { background: #1d5ce8; border-color: #1d5ce8; color: white }
.primary:hover { background: #174bc2 }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #1d5ce8; outline-offset: 3px }
.hero, article, .entry { background: white; border-radius: 24px; padding: 24px; margin: 16px 0; border: 1px solid #e2e8f0; box-shadow: 0 20px 50px -28px #0f172a24 }
.hero { background: #eff5ff; padding: clamp(28px,6vw,72px) }
.landing-hero { display: grid; grid-template-columns: 1.06fr 1fr; overflow: hidden; padding: 0; border: 0; border-radius: 30px; background: radial-gradient(85% 125% at 100% 40%, #254699 0%, #14284e 54%, #101c36 100%); color: white; box-shadow: 0 28px 64px -34px #173979 }
.landing-copy { padding: clamp(28px,5vw,56px); align-self: center }
.landing-copy p { color: #cbd8f3; max-width: 35ch }
.landing-copy .primary { background: white; border-color: white; color: #0f172a }
.landing-visual { position: relative; min-height: 280px }
.landing-visual img { width: 100%; height: 100%; object-fit: cover; position: absolute }
.landing-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #182d57, transparent 34%) }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 14px }
.grid article { margin: 0 }
.tag { display: inline-block; background: #eaf1ff; color: #174bc2; border-radius: 99px; padding: 4px 12px }
.muted { color: #52647e }
label { display: grid; gap: 6px; margin: 12px 0; font-weight: 600 }
form .primary { margin-top: 8px }
#notice { color: #a32121; margin: 0 }
#notice:empty { display: none }
.entry { text-align: center; padding: 36px 20px }
.small { display: block; font-size: .9rem; margin-top: 12px }
.map { position:relative; isolation:isolate; overflow:hidden; width:100%; min-width:0; height: 365px; border-radius: 20px; margin-top: 12px; background: #eaf1ff }
.narrow { max-width: 540px; margin: auto }
.narrow article, .profile-sheet { border-radius: 28px; padding: clamp(20px,4vw,32px) }
.narrow .primary { display: block; text-align: center; width: 100% }
.narrow details { margin-top: 20px }
.pin { background: #1d5ce8; color: white; border: 2px solid white; border-radius: 100%; text-align: center; line-height: 26px; font-weight: bold }
.stack > * + * { margin-top: 12px }
.avatar { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; background: #eaf1ff; color: #1d5ce8; margin-bottom: 12px; overflow: hidden; font-size: 1.5rem; font-weight: 800 }
.avatar img { width: 100%; height: 100%; object-fit: cover }
.avatar img[hidden] { display: none }
@media (max-width: 760px) {
  .landing-hero { grid-template-columns: 1fr }
  .landing-visual { min-height: 220px }
  .landing-visual::after { background: linear-gradient(180deg, #182d57, transparent 35%) }
}
@media (prefers-reduced-motion: reduce) {
  button, .button { transition: none }
  button:active, .button:active { transform: none }
}
.dashboard-head { display:flex; align-items:center; gap:20px; padding:24px; margin:16px 0 24px; border:1px solid #e2e8f0; border-radius:28px; background:white }
.dashboard-head .avatar { flex:none; margin:0; width:64px; height:64px; background:#1d5ce8; color:white }
.dashboard-head h1 { margin:0; font-size:clamp(1.5rem,4vw,2.4rem); letter-spacing:-.04em }
.dashboard-head p { margin:4px 0 0 }
.dashboard-content { display:grid; gap:20px; align-items:start; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)) }
.dashboard-content .profile-sheet { margin:0; grid-row:1 }
.dashboard-content section .row h2 { margin:0 }
@media (max-width:760px) {
  .dashboard-head { gap:14px; padding:18px }
  .dashboard-head .avatar { width:48px; height:48px }
}
#nav { display:flex; align-items:center; gap:10px; flex-wrap:wrap }
#nav .public-nav-link { padding:8px; text-decoration:none; font-size:.9rem; font-weight:700; color:#334155 }
#nav .button { font-size:.9rem; padding:8px 13px }
.public-hero { position:relative; isolation:isolate; display:grid; grid-template-columns:1.04fr 1fr; min-height:470px; border-radius:30px; overflow:hidden; background:#0f1d39; color:white; box-shadow:0 24px 60px -38px #1c3e80 }
.public-copy { z-index:1; padding:clamp(28px,5.2vw,64px); align-self:center }
.public-city { display:flex; align-items:center; gap:8px; margin:0 0 20px; color:#d5e5ff; font-size:.9rem; font-weight:700 }
.public-city span { width:7px; height:7px; border-radius:50%; background:#93b7ff }
.public-copy h1 { margin:0; font-size:clamp(2.4rem,5.4vw,4.4rem); line-height:1 }
.public-copy h1 + p { color:#d1ddf5; max-width:32ch; margin:20px 0 24px }
.public-copy .button { background:white; border-color:white; color:#152b58 }
.public-copy .button span { margin-left:.45rem }
.public-photo { position:relative; min-height:260px }
.public-photo img { position:absolute; width:100%; height:100%; object-fit:cover; object-position:56% center }
.public-photo::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,#0f1d39,transparent 37%) }
.public-section { margin:48px 0; scroll-margin-top:20px }
.public-section-head { margin:0 0 17px }
.public-section-head h2 { font-size:clamp(1.7rem,3vw,2.4rem); letter-spacing:-.04em }
.public-section-head p,.public-steps p { color:#52647e; margin:6px 0 0 }
.trainer-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px }
.trainer-grid .trainer-card { padding:0; overflow:hidden }
.trainer-card img { display:block; width:100%; aspect-ratio:1.65; object-fit:cover; object-position:center 31%; background:#eaf1ff }
.trainer-card-body { padding:20px }
.trainer-card h3 { margin-top:12px; font-size:1.25rem }
.trainer-card p { margin:0 }
.public-steps article { padding:22px; background:#fdfdff }
.public-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:14px; padding:20px 0; border-top:1px solid #dfe7f3; color:#334155 }
@media(max-width:760px){
  .public-hero { grid-template-columns:1fr; min-height:0 }
  .public-photo { min-height:218px }
  .public-photo::after { background:linear-gradient(180deg,#0f1d39,transparent 28%) }
  .desktop-break { display:none }
  .trainer-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,205px),1fr)) }
}
@media(max-width:520px){#nav .public-nav-link { display:none }}
.trainer-card { position:relative; transition:transform .18s ease, box-shadow .18s ease }
.trainer-card:hover { transform:translateY(-3px); box-shadow:0 20px 44px -24px #204a8b55 }
.trainer-card-link { color:inherit; text-decoration:none }
.trainer-card-link:hover { color:#1d5ce8 }
.trainer-card-link::after { content:''; position:absolute; inset:0 }
.trainer-card:focus-within { outline:2px solid #1d5ce8; outline-offset:3px }
.trainer-profile { display:grid; grid-template-columns: minmax(0,320px) minmax(0,1fr); align-items:start; gap:clamp(20px,5vw,52px); padding:clamp(20px,4vw,36px) }
.trainer-profile h1 { font-size:clamp(2rem,4vw,3.8rem) }
.trainer-portrait { display:block; width:100%; aspect-ratio:4/5; object-fit:cover; object-position:center 30%; border-radius:20px; background:#eaf1ff }
.trainer-profile dt { font-weight:750; margin-top:12px }
.trainer-profile dd { color:#52647e; margin:4px 0 0 }
textarea { width:100%; padding:11px 16px; border-radius:14px; border:1px solid #dce5f0; background:#f5f7fa; color:#0f172a; font:inherit; resize:vertical }
textarea:focus-visible { outline:2px solid #1d5ce8; outline-offset:3px }
@media(max-width:680px) { .trainer-profile { grid-template-columns:1fr } .trainer-portrait { aspect-ratio:4/3 } }
@media(prefers-reduced-motion:reduce) { .trainer-card { transition:none } .trainer-card:hover { transform:none } }
.brand-mark { display:flex; align-items:center; justify-content:center; gap:3px; background:linear-gradient(145deg,#3679ff,#1847cc); box-shadow:0 6px 12px -6px #1d5ce899 }
.brand-mark i { width:4px; height:12px; border-radius:4px; background:#fff; transform:skewX(-20deg) }
.brand-mark i:nth-child(2) { height:20px }
.brand-mark i:nth-child(3) { height:15px; opacity:.72 }
.trainer-window { overflow:hidden; padding:6px; margin:-6px }
.trainer-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
.trainer-grid .trainer-card:nth-child(n+3) { display:none }
.trainer-grid .trainer-card img { aspect-ratio:1.75 }
.trainer-card-body { padding:clamp(20px,3vw,30px) }
.trainer-card h3 { font-size:clamp(1.3rem,2.4vw,1.65rem) }
.trainer-card .trainer-summary { color:#334155; margin-top:12px; line-height:1.55; min-height:3.1em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden }
@media(max-width:520px) {
  .trainer-grid { grid-template-columns:minmax(0,1fr) }
  .trainer-grid .trainer-card:nth-child(n+2) { display:none }
  .trainer-grid .trainer-card img { aspect-ratio:1.42 }
}
.catalog-cta { margin-top:24px; text-align:center }
.catalog-filters { grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)) }
.catalog-filters label { margin:0 }
.catalog-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,255px),1fr)); gap:18px }
.catalog-grid .trainer-card { padding:0; overflow:hidden }
.catalog-toggle { display:flex; gap:4px; padding:4px; border:1px solid #dfe7f3; border-radius:16px; background:white }
.catalog-toggle button { padding:7px 14px; border-color:transparent }
.catalog-toggle button[aria-pressed="true"] { color:#174bc2; background:#eaf1ff }
#catalog-map { height:clamp(340px,60vh,570px) }
#catalog-results[hidden], #catalog-map[hidden] { display:none }
.dashboard-head { flex-wrap:wrap }
.dashboard-head .role-shortcut { margin-left:auto }
.location-tools,.radius-presets { display:flex; flex-wrap:wrap; gap:8px; align-items:center }
.location-tools { margin-top:14px; gap:14px }
.radius-presets button { padding:7px 12px }
.radius-presets button[aria-pressed="true"] { color:#174bc2; background:#eaf1ff; border-color:#cddfff }
#location-status:empty { display:none }
.search-panel .location-tools { align-items:end }
.search-panel .location-tools label { margin:0; flex:1 1 200px; max-width:380px }
.search-radius { margin-top:22px; padding-top:20px; border-top:1px solid #e2e8f0 }
.search-radius .grid { max-width:540px }
.sport-presets { margin:12px 0 }
.page-back { display:inline-block; padding:7px 0; font-weight:700; text-decoration:none }
.page-back:hover { text-decoration:underline }
.public-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px }
.public-actions > a:not(.button) { color:#dfebff; font-weight:700; text-underline-offset:4px }
[data-clear-area][hidden] { display:none }
.search-radius { background:#f7faff; border:1px solid #dfe9fa; border-radius:20px; padding:clamp(16px,3vw,24px) }
.radius-heading { display:flex; align-items:center; justify-content:space-between; gap:12px }
.radius-heading label { margin:0; font-size:1.15rem; font-weight:800 }
.radius-heading output { padding:5px 12px; border-radius:10px; background:#e5eeff; color:#174bc2; font-weight:800; white-space:nowrap }
.search-radius input[type="range"] { display:block; margin:10px 0 2px; padding:0; min-height:32px; border:0; accent-color:#1d5ce8; background:transparent; cursor:pointer }
.radius-scale { display:flex; justify-content:space-between; color:#52647e; font-size:.85rem }
.travel-options { min-width:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:8px; border:0; padding:0; margin:18px 0 0 }
.travel-options legend { padding:0; margin-bottom:8px; font-weight:750 }
.travel-options label { display:flex; align-items:center; gap:9px; margin:0; padding:10px 12px; border:1px solid #dce5f0; border-radius:12px; background:white; cursor:pointer }
.travel-options label:has(input:checked) { border-color:#a9c5ff; background:#edf4ff; color:#174bc2 }
.travel-options input[type="radio"] { width:16px; height:16px; margin:0; flex:none; accent-color:#1d5ce8 }
.travel-options label { min-height:72px; padding:12px 14px; align-items:center }
.travel-options strong,.travel-options small { display:block }
.travel-options small { color:#52647e; font-size:.84rem; font-weight:500; line-height:1.35; margin-top:3px }
.travel-options label:focus-within { outline:2px solid #1d5ce8; outline-offset:2px }
@media(max-width:600px) { .travel-options { grid-template-columns:1fr } }
.request-form { max-width:750px }
.request-form h1,.request-grid h2 { margin-top:12px }
.request-form h1 { font-size:clamp(2rem,4vw,3rem) }
.request-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)) }
.request-description { overflow-wrap:anywhere; white-space:pre-wrap }
.request-editor { padding:12px 0; border-top:1px solid #e2e8f0 }
.request-editor summary { cursor:pointer; font-weight:750; color:#174bc2 }
.offer-photo { width:52px; height:52px; border-radius:50%; object-fit:cover }
.request-grid article h3 { margin-top:12px }
.request-heading h1 { font-size:clamp(2rem,4vw,3rem) }
.request-tabs { display:flex; flex-wrap:wrap; gap:6px; padding:5px; background:white; border:1px solid #dfe7f3; border-radius:16px; width:fit-content; margin:18px 0 }
.request-tabs a { display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border-radius:11px; text-decoration:none; color:#334155; font-weight:750 }
.request-tabs a:hover,.request-tabs a[aria-current="page"] { color:#174bc2; background:#eaf1ff }
.request-tabs .tag { padding:1px 7px; font-size:.8rem }
.app-brand { text-decoration:none }
.coach-intro { display:grid; grid-template-columns:1.25fr 1fr; gap:30px; align-items:center; padding:clamp(24px,5vw,62px); margin-top:18px; border-radius:28px; background:#e9f1ff }
.coach-intro h1 { font-size:clamp(2.4rem,5vw,4.4rem) }
.coach-preview article { margin:0 0 14px }
.coach-preview article p { margin-bottom:0; color:#52647e }
@media(max-width:680px) { .coach-intro { grid-template-columns:1fr } .app-brand .tag { display:none } }
.coach-onboarding { max-width:790px }
.coach-onboarding h1 { font-size:clamp(2rem,4vw,3rem) }
.coach-onboarding .grid { align-items:start }
.coach-progress { display:grid; gap:7px; color:#52647e; font-weight:700; font-size:.9rem; margin:18px 0 24px }
.coach-progress progress { display:block; width:100%; height:9px; accent-color:#1d5ce8 }
.coach-step h2 { margin:0 0 16px }
.coach-step-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px }
.coach-step-actions button { margin:0 }
.coach-step-actions [hidden],.coach-step[hidden] { display:none }
.coach-photo-card { display:grid; justify-items:center; gap:14px; padding:24px 16px; text-align:center; border:1px solid #dfe7f3; border-radius:20px; background:#f7faff }
.coach-camera-button.avatar { width:104px; height:104px; margin:0; padding:0; border:1px solid #c9dcff; background:#e8f0ff }
.coach-camera-button.avatar:is(:hover,:focus-visible) { background:#dbe9ff }
.portrait-smile { display:block; position:relative; width:46px; height:50px; border:2px solid currentColor; border-radius:46% }
.portrait-smile::before { content:""; position:absolute; top:15px; left:11px; width:5px; height:6px; border-radius:50%; background:currentColor; box-shadow:15px 0 currentColor }
.portrait-smile::after { content:""; position:absolute; left:12px; top:26px; width:18px; height:8px; border-bottom:2px solid currentColor; border-radius:50% }
.coach-photo-card p { margin:0 0 8px }
.coach-photo-card .muted,.coach-field-hint,[data-certificate-status] { margin:8px 0 0; font-size:.875rem }
body[data-coach-onboarding] > header { display:none }
.coach-camera-dialog { width:min(440px,calc(100% - 24px)); max-height:calc(100dvh - 24px); padding:20px; border:1px solid #dfe7f3; border-radius:22px; color:#0f172a }
.coach-camera-dialog::backdrop { background:#0f172a99 }
.camera-view { position:relative; isolation:isolate; overflow:hidden; aspect-ratio:1; border-radius:16px; background:#111827 }
.camera-view video { display:block; width:100%; height:100%; object-fit:cover; transform:scaleX(-1) }
.camera-guide { position:absolute; pointer-events:none; inset:9%; border:2px solid #fff; border-radius:50%; box-shadow:0 0 0 900px #0f172a65 }

/* Keep the coach interface within the on-screen Android WebView width. */
body[data-app="coach"] { min-height:100dvh; overflow-wrap:anywhere }
body[data-app="coach"] :is(main,#view,.coach-onboarding,form,.coach-step,.grid > *,#nav) { min-width:0 }
body[data-app="coach"] :is(input,textarea,select,button,img,video) { max-width:100% }
body[data-app="coach"] .camera-view video { position:absolute; inset:0 }
@media (max-width:680px) {
  body[data-app="coach"] { background:#fff; font-size:16px; }
  body[data-app="coach"] header > div {
    padding:10px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left));
    gap:6px 12px;
  }
  body[data-app="coach"] .app-brand { gap:8px; min-height:40px }
  body[data-app="coach"] .brand-mark { width:32px; height:32px; flex:none }
  body[data-app="coach"] header strong { font-size:1.13rem }
  body[data-app="coach"] #nav { flex:1 1 100%; gap:4px 12px }
  body[data-app="coach"] #nav a,
  body[data-app="coach"] #nav button { padding:7px 0; min-height:38px; font-size:.85rem; text-decoration:none }
  body[data-app="coach"] #nav button { color:#52647e; margin-inline-start:auto; border:0 }
  body[data-app="coach"] main {
    width:100%; padding:16px max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  }
  body[data-app="coach"] .coach-onboarding {
    width:100%; max-width:none; margin:0; padding:4px 0 0; border:0; border-radius:0; box-shadow:none;
  }
  body[data-app="coach"] .coach-onboarding h1 { font-size:clamp(1.55rem,6.6vw,2rem); line-height:1.12; margin:0 0 8px }
  body[data-app="coach"] .coach-onboarding > p { font-size:.9rem; margin:0 }
  body[data-app="coach"] .coach-onboarding .grid { grid-template-columns:minmax(0,1fr); gap:0 }
  body[data-app="coach"] .coach-progress { margin:18px 0 }
  body[data-app="coach"] .coach-step h2 { font-size:1.25rem }
  body[data-app="coach"] .coach-step-actions { display:flex; gap:8px; margin-top:16px }
  body[data-app="coach"] .coach-step-actions button:not([hidden]) { flex:1 1 auto; min-height:46px; padding:9px 12px }
  body[data-app="coach"] .coach-camera-dialog {
    box-sizing:border-box; inset:0; width:100%; height:100%; max-width:none; max-height:none; margin:0;
    border:0; border-radius:0; padding:16px; overflow:auto;
  }
  body[data-app="coach"] .camera-view { width:min(100%, max(170px,calc(100dvh - 215px))); margin-inline:auto }
  body[data-app="coach"] .dashboard-head { padding:14px; margin:0 0 16px }
  body[data-app="coach"] .dashboard-content,body[data-app="coach"] .request-grid { grid-template-columns:minmax(0,1fr) }
  body[data-app="coach"] .coach-intro { margin-top:0; padding:20px; border-radius:20px; gap:14px }
}

.coach-profile-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px }
.coach-profile-heading :is(h2,p) { margin:0 }
.coach-profile-heading p { margin-top:4px }
.coach-account { margin-top:16px; display:flex; flex-wrap:wrap; align-items:center; gap:10px }
.coach-account h2 { flex-basis:100%; margin:0 }
.dashboard-training { grid-template-columns:minmax(0,1fr) }
body[data-coach-cabinet] #nav a { padding:9px 14px; border-radius:12px; text-decoration:none; font-weight:750 }
body[data-coach-cabinet] #nav a[aria-current="page"] { color:#174bc2; background:#eaf1ff }
@media (max-width:680px) {
  body[data-coach-cabinet] main { padding-bottom:calc(88px + env(safe-area-inset-bottom)) }
  body[data-coach-cabinet] #nav {
    position:fixed; z-index:20; inset:auto 0 0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px; padding:6px 8px max(6px,env(safe-area-inset-bottom)); background:white; border-top:1px solid #dfe7f3;
  }
  body[data-coach-cabinet] #nav a { justify-content:center; min-height:46px; padding:6px 2px; color:#334155 }
}
