/* DailyOne V56: mobile fit, compact home cards and immediate page switching. */
html.dailyone-v49 .main{view-transition-name:none!important}
html.dailyone-v49 .view.active{animation:uxViewSettle .16s cubic-bezier(.2,.8,.2,1) both!important}
html.dailyone-v49 .view.active .card,
html.dailyone-v49 .view.active .card.v49-card-enter{animation:none!important}
html.dailyone-v50.v50-page-changing .main{filter:none!important}
@keyframes uxViewSettle{from{transform:translateY(3px)}to{transform:none}}

@media(max-width:720px){
  html,body{background:#f4f1eb!important}

  /* M7 real-device decision: weather leads every mobile/PWA home, then today's actions. */
  #morningBrief{order:-30!important}
  #homeImportant{order:-29!important;grid-column:1/-1!important;aspect-ratio:auto!important}
  #homePlan{order:-28!important;grid-column:1/-1!important;aspect-ratio:auto!important}

  .dailyone-app-refresh{min-height:62px;padding:12px 14px}

  /* Touch browsers repaint translucent layers while scrolling. Keep mobile cards on a stable layer. */
  html.dailyone-v49 body:not(.home-layout-editing) .view.active .card{
    --glass-shift:0px!important;transform:none!important;animation:none!important;
    transition:box-shadow .16s ease,border-color .16s ease!important
  }
  #cooking .c516-panel,#cooking .c516-pantry-entry,#cooking .c516-pantry-form{
    animation:none!important;transform:none!important;backface-visibility:hidden
  }

  body.morning-home #morningBrief .weather-locate{
    display:grid!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;
    z-index:6!important;width:38px!important;height:38px!important;background:#fff!important;border:1px solid rgba(29,29,31,.12)!important;
    box-shadow:0 5px 16px rgba(29,29,31,.07)!important
  }

  html.dailyone-v50 body.morning-home #morningBrief{padding:16px!important;border-radius:24px!important}
  body.morning-home #morningBrief .morning-head{padding-right:42px;gap:8px}
  body.morning-home #morningBrief .morning-head>div{min-width:0;width:100%}
  html.dailyone-v50 body.morning-home #morningBrief .morning-greeting{
    max-width:100%!important;margin:7px 0 4px!important;font-size:clamp(24px,7.2vw,29px)!important;
    line-height:1.08!important;letter-spacing:-.035em!important;white-space:normal!important;
    overflow-wrap:anywhere!important;word-break:normal!important;overflow:visible!important
  }
  body.morning-home #morningBrief .morning-greeting .v49-person{white-space:normal!important}
  html.dailyone-v50 body.morning-home #morningBrief .morning-subtitle{font-size:12px!important;line-height:1.45!important}
  body.morning-home #morningBrief .morning-location{margin-top:6px!important}
  body.morning-home #morningBrief .weather-main{grid-template-columns:72px 1fr;gap:8px;margin-top:9px}
  body.morning-home #morningBrief .weather-temp{font-size:42px;letter-spacing:-3px}
  body.morning-home #morningBrief .weather-metric{min-height:44px!important;padding:7px 4px!important}
  body.morning-home #morningBrief .morning-advice{margin-top:8px;padding:9px 11px}

  #home>.grid>.card.home-editor-wide{aspect-ratio:auto!important;height:auto!important;min-height:0!important}
  #homeFinanceCombined.home-editor-wide,#homeCookingLearning.home-editor-wide{overflow:hidden!important}

  #homeLearning .shared-learning-word{
    max-width:100%;font-size:clamp(21px,6.7vw,29px)!important;line-height:1.08!important;
    letter-spacing:-.025em;overflow-wrap:anywhere;word-break:break-word
  }
  #home>.grid>.shared-home-widget.home-editor-square .card-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #home>.grid>.shared-home-widget.home-editor-square .card-label em{display:none}
  #homeLearning.home-editor-square h2{margin:7px 0 8px}
  #homeLearning .shared-widget-content small{display:block;max-width:100%;overflow-wrap:anywhere}
  #homeLearning .shared-widget-content p{margin:10px 0 0;line-height:1.35;overflow-wrap:anywhere}

  #homeFinanceCombined .shared-finance-grid{gap:7px}
  #homeFinanceCombined .shared-finance-grid div{padding:11px 12px}
  #homeFinanceCombined .shared-finance-grid .net{padding:13px 14px}
  #homeFinanceCombined .shared-finance-grid .net .shared-finance-amount{font-size:26px!important}

  #homeCookingLearning.home-cooking-learning{padding:18px!important}
  #homeCookingLearning .home-cooking-grid{grid-template-columns:1fr!important;gap:11px!important}
  #homeCookingLearning .home-cooking-name{font-size:20px!important;line-height:1.22}
  #homeCookingLearning .home-cooking-copy{line-height:1.5;margin-top:6px}
  #homeCookingLearning .home-cooking-link{margin-top:9px}
  #homeCookingLearning .home-cooking-meta{justify-content:flex-start!important;gap:6px}
  #homeCookingLearning .home-cooking-meta span{padding:6px 9px;font-size:11px}

  #cooking .c516-modes{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  #cooking .c516-mode{min-height:62px;padding:9px 7px;border-radius:17px;text-align:center}
  #cooking .c516-mode b{font-size:14px}
  #cooking .c516-mode small{margin-top:4px;font-size:9px;line-height:1.25}
}

.dailyone-app-refresh{
  display:grid;width:100%;grid-template-columns:38px 1fr;align-items:center;gap:11px;
  margin:18px 0 8px;padding:11px 14px;border:1px solid rgba(60,60,67,.1);border-radius:17px;
  background:linear-gradient(145deg,rgba(255,255,255,.78),rgba(238,244,241,.7));
  color:#4f5f59;text-align:left;box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 8px 24px rgba(50,70,62,.06)
}
.dailyone-app-refresh>span:first-child{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:rgba(255,255,255,.72);font-size:23px}
.dailyone-app-refresh b,.dailyone-app-refresh small{display:block}
.dailyone-app-refresh b{font-size:15px}
.dailyone-app-refresh small{margin-top:3px;color:#7d8582;font-size:11px;line-height:1.4}
.dailyone-app-refresh:active{transform:scale(.985)}
.dailyone-app-refresh:disabled{opacity:.62}

@media(max-width:390px){
  html.dailyone-v50 body.morning-home #morningBrief .morning-greeting{font-size:clamp(23px,7vw,27px)!important}
  #homeLearning .shared-learning-word{font-size:clamp(20px,6.4vw,26px)!important}
}

@media(prefers-reduced-motion:reduce){html.dailyone-v49 .view.active{animation:none!important}}
