/* ================================================================
   SWACK v6.1.4 — compact Today, clean Coach, tertiary restart,
   explicit plan adjustment. Built on the v6.1.3 design system.
   ================================================================ */

/* Design-system floor for this pass. */
:root{
  --sw-touch-min:44px;
  --sw-control-radius:16px;
  --sw-space-1:4px;
  --sw-space-2:8px;
  --sw-space-3:12px;
  --sw-space-4:16px;
  --sw-space-5:24px;
}

/* 1) Coach starter pills are no longer part of an existing conversation. */
.coach-modal-r6 .coach-starters-r6,.v614-coach-clean .coach-starters-r6{display:none!important}
.v614-coach-clean .coach-head-r6{margin-bottom:8px!important}
.v614-coach-clean .coach-messages-r6{margin-top:2px!important;border-top:1px solid color-mix(in srgb,var(--bp-line) 78%,transparent)!important}
.v614-coach-clean .coach-compose-r6 textarea{font-size:17px!important;min-height:48px!important}

/* 2) Today: compact by removing dead space, not by making important text tiny. */
.v614-home{margin-top:-4px!important}
.v614-home .v6-greeting{padding:5px 2px 10px!important}
.v614-home .v6-greeting h1{font-size:23px!important;line-height:1.15!important}
.v614-home .v6-greeting p{font-size:14px!important;line-height:1.35!important;margin-top:3px!important}
.v614-home .v613-coach-line{margin-bottom:8px!important}
.v614-home .v613-coach-line .v6-coach-compose{min-height:48px!important;border-radius:17px!important}
.v614-home .v613-coach-line .v6-coach-compose textarea{min-width:0!important;width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;padding-right:2px!important}
.v614-home .v6-primary-card{padding:15px 16px!important;margin-bottom:8px!important;border-radius:20px!important}
.v614-home .v6-card-kicker{font-size:10px!important}
.v614-home .v6-primary-row h2{font-size:28px!important;line-height:1.01!important;margin:7px 0 11px!important}
.v614-home .v6-metrics{margin-bottom:11px!important;gap:5px!important}
.v614-home .v6-metrics strong{font-size:14px!important}
.v614-home .v6-primary-action{min-height:48px!important}
.v614-home .v6-next-meal{padding:11px 13px!important;min-height:84px!important;border-radius:18px!important}
.v614-home .v6-next-meal strong{font-size:16px!important}
.v614-home .v6-next-meal span:not(.v6-meal-photo){font-size:12.5px!important;line-height:1.28!important;max-width:min(58vw,310px)!important}
.v614-home .v6-next-meal em{font-size:10px!important;margin-top:2px!important}
.v614-home .bp5-next-meal .bp5-today-food-photo{width:54px!important;height:54px!important;flex-basis:54px!important}
.v614-home .bp5-meal-check{margin-top:6px!important;padding:6px 9px!important;min-height:34px!important;font-size:11px!important}

/* Completed workout restart = tertiary text action, not a second giant CTA. */
.v614-home .v6-completed-actions{display:grid!important;grid-template-columns:1fr!important;gap:4px!important}
.v614-restart-link{
  width:max-content!important;max-width:100%!important;min-height:36px!important;margin:0 auto!important;padding:5px 8px!important;
  border:0!important;background:transparent!important;box-shadow:none!important;color:var(--bp-muted)!important;
  font:700 16px/1.2 Manrope,system-ui,sans-serif!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important
}
.v614-restart-link:active{transform:scale(.98)}

/* Shorter phones: preserve readability and remove optional metadata first. */
@media(max-width:620px) and (max-height:900px){
  body.v614-today-mode .topbar{height:72px!important}
  body.v614-today-mode #app{padding-top:10px!important;padding-bottom:88px!important}
  .v614-home .v6-greeting{padding-top:2px!important;padding-bottom:8px!important}
  .v614-home .v613-coach-line{margin-bottom:7px!important}
  .v614-home .v6-primary-card{padding-top:14px!important;padding-bottom:13px!important}
  .v614-home .v6-primary-row h2{margin-bottom:9px!important}
  .v614-home .v6-metrics{margin-bottom:9px!important}
  .v614-home .v6-next-meal em{display:none!important}
}
@media(max-width:620px) and (max-height:790px){
  body.v614-today-mode .topbar{height:68px!important}
  body.v614-today-mode #app{padding-top:7px!important}
  .v614-home .v6-greeting p{display:none!important}
  .v614-home .v6-primary-row h2{font-size:26px!important}
  .v614-home .v6-next-meal span:not(.v6-meal-photo){display:-webkit-box!important;-webkit-line-clamp:1;-webkit-box-orient:vertical}
}

/* 3) Completed-detail restart follows the same tertiary hierarchy. */
.v614-completed-restart{
  min-height:40px!important;padding:7px 10px!important;border:0!important;background:transparent!important;box-shadow:none!important;
  color:var(--bp-muted)!important;font:700 15px/1.2 Manrope,system-ui,sans-serif!important
}

/* 4) Training plan action: clearly tappable, compact, one icon family. */
.v611-plan-head{align-items:center!important}
.v611-adjust-btn.v614-plan-adjust{
  min-height:44px!important;padding:9px 12px!important;border:1px solid color-mix(in srgb,var(--bp-purple) 20%,var(--bp-line))!important;
  border-radius:15px!important;background:color-mix(in srgb,var(--bp-card) 72%,transparent)!important;color:var(--bp-ink)!important;
  box-shadow:none!important;font:750 15px/1 Manrope,system-ui,sans-serif!important;display:inline-flex!important;align-items:center!important;gap:7px!important
}
.v614-plan-adjust svg{width:18px;height:18px;fill:none;stroke:var(--bp-purple);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.v614-plan-adjust:active{transform:scale(.98)}
@media(max-width:390px){
  .v611-plan-head{flex-direction:row!important;align-items:center!important;gap:10px!important}
  .v611-plan-head>div{min-width:0!important;flex:1 1 auto!important}
  .v611-adjust-btn.v614-plan-adjust{align-self:auto!important;padding:9px 10px!important;font-size:14px!important}
}

/* Accessibility: visible controls keep a minimum hit area even after compaction. */
.v614-plan-adjust,.v614-restart-link,.coach-compose-r6 button,.v613-coach-line-icon{touch-action:manipulation}
@media(prefers-reduced-motion:reduce){.v614-restart-link,.v614-plan-adjust{transition:none!important}}
