/* ShardsDiet 3.3.11 - mobile/PWA only: compact Crea Dieta setup before the existing builder. */
@media(max-width:820px){
  .sdMobileDietSetupPanel{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;display:grid;gap:12px;overflow:visible!important}
  .sdMobileDietSetupCard{min-width:0;padding:14px;border:1px solid var(--stroke);border-radius:20px;background:#fff;box-shadow:0 8px 24px rgba(18,32,51,.045)}
  .sdMobileSetupHeading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;padding-bottom:9px;border-bottom:1px solid #edf2f3}
  .sdMobileSetupHeading>span{font-size:11px;font-weight:950;letter-spacing:.075em;text-transform:uppercase;color:#405868}
  .sdMobileDietBaseFields{display:grid;gap:11px}
  .sdMobileDietSetupCard label{margin-bottom:6px;font-size:9px;letter-spacing:.06em;color:#66798a}
  .sdMobileDietSetupCard input,.sdMobileDietSetupCard select{min-width:0;min-height:44px;border-radius:13px;padding:10px 11px;font-size:14px;background:#fff}
  .sdMobileTitleDayGrid{display:grid;grid-template-columns:minmax(0,1fr) 84px;gap:9px;align-items:end}
  .sdMobileTitleDayGrid>div{min-width:0}
  .sdMobileTitleDayGrid #dayCount{text-align:center;font-weight:900}
  .sdMobileSetupEmpty{padding:4px 1px;color:var(--muted);font-size:12px;line-height:1.5}

  .sdMobileClientIdentity{display:grid;gap:7px;margin-bottom:12px}
  .sdMobileClientIdentity h3{margin:0 0 2px;font-size:19px;line-height:1.2;letter-spacing:-.035em;overflow-wrap:anywhere}
  .sdMobileClientIdentity select{font-weight:850;color:#233d4d;background:#fbfefd}
  .sdMobileClientMetricGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .sdMobileClientMetric{min-width:0;padding:11px 10px;border:1px solid #e1eceb;border-radius:15px;background:#fbfefd;overflow:hidden}
  .sdMobileClientMetric b{display:block;min-width:0;font-size:18px;line-height:1.15;letter-spacing:-.035em;color:#142b3b;overflow-wrap:anywhere}
  .sdMobileClientMetric.goal b{font-size:14px;line-height:1.25;letter-spacing:-.02em}
  .sdMobileClientMetric span{display:block;margin-top:4px;color:#708090;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.055em}
  .sdMobileDetailsToggle{width:100%;min-height:38px;margin-top:10px;padding:7px 10px;border:0;border-top:1px solid #edf2f3;background:transparent;color:#2c5961;font-size:11px;font-weight:950;box-shadow:none}
  .sdMobileDetailsToggle span{margin-left:3px}
  .sdMobileClientDetails{display:grid;gap:0;margin-top:2px;border-top:1px solid #edf2f3}
  .sdMobileClientDetails[hidden]{display:none!important}
  .sdMobileClientDetailRow{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0;padding:9px 2px;border-bottom:1px solid #eff4f4}
  .sdMobileClientDetailRow span{min-width:0;color:#66798a;font-size:11px;font-weight:800;line-height:1.35}
  .sdMobileClientDetailRow b{min-width:0;max-width:58%;color:#1f3949;font-size:12px;line-height:1.35;text-align:right;overflow-wrap:anywhere;white-space:pre-wrap}
  .sdMobileClientDetailRow.wide{display:grid;gap:5px}
  .sdMobileClientDetailRow.wide b{max-width:none;text-align:left;font-weight:750}
  .sdMobileClientDetailsEmpty{padding:11px 2px;color:var(--muted);font-size:11px;line-height:1.45}

  .sdMobileTargetCard{display:grid;gap:13px}
  .sdMobileTargetHeading{margin-bottom:0}
  .sdMobileKcalBlock{display:grid;gap:8px}
  .sdMobileKcalInput{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;min-width:0;padding:6px 11px;border:1px solid #bcded8;border-radius:16px;background:#fbfffe}
  .sdMobileKcalInput input{min-width:0;min-height:48px;padding:6px 2px;border:0!important;background:transparent!important;box-shadow:none!important;text-align:center;font-size:25px!important;font-weight:950;letter-spacing:-.04em;color:#102a3a;scroll-margin-bottom:150px}
  .sdMobileKcalInput>span{font-size:12px;font-weight:900;color:#617684}
  .sdMobileKcalCompare{display:grid;gap:6px;padding:8px 0 2px}
  .sdMobileKcalCompare>div{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
  .sdMobileKcalCompare span{color:#718090;font-size:10px;font-weight:800}
  .sdMobileKcalCompare b{min-width:0;text-align:right;font-size:12px;color:#1d3747;overflow-wrap:anywhere}
  #sdMobileKcalDifference.negative{color:#9a5a00}
  #sdMobileKcalDifference.positive{color:#08754f}
  .sdMobileMacroMethod{display:grid;gap:0}
  .sdMobileMacroMethod select{font-weight:850;background:#fbfefd}
  .sdMobileMacroHeading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:1px}
  .sdMobileMacroHeading>span{color:#506574;font-size:10px;font-weight:950;text-transform:uppercase;letter-spacing:.055em}
  .sdMobileMacroHeading>b{min-width:0;font-size:10px;font-weight:950;text-align:right;color:#617684;overflow-wrap:anywhere}
  #sdMobileMacroTotal[data-status="ok"]{color:#08754f}
  #sdMobileMacroTotal[data-status="low"]{color:#9a5a00}
  #sdMobileMacroTotal[data-status="high"]{color:#a81f42}
  .sdMobileMacroGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;min-width:0}
  .sdMobileMacroColumn{min-width:0;padding:9px 7px 10px;border:1px solid #e0ebeb;border-radius:15px;background:#fbfefd;text-align:center;overflow:hidden}
  .sdMobileMacroColumn label{margin:0 0 5px;text-align:center;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sdMobilePercentInput{display:grid;grid-template-columns:minmax(0,1fr) 13px;align-items:center;gap:1px;min-width:0;border:1px solid #d5e4e4;border-radius:11px;background:#fff;padding:2px 5px}
  .sdMobilePercentInput input{width:100%;min-width:0;min-height:37px;padding:4px 0;border:0!important;box-shadow:none!important;background:transparent!important;text-align:center;font-size:17px!important;font-weight:950;color:#193444;scroll-margin-bottom:150px}
  .sdMobilePercentInput span{font-size:10px;font-weight:900;color:#71808c}
  .sdMobileMacroGrams{display:block;margin-top:7px;font-size:12px;color:#08754f;white-space:nowrap}
  .sdMobileMacroTargetsBox{min-width:0}
  .sdMobileMacroTargetsBox:empty{display:none}
  .sdMobileMacroTargetsBox .targetHint{margin-top:0;font-size:10px;line-height:1.4}
  .sdMobileDerivedTargets{margin-top:8px;border-top:1px solid #edf2f3;padding-top:7px}
  .sdMobileDerivedTargets summary{cursor:pointer;color:#627584;font-size:10px;font-weight:900;list-style-position:inside}
  .sdMobileDerivedTargets>div{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;margin-top:8px}
  .sdMobileDerivedTargets span{display:flex;justify-content:space-between;gap:5px;color:#71808c;font-size:9px;line-height:1.35}
  .sdMobileDerivedTargets b{color:#304c5b;white-space:nowrap}

  .sdMobileDietSetupPanel + .space{height:12px}
  .sdMobileDietSetupPanel input:focus,.sdMobileDietSetupPanel select:focus{scroll-margin-bottom:150px}
}

@media(max-width:360px){
  .sdMobileDietSetupCard{padding:12px;border-radius:18px}
  .sdMobileTitleDayGrid{grid-template-columns:minmax(0,1fr) 76px;gap:7px}
  .sdMobileClientMetric{padding:10px 8px}
  .sdMobileClientMetric b{font-size:16px}
  .sdMobileClientMetric.goal b{font-size:13px}
  .sdMobileMacroGrid{gap:5px}
  .sdMobileMacroColumn{padding:8px 5px}
  .sdMobilePercentInput{padding-left:3px;padding-right:3px;grid-template-columns:minmax(0,1fr) 11px}
  .sdMobilePercentInput input{font-size:16px!important}
  .sdMobileMacroGrams{font-size:11px}
  .sdMobileDerivedTargets>div{grid-template-columns:1fr}
}

@media(max-width:330px){
  .sdMobileDietSetupCard{padding:11px}
  .sdMobileMacroColumn label{font-size:7px}
  .sdMobilePercentInput input{font-size:15px!important}
  .sdMobileMacroGrams{font-size:10px}
}
