:root {
  color-scheme: light;
  --page: #f6f5f1; --card: #ffffff; --ink: #161614; --ink2: #55534e; --muted: #8a8780;
  --line: #e3e1da; --accent: #2a78d6; --accent-ink: #ffffff; --soft: #eaf2fc;
  --good: #0b8a0b; --warn: #a86f00; --bad: #c43232; --lock: #6b4fd8;
  --snack-accent: #8cbcf5; /* on the dark snack bar */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #111110; --card: #1c1c1a; --ink: #f3f3f0; --ink2: #c3c2b7; --muted: #8f8d86;
    --line: #2e2e2b; --accent: #3987e5; --accent-ink: #ffffff; --soft: #18304d;
    --good: #2fbf2f; --warn: #e0a42a; --bad: #e66767; --lock: #9c88f0;
    --snack-accent: #1c5aa8; /* on the light snack bar */
  }
}
/* the switch in the top bar wins over the device setting, both ways */
:root[data-theme="dark"] {
  color-scheme: dark;
    --page: #111110; --card: #1c1c1a; --ink: #f3f3f0; --ink2: #c3c2b7; --muted: #8f8d86;
    --line: #2e2e2b; --accent: #3987e5; --accent-ink: #ffffff; --soft: #18304d;
    --good: #2fbf2f; --warn: #e0a42a; --bad: #e66767; --lock: #9c88f0;
    --snack-accent: #1c5aa8;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
/* an app, not a page: no text selection, no long-press menu, no grey flash on a tap; fields still select */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
[hidden] { display: none !important; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; font-size: 18px; }
.ver { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 4px; }
.who { font-size: 14px; color: var(--ink2); display: flex; gap: 8px; align-items: center; }

main, .login { max-width: 720px; margin: 0 auto; padding: 12px 12px 80px; }
.login { text-align: center; padding-top: 15vh; }
.err { color: var(--bad); }

.btn { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.big { padding: 14px 22px; font-size: 18px; }
.btn.icon { width: 44px; height: 44px; padding: 0; font-size: 22px; }
.btn.small { width: 32px; height: 32px; min-height: 32px; font-size: 18px; }
.btn[disabled] { opacity: .5; cursor: progress; }
.link { background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }

.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.weektitle { text-align: center; font-weight: 600; }

.tabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.tab { flex: 1; font: inherit; font-size: 15px; border: 0; background: none; color: var(--ink2); padding: 8px 4px; border-radius: 8px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--soft); color: var(--ink); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.hint { color: var(--muted); font-size: 13px; }

.balance { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { font-size: 13px; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line); background: var(--card); display: inline-flex; gap: 5px; align-items: center; }
.chip b { font-weight: 600; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }

.days { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 14px; display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.day.locked { border-left: 4px solid var(--lock); }
.dname { font-weight: 700; }
.ddate { font-size: 12px; color: var(--muted); }
.dish { min-width: 0; }
.dlabel { font-weight: 600; overflow-wrap: anywhere; }
.dlabel.empty { color: var(--muted); font-weight: 400; font-style: italic; }
.dsub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { font-size: 11px; border-radius: 6px; padding: 1px 6px; background: var(--page); color: var(--ink2); border: 1px solid var(--line); }
.tag.t-min { color: var(--ink); }
.tag.t-neu { background: var(--soft); color: var(--accent); border-color: transparent; }
/* a day that has come: how was it? */
.rate { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.rate .hint { font-size: 12px; }
.thumb { font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink2); cursor: pointer; }
.thumb svg { width: 16px; height: 16px; }
.thumb:hover { border-color: var(--accent); }
.thumb[data-act="up"].on { background: var(--good); border-color: var(--good); color: #fff; }
.thumb[data-act="down"].on { background: var(--bad); border-color: var(--bad); color: #fff; }
.likes { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }
.likes svg { width: 12px; height: 12px; }
.dbtns { display: flex; gap: 4px; }
.dbtns .btn { width: 40px; height: 40px; min-height: 40px; padding: 0; }
.dbtns .btn svg { width: 20px; height: 20px; }
.dbtns .btn.on { background: var(--lock); border-color: var(--lock); color: #fff; }
.dbtns .btn.taken { color: var(--good); border-color: var(--good); }

.versions { margin-top: 16px; font-size: 14px; }
.versions summary { cursor: pointer; color: var(--ink2); }
.versions ul { list-style: none; padding: 0; margin: 8px 0 0; }
.versions li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: center; }
.versions li span { color: var(--ink2); }

.persons { display: inline-flex; align-items: center; gap: 8px; }
.section { margin: 14px 0 6px; font-size: 14px; color: var(--ink2); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.section .wares { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
.dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.dot svg { width: 19px; height: 19px; }
/* on the list the circles are larger, as in the old app */
.items .dot { width: 40px; height: 40px; }
.items .dot svg { width: 24px; height: 24px; }
.items .on .dot { opacity: .45; }
.donehead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lately { margin-top: 18px; }
/* someone else is in the shop: on every tab, a tap leads to adding */
.herebar { display: grid; gap: 6px; margin: -4px 0 12px; }
.here { display: flex; align-items: stretch; background: var(--accent); color: var(--accent-ink); border-radius: 12px; overflow: hidden; }
.herego { flex: 1; display: flex; align-items: center; gap: 10px; font: inherit; font-size: 15px; text-align: left; color: inherit; background: none; border: 0; padding: 10px 12px; cursor: pointer; }
.herego svg { flex: none; width: 22px; height: 22px; }
.hereoff { flex: none; font: inherit; font-size: 20px; color: inherit; background: none; border: 0; border-left: 1px solid rgba(255, 255, 255, .3); width: 44px; cursor: pointer; }
/* one's own: "Ich bin im Laden", or that the others see it */
.mehere { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: -2px 0 10px; font-size: 14px; }
.mehere .link { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.mehere svg { width: 18px; height: 18px; flex: none; }
.mehere .c { color: var(--muted); font-size: 13px; }
.mehere .mein { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-weight: 600; }
.offline { background: var(--soft); color: var(--ink); border: 1px solid var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin: 0 0 10px; }
.lately summary { cursor: pointer; color: var(--ink2); font-weight: 600; padding: 6px 0; }
.lately .row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.lately .row .n { flex: 1; }
.lately .back { width: 36px; height: 36px; min-height: 36px; }
.urlrow { display: flex; gap: 8px; }
.clearable { position: relative; flex: 1; min-width: 0; display: flex; }
.clearable input { flex: 1; min-width: 0; padding-right: 40px; }
.clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.clear:hover { color: var(--ink); background: var(--soft); }
.ndrow .ndsug { grid-column: 3 / -1; grid-row: 2; margin: 0; z-index: 1; }
.ndrow .ndsug ~ .ndstep, .ndrow .ndsug ~ .ndu { grid-row: 3; }
.nding select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 6px; min-width: 0; }
.ndor { font-size: 13px; color: var(--muted); margin: 8px 0 6px; }
.ndhits { list-style: none; margin: 8px 0 0; padding: 0; max-height: 38vh; overflow: auto; display: grid; gap: 4px; }
.ndhits button { font: inherit; text-align: left; width: 100%; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; display: grid; gap: 2px; }
.ndhits button:hover { border-color: var(--accent); }
.ndhits button span { font-size: 13px; color: var(--muted); }
.ndhits .have { color: var(--good); }
.ndhits .hint { padding: 6px 2px; }
.urlrow .search { margin-bottom: 0; }
#ndnote { margin: 6px 0 10px; }
#ndnote.err, .err { color: var(--bad); }
.ndform { overflow: auto; flex: 1; min-height: 120px; display: grid; gap: 10px; align-content: start; }
.ndform input[type=text], .ndform input[type=number], .nding input:not([type=checkbox]) { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; min-width: 0; }
.ndform label.row { display: grid; gap: 4px; font-size: 13px; color: var(--ink2); }
.ndminrow input { width: 110px; }
.ndtags { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.chipbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.heardlist { overflow: auto; max-height: 52vh; margin: 8px 0; }
.ndline.maybe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink2); }
.nding { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nding li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.nding li.off { opacity: .55; }
.ndrow { display: grid; grid-template-columns: 22px 32px auto minmax(0, 1fr); gap: 6px; align-items: center; }
/* the name has the line, amount and unit go under it */
.ndrow .ndn { grid-column: 3 / -1; }
.ndrow .ndstep { grid-column: 3; grid-row: 2; display: inline-flex; align-items: center; gap: 4px; }
.ndrow .ndstep .btn { width: 34px; height: 34px; min-height: 34px; font-size: 18px; }
.ndrow .ndq { width: 72px; text-align: center; }
.ndrow .ndu { grid-column: 4; grid-row: 2; justify-self: start; width: 96px; }
.ndrow input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.ndline { font-size: 12px; color: var(--muted); margin: 4px 0 0 60px; }
.newing { color: var(--warn); }
.dright { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dacts { display: flex; gap: 4px; }
.dacts .btn { width: 34px; height: 34px; min-height: 34px; padding: 0; }
.dacts .btn svg { width: 17px; height: 17px; }
.dishlist a { color: inherit; text-decoration-color: var(--muted); }
.takebar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.takelist { overflow: auto; flex: 1; min-height: 120px; margin-top: 8px; }
.takelist li.off .n { color: var(--muted); }
.takelist li.off .dot { opacity: .45; }
.takelist li.hint { padding: 10px 12px; }
.takelist label { grid-template-columns: 24px 32px minmax(0, 1fr) auto; gap: 4px 8px; padding: 8px 10px; }
.takelist .dot { width: 32px; height: 32px; }
.takelist .dot svg { width: 20px; height: 20px; }
.takelist .n { overflow-wrap: anywhere; }
/* the amount goes under the name, so the name keeps the width */
.takelist .stepper { grid-column: 3; justify-self: start; }
/* the house sits at the end of the name's row ("mostly at home"); the amount below may take the full width */
.takelist .stepper { grid-row: 2; grid-column: 3 / span 2; }
.takelist .home { grid-column: 4; grid-row: 1; align-self: start; color: var(--muted); }
.takelist .home svg { width: 18px; height: 18px; }
.takelist .home[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--accent); }
/* what goes along on almost every trip, one tap each */
.staples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
.staples .setlabel { width: 100%; }
.staples .chipbtn { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 3px; }
.staples .dot { width: 22px; height: 22px; }
.staples .dot svg { width: 14px; height: 14px; }
#itemhabit { display: flex; flex-wrap: wrap; gap: 6px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; }
.stepper .btn { width: 30px; height: 30px; min-height: 30px; font-size: 17px; }
.stepper .q { min-width: 52px; text-align: center; font-size: 15px; }
.add { position: relative; }
.add .search { margin-bottom: 4px; }
.addlist { list-style: none; margin: 0 0 10px; padding: 4px 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.addlist li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.addlist li:hover { background: var(--soft); }
.addlist .own span:last-child { color: var(--ink2); }
.section { scroll-margin-top: 76px; }
.section.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0%, 30% { background: var(--soft); box-shadow: 0 0 0 6px var(--soft); border-radius: 6px; } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
.section .num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-right: 8px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 13px; letter-spacing: 0; vertical-align: 1px; }
.mapbox { margin: 4px 0 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.mapbox summary { display: flex; gap: 8px; align-items: baseline; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--ink2); list-style: none; }
.mapbox summary::-webkit-details-marker { display: none; }
.mapbox summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.mapbox[open] summary::before { transform: rotate(90deg); }
.mapbox summary span { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--muted); }
.mapscroll { overflow-x: auto; border-top: 1px solid var(--line); }
.map { display: block; width: 100%; min-width: 660px; height: auto; font: 15px system-ui, -apple-system, "Segoe UI", sans-serif; }
.map .floor { fill: var(--page); stroke: var(--line); stroke-width: 2; }
.map .shelf rect { fill: var(--line); }
.map text { fill: var(--muted); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.map .shelf.on rect { fill: var(--soft); stroke: var(--accent); stroke-width: 2.5; }
.map .shelf.on text { fill: var(--ink); font-weight: 700; }
.map [data-stop] { cursor: pointer; }
.map .num circle { fill: var(--accent); }
.map .num text { fill: var(--accent-ink); font-size: 13px; font-weight: 700; }
.map .way { fill: none; stroke: var(--accent); stroke-width: 4; stroke-dasharray: 10 8; stroke-linejoin: round; }
.map marker path { fill: var(--accent); }
.map .door { fill: var(--good); }
.map .till { fill: var(--accent); }
.map .tag { fill: var(--ink2); font-weight: 600; font-size: 13px; }
/* shop, sorting and copy in one row, the shop giving way */
.shopbar { flex-wrap: nowrap; gap: 8px; }
.shopbar .select { flex: 1 1 auto; min-width: 0; }
.shopbar .seg { flex: none; }
.shopbar .seg button { padding: 8px 12px; white-space: nowrap; }
.shopbar .btn.icon { flex: none; width: 40px; height: 40px; min-height: 40px; }
.shopbar .btn.icon svg { width: 20px; height: 20px; }
.select { font: inherit; min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.items { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.items li { border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items label { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; cursor: pointer; }
.items input { width: 20px; height: 20px; accent-color: var(--accent); }
/* on the shopping list the tick box sits right, or left by choice in the settings */
#shop .items label { grid-template-columns: 40px minmax(0, 1fr) auto 28px; }
#shop .items input { order: 1; justify-self: end; }
body.checkleft #shop .items label { grid-template-columns: 28px 40px minmax(0, 1fr) auto; }
body.checkleft #shop .items input { order: 0; justify-self: start; }
.items .q { color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* packs first ("2 Becher"), what they hold small beneath */
.items .q small { display: block; font-size: 11px; color: var(--muted); text-align: right; }
.stepper .q small { text-align: center; }
.items .on .n { text-decoration: line-through; color: var(--muted); }
.items .for { font-size: 12px; color: var(--muted); }

.hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hist li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.hist li:hover { border-color: var(--accent); }
.hist .h { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.hist .h span { font-weight: 400; font-size: 12px; color: var(--muted); }
.hist .l { font-size: 13px; color: var(--ink2); margin-top: 4px; }

.search { width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); margin-bottom: 10px; }
.dishlist { list-style: none; padding: 0; margin: 0; }
.dishlist li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.dishlist .c { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dishlist.pick li { cursor: pointer; }
.dishlist.pick li:hover { border-color: var(--accent); }

dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--page); color: var(--ink); width: min(560px, 94vw); max-height: 86vh; padding: 0; }
/* behind a pop-up the page blurs and darkens, so the eye stays on the pop-up */
dialog::backdrop { background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
dialog { box-shadow: 0 12px 40px rgba(0,0,0,.45); }
/* a tap on a row shows softly, not in Android's strong blue */
.items label, .addlist li, .ndhits button, .iconbtn, .iconpick button { -webkit-tap-highlight-color: rgba(127,127,127,.18); }
.gearbtn { width: 38px; height: 38px; min-height: 38px; }
.gearbtn svg { width: 20px; height: 20px; }
dialog.settings { width: min(360px, 94vw); margin: 64px 12px auto auto; }
.iconbtn { display: inline-flex; align-items: center; gap: 10px; font: inherit; color: var(--ink2); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 6px 6px; cursor: pointer; }
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; max-height: 34vh; overflow: auto; width: 100%; padding: 4px; }
.iconpick button { border: 2px solid transparent; background: none; border-radius: 50%; padding: 2px; cursor: pointer; display: grid; place-items: center; }
.iconpick button span:not(.dot) { font-size: 10px; color: var(--muted); }
.iconpick button[data-icon=""] { border-radius: 12px; }
.iconpick button.sel { border-color: var(--accent); }
.iconpick .dot { width: 36px; height: 36px; }
.iconpick .dot svg { width: 22px; height: 22px; }
.itemamt { display: flex; align-items: center; gap: 6px; }
.itemamt input { width: 84px; text-align: center; }
.itemamt input, .itemamt select, #itemshelf { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; min-height: 40px; }
#itemshelf { width: 100%; }
.items .n, .items .q { cursor: pointer; }
.items .n { text-decoration: underline dotted var(--line); text-underline-offset: 4px; }
.setrow { display: grid; gap: 6px; margin-bottom: 16px; justify-items: start; }
.setrow .hint { margin: 0; }
.setlabel { font-size: 13px; font-weight: 700; color: var(--ink2); text-transform: uppercase; letter-spacing: .04em; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { font: inherit; border: 0; background: none; color: var(--ink); padding: 8px 16px; min-height: 40px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.editform { padding: 16px; display: flex; flex-direction: column; max-height: 86vh; }
.editform h2 { margin: 0 0 10px; font-size: 18px; }
.editform .dishlist { overflow: auto; flex: 1; min-height: 120px; }
.editsug { margin-bottom: 10px; }
.editsug .dishlist { flex: none; min-height: 0; overflow: visible; }
.sughead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.editbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 64px; height: 64px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--accent-ink); font-size: 38px; font-weight: 300; line-height: 1; box-shadow: 0 6px 16px rgba(0,0,0,.4); cursor: pointer; z-index: 15; }
.fab:active { transform: scale(.96); }
body.fableft .fab { right: auto; left: 16px; }
.snack { touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: opacity .15s; }
/* the bar and the hints stand clear of the big + */
body.withfab .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
body.withfab #app { padding-bottom: 96px; }
dialog.sheet { margin: auto auto 0; width: min(560px, 100vw); max-width: 100vw; border-radius: 16px 16px 0 0; }
.mic { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: var(--accent); cursor: pointer; display: grid; place-items: center; }
.mic svg { width: 22px; height: 22px; }
.mic.on { background: var(--bad); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--bad) 25%, transparent); } }
.add .clearable { display: flex; margin-bottom: 4px; }
.add .clearable .search { margin-bottom: 0; }
#addsheet .clearable { display: flex; }
#addsheet .addlist { margin-top: 6px; max-height: 40vh; overflow: auto; }
.snack { display: flex; align-items: center; gap: 14px; padding: 6px 6px 6px 16px; min-width: min(340px, 90vw); justify-content: space-between; }
.snackbtn { font: inherit; font-weight: 700; color: var(--snack-accent); background: none; border: 0; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 20; max-width: 90vw; }

@media (max-width: 520px) {
  .day { grid-template-columns: 52px 1fr; }
  .dbtns { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---- the ideas page */
.ihead { font-size: 16px; margin: 22px 0 4px; }
.ideabox .ihead { margin-top: 4px; }
.ideabox { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.askrow { display: grid; gap: 8px; justify-items: start; }
.askrow .clearable { width: 100%; }
#runnote { margin: 8px 0 4px; }
.ideas { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.idea { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--page); }
.idea .ititle { display: flex; flex-direction: column; gap: 2px; }
.idea .c, .ideas-list .c { font-size: 12px; color: var(--muted); }
.idea .why { margin: 6px 0; font-size: 14px; color: var(--ink2); }
.idea details { font-size: 14px; margin: 4px 0 8px; }
.idea summary { cursor: pointer; color: var(--accent); }
.idea details ul { margin: 6px 0 0; padding-left: 18px; }
.ibtns { display: flex; gap: 8px; }
.ideas-list li .btn { flex: none; }
.lack { margin: 8px 0 4px; font-weight: 600; font-size: 14px; }
.hint.good { color: var(--good); }
/* wishes: on top of the ideas page, each with a heart */
.wishes { margin-bottom: 14px; }
.wishes .ihead { margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.wishes .ihead svg, .mywish svg, .cookwish .btn svg, .tag.t-wish svg { width: 1em; height: 1em; flex: none; color: var(--bad); }
.wishask { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.wishask .hint { margin: 4px 0; }
.cookwish { margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cookwish .btn { display: inline-flex; align-items: center; gap: 6px; }
.mywish { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.tag.t-wish { display: inline-flex; align-items: center; gap: 3px; vertical-align: 1px; background: var(--soft); color: var(--ink); border-color: transparent; }
.pdnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
#pdlist li.past { opacity: .55; }
@media (max-width: 400px) {
  .tab { font-size: 14px; padding: 8px 2px; }
}
.btn.slim { min-height: 34px; padding: 5px 12px; font-size: 14px; }
/* a long note wraps instead of pushing the button off the screen */
.ideas-list li > span { min-width: 0; }
.ideas-list .c { white-space: normal; }
.later { margin-top: 10px; }
.later summary { cursor: pointer; color: var(--ink2); font-weight: 600; padding: 4px 0; }
.ibtns { flex-wrap: wrap; }
/* thumbs in the dish list */
.dthumbs { display: inline-flex; gap: 4px; }
.dthumbs .thumb { min-height: 30px; padding: 2px 7px; font-size: 12px; }
/* what is new */
.news { list-style: none; padding: 0; margin: 0 0 6px; overflow: auto; min-height: 0; }
.news > li { margin-bottom: 10px; }
.news ul { margin: 4px 0 0; padding-left: 18px; }
.news:focus { outline: none; }
#pdlist li.fixed { opacity: .5; cursor: default; border-style: dashed; }
#pdlist li.fixed:hover { border-color: var(--line); }
#pdlist li > span:first-child { white-space: nowrap; }
#pdlist li .c { white-space: normal; text-align: right; }
.tag.t-warn { background: none; color: var(--warn); border-color: var(--warn); }
#pdlist .warn { color: var(--warn); }
/* ---- cooking */
dialog.cook { width: min(640px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 auto; border-radius: 0; border: 0; }
dialog.cook .editform { height: 100%; max-height: none; }
.cookhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cookhead h2 { font-size: 22px; margin: 4px 0 0; }
.cookbody { overflow: auto; flex: 1; min-height: 0; }
#cookmeta { margin: 4px 0 2px; }
#cookwake { margin: 0 0 10px; }
#cookwake.warn { color: var(--warn); }
.cooking { list-style: none; padding: 0; margin: 0; }
.cooking li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 17px; }
.cooking .c { color: var(--ink2); white-space: nowrap; }
.cooking li[data-got] { cursor: pointer; }
.cooking li.done, .cooking li.done .c { color: var(--muted); text-decoration: line-through; }
.cooksteps { padding-left: 38px; margin: 4px 0; }
.cooksteps li { font-size: 18px; line-height: 1.5; padding: 8px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cooksteps li::marker { font-weight: 700; color: var(--accent); }
.cooksteps li.done { color: var(--muted); text-decoration: line-through; }
/* what a step names: how long and how hot stand out most, amounts and ingredients less */
.cooksteps .m-time, .cooksteps .m-heat { font-weight: 700; color: var(--accent); background: var(--soft); border-radius: 6px; padding: 0 4px; white-space: nowrap; }
.cooksteps .m-heat { color: var(--bad); background: none; border: 1px solid currentColor; }
.cooksteps .m-qty { font-weight: 700; white-space: nowrap; }
.cooksteps .m-ing { text-decoration: underline 2px var(--good); text-underline-offset: 4px; }
.cooksteps li.done span { color: inherit; background: none; border-color: transparent; text-decoration: inherit; }
#cookedit, .ndsteps textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; }
.ndsteps { display: grid; gap: 4px; margin-top: 12px; }
/* a dish's name that opens it */
.linkname { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.dlabel.cookable { cursor: pointer; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.isteps { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
/* how long a thing must keep */
.until { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 600; padding: 0 6px; border-radius: 6px; color: var(--warn); border: 1px solid var(--warn); vertical-align: 1px; }
.until.past { color: var(--bad); border-color: var(--bad); }
.untilpick { display: flex; flex-wrap: wrap; gap: 6px; }
.untilpick button { font: inherit; font-size: 14px; min-width: 44px; min-height: 36px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.untilpick button.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.untilpick button { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.untilpick button small { font-size: 11px; opacity: .8; }
/* only the box ticks a line on the list: a box big enough for a thumb */
#shop .items label { cursor: default; grid-template-columns: 40px minmax(0, 1fr) auto 34px; }
body.checkleft #shop .items label { grid-template-columns: 34px 40px minmax(0, 1fr) auto; }
#shop .items input[type=checkbox] { width: 26px; height: 26px; cursor: pointer; }
#shop .items .dot, #shop .items .n, #shop .items .q { cursor: pointer; }
#itemnote { width: 100%; }
.items .note { color: var(--ink2); font-style: italic; }
/* ---- what the week asks of the shuffle: things that must go, time per day */
.useup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.useup .chip { padding-right: 2px; }
.uudel { font: inherit; font-size: 16px; line-height: 1; border: 0; background: none; color: var(--muted); cursor: pointer; min-width: 26px; min-height: 26px; border-radius: 999px; }
.uudel:hover { color: var(--ink); background: var(--soft); }
.uuadd { margin-bottom: 10px; }
.uuadd .addlist .c { margin-left: auto; font-size: 12px; color: var(--muted); }
.tag.t-weg { background: none; color: var(--good); border-color: var(--good); }
.day.away .dlabel { color: var(--ink2); font-weight: 400; font-style: italic; }
.edittime { display: grid; gap: 6px; margin-bottom: 12px; }
#edittime { display: flex; flex-wrap: wrap; gap: 6px; }
#suglist li.say .c { white-space: normal; }
/* ---- what was said to Claude on a dish, and its timers */
.cooktalk { margin: 10px 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--soft); font-size: 16px; line-height: 1.45; }
.cooktalk p { margin: 4px 0; }
.cookask { margin-top: 10px; }
.cookask .hint { margin: 0; }
.cooksteps [data-timer] { cursor: pointer; }
.cooksteps [data-timer] svg { width: 14px; height: 14px; margin-left: 3px; vertical-align: -1px; }
.timers:empty { display: none; }
.timers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px 0 4px; }
.timer { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border-radius: 10px; background: var(--soft); }
.timer .tlabel { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.timer .tlabel span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer .tlabel svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.timer b { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--accent); }
.timer.due { background: var(--bad); }
.timer.due, .timer.due .tlabel, .timer.due b, .timer.due .tlabel svg { color: #fff; }
.timerbar { position: fixed; left: 8px; right: 8px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 30; max-width: 624px; margin: 0 auto; padding: 0; }
.timerbar .timer { box-shadow: 0 4px 16px rgb(0 0 0 / 0.25); }
body.withtimer .toast { bottom: calc(156px + env(safe-area-inset-bottom)); }
.cookih { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cookih .cooklinks { display: flex; gap: 14px; }
.cookih .link { font-size: 14px; font-weight: 400; white-space: nowrap; }
.cookih .link[hidden] { display: none; }
.cookingform { display: grid; gap: 8px; justify-items: start; }
#cookingrows { display: grid; gap: 6px; width: 100%; }
.ingrow { display: grid; grid-template-columns: minmax(0, 1fr) 56px 64px 32px; gap: 6px; align-items: center; }
.ingrow input { min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }

/* the audit log: administrators only */
dialog.audit { width: min(640px, 96vw); }
.auditbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
#auditkind { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; min-height: 40px; }
.auditbody { overflow: auto; min-height: 0; max-height: 60vh; }
.auditbody h3 { font-size: 13px; color: var(--ink2); margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .04em; }
.auditbody ul { list-style: none; margin: 0; padding: 0; }
.auditbody li { display: grid; grid-template-columns: 44px 1fr; gap: 2px 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.auditbody li .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.auditbody li .by { font-weight: 600; }
.auditbody li .k { color: var(--muted); font-size: 12px; }
.auditbody table { border-collapse: collapse; width: 100%; font-size: 14px; }
.auditbody th, .auditbody td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.auditbody th { color: var(--ink2); font-weight: 600; }
.auditbody td.n { text-align: right; font-variant-numeric: tabular-nums; }
.auditbody .staystats li { display: flex; flex-direction: column; gap: 2px; }
