/* JourneyTrack v1.2 mobile-first cleanup. Loaded after app.css so these rules only refine small screens. */
html,body{max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%}
.challenge-empty-player{min-height:220px;border:1px dashed color-mix(in srgb,var(--accent) 28%,white);border-radius:18px;background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 3%,white),color-mix(in srgb,var(--accent) 7%,white));display:grid;place-content:center;justify-items:center;text-align:center;gap:8px;padding:24px;color:var(--muted);margin:18px 0}.challenge-empty-player>span{width:54px;height:54px;border-radius:18px;background:var(--surface-2);color:var(--purple);display:grid;place-items:center;font-size:24px}.challenge-empty-player strong{color:var(--text);font-size:17px}.challenge-empty-player small{max-width:430px;line-height:1.45}
@media(max-width:760px){
  body{padding-bottom:env(safe-area-inset-bottom)}
  .topbar{height:auto;min-height:58px;padding:max(7px,env(safe-area-inset-top)) 10px 7px;align-items:flex-end}
  .brand{min-width:0;gap:7px}.brand-logo{width:31px;height:31px}.brand>span{font-size:14px;white-space:nowrap}.topbar-actions{gap:5px}.icon-btn{width:34px;height:34px;border-radius:11px;padding:0}
  .shell{width:calc(100% - 14px);padding:12px 0 calc(96px + env(safe-area-inset-bottom))}
  .page-head{margin:4px 3px 13px}.page-head h1{font-size:30px;line-height:1.05}.page-head .muted{font-size:13px;margin-top:5px}
  h2{font-size:20px}.card{padding:15px;margin:11px 0;border-radius:18px;box-shadow:0 7px 22px rgba(72,40,120,.07)}
  .section-head{align-items:flex-start;flex-wrap:wrap}.section-head>small{width:100%}
  .welcome-card{padding:18px;border-radius:20px}.welcome-card h1{font-size:27px}.sparkle{font-size:28px}
  .stats-grid,.stats-grid.three{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:11px 0}.stat-card{padding:13px;border-radius:16px}.stat-card strong{font-size:20px}.stat-card small{font-size:11px}.stat-card em{font-size:10px}
  .form-grid{gap:12px}.form-grid label{min-width:0}.primary,.secondary{min-height:44px}
  .history-row{padding:12px 0}.history-row-actions{display:grid!important;grid-template-columns:minmax(0,1fr);gap:9px!important;align-items:start}.history-row-actions>div:first-child{width:100%;min-width:0}.history-row-actions .entry-actions{width:100%!important;justify-content:flex-start!important;display:flex!important;flex-wrap:wrap}.entry-actions .small-btn{min-width:0!important;flex:0 0 auto}.meal-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important}.meal-actions>*{min-width:0}.meal-actions .small-btn{width:100%;min-width:0!important;padding:8px 5px!important;font-size:11px!important}
  .nutrition-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.nutrition-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.nutrition-detail-grid>div{padding:10px}.nutrition-day-row{display:grid;gap:7px}.nutrition-day-values{justify-content:flex-start!important;gap:8px}.nutrition-plan-card .section-head .pill{margin-top:2px}
  .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.photo-card{border-radius:15px}.photo-card>div{padding:9px}.photo-card p{font-size:12px}.photo-card small{font-size:10px}.photo-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px!important}.photo-actions>*{min-width:0}.photo-actions .small-btn{width:100%;min-width:0!important;padding:7px 3px!important;font-size:10px!important}
  .challenge-hero{padding:17px;border-radius:20px;gap:12px}.challenge-hero h1{font-size:27px}.challenge-ring{width:62px;height:62px;flex-basis:62px;border-width:5px}.challenge-ring strong{font-size:20px}.challenge-player-card{padding:14px}.video-frame{border-radius:14px;margin:13px 0}.challenge-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.challenge-day{border-radius:14px}.challenge-day-copy{padding:9px}.challenge-day-copy strong{font-size:11.5px}.challenge-day-copy small{font-size:9.5px}.mini-tags span{font-size:8px}.challenge-actions{gap:8px}.challenge-note{padding:10px;font-size:12px}.challenge-empty-player{min-height:180px;margin:12px 0}
  .bottom-nav{left:4px;right:4px;transform:none;width:auto;height:62px;bottom:max(4px,env(safe-area-inset-bottom));padding:4px 2px;border-radius:18px;grid-template-columns:repeat(7,minmax(0,1fr))}.nav-item{min-width:0;overflow:hidden}.nav-item span{font-size:15px}.nav-item small{font-size:7.5px;max-width:100%;overflow:hidden;text-overflow:clip;white-space:nowrap}
  .ai-compose{bottom:78px}.bubble{max-width:96%}
  .admin-grid{gap:10px}.admin-grid .card{margin:0}.status-row{gap:8px}.status-row span{min-width:0}.status-row b{text-align:right;overflow-wrap:anywhere}.compact-form{margin-top:12px}
}
@media(max-width:390px){
  .shell{width:calc(100% - 10px)}
  .card{padding:13px}.page-head h1{font-size:28px}
  .stats-grid,.stats-grid.three,.nutrition-stats-grid{gap:6px}.stat-card{padding:11px}.stat-card strong{font-size:18px}
  .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.photo-card>div{padding:7px}.photo-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.photo-actions .small-btn{font-size:9px!important}
  .challenge-grid{gap:6px}.challenge-day-copy{padding:7px}.challenge-day-copy strong{font-size:10.5px}.day-number{left:5px;bottom:5px;padding:4px 6px;font-size:8px}
  .bottom-nav{left:2px;right:2px}.nav-item small{font-size:7px}.nav-item span{font-size:14px}
}
@media(max-width:330px){.photo-grid{grid-template-columns:1fr}.stats-grid,.stats-grid.three,.nutrition-stats-grid{grid-template-columns:1fr 1fr}.brand>span{display:none}}
