.feed-metrics{align-items:start}
.stepper{display:grid;grid-template-columns:44px 1fr 44px;gap:6px;align-items:center}
.stepper-wide{grid-template-columns:44px 44px minmax(58px,1fr) 44px 44px}
.stepper input{text-align:center;padding-left:6px;padding-right:6px}
.stepper-button{min-width:44px;min-height:50px;padding:0;border:1px solid var(--line);border-radius:13px;background:var(--surface-soft);color:var(--primary);font-size:14px;font-weight:800;cursor:pointer;touch-action:manipulation}
.stepper-button:active{transform:scale(.96);background:var(--mint)}
.feed-stepper{grid-template-columns:repeat(3,1fr)!important;gap:6px}
.feed-stepper input{grid-column:1/-1;grid-row:1;min-height:54px;font-size:19px;font-weight:800}
.feed-step-column{display:grid;gap:6px;min-width:0}
.feed-stepper .stepper-button{min-width:0;width:100%;min-height:44px}
.field-helper{margin:-3px 0 16px;color:var(--muted);font-size:12px}
.supplement-dose{display:grid;grid-template-columns:1fr;gap:0}
.supplement-dose select{min-height:50px}
@media (max-width:420px){.stepper-wide{grid-template-columns:40px 40px minmax(48px,1fr) 40px 40px;gap:4px}.stepper-wide .stepper-button{min-width:40px;font-size:13px}}
.quick-actions{display:flex;align-items:center;gap:4px}
.ai-badge{padding:4px 8px;border-radius:99px;background:var(--surface-soft);color:var(--primary);font-size:11px;font-weight:800}
.ai-actions{grid-template-columns:1fr 1fr}
.ai-save-button{grid-column:1/-1}
.ai-status{padding:10px 12px;border-radius:12px;background:var(--surface-soft);color:var(--primary)!important;font-size:12px!important}
.security-note{font-size:11px!important;line-height:1.5}
.entry-card[data-edit]{cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.entry-card[data-edit]:hover{border-color:rgba(23,111,97,.45);box-shadow:0 5px 16px rgba(23,111,97,.08)}.entry-card[data-edit]:active{transform:scale(.995)}
.save-button:disabled {
  cursor: wait;
  opacity: .58;
}
.timeline-sort-button{width:36px;height:36px;min-width:36px;color:var(--primary);transition:background .18s ease,transform .18s ease}
.timeline-sort-button svg{width:19px;height:19px;transition:transform .22s ease}
.timeline-sort-button.is-desc svg{transform:rotate(180deg)}
.timeline-sort-button:active{transform:scale(.94)}
.timeline-tools{position:relative;display:flex;align-items:center;gap:7px}
.timeline-filter{position:relative}
.timeline-filter>summary{list-style:none}
.timeline-filter>summary::-webkit-details-marker{display:none}
.timeline-filter-button{position:relative;width:36px;height:36px;min-width:36px;color:var(--primary)}
.timeline-filter-button svg{width:18px;height:18px}
.filter-active-dot{position:absolute;right:3px;top:3px;width:7px;height:7px;border:2px solid var(--surface);border-radius:50%;background:var(--coral);opacity:0}
.timeline-filter-button.is-filtered .filter-active-dot{opacity:1}
.timeline-filter-popover{position:absolute;z-index:30;right:0;top:43px;width:190px;padding:10px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 16px 38px rgba(23,58,52,.18)}
.timeline-filter-popover>strong{display:block;padding:5px 8px 7px;font-size:12px}
.timeline-filter-popover label{display:flex;align-items:center;gap:10px;min-height:42px;padding:0 8px;border-radius:10px;cursor:pointer}
.timeline-filter-popover label:hover{background:var(--surface-soft)}
.timeline-filter-popover input{width:18px;height:18px;margin:0;accent-color:var(--primary)}
.timeline-filter-popover span{font-size:13px;font-weight:700}
.timeline-filter-popover .text-button{width:100%;margin-top:3px;border-top:1px solid var(--line);border-radius:0}
.transfer-card{border-color:rgba(23,111,97,.22)}
.transfer-dates .field{margin-bottom:8px}
.transfer-action{width:100%}
.transfer-status{margin:0 0 12px!important;padding:9px 11px;border-radius:11px;background:var(--surface-soft);color:var(--primary)!important;font-size:12px!important}
.transfer-divider{display:flex;align-items:center;gap:10px;margin:20px 0 14px;color:var(--muted);font-size:12px;font-weight:700}
.transfer-divider::before,.transfer-divider::after{content:"";height:1px;flex:1;background:var(--line)}
.paste-json{min-height:132px!important;font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace!important;word-break:break-all}
.cloud-card{border-color:rgba(23,111,97,.28)}
.cloud-dot{width:10px;height:10px;border-radius:50%;background:var(--muted);box-shadow:0 0 0 5px var(--surface-soft)}
.cloud-card[data-state="synced"] .cloud-dot{background:var(--primary)}
.cloud-card[data-state="syncing"] .cloud-dot{background:var(--amber);animation:cloudPulse 1.1s ease-in-out infinite}
.cloud-card[data-state="pending"] .cloud-dot{background:var(--coral)}
.cloud-card[data-state="error"] .cloud-dot{background:var(--danger)}
.cloud-badge{padding:5px 9px;border-radius:99px;background:var(--surface-soft);color:var(--primary);font-size:11px;font-weight:800}
.cloud-status{margin:0 0 14px!important;padding:10px 12px;border-radius:12px;background:var(--surface-soft);color:var(--primary)!important;font-size:12px!important}
.cloud-card[data-state="error"] .cloud-status{background:rgba(196,71,71,.1);color:var(--danger)!important}
.cloud-card[data-state="pending"] .cloud-status{background:var(--amber-soft);color:var(--ink)!important}
.cloud-card button:disabled{opacity:.58;cursor:wait}
.cloud-config{margin:0 0 16px;padding:0 12px 12px;border:1px solid var(--line);border-radius:14px}
.cloud-config summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--muted);font-size:12px;font-weight:750}
.cloud-config .field{margin-bottom:10px}
.cloud-full-button{width:100%}
.cloud-auth-actions{grid-template-columns:1fr 1fr}
.cloud-reset{display:block;margin:4px auto 0}
.cloud-account{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding:13px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft)}
.cloud-account small,.cloud-account strong{display:block}.cloud-account small{color:var(--muted);font-size:11px}.cloud-account strong{margin-top:2px;font-size:13px;word-break:break-all}.cloud-account>span{flex:0 0 auto;color:var(--muted);font-size:11px}
.migration-banner{margin:0 0 14px;padding:14px;border:1px solid rgba(239,178,78,.45);border-radius:15px;background:var(--amber-soft)}
.migration-banner strong{display:block}.migration-banner p{margin:4px 0 12px;color:var(--muted);font-size:12px}
.sync-recovery{margin:0 0 14px;padding:14px;border:1px solid rgba(184,62,62,.3);border-radius:15px;background:rgba(184,62,62,.08)}
.sync-recovery strong{display:block;color:var(--danger)}
.sync-recovery p{margin:4px 0 12px!important;color:var(--ink)!important;font-size:12px!important}
.sync-recovery small{display:block;margin-top:9px;color:var(--muted);font-size:11px;line-height:1.5}
.sync-recovery .danger-button{min-height:50px;background:transparent}
@keyframes cloudPulse{50%{opacity:.45;transform:scale(.8)}}
@media (prefers-reduced-motion:reduce){.cloud-card[data-state="syncing"] .cloud-dot{animation:none}}
.ai-entry-trigger{padding-inline:10px;border-radius:99px;background:var(--surface-soft)}
.ai-entry-dialog{width:min(100% - 16px,620px);height:min(88dvh,780px);margin:auto auto 0;padding:0;border:0;border-radius:28px 28px 0 0;background:var(--surface);color:var(--ink);box-shadow:0 -18px 60px rgba(18,53,45,.24)}
.ai-entry-dialog::backdrop{background:rgba(15,42,36,.52);backdrop-filter:blur(3px)}
.ai-chat-shell{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%}
.ai-chat-header{display:flex;align-items:center;justify-content:space-between;padding:18px 18px 12px;border-bottom:1px solid var(--line)}
.ai-chat-header h2{margin:1px 0 0;font-size:24px}
.ai-chat-messages{overflow:auto;padding:16px 14px 24px;overscroll-behavior:contain}
.ai-message{display:flex;align-items:flex-start;gap:9px;margin-bottom:14px}
.ai-message-user{justify-content:flex-end}
.ai-avatar{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:12px;background:var(--primary);color:#fff;font-size:11px;font-weight:900;letter-spacing:.04em}
.ai-bubble{max-width:calc(100% - 43px);padding:11px 13px;border-radius:5px 17px 17px 17px;background:var(--surface-soft);font-size:13px}
.ai-bubble p{margin:4px 0 0;color:var(--muted)}
.ai-message-user .ai-bubble{border-radius:17px 5px 17px 17px;background:var(--primary);color:#fff;white-space:pre-wrap}
.ai-thinking{display:inline-flex;align-items:center;gap:5px;color:var(--muted)}
.ai-thinking::after{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;box-shadow:10px 0 currentColor,20px 0 currentColor;animation:aiDots 1s ease-in-out infinite}
.ai-draft-list{display:grid;gap:10px;margin-top:10px}
.ai-draft-card{padding:13px;border:1px solid rgba(23,111,97,.28);border-radius:17px;background:var(--surface);box-shadow:0 7px 22px rgba(23,111,97,.08)}
.ai-draft-card header{margin-bottom:11px}
.ai-draft-card header strong{display:block;font-size:15px}
.ai-draft-preview{display:block;margin-top:2px;color:var(--muted);font-size:11px}
.ai-draft-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.ai-draft-field{display:block;min-width:0}
.ai-draft-field.wide{grid-column:1/-1}
.ai-draft-field span{display:block;margin-bottom:5px;color:var(--muted);font-size:11px;font-weight:700}
.ai-draft-field input,.ai-draft-field select,.ai-draft-field textarea{width:100%;min-height:43px;padding:9px 10px;border:1px solid var(--line);border-radius:11px;background:#fbfdfc;color:var(--ink);outline:0}
.ai-draft-field textarea{min-height:66px;resize:vertical}
.ai-draft-field input:focus,.ai-draft-field select:focus,.ai-draft-field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(23,111,97,.13)}
.ai-confirm-draft{width:100%;min-height:46px;margin-top:11px}
.ai-draft-saved{display:flex;align-items:center;gap:9px;padding:14px;border-radius:15px;background:var(--surface-soft);color:var(--primary);font-weight:800}
.ai-draft-saved::before{content:"✓";display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--primary);color:#fff}
.ai-error-bubble{background:rgba(184,62,62,.1);color:var(--danger)}
.ai-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;padding:11px 12px calc(11px + var(--safe-bottom));border-top:1px solid var(--line);background:var(--surface)}
.ai-composer textarea{width:100%;min-height:48px;max-height:120px;padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:#fbfdfc;color:var(--ink);resize:none;outline:0}
.ai-composer textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(23,111,97,.13)}
.ai-send-button{min-width:70px;min-height:48px;padding-inline:14px}
.ai-send-button:disabled{opacity:.55;cursor:wait}
@keyframes aiDots{50%{opacity:.35;transform:translateY(-2px)}}
@media (min-width:680px){.ai-entry-dialog{margin:auto;border-radius:28px}}
@media (max-width:390px){.ai-draft-fields{grid-template-columns:1fr}.ai-draft-field.wide{grid-column:auto}}
@media (prefers-color-scheme:dark){.ai-draft-field input,.ai-draft-field select,.ai-draft-field textarea,.ai-composer textarea{background:#132824}}
@media (prefers-reduced-motion:reduce){.ai-thinking::after{animation:none}}

.daily-photo-card{margin-top:14px;padding:14px;border:1px solid rgba(23,111,97,.2);border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--shadow)}
.daily-photo-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.daily-photo-heading>div{display:flex;align-items:center;gap:9px}.daily-photo-heading h3{margin:0;font-size:17px}
.photo-date-mark{width:19px;height:23px;border:2px solid var(--primary);border-radius:5px 5px 8px 8px;box-shadow:inset 0 5px 0 var(--mint);transform:rotate(-4deg)}
.daily-photo-stage{position:relative;display:block;width:100%;aspect-ratio:4/3;overflow:hidden;padding:0;border:0;border-radius:18px;background:linear-gradient(145deg,var(--surface-soft),#f7fbfa);color:var(--ink);cursor:pointer;transition:aspect-ratio .2s ease}
.daily-photo-stage[data-orientation="portrait"]{aspect-ratio:4/5}.daily-photo-stage[data-orientation="square"]{aspect-ratio:1/1}.daily-photo-stage[data-orientation="landscape"]{aspect-ratio:16/9}
.daily-photo-stage img{position:absolute;inset:0;width:100%;height:100%}.daily-photo-backdrop{z-index:0;object-fit:cover;filter:blur(20px) saturate(.78);opacity:.58;transform:scale(1.1)}.daily-photo-foreground{z-index:1;object-fit:contain}.daily-photo-stage:focus-visible{outline:3px solid rgba(23,111,97,.3);outline-offset:3px}
.daily-photo-empty{position:absolute;z-index:2;inset:0;display:grid;place-content:center;justify-items:center;padding:24px;text-align:center}
.daily-photo-empty svg{width:38px;height:38px;margin-bottom:10px;fill:none;stroke:var(--primary);stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.daily-photo-empty strong,.daily-photo-empty small{display:block}.daily-photo-empty strong{font-size:15px}.daily-photo-empty small{margin-top:4px;color:var(--muted);font-size:11px}
.daily-photo-meta{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 3px 0}.daily-photo-meta p{min-width:0;margin:0;font-size:13px;font-weight:700;overflow-wrap:anywhere}.photo-sync-state{flex:0 0 auto;color:var(--muted);font-size:11px}.photo-sync-state[data-state="pending"]{color:var(--amber)}.photo-sync-state[data-state="error"]{color:var(--danger)}.photo-sync-state[data-state="synced"]{color:var(--primary)}
.daily-photo-dialog{width:min(100% - 16px,600px);margin:auto auto 0;padding:0;border:0;border-radius:28px 28px 0 0;background:var(--surface);color:var(--ink)}
.daily-photo-editor{padding:0}.daily-photo-editor .dialog-header{padding:18px 18px 12px}.daily-photo-editor-body{padding:0 18px 8px}.daily-photo-editor-body .field{margin-bottom:0}
.photo-picker{position:relative;display:grid;place-items:center;overflow:hidden;width:100%;aspect-ratio:4/3;border:1px dashed rgba(23,111,97,.45);border-radius:19px;background:var(--surface-soft);cursor:pointer;text-align:center}
.photo-picker img{width:100%;height:100%;object-fit:contain;background:var(--surface-soft)}.photo-picker>span{display:grid;gap:3px;padding:20px}.photo-picker strong{color:var(--primary)}.photo-picker small{color:var(--muted);font-size:11px}
.photo-compress-status{margin:8px 2px 14px;color:var(--muted);font-size:11px}.photo-compress-status[data-state="busy"]{color:var(--amber)}.photo-compress-status[data-state="error"]{color:var(--danger)}
.daily-photo-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 18px calc(14px + var(--safe-bottom));border-top:1px solid var(--line)}.daily-photo-actions .primary-button{grid-column:1/-1;grid-row:1}.daily-photo-actions .primary-button,.daily-photo-actions .secondary-button,.daily-photo-actions .danger-button{min-height:50px}
@media (min-width:680px){.daily-photo-dialog{margin:auto;border-radius:28px}}
@media (prefers-color-scheme:dark){.daily-photo-stage{background:linear-gradient(145deg,#17312c,#10211e)}}
