/* Fuel Log — big-text, Nutritionix-style layout. Sizes are rem so the Text size setting scales everything. */
html { font-size: 23px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html[data-ts="large"] { font-size: 20px; }
html[data-ts="xl"] { font-size: 23px; }
html[data-ts="huge"] { font-size: 27px; }
:root, html[data-theme="light"] {
  --bg: #ffffff; --bg2: #f1f3f1; --card: #ffffff; --line: #c9cfc9; --line2: #e3e7e3;
  --tx: #000000; --mut: #333a33; --acc: #2f8f3a; --acc-tx: #1f6b28; --bar: #2f8f3a; --bar-tx: #ffffff;
  --red: #c62828; --amber: #a35a00; --amber-bg: #fff3df; --purple: #6a3fb5; --blue: #1c5fbf; --teal: #2f8f3a; --orange: #d9730d;
  --gray: #9aa09a; --shadow: 0 1px 3px rgba(0,0,0,.12);
}
html[data-theme="dark"] {
  --bg: #0e1215; --bg2: #161c20; --card: #1a2126; --line: #3a454d; --line2: #2a333a;
  --tx: #ffffff; --mut: #d5dbe0; --acc: #4cc35a; --acc-tx: #7fe08a; --bar: #1f6b28; --bar-tx: #ffffff;
  --red: #ff6b6b; --amber: #ffb547; --amber-bg: #3a2a10; --purple: #b694ff; --blue: #7fb2ff; --teal: #4cc35a; --orange: #ffa04d;
  --gray: #5c666e; --shadow: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg2); color: var(--tx); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 1rem; line-height: 1.35; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
b, strong { font-weight: 700; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--bar); color: var(--bar-tx); display: flex; align-items: center; gap: .3rem; min-height: 3rem; padding: .2rem .3rem; padding-top: max(.2rem, env(safe-area-inset-top)); }
.bar h1 { flex: 1; margin: 0; font-size: 1.1rem; font-weight: 700; text-align: center; line-height: 1.2; min-width: 0; }
.barbtn { background: none; border: 0; color: var(--bar-tx); font-size: 1.9rem; line-height: 1; min-width: 2.3rem; min-height: 2.3rem; border-radius: .5rem; padding: 0 .2rem; cursor: pointer; font-weight: 700; }
.barbtn:active { background: rgba(255,255,255,.18); }
.barbtn.ghost { visibility: hidden; }
.datebtn { flex: 1; background: none; border: 0; color: var(--bar-tx); font-size: 1.1rem; font-weight: 700; min-height: 2.3rem; line-height: 1.15; cursor: pointer; min-width: 0; }
.datebtn small { display: block; font-size: .72rem; font-weight: 600; opacity: .95; }

/* ---------- bottom tabs ---------- */
#view { padding-bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: flex-end; background: var(--card); border-top: 2px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; background: none; border: 0; padding: .35rem 0 .3rem; display: flex; flex-direction: column; align-items: center; gap: .1rem; color: var(--mut); font-size: min(.68rem, 4.3vw); white-space: nowrap; font-weight: 700; cursor: pointer; min-width: 0; }
.tabs button svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--acc-tx); }
.tabs .track { flex: 0 0 min(3.4rem, 21vw); }
.tabs .track b { display: flex; align-items: center; justify-content: center; width: min(3rem, 19vw); height: min(3rem, 19vw); margin-top: -1.3rem; border-radius: 50%; background: var(--acc); color: #fff; font-size: 2.3rem; line-height: 1; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.3); border: 3px solid var(--card); }
.tabs .track span { color: var(--acc-tx); }

/* ---------- day summary ---------- */
.sum { background: var(--card); padding: .7rem .8rem .6rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.kc { display: flex; align-items: stretch; justify-content: space-around; text-align: center; gap: .4rem; }
.kc > div { flex: 1; min-width: 0; }
.kc b { display: block; font-size: 1.45rem; line-height: 1.1; }
.kc span { font-size: .8rem; color: var(--mut); font-weight: 600; }
.kc .sep { flex: 0 0 2px; background: var(--line); }
.kc .over b { color: var(--red); }
.pbar { height: .7rem; background: var(--line2); border-radius: 1rem; overflow: hidden; margin: .5rem 0 .2rem; }
.pbar i { display: block; height: 100%; background: var(--acc); border-radius: 1rem; }
.pbar i.over { background: var(--red); }
.goalline { text-align: center; font-size: .78rem; color: var(--mut); font-weight: 600; }
.mac3 { display: flex; gap: .5rem; margin-top: .6rem; }
.mac3 > div { flex: 1; min-width: 0; text-align: center; }
.mac3 .ml { font-size: .78rem; font-weight: 700; color: var(--mut); }
.mac3 .mv { font-size: 1.15rem; font-weight: 700; line-height: 1.15; }
.mac3 .mg { font-size: .7rem; color: var(--mut); font-weight: 600; }
.mac3 .over .mv { color: var(--red); }
.minibar { height: .35rem; background: var(--line2); border-radius: 1rem; overflow: hidden; margin-top: .2rem; }
.minibar i { display: block; height: 100%; border-radius: 1rem; }
.dq { margin-top: .55rem; font-size: .75rem; color: var(--mut); font-weight: 600; }
.dq .row1 { display: flex; justify-content: space-between; gap: .4rem; flex-wrap: wrap; }
.seg { display: flex; height: .4rem; border-radius: 1rem; overflow: hidden; background: var(--line2); margin: .25rem 0 .15rem; }
.seg i { display: block; height: 100%; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; padding: .55rem .5rem; background: var(--bg2); }
.quick button { background: var(--card); border: 2px solid var(--line); border-radius: .7rem; padding: .35rem .1rem; display: flex; flex-direction: column; align-items: center; font-size: min(.72rem, 4.3vw); font-weight: 700; color: var(--tx); cursor: pointer; min-width: 0; }
.quick button .qi { font-size: 1.35rem; line-height: 1.2; }

/* ---------- meals ---------- */
.meal { background: var(--card); margin-bottom: .45rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mh { display: flex; align-items: center; border-bottom: 1px solid var(--line2); }
.mh-t { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 .4rem; background: none; border: 0; padding: .5rem .6rem .5rem .8rem; cursor: pointer; text-align: left; min-width: 0; }
.mh-t .mn { font-size: .9rem; font-weight: 800; letter-spacing: .03em; color: var(--acc-tx); }
.mh-t .mk { font-size: .95rem; font-weight: 700; white-space: nowrap; }
.mh-t .mk small { font-size: .7rem; font-weight: 600; color: var(--mut); }
.madd { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; margin-right: .4rem; border-radius: 50%; border: 2px solid var(--acc); background: none; color: var(--acc-tx); font-size: 1.6rem; line-height: 1; font-weight: 700; cursor: pointer; }
.mempty { padding: .5rem .8rem; color: var(--mut); font-size: .8rem; }
.fr { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border-bottom: 1px solid var(--line2); cursor: pointer; }
.fr:last-child { border-bottom: 0; }
.fr:active { background: var(--bg2); }
.ic { flex: 0 0 2.4rem; width: 2.4rem; height: 2.4rem; border-radius: .5rem; background: var(--bg2); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; overflow: hidden; }
.ic img { width: 100%; height: 100%; object-fit: cover; }
.fr .mid { flex: 1; min-width: 0; }
.fr .n { font-weight: 700; font-size: 1rem; line-height: 1.2; overflow-wrap: break-word; }
.fr .sv { font-size: .78rem; color: var(--mut); margin-top: .12rem; line-height: 1.3; overflow-wrap: break-word; }
.fr .k { flex: 0 0 auto; font-size: 1.1rem; font-weight: 700; text-align: right; }
.fr.est .k { color: var(--amber); }
.daylinks { padding: .3rem .5rem 1rem; }

/* ---------- badges ---------- */
.badge { display: inline-block; font-size: .7rem; font-weight: 800; padding: .02rem .4rem; border-radius: .35rem; margin-right: .3rem; border: 2px solid currentColor; white-space: nowrap; vertical-align: .05em; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.b-barcode, .b-label, .b-database { color: var(--acc-tx); }
.b-restaurant { color: var(--purple); }
.b-estimate { color: var(--amber); background: var(--amber-bg); }
.b-manual { color: var(--mut); }

/* ---------- full-screen page (was a sheet) ---------- */
.page { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
#sheetBody { padding: .7rem .8rem calc(2rem + env(safe-area-inset-bottom)); max-width: 46rem; margin: 0 auto; }
#sheetBody h2 { font-size: 1.2rem; margin: .2rem 0 .5rem; line-height: 1.25; }
#sheetBody h2 small { display: block; font-size: .8rem; font-weight: 500; color: var(--mut); margin-top: .2rem; }
h3.sec, .sec { font-size: .85rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--acc-tx); margin: 1.1rem 0 .4rem; }
.muted { color: var(--mut); }
.src { font-size: .8rem; color: var(--mut); margin: .3rem 0; overflow-wrap: break-word; }
.src a { color: var(--blue); font-weight: 700; }
.warn { background: var(--amber-bg); color: var(--tx); border-left: .3rem solid var(--amber); padding: .45rem .6rem; border-radius: .4rem; font-size: .82rem; margin: .45rem 0; }
.ok { border-left: .3rem solid var(--acc); padding: .35rem .6rem; font-size: .82rem; margin: .45rem 0; background: var(--bg2); border-radius: .4rem; }
.err { color: var(--red); font-weight: 700; }

/* ---------- forms ---------- */
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 2.6rem; border: 2px solid var(--line); border-radius: .55rem; background: var(--card); padding: .3rem .55rem; font-size: 1rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--acc); outline-offset: 0; border-color: var(--acc); }
textarea { min-height: 4.6rem; resize: vertical; }
select { appearance: auto; }
label, .lbl { display: block; font-size: .82rem; font-weight: 700; color: var(--mut); margin: .7rem 0 .25rem; }
.field { margin: .5rem 0; }
.row { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1 1 8rem; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.8rem; padding: .35rem .8rem; border-radius: .7rem; border: 2px solid var(--line); background: var(--card); font-weight: 700; font-size: 1rem; cursor: pointer; text-align: center; line-height: 1.2; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.danger { color: var(--red); border-color: var(--red); }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; }
.btn + .btn.wide, .btn.wide + .btn.wide { margin-top: .5rem; }
.stepper { display: flex; align-items: center; gap: .35rem; }
.stepper button { flex: 0 0 2.6rem; height: 2.6rem; border-radius: .55rem; border: 2px solid var(--line); background: var(--card); font-size: 1.5rem; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper input { flex: 1; text-align: center; font-size: 1.15rem; font-weight: 700; min-width: 3.5rem; }
.pick { display: flex; flex-direction: column; gap: .35rem; }
.pick button { display: flex; justify-content: space-between; align-items: center; min-height: 2.8rem; padding: .3rem .7rem; border-radius: .6rem; border: 2px solid var(--line); background: var(--card); font-weight: 700; text-align: left; cursor: pointer; }
.pick button.on { border-color: var(--acc); background: var(--bg2); color: var(--acc-tx); }
.loadmsg { padding: 3rem .5rem; text-align: center; font-size: 1.05rem; font-weight: 600; }
.spin { display: inline-block; width: 1.1rem; height: 1.1rem; border: .2rem solid var(--line); border-top-color: var(--acc); border-radius: 50%; animation: sp 0.8s linear infinite; margin-right: .5rem; vertical-align: -.15rem; }
@keyframes sp { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(5.6rem + env(safe-area-inset-bottom)); z-index: 60; background: #111; color: #fff; padding: .55rem .9rem; border-radius: .7rem; font-size: .9rem; font-weight: 600; max-width: 92vw; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,.35); }

/* ---------- track sheet ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin: .5rem 0; }
.tiles button { min-height: 4.6rem; border-radius: .8rem; border: 2px solid var(--line); background: var(--card); font-weight: 800; font-size: .95rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; cursor: pointer; padding: .3rem; }
.tiles button .qi { font-size: 1.7rem; line-height: 1.1; }
.tiles button.big { border-color: var(--acc); }
.searchbox { display: flex; gap: .35rem; }
.searchbox input { flex: 1; font-size: 1.05rem; min-height: 2.9rem; }
.results { margin-top: .4rem; border: 2px solid var(--line); border-radius: .7rem; overflow: hidden; background: var(--card); }
.res { display: flex; align-items: center; gap: .5rem; padding: .55rem .65rem; border-bottom: 1px solid var(--line2); cursor: pointer; }
.res:last-child { border-bottom: 0; }
.res .t { flex: 1; min-width: 0; }
.res .n { font-weight: 700; overflow-wrap: break-word; line-height: 1.2; }
.res small { display: block; font-size: .75rem; color: var(--mut); margin-top: .1rem; overflow-wrap: anywhere; }
.res .k { font-weight: 700; white-space: nowrap; font-size: .95rem; }
.res.hd { font-size: .78rem; font-weight: 800; color: var(--acc-tx); cursor: default; background: var(--bg2); letter-spacing: .03em; }
.res.ai .n { color: var(--acc-tx); }

/* ---------- edit food ---------- */
.ef-head { display: flex; gap: .6rem; align-items: center; margin-bottom: .3rem; }
.ef-ph { flex: 0 0 4.2rem; width: 4.2rem; height: 4.2rem; border-radius: .7rem; background: var(--bg2); display: flex; align-items: center; justify-content: center; font-size: 2.3rem; overflow: hidden; }
.ef-ph img { width: 100%; height: 100%; object-fit: cover; }
.ef-head .nm { flex: 1; min-width: 0; }
.ef-head textarea { resize: none; overflow: hidden; min-height: 0; }
.ef-head .name { font-size: 1.1rem; font-weight: 800; border-width: 0 0 2px; border-radius: 0; padding: .1rem 0; min-height: 2.2rem; background: transparent; }
.ef-head .brand { font-size: .85rem; border-width: 0 0 2px; border-radius: 0; padding: .1rem 0; min-height: 1.9rem; background: transparent; color: var(--mut); margin-top: .2rem; }
.qgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem .5rem; align-items: end; }
@media (min-width: 600px) { .qgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.qgrid .full { grid-column: 1 / -1; }
.calbig { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); padding: .45rem .1rem; margin: .7rem 0 .2rem; }
.calbig span { font-weight: 700; font-size: 1rem; }
.calbig b { font-size: 1.7rem; }
.calbig.est b { color: var(--amber); }
.tot { font-size: .78rem; color: var(--mut); font-weight: 600; }
.thumb { width: 100%; max-height: 14rem; object-fit: cover; border-radius: .7rem; margin: .3rem 0; }
.photorow { display: flex; gap: .6rem; align-items: center; }
.photorow img { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: .6rem; }
.nums { display: grid; grid-template-columns: minmax(0, 1fr) minmax(4.5rem, 34%); gap: .3rem .5rem; align-items: center; }
.nums span { font-weight: 600; font-size: .9rem; }
.nums input { text-align: right; }

/* ---------- AI items list ---------- */
.item { border: 2px solid var(--line); border-radius: .7rem; padding: .5rem .6rem; margin: .45rem 0; background: var(--card); cursor: pointer; }
.item.est { border-color: var(--amber); }
.item .top2 { display: flex; gap: .5rem; align-items: flex-start; }
.item input[type=checkbox] { width: 1.6rem; height: 1.6rem; min-height: 0; flex: 0 0 1.6rem; margin-top: .1rem; accent-color: var(--acc); }
.item .nm { font-weight: 800; overflow-wrap: break-word; }
.item small { display: block; font-size: .78rem; color: var(--mut); margin-top: .15rem; overflow-wrap: break-word; }
.item .mac4 { font-size: .85rem; margin-top: .2rem; }
.mic { display: block; margin: .5rem auto; width: 5rem; height: 5rem; border-radius: 50%; border: 0; background: var(--acc); color: #fff; font-size: 2.3rem; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.mic.on, .minimic.on { background: var(--red); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 .6rem rgba(198,40,40,.2); } }
.minimic { flex: 0 0 2.8rem !important; height: 2.8rem; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font-size: 1.3rem; cursor: pointer; }

/* ---------- scanner ---------- */
.video { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; border-radius: .7rem; overflow: hidden; }
.video video { width: 100%; height: 100%; object-fit: cover; }
.video .guide { position: absolute; left: 10%; right: 10%; top: 30%; bottom: 30%; border: 3px solid rgba(255,255,255,.85); border-radius: .6rem; }
.video .laser { position: absolute; left: 12%; right: 12%; top: 50%; height: 3px; background: #ff3b3b; box-shadow: 0 0 8px #ff3b3b; }
#scanMsg { font-size: .9rem; font-weight: 600; }

/* ---------- Nutrition Facts (FDA style) ---------- */
.nf { border: 2px solid var(--tx); padding: .35rem .5rem .45rem; margin: .7rem 0; background: var(--card); color: var(--tx); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.nf-h { font-size: 1.75rem; font-weight: 900; line-height: 1; letter-spacing: -.01em; }
.nf-sv { font-size: .85rem; padding: .2rem 0 .25rem; display: flex; justify-content: space-between; gap: .4rem; flex-wrap: wrap; font-weight: 700; }
.nf-x { border-top: .6rem solid var(--tx); }
.nf-m { border-top: .25rem solid var(--tx); }
.nf-cal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; font-weight: 900; padding: .1rem 0; }
.nf-cal span { font-size: 1.35rem; }
.nf-cal b { font-size: 2.1rem; line-height: 1; }
.nf-dvh { text-align: right; font-size: .78rem; font-weight: 800; padding: .15rem 0; border-bottom: 1px solid var(--tx); }
.nf-r { display: flex; justify-content: space-between; gap: .4rem; padding: .18rem 0; border-bottom: 1px solid var(--tx); font-size: .9rem; line-height: 1.25; }
.nf-r.i1 { padding-left: 1rem; }
.nf-r.i2 { padding-left: 2rem; }
.nf-r .dv { font-weight: 800; white-space: nowrap; }
.nf-r.last { border-bottom: 0; }
.nf-foot { font-size: .7rem; line-height: 1.3; padding-top: .3rem; border-top: .25rem solid var(--tx); }

/* ---------- source of calories ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: .8rem; padding: .7rem .8rem; margin: .6rem .5rem; box-shadow: var(--shadow); }
#sheetBody .card { margin: .6rem 0; }
.card h2 { font-size: 1.1rem; margin: 0 0 .45rem; }
.soc { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.soc svg { flex: 0 0 6.5rem; width: 6.5rem; height: 6.5rem; }
.soc .rows { flex: 1 1 11rem; min-width: 0; }
.soc .sr2 { margin-bottom: .45rem; }
.soc .sr2 .t { display: flex; justify-content: space-between; gap: .3rem; font-weight: 700; font-size: .9rem; flex-wrap: wrap; }
.soc .sr2 .t small { font-weight: 600; color: var(--mut); font-size: .78rem; }
.soc .b2 { height: .55rem; background: var(--line2); border-radius: 1rem; overflow: hidden; margin-top: .15rem; position: relative; }
.soc .b2 i { display: block; height: 100%; border-radius: 1rem; }
.soc .b2 u { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--tx); text-decoration: none; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .3rem; vertical-align: 0; }

/* ---------- stats ---------- */
.calnav { display: flex; align-items: center; justify-content: space-between; margin-bottom: .3rem; }
.calnav b { font-size: 1.05rem; flex: 1; text-align: center; }
.calnav button { background: none; border: 2px solid var(--line); border-radius: .5rem; font-size: 1.4rem; font-weight: 700; width: 2.6rem; height: 2.4rem; cursor: pointer; line-height: 1; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .2rem; }
.cal .dh { text-align: center; font-size: .7rem; font-weight: 800; color: var(--mut); padding: .1rem 0; }
.cal .d { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: .4rem; font-size: .8rem; font-weight: 800; background: var(--bg2); color: var(--mut); cursor: pointer; border: 0; padding: 0; min-width: 0; }
.cal .d.g { background: #2f8f3a; color: #fff; }
.cal .d.r { background: #c62828; color: #fff; }
.cal .d.m { background: var(--gray); color: #fff; }
.cal .d.f { background: transparent; color: var(--mut); opacity: .55; cursor: default; }
.cal .d.today { outline: 3px solid var(--tx); outline-offset: -3px; }
.calstats { display: flex; gap: .5rem; margin-top: .6rem; text-align: center; }
.calstats > div { flex: 1; background: var(--bg2); border-radius: .6rem; padding: .35rem .2rem; }
.calstats b { display: block; font-size: 1.4rem; }
.calstats span { font-size: .75rem; font-weight: 700; color: var(--mut); }
.legend2 { display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .75rem; font-weight: 600; margin-top: .5rem; color: var(--mut); }
.legend2 i { display: inline-block; width: .8rem; height: .8rem; border-radius: .2rem; margin-right: .25rem; vertical-align: -.05rem; }
.wgraph { width: 100%; height: auto; display: block; margin-top: .4rem; }
.wlist .wr { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line2); font-size: .9rem; }
.wlist .wr button { background: none; border: 0; color: var(--red); font-size: 1.2rem; font-weight: 700; cursor: pointer; min-width: 2.2rem; min-height: 2.2rem; }
.legend { font-size: .82rem; line-height: 1.9; }

/* ---------- settings / login ---------- */
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--bg); }
.login-box { width: 100%; max-width: 22rem; text-align: center; }
.login-box .logo { font-size: 3rem; }
.login-box h1 { margin: .2rem 0; font-size: 1.6rem; }
.login-box input { text-align: center; font-size: 1.4rem; letter-spacing: .2em; margin: .5rem 0; min-height: 3rem; }
.setwrap { padding: .1rem .2rem 1rem; }
.goal { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .4rem 0; border-bottom: 1px solid var(--line2); }
.goal .gl { flex: 1 1 0; min-width: 0; font-weight: 700; }
.goal .gl small { display: block; font-size: .72rem; color: var(--mut); font-weight: 600; }
.goal input { flex: 0 0 5.2rem; width: 5.2rem; text-align: right; }
.goal input.wide { flex-basis: 6.5rem; width: 6.5rem; }
.goal .u { font-weight: 700; flex: 0 0 auto; }
.goal .gg { flex: 1 0 100%; text-align: right; font-size: .8rem; color: var(--acc-tx); font-weight: 700; }
@media (min-width: 720px) {
  .bar { padding-left: max(.3rem, calc((100% - 46rem) / 2)); padding-right: max(.3rem, calc((100% - 46rem) / 2)); }
  #view { max-width: 46rem; margin: 0 auto; }
  .tabs { max-width: 46rem; margin: 0 auto; border-left: 2px solid var(--line); border-right: 2px solid var(--line); }
  body { background: var(--bg2); }
}

html[data-ts="huge"] .fr .ic { flex-basis: 1.9rem; width: 1.9rem; height: 1.9rem; font-size: 1.1rem; }
html[data-ts="huge"] .fr { gap: .4rem; padding: .5rem .5rem; }
