:root {
  --bg: #f7faf5;
  --surface: #ffffff;
  --surface-soft: #f1f8ef;
  --surface-green: #eaf6e7;
  --text: #182019;
  --muted: #7d877e;
  --line: #e6ece4;
  --green: #4f9b4b;
  --green-dark: #2f7f35;
  --green-soft: #dff0db;
  --orange: #e9a132;
  --red: #d94a45;
  --shadow: 0 8px 28px rgba(34, 73, 37, .08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; width:100%; height:100%; min-height:100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
body { display:flex; justify-content:center; overflow:hidden; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(79,155,75,.22); outline-offset: 2px; }
.app-shell { --nav-height:72px; width:100%; max-width:430px; height:100dvh; min-height:100dvh; background:var(--bg); position:relative; overflow:hidden; padding-bottom:0; }
.screen { height:calc(100% - var(--nav-height) - var(--safe-bottom)); min-height:0; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
.screen.detail-screen { height:100%; }
.page { padding:18px 18px 28px; }
.page.with-hero { background: linear-gradient(#f1f9ed 0 190px, var(--bg) 190px); }
.header-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.eyebrow { color: var(--muted); font-size: 13px; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: 28px; line-height: 1.22; letter-spacing:-.02em; }
h2 { font-size: 20px; line-height:1.3; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid rgba(230,236,228,.88); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.card.flat { box-shadow:none; }
.section-title { display:flex; align-items:center; justify-content:space-between; margin: 18px 2px 10px; }
.section-title h2 { font-size:17px; }
.link-btn { border:0; background:none; color:var(--muted); padding:8px 0; min-height:44px; }
.hero-art { width:76px; height:76px; object-fit:contain; padding:18px; border-radius:22px; background:rgba(255,255,255,.72); border:1px solid rgba(225,236,222,.85); }
.header-icon { width:54px; height:54px; object-fit:contain; padding:13px; border-radius:17px; background:var(--surface-green); }
.greeting { padding-top: 8px; }
.greeting p { margin-top:7px; font-size:14px; color:var(--muted); }
.goal-card { padding:16px; margin-top:16px; }
.goal-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.goal-grid { display:grid; grid-template-columns: 140px 1fr; gap:16px; align-items:center; }
.ring { width:136px; height:136px; border-radius:50%; background: conic-gradient(var(--green) var(--pct), #edf1ec 0); display:grid; place-items:center; position:relative; }
.ring::after { content:""; width:103px; height:103px; border-radius:50%; background:var(--surface); position:absolute; }
.ring-content { position:relative; z-index:1; text-align:center; }
.ring-content strong { display:block; font-size:30px; }
.ring-content span { color:var(--muted); font-size:12px; }
.macro-list { display:grid; gap:11px; }
.macro-line { display:grid; gap:6px; }
.macro-line .row { display:flex; justify-content:space-between; font-size:12px; }
.progress { height:7px; border-radius:100px; background:#edf1ec; overflow:hidden; }
.progress > i { display:block; height:100%; border-radius:100px; background:var(--green); }
.quick-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:14px; }
.quick { border:0; background:rgba(255,255,255,.78); border-radius:18px; padding:12px 8px 10px; min-height:100px; box-shadow:0 6px 20px rgba(52,92,55,.05); }
.quick-icon { width:38px; height:38px; margin:0 auto 8px; border-radius:12px; background:var(--surface-green); display:grid; place-items:center; }
.quick-icon img { width:19px; height:19px; object-fit:contain; }
.quick strong { display:block; font-size:13px; }
.quick span { display:block; margin-top:5px; color:var(--muted); font-size:10px; line-height:1.35; }
.banner { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:78px; background:linear-gradient(90deg,#ecf7e9,#f8fbf7); border-radius:20px; padding:12px 14px; margin-top:14px; overflow:hidden; }
.banner img { width:54px; height:54px; object-fit:contain; padding:13px; border-radius:16px; background:rgba(255,255,255,.78); border:1px solid rgba(225,236,222,.85); }
.banner strong { display:block; }
.banner small { display:block; margin-top:4px; color:var(--muted); }
.bottom-nav { position:absolute; left:0; transform:none; bottom:0; width:100%; height:calc(var(--nav-height) + var(--safe-bottom)); padding:8px 18px calc(8px + var(--safe-bottom)); background:rgba(255,255,255,.98); border-top:1px solid var(--line); display:grid; grid-template-columns:repeat(4,1fr); z-index:40; backdrop-filter:blur(12px); }
.nav-btn { border:0; background:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; color:#8a928a; font-size:11px; min-height:52px; }
.nav-btn img { width:25px; height:25px; object-fit:contain; filter:grayscale(1) opacity(.65); }
.nav-btn.active { color:var(--green-dark); font-weight:600; }
.nav-btn.active img { filter:none; }
.toolbar { display:flex; gap:10px; align-items:center; }
.primary { border:0; background:var(--green); color:white; border-radius:999px; min-height:44px; padding:0 16px; font-weight:600; box-shadow:0 7px 18px rgba(79,155,75,.2); }
.secondary { border:1px solid var(--line); background:white; border-radius:14px; min-height:44px; padding:0 14px; }
.search { width:100%; min-height:46px; border-radius:14px; border:1px solid var(--line); background:#f8faf7; padding:0 14px; color:var(--text); }
.chips { display:flex; gap:8px; overflow-x:auto; padding:10px 0 4px; scrollbar-width:none; }
.chip { border:0; background:transparent; color:var(--muted); min-height:38px; padding:0 12px; border-radius:999px; white-space:nowrap; }
.chip.active { background:var(--surface-green); color:var(--green-dark); font-weight:600; }
.food-list { margin-top:8px; background:var(--surface); border-radius:18px; border:1px solid var(--line); overflow:hidden; }
.food-row { display:grid; grid-template-columns:1fr auto 18px; gap:12px; align-items:center; padding:13px 14px; border-bottom:1px solid var(--line); }
.food-row:last-child { border-bottom:0; }
.food-main strong { display:block; font-size:15px; }
.food-main span { display:block; margin-top:4px; font-size:12px; color:var(--muted); }
.food-meta { text-align:right; font-size:12px; }
.food-meta time { display:block; color:var(--muted); margin-bottom:6px; }
.badge { display:inline-flex; align-items:center; min-height:25px; padding:0 9px; border-radius:999px; font-size:11px; font-weight:600; background:#edf6ea; color:var(--green-dark); }
.badge.warn { background:#fff3dc; color:#c37b00; }
.badge.danger { background:#ffe7e5; color:#cb443d; }
.chev { color:#a8afa8; font-size:20px; }
.empty { padding:28px 18px; text-align:center; color:var(--muted); }
.detail-topbar { min-height:70px; display:grid; grid-template-columns:44px 1fr auto; align-items:center; gap:10px; padding:10px 16px; background:var(--surface); border-bottom:1px solid var(--line); }
.detail-topbar > strong { text-align:center; }
.detail-back, .detail-edit { min-width:44px; min-height:44px; border:0; background:transparent; }
.detail-back { font-size:28px; text-align:left; }
.detail-edit { width:auto; padding:0 8px; color:var(--green-dark); }
.detail-body { position:relative; background:var(--bg); padding:20px 18px 28px; }
.detail-body.no-hero { margin-top:0; border-radius:0; }
.tags { display:flex; gap:8px; margin-top:8px; }
.info-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.info-box { border:1px solid var(--line); background:white; border-radius:16px; padding:13px; }
.info-box small { color:var(--muted); display:block; }
.info-box strong { margin-top:7px; display:block; }
.nutrition-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
.nutrition-grid .metric { display:flex; justify-content:space-between; gap:8px; background:white; border:1px solid var(--line); border-radius:12px; padding:11px; font-size:13px; }
.tip { background:#eef8ec; border-radius:16px; padding:14px; margin-top:16px; font-size:13px; line-height:1.55; }
.recipe-list { display:grid; gap:12px; }
.recipe-card { display:block; background:white; border:1px solid var(--line); border-radius:18px; padding:14px; }
.recipe-card h3 { margin-top:4px; }
.recipe-card p { color:var(--muted); margin-top:5px; font-size:12px; line-height:1.45; }
.recipe-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.profile-card { padding:16px; margin-top:12px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field { display:grid; gap:6px; font-size:13px; }
.field.full { grid-column:1/-1; }
.field input,.field select { width:100%; min-height:46px; border-radius:13px; border:1px solid var(--line); background:white; padding:0 12px; }
.form-actions { display:flex; gap:10px; margin-top:14px; }
.form-actions button { flex:1; }
.data-card { margin-top:14px; padding:16px; }
.data-status { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.data-status strong { display:block; }
.data-status span { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
.modal-backdrop { position:absolute; inset:0; z-index:60; background:rgba(22,30,22,.28); display:flex; align-items:flex-end; justify-content:center; }
.modal { width:min(100%,430px); background:white; border-radius:26px 26px 0 0; max-height:88dvh; overflow:auto; padding:18px 18px calc(20px + var(--safe-bottom)); box-shadow:0 -18px 50px rgba(0,0,0,.14); }
.modal-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.close { border:0; background:#f1f3f0; width:42px; height:42px; border-radius:50%; font-size:20px; }
.results { margin-top:10px; border:1px solid var(--line); border-radius:16px; overflow:hidden; max-height:320px; overflow-y:auto; }
.result-row { width:100%; border:0; background:white; display:block; text-align:left; padding:12px 14px; border-bottom:1px solid var(--line); min-height:64px; }
.result-row:last-child { border-bottom:0; }
.result-row.selected-result { background:var(--surface-green); }
.result-copy { min-width:0; display:grid; gap:3px; }
.result-copy strong { font-size:14px; color:var(--text); }
.result-copy small { color:var(--muted); font-size:11px; line-height:1.35; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.search-filter-row { display:grid; grid-template-columns:1.25fr .75fr; gap:10px; margin-top:10px; }
.mini-field { display:grid; gap:5px; color:var(--muted); font-size:11px; }
.mini-field select { width:100%; min-height:42px; border-radius:12px; border:1px solid var(--line); background:#f8faf7; padding:0 10px; color:var(--text); }
.inline-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.toast { position:fixed; left:50%; bottom:94px; transform:translateX(-50%); background:#1d2a1f; color:white; padding:11px 16px; border-radius:999px; font-size:13px; z-index:90; box-shadow:var(--shadow); }
.notice { margin:12px 18px 0; padding:11px 13px; border-radius:14px; background:#fff6df; color:#8d6615; font-size:12px; line-height:1.45; }
@media (min-width: 431px) {
  body { padding:24px 0; }
  .app-shell { height:min(844px, calc(100dvh - 48px)); min-height:620px; border-radius:32px; overflow:hidden; box-shadow:0 18px 60px rgba(36,67,37,.14); }
  .bottom-nav { bottom:0; border-radius:0 0 32px 32px; overflow:hidden; }
}
@media (max-width: 360px) {
  .page { padding-left:14px; padding-right:14px; }
  .goal-grid { grid-template-columns:122px 1fr; gap:12px; }
  .ring { width:120px; height:120px; }
  .ring::after { width:91px; height:91px; }
  .quick-grid { gap:7px; }
  .quick { padding-left:5px; padding-right:5px; }
}

.text-food-summary { padding:12px 14px; margin-top:14px; }

/* v1.2.3: removable daily food logs and recommendation undo */
.log-actions { display:flex; align-items:center; gap:10px; }
.danger-link { color:#c94c45; }
.daily-log-list { background:var(--surface); border:1px solid var(--line); border-radius:18px; overflow:hidden; }
.daily-log-row { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; padding:13px 14px; border-bottom:1px solid var(--line); }
.daily-log-row:last-child { border-bottom:0; }
.daily-log-copy { min-width:0; }
.daily-log-copy > div { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.daily-log-copy strong { font-size:14px; }
.daily-log-copy small { display:block; margin-top:5px; color:var(--muted); font-size:11px; line-height:1.4; }
.badge.log-source { min-height:22px; padding:0 7px; font-size:10px; }
.log-delete { min-width:54px; min-height:40px; border:1px solid #f0d5d2; border-radius:11px; background:#fff8f7; color:#bf4a43; font-size:12px; }
@media (max-width:360px){
  .section-title { align-items:flex-start; }
  .log-actions { gap:5px; flex-wrap:wrap; justify-content:flex-end; }
  .log-actions .link-btn { min-height:34px; padding:4px 0; font-size:11px; }
}

/* v1.2.4: keep today's records visible near the top of Home */
.today-log-section { scroll-margin-top: 10px; margin-top: 2px; }
.compact-empty { padding: 18px 16px; }
.today-log-section .section-title { margin-top: 14px; }

/* v1.2.6: make today's food log unmistakably visible directly below the target card */
.today-log-card { margin-top:14px; padding:16px; scroll-margin-top:12px; }
.today-log-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.today-log-head h2 { margin:0; font-size:18px; line-height:1.25; }
.today-log-head .eyebrow { display:block; margin-top:4px; }
.today-log-card .daily-log-list { border:0; border-top:1px solid var(--line); border-radius:0; margin-top:2px; }
.today-log-card .daily-log-row { padding-left:0; padding-right:0; }
.today-log-card .compact-empty { padding:12px 0 2px; text-align:left; }

/* v1.3.0 · Scheme B — data dashboard */
:root {
  --bg: #f3f8fd;
  --surface: #ffffff;
  --surface-soft: #edf5ff;
  --surface-green: #edf8ef;
  --text: #111a2e;
  --muted: #718096;
  --line: #e2eaf3;
  --blue: #3f82f7;
  --blue-dark: #2367dc;
  --blue-soft: #eaf2ff;
  --green: #42a85a;
  --green-dark: #26843c;
  --green-soft: #e8f7eb;
  --orange: #f0a13b;
  --orange-soft: #fff3e4;
  --red: #e65353;
  --shadow: 0 10px 28px rgba(30, 73, 120, .08);
}
html,body{background:#eef5fb}
body{color:var(--text)}
.app-shell{background:var(--bg)}
.page{padding:18px 16px 28px}
.dashboard-page{background:linear-gradient(180deg,#eef6ff 0,#f8fbfe 250px,#f5f8fb 100%)}
.dashboard-topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.dashboard-topbar h1{font-size:27px;letter-spacing:-.03em}
.dashboard-subtitle{font-size:13px;margin-top:4px}
.date-pill{position:relative;display:flex;align-items:center;gap:7px;min-height:43px;border:1px solid #d9e5f2;background:#fff;border-radius:13px;padding:0 10px;color:#24456d;font-weight:600;box-shadow:0 4px 14px rgba(50,91,140,.05)}
.date-pill span{font-size:11px;color:#74849a}
.date-pill input{border:0;background:transparent;color:#24456d;font-weight:700;width:128px;outline:0;padding:0}
.overview-panel{display:grid;grid-template-columns:160px 1fr;gap:14px;align-items:center;margin-bottom:14px}
.calorie-side{display:grid;justify-items:center;gap:10px}
.dashboard-ring{width:156px;height:156px;background:conic-gradient(var(--green) var(--pct),#e3eaf0 0);box-shadow:inset 0 0 0 1px rgba(255,255,255,.5)}
.dashboard-ring::after{width:118px;height:118px}
.dashboard-ring .ring-content strong{font-size:34px;letter-spacing:-.04em}
.dashboard-ring .ring-content span{font-size:12px;color:#7a8797}
.calorie-remaining{font-size:12px;color:#64758a;text-align:center}
.calorie-remaining strong{color:#344a65}
.dashboard-macros{display:grid;gap:9px}
.dashboard-macro-card{background:#fff;border:1px solid #e4ebf3;border-radius:14px;padding:10px 11px;box-shadow:0 5px 16px rgba(37,82,130,.05)}
.dashboard-macro-card .row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.dashboard-macro-card .row>div{min-width:0}
.dashboard-macro-card span{display:block;font-size:11px;color:#6c7a8d;margin-bottom:2px}
.dashboard-macro-card strong{display:block;font-size:13px;white-space:nowrap}
.dashboard-macro-card b{font-size:12px;color:var(--green)}
.dashboard-macro-card.blue b{color:var(--blue)}
.dashboard-macro-card.orange b{color:var(--orange)}
.dashboard-macro-card .progress{height:6px;margin-top:7px;background:#edf1f5}
.dashboard-macro-card .progress i{background:var(--green)}
.dashboard-macro-card.blue .progress i{background:var(--blue)}
.dashboard-macro-card.orange .progress i{background:var(--orange)}
.dashboard-quick{margin-top:2px;margin-bottom:14px}
.dashboard-quick .quick{min-height:93px;border:1px solid #e4ebf3;box-shadow:0 6px 18px rgba(38,82,125,.05)}
.dashboard-quick .quick.quick-blue{background:linear-gradient(180deg,#f3f7ff,#fff)}
.dashboard-quick .quick.quick-orange{background:linear-gradient(180deg,#fff7ed,#fff)}
.dashboard-quick .quick-icon{background:#eaf2ff}
.dashboard-quick .quick-orange .quick-icon{background:#fff0dd}
.dashboard-quick .quick-icon img{filter:invert(45%) sepia(92%) saturate(1790%) hue-rotate(202deg) brightness(100%) contrast(93%)}
.dashboard-quick .quick-orange .quick-icon img{filter:invert(66%) sepia(74%) saturate(815%) hue-rotate(343deg) brightness(98%) contrast(92%)}
.dashboard-quick .quick strong{font-size:12px;color:#24364e}
.dashboard-quick .quick span{font-size:9px}
.dashboard-card{border-radius:18px;border:1px solid #e4ebf3;box-shadow:0 6px 20px rgba(36,75,120,.05)}
.today-log-card{margin-top:0;padding:14px}
.today-log-head{align-items:center;margin-bottom:8px}
.today-log-head h2{font-size:17px}
.outline-action{border:1px solid #d7e3ef;background:#fff;border-radius:11px;min-height:38px;padding:0 11px;color:#355378;font-size:12px;font-weight:600}
.text-action{border:0;background:transparent;color:#e05050;padding:9px 4px;font-size:12px}
.today-log-footer{display:flex;justify-content:flex-end;border-top:1px solid var(--line)}
.daily-log-list{border-color:#e6edf4}
.daily-log-row{padding:12px 4px}
.daily-log-copy strong{color:#24334a}
.badge.log-source{background:#fff0d9;color:#bd7922}
.log-delete{background:#fff;border-color:#f0d9d9;color:#e04f4f}
.history-preview-card{padding:14px;margin-top:14px}
.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.section-heading h2{font-size:17px}
.history-preview-list{border-top:1px solid var(--line)}
.history-preview-row{width:100%;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;border:0;border-bottom:1px solid var(--line);background:transparent;padding:11px 0;text-align:left}
.history-preview-row:last-child{border-bottom:0}
.history-preview-row>span:first-child strong{display:block;font-size:12px;color:#283a54}
.history-preview-row>span:first-child small{display:block;font-size:11px;color:#101827;font-weight:700;margin-top:2px}
.history-preview-macros{font-size:10px;color:#8190a3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-preview-row>b{color:#9ba9ba}
.bottom-nav{border-top-color:#e1e9f2;box-shadow:0 -8px 22px rgba(38,71,108,.05)}
.nav-btn.active{color:var(--blue-dark)}
.nav-btn.active img{filter:invert(45%) sepia(81%) saturate(1902%) hue-rotate(202deg) brightness(99%) contrast(95%)}
.primary{background:var(--blue);box-shadow:0 7px 18px rgba(63,130,247,.22)}
button:focus-visible,input:focus-visible,select:focus-visible{outline-color:rgba(63,130,247,.22)}
.chip.active{background:var(--blue-soft);color:var(--blue-dark)}
.badge{background:#eaf6ec;color:#2a8b43}
.result-row.selected-result{background:#eef5ff}
.tip{background:#eff6ff}
.detail-edit{color:var(--blue-dark)}

/* History screen */
.history-page{background:linear-gradient(180deg,#eff7ff,#f7fafc 240px)}
.history-topbar{display:grid;grid-template-columns:42px 1fr 42px;align-items:center;gap:8px;text-align:center;margin-bottom:14px}
.history-topbar h1{font-size:24px}
.history-topbar p{font-size:11px;margin-top:3px}
.history-back{border:0;background:transparent;width:42px;height:42px;font-size:30px;color:#244268;text-align:left}
.history-filters{display:grid;grid-template-columns:repeat(3,1fr) 1.15fr;gap:6px;margin-bottom:12px}
.history-chip,.month-filter{border:1px solid #dce7f2;background:#fff;border-radius:11px;min-height:38px;display:flex;align-items:center;justify-content:center;color:#57708e;font-size:11px}
.history-chip.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.month-filter input{width:100%;border:0;background:transparent;padding:0 5px;color:#445c79;font-size:10px;outline:0}
.trend-card{padding:14px;margin-bottom:15px}
.chart-wrap{position:relative;height:180px;padding:20px 4px 20px;margin-top:4px;border-top:1px solid #edf2f6}
.bar-chart{position:absolute;inset:22px 6px 14px;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:7px;align-items:end}
.bar-item{height:100%;min-width:0;display:grid;grid-template-rows:1fr auto;align-items:end;gap:5px;border:0;background:transparent;padding:0}
.bar-item .bar{display:block;width:100%;min-height:3px;border-radius:6px 6px 2px 2px;background:#b7d4ff}
.bar-item.today .bar{background:#64bf78}
.bar-item small{font-size:9px;color:#7e8c9d;text-align:center}
.target-line{position:absolute;left:4px;right:4px;border-top:1px dashed #7f9ac0;z-index:2}
.target-line span{position:absolute;right:0;top:-23px;background:var(--blue);color:white;border-radius:7px;padding:3px 6px;font-size:9px}
.history-records{margin-top:4px}
.history-record-list{display:grid;gap:9px}
.history-record-row{position:relative;width:100%;border:1px solid #e1e9f2;background:#fff;border-radius:15px;padding:12px 30px 11px 12px;text-align:left;box-shadow:0 4px 16px rgba(35,74,118,.04)}
.history-record-row:first-child{border-color:#cfe9d3;background:#f7fdf8}
.history-record-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.history-record-head strong{display:block;font-size:11px;color:#34465d}
.history-record-head b{display:block;margin-top:2px;font-size:19px;color:#111a2e}
.history-status{border-radius:999px;padding:5px 9px;font-size:10px;font-weight:700;background:#eaf7ed;color:#2f9147}
.history-status.danger{background:#ffe8e6;color:#d84d49}
.history-record-macros{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px}
.history-record-macros span{font-size:9px;color:#708097;white-space:nowrap}
.history-record-macros i{font-style:normal;font-weight:700;color:#4a8fef;margin-left:2px}
.history-record-row>small{display:block;margin-top:7px;font-size:9px;color:#9aa7b6}
.history-chevron{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:20px;color:#93a1b2}
.log-date-note{margin-top:12px;padding:9px 11px;border-radius:10px;background:#f2f7fd;color:#60738a;font-size:11px}

@media (max-width:380px){
  .overview-panel{grid-template-columns:145px 1fr;gap:10px}
  .dashboard-ring{width:140px;height:140px}.dashboard-ring::after{width:106px;height:106px}
  .date-pill{padding:0 8px}.date-pill input{width:112px;font-size:11px}
  .history-filters{grid-template-columns:repeat(3,1fr)}.month-filter{grid-column:1/-1}
}
.date-pill{overflow:hidden;cursor:pointer}
.date-pill b{font-size:11px;white-space:nowrap;color:#24456d}
.date-pill input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.month-filter{position:relative;overflow:hidden;cursor:pointer;padding:0 8px}
.month-filter b{font-size:10px;color:#445c79;white-space:nowrap}
.month-filter input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
/* v1.3.0 density tuning after visual QA */
.dashboard-quick .quick{min-height:76px;padding:8px 5px 7px;border-radius:16px}
.dashboard-quick .quick-icon{width:31px;height:31px;margin-bottom:5px;border-radius:10px}
.dashboard-quick .quick-icon img{width:16px;height:16px}
.dashboard-quick .quick span{display:none}
.dashboard-quick .quick strong{font-size:11px}
.today-log-card{padding:12px 13px}
.today-log-head{margin-bottom:5px}
.today-log-head h2{font-size:16px}
.daily-log-row{padding:8px 2px}
.daily-log-copy strong{font-size:13px}
.daily-log-copy small{margin-top:3px;font-size:10px}
.log-delete{min-width:48px;min-height:34px;font-size:11px}
.log-actions{gap:7px}
.log-actions .link-btn{min-height:34px;font-size:11px;padding:3px 0}
.outline-action{min-height:34px;padding:0 9px;font-size:11px}
.history-preview-card{margin-top:10px;padding:12px 13px}

.boot-message{padding:32px 24px;color:#607086;font-size:14px;text-align:center;}

/* v1.4.0 cloud account */
.auth-screen{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:24px;background:linear-gradient(180deg,#eef6ff 0,#f7fafc 42%,#fff 100%)}
.auth-card{width:min(100%,420px);background:#fff;border:1px solid #e1e9f2;border-radius:24px;padding:24px;box-shadow:0 18px 46px rgba(35,74,118,.10)}
.auth-card h1{font-size:25px;margin:6px 0 8px;color:#172033}.auth-card>p{font-size:13px;line-height:1.65;color:#66778d;margin:0 0 16px}
.auth-brand{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;background:#eaf3ff;color:#2f70c7;font-size:11px;font-weight:800;letter-spacing:.04em}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#f2f6fa;border-radius:12px;padding:4px;margin:18px 0 14px}.auth-tabs button{border:0;background:transparent;min-height:38px;border-radius:9px;color:#708097;font-weight:700}.auth-tabs button.active{background:#fff;color:#2369c7;box-shadow:0 3px 10px rgba(35,74,118,.08)}
.auth-form{display:grid;gap:11px}.auth-submit{width:100%;margin-top:4px;min-height:46px}.auth-submit:disabled{opacity:.6}.auth-message{padding:10px 12px;border-radius:10px;background:#eef7ff;color:#38658f;font-size:12px;line-height:1.5}.auth-message.error{background:#fff0ef;color:#b94b48}
.auth-foot,.auth-hint{text-align:center;color:#98a5b5;font-size:10px;line-height:1.5;margin-top:14px}.migration-card{display:grid;gap:10px}.migration-card .primary,.migration-card .secondary{width:100%;min-height:44px}
.account-card{margin-bottom:14px}.account-sync-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.account-sync-row>span{font-size:11px;color:#6f8095;margin-right:auto}.compact-btn{min-height:34px;padding:0 11px;font-size:11px}.danger-outline{color:#bd4a47;border-color:#f0caca;background:#fff}
@media (max-width:480px){.auth-screen{padding:16px}.auth-card{padding:20px;border-radius:20px}.auth-card h1{font-size:22px}}
