/* iOS viewport safety: all course views are fixed-width chrome.
   The arena and the import review are the ONLY scalable surfaces. */
html, html body {
  width:100%;max-width:100%;height:100%;
  overflow-x:hidden!important;
  overscroll-behavior:none!important;
  touch-action:pan-x pan-y;
  -webkit-text-size-adjust:100%;
}
html.course-refined-chrome #app.compact-app {
  min-width:0!important;overflow:hidden!important;
}
html.course-refined-chrome #app.compact-app #dock,
html.course-refined-chrome #app.compact-app #dock > *,
html.course-refined-chrome #app.compact-app .cw-route-metrics > *,
html.course-refined-chrome #app.compact-app .compact-counters > * {
  min-width:0!important;max-width:100%;
}
html.course-refined-chrome #app.compact-app .map-layer,
html.course-refined-chrome #app.compact-app .map-layer #arena,
.mvp-review .mvp-review-viewport {
  touch-action:none!important;
}
html.course-refined-chrome #app.compact-app :is(.cw-top-tools,.cw-top-left,.compact-summary,.compact-counters,.cw-route-metrics) {
  touch-action:manipulation;
}
@media(max-width:699px) {
  html.course-refined-chrome #app.compact-app {
    left:0!important;right:0!important;
    width:100vw!important;max-width:100vw!important;
    transform:none!important;
  }
  html.course-refined-chrome #app.compact-app #dock {
    left:0!important;right:0!important;
    width:100%!important;max-width:100%!important;
    transform:none!important;
    box-sizing:border-box!important;
  }
  html.course-refined-chrome #app.compact-app #dock .compact-counters {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  }
  html.course-refined-chrome #app.compact-app .compact-summary {
    grid-template-columns:44px minmax(0,1fr) 44px 48px!important;
  }
}
/* Sheets remain scrollable; native text inputs keep 16px to avoid iOS
   input-focus magnification. None of the fixed chrome is transformed. */
html.course-refined-chrome #app.compact-app .sheet {
  max-width:100%!important;
  touch-action:pan-y!important;
}
html.course-refined-chrome #app.compact-app .sheet :is(input,textarea,select) {
  font-size:max(16px,1rem)!important;
}

/* Refined one-hand course walk: compact thumb dock and map-level utilities. */
html.course-refined-chrome #app.compact-app .cw-top-tools {
  position:absolute;top:calc(env(safe-area-inset-top) + 9px);right:10px;
  display:flex;align-items:center;gap:5px;z-index:24;
  margin:0;padding:0;pointer-events:auto;
}
html.course-refined-chrome #app.compact-app .cw-top-tools > button {
  display:grid!important;place-items:center!important;position:static!important;
  width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;
  flex:0 0 44px!important;margin:0!important;padding:0!important;
  border:1px solid rgba(240,235,211,.16)!important;border-radius:50%!important;
  color:#f0eee2!important;background:rgba(35,37,34,.56)!important;
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  box-shadow:0 2px 9px rgba(0,0,0,.13)!important;
}
html.course-refined-chrome #app.compact-app .cw-top-tools #mvpHelp span {
  display:grid;place-items:center;width:19px;height:19px;
  border:1px solid currentColor;border-radius:50%;font:12px/1 Arial,sans-serif;
}
html.course-refined-chrome #app.compact-app .cw-top-tools svg {width:19px;height:19px}
html.course-refined-chrome #app.compact-app .cw-top-left {
  position:absolute;z-index:24;top:calc(env(safe-area-inset-top) + 9px);left:10px;
}
html.course-refined-chrome #app.compact-app .cw-top-left #mvpLogin {
  display:block;min-height:44px!important;margin:0!important;padding:0 13px!important;
  border:1px solid rgba(240,235,211,.17)!important;border-radius:24px!important;
  background:rgba(35,37,34,.67)!important;color:#eee9cf!important;
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  font:500 12px Arial,sans-serif;
}
html.course-refined-chrome #app.compact-app .cw-top-left #mvpLogin[hidden] {display:none!important}
html.course-refined-chrome #app.compact-app .cw-utility-collapsed,
html.course-refined-chrome #app.compact-app #dock > #sourceRouteChoice {display:none!important}
html.course-refined-chrome #app.compact-app #dock {
  display:flex!important;flex-direction:column!important;gap:5px!important;
  padding:7px 11px calc(6px + env(safe-area-inset-bottom))!important;
  background:rgba(31,32,30,.97)!important;
  border-radius:17px 17px 0 0!important;
  box-shadow:0 -5px 22px rgba(0,0,0,.15)!important;
}
html.course-refined-chrome #app.compact-app #dock .compact-summary {
  display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px 48px!important;
  grid-template-rows:29px 21px!important;column-gap:5px!important;row-gap:0!important;
  min-height:50px!important;height:50px!important;
}
html.course-refined-chrome #app.compact-app .compact-summary .leg-swipe-hint {display:none!important}
html.course-refined-chrome #app.compact-app .compact-summary :is(#prev,#next) {
  width:44px!important;height:46px!important;min-height:46px!important;
  grid-row:1/3!important;border-radius:12px!important;
  background:rgba(255,255,255,.035)!important;
}
html.course-refined-chrome #app.compact-app .compact-summary #walkLeg {
  grid-column:2!important;grid-row:1!important;min-height:29px!important;
  padding:0 2px!important;
}
html.course-refined-chrome #app.compact-app .compact-summary #walkLeg strong {
  display:block!important;font:600 18px/22px Arial,sans-serif!important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
html.course-refined-chrome #app.compact-app .compact-summary #walkLeg strong .leg-time {
  font:400 10px/12px Arial,sans-serif!important;color:#aeaea5!important;
}
html.course-refined-chrome #app.compact-app .compact-summary #walkLeg small {
  font:11px/13px Arial,sans-serif!important;
}
html.course-refined-chrome #app.compact-app .compact-summary #compactStats {
  grid-column:2!important;grid-row:2!important;
  display:flex!important;align-items:center!important;gap:6px!important;
  min-height:21px!important;height:21px!important;overflow:hidden;
  padding:0 2px!important;text-align:left!important;white-space:nowrap!important;
}
html.course-refined-chrome #app.compact-app #compactStats > b {
  font:500 10px/14px Arial,sans-serif!important;white-space:nowrap;
}
html.course-refined-chrome #app.compact-app #compactStats > span {
  font:10px/14px Arial,sans-serif!important;white-space:nowrap;
  color:#b8b7a9!important;
}
html.course-refined-chrome #app.compact-app .compact-summary #doneNext {
  grid-column:4!important;grid-row:1/3!important;
  width:48px!important;min-width:48px!important;
  height:48px!important;min-height:48px!important;
  border-radius:14px!important;
}
html.course-refined-chrome #app.compact-app #dock .compact-counters {
  grid-template-columns:1fr 1fr!important;gap:7px!important;
  min-height:57px!important;max-height:none!important;
}
html.course-refined-chrome #app.compact-app #dock .compact-counters > :is(.big-strides,.walk-counter) {
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) 44px!important;
  grid-template-rows:12px 44px!important;gap:0!important;
  min-height:57px!important;height:57px!important;
  padding:0 2px!important;border-radius:13px!important;
  background:#2b2d29!important;
}
html.course-refined-chrome #app.compact-app #dock .compact-counters :is(#bigStridesLabel,#walkStepsLabel) {
  font:500 10px/12px Arial,sans-serif!important;
}
html.course-refined-chrome #app.compact-app #dock .compact-counters :is(#strideCountEdit b,#walkStepsValue) {
  font:600 23px/26px Arial,sans-serif!important;
}
html.course-refined-chrome #app.compact-app #dock .compact-counters :is(#strideFloatMinus,#strideFloatPlus,#walkStepsMinus,#walkStepsPlus) {
  width:44px!important;min-width:44px!important;
  height:44px!important;min-height:44px!important;
  border-radius:11px!important;
}
html.course-refined-chrome #app.compact-app .cw-route-metrics {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;
  width:100%;min-height:48px;margin:0;
}
html.course-refined-chrome #app.compact-app .cw-route-control {
  display:grid;grid-template-columns:37px minmax(0,1fr) 37px;align-items:center;
  min-width:0;height:48px;border:1px solid #ffffff17;border-radius:12px;
  background:#262824;overflow:hidden;
}
html.course-refined-chrome #app.compact-app .cw-route-control.cw-single-route {
  grid-template-columns:minmax(0,1fr);
}
html.course-refined-chrome #app.compact-app .cw-single-route .cw-route-arrow {display:none!important}
html.course-refined-chrome #app.compact-app .cw-route-arrow {
  display:grid;place-items:center;width:37px;min-width:37px;height:46px;min-height:46px;
  border:0;background:transparent;color:#ded3a6;font:24px Arial,sans-serif;padding:0;
}
html.course-refined-chrome #app.compact-app .cw-route-arrow:disabled {opacity:.22}
html.course-refined-chrome #app.compact-app .cw-route-value,
html.course-refined-chrome #app.compact-app .cw-model-summary {
  display:flex;flex-direction:column;justify-content:center;align-items:center;
  min-width:0;height:48px;min-height:48px;padding:2px 3px;
  border:0;border-radius:12px;background:transparent;color:#efede3;text-align:center;
  font-family:Arial,sans-serif;
}
html.course-refined-chrome #app.compact-app .cw-model-summary {
  background:#282a27;border:1px solid #ffffff17;
}
html.course-refined-chrome #app.compact-app .cw-route-metrics small {
  display:block;font:500 9px/12px Arial,sans-serif;letter-spacing:.015em;
  color:#b9b9a9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;
}
html.course-refined-chrome #app.compact-app .cw-route-metrics b {
  display:block;font:600 11px/16px Arial,sans-serif;color:#e8dfba;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;
}
html.course-refined-chrome #app.compact-app #progressTrack {
  height:2px!important;min-height:2px!important;max-height:2px!important;
  margin:0!important;padding:0!important;flex:none!important;
}
html.course-refined-chrome #app.compact-app .floating-reset #recenterMap {
  background:rgba(39,41,37,.69)!important;border-radius:50%!important;
  backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);
}
html.course-refined-chrome #app.compact-app:has(.sheet.show) :is(.cw-top-tools,.cw-top-left) {
  pointer-events:none;opacity:0;
}
html.course-refined-chrome #app.compact-app .cw-top-tools button:focus-visible,
html.course-refined-chrome #app.compact-app .cw-route-metrics button:focus-visible {
  outline:2px solid #e2d49b;outline-offset:2px;
}
@media (max-width:370px) {
  html.course-refined-chrome #app.compact-app #dock {padding-left:7px!important;padding-right:7px!important}
  html.course-refined-chrome #app.compact-app .cw-route-metrics {gap:5px}
  html.course-refined-chrome #app.compact-app .cw-route-control {grid-template-columns:31px minmax(0,1fr) 31px}
  html.course-refined-chrome #app.compact-app .cw-route-arrow {width:31px;min-width:31px}
  html.course-refined-chrome #app.compact-app .cw-route-metrics b {font-size:10px}
}
@media (min-width:700px) {
  html.course-refined-chrome #app.compact-app .cw-top-tools {right:20px}
  html.course-refined-chrome #app.compact-app .cw-top-left {left:20px}
}
@media (prefers-reduced-motion:no-preference) {
  html.course-refined-chrome #app.compact-app .cw-top-tools,
  html.course-refined-chrome #app.compact-app .cw-route-metrics button {transition:background .14s,opacity .14s}
}

/* SvRF update: readable total rhythm and clear leg warnings. */
html.course-refined-chrome #app.compact-app .compact-summary{grid-template-rows:29px 44px!important;min-height:73px!important;height:73px!important}
html.course-refined-chrome #app.compact-app .compact-summary #compactStats{display:flex!important;align-items:center!important;justify-content:space-between!important;grid-row:2!important;min-height:43px!important;height:43px!important;padding:0 2px!important;gap:5px!important;overflow:visible!important;white-space:normal!important}
html.course-refined-chrome #app.compact-app #compactStats .cw-avg-label{font:500 11px/15px Arial,sans-serif!important;min-width:0;flex:1;color:#d5d6c7!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.course-refined-chrome #app.compact-app #compactStats .cw-total-time{display:flex!important;flex-direction:column!important;align-items:flex-end!important;flex:0 0 auto;min-width:88px;color:#eee4bc!important;margin:0!important}
html.course-refined-chrome #app.compact-app #compactStats .cw-total-time small{font:600 9px/11px Arial,sans-serif!important;letter-spacing:.045em;color:#c8c8b5!important;white-space:nowrap}
html.course-refined-chrome #app.compact-app #compactStats .cw-total-time strong{font:700 20px/23px Arial,sans-serif!important;font-variant-numeric:tabular-nums;color:#eee4bc!important;white-space:nowrap}
html.course-refined-chrome #app.compact-app .cw-model-summary .cw-speed-line{font:500 10px/12px Arial,sans-serif;color:#b9c1b3;white-space:nowrap}
html.course-refined-chrome #app.compact-app .cw-model-summary b{font-size:15px!important;line-height:18px!important}
html.course-refined-chrome #app.compact-app #cwReferenceAlert{display:block;width:100%;border:1px solid rgba(239,177,138,.45);border-radius:10px;background:rgba(239,177,138,.13);color:#f1c5a8;padding:9px 12px;font:600 12px/1.4 Arial,sans-serif;text-align:left;white-space:normal;min-height:40px}
html.course-refined-chrome #app.compact-app #cwReferenceAlert[hidden]{display:none!important}
@media(max-width:375px){html.course-refined-chrome #app.compact-app #compactStats .cw-avg-label{font-size:9px!important}html.course-refined-chrome #app.compact-app #compactStats .cw-total-time strong{font-size:17px!important}}
