[hidden] { display: none !important; }
:root { --muted:#6d6783; --faint:#77718a; }
.is-locked { padding-bottom:0; }
.auth-gate { min-height:100svh; display:grid; place-items:center; padding:32px 20px calc(32px + env(safe-area-inset-bottom)); }
.auth-card { width:min(100%,470px); padding:38px; border:1px solid var(--border); border-radius:32px; background:rgba(255,255,255,.94); box-shadow:var(--shadow); }
.auth-logo { border-radius:20px; margin-bottom:24px; }
.auth-card .eyebrow { margin:0 0 15px; font-size:10px; letter-spacing:.12em; }
.auth-card h1 { font-size:clamp(31px,8vw,42px); letter-spacing:-.055em; line-height:1.08; margin:0 0 18px; }
.auth-lead { font-size:16px; line-height:1.5; color:var(--muted); }
.auth-features { padding:0; margin:30px 0; list-style:none; display:grid; gap:20px; }
.auth-features li { display:grid; grid-template-columns:25px 1fr; column-gap:8px; align-items:start; line-height:1.6; }
.auth-features li span { grid-column:2; color:var(--muted); font-size:12px; }
.auth-features strong { font-size:14px; }
#auth-message { font-size:14px; line-height:1.6; margin:20px 0; }
.auth-card .full-button { display:flex; justify-content:flex-start; align-items:center; min-height:52px; text-decoration:none; margin-top:10px; font-size:15px; }
.auth-footnote { color:var(--muted); font-size:12px; line-height:1.6; margin:20px 0 0; }
.login-code { font-size:20px; font-weight:750; letter-spacing:.025em; color:var(--lime); }
.account-card { border-radius:24px; min-width:0; padding:26px; margin-bottom:20px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.account-card p { color:var(--muted); font-size:13px; line-height:1.6; margin:8px 0 0; }
.account-card .eyebrow { font-size:10px; margin-bottom:8px; }
.account-card h2 { margin:0; font-size:23px; }
.account-card strong { font-size:18px; }
.account-actions,.access-actions { display:flex; flex-wrap:wrap; gap:9px; }
#admin-users,#admin-message { width:100%; }
.access-row { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px 0; border-top:1px solid var(--border); }
.access-row strong { font-size:15px; overflow-wrap:anywhere; }
.access-actions button { min-height:44px; }
.welcome-dialog { width:min(500px,calc(100% - 28px)); max-height:calc(100dvh - 36px); margin:auto; padding:0; border:1px solid var(--border); border-radius:28px; color:var(--text); background:var(--surface); box-shadow:var(--shadow); text-align:left; overflow:auto; }
.welcome-dialog::backdrop { background:rgba(34,25,61,.45); backdrop-filter:blur(5px); }
.welcome-content { padding:30px; }
.welcome-top { display:flex; justify-content:space-between; align-items:center; }
.welcome-badge { background:var(--surface-3); color:var(--lime); padding:8px 12px; border-radius:40px; font-weight:700; font-size:12px; }
.welcome-emoji { display:grid; place-items:start; font-size:45px; margin:22px 0; }
.welcome-content h2 { margin:12px 0 20px; font-size:29px; line-height:1.15; letter-spacing:-.035em; }
#welcome-copy { min-height:218px; }
#welcome-copy p { margin:0 0 15px; font-size:14px; line-height:1.7; color:var(--muted); }
#welcome-copy strong { color:var(--text); }
.welcome-progress { display:flex; gap:6px; margin:25px 0; }
.welcome-progress i { height:4px; flex:1; background:var(--surface-3); border-radius:5px; }
.welcome-progress .active { background:var(--lime); }
.welcome-actions { display:flex; justify-content:space-between; gap:12px; }
.welcome-actions button { min-height:48px; }
.sync-banner { position:fixed; z-index:1000; left:50%; transform:translateX(-50%); bottom:20px; width:max-content; max-width:calc(100% - 28px); display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:14px 18px; border-radius:17px; box-shadow:var(--shadow); background:#2c2745; color:white; font-size:13px; line-height:1.5; }
.sync-banner button { border:1px solid #ffffff50; background:transparent; padding:8px; color:white; border-radius:8px; font-size:12px; cursor:pointer; }
*:focus-visible { outline:3px solid #7566e6; outline-offset:3px; }
body { text-align:left; }
@media(max-width:700px) {
  .header-inner { padding-top:env(safe-area-inset-top); }
  .app-main { padding-top:22px; }
  .mobile-nav button { font-size:11px; }
  .heading-buttons { flex-wrap:wrap; }
  .heading-buttons button { min-height:44px; }
  .account-card { padding:20px; gap:18px; }
  .account-actions { width:100%; }
  .account-actions button { flex:1 1 auto; min-height:44px; }
  .access-row { flex-direction:column; align-items:flex-start; }
  .access-actions { width:100%; }
  .access-actions button { flex:1; }
  .sync-banner { bottom:calc(86px + env(safe-area-inset-bottom)); }
  .app-dialog { max-height:calc(100dvh - 26px - env(safe-area-inset-top)); overflow-y:auto; }
  input,select,textarea { font-size:16px !important; }
  .row-action,.icon-button { min-width:40px; min-height:40px; }
  .body-value, .food-values, .library-macros { text-align:left; }
  .calendar-day { min-width:0; overflow:hidden; }
}
@media(max-width:420px) {
  .auth-gate { padding:14px; }
  .auth-card { padding:26px; border-radius:26px; }
  .auth-logo { width:54px; height:54px; margin-bottom:18px; }
  .auth-features { margin:24px 0; gap:16px; }
  .welcome-content { padding:22px; }
  .welcome-content h2 { font-size:26px; }
  .welcome-emoji { margin:16px 0; }
  .calorie-copy { min-width:0; }
  .calorie-copy h2 { font-size:17px; }
  .food-item { grid-template-columns:32px minmax(0,1fr) auto; gap:7px; }
  .food-symbol { width:32px; height:32px; }
}
