:root {
  --bg: #faf6ee; --card: #fff; --ink: #231f1b; --muted: #6d675f; --line: #e8e2d8;
  --brand: #2f6f4f; --brand-ink: #fff; --brand-soft: #e5f0e9; --warn: #b4540a; --warn-soft: #fdf0e1;
  --accent: #c0592f; --accent-ink: #9a4426; --butter: #f8e6a8; --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif; --err: #b3261e; --err-soft: #fbe9e7; --radius: 14px; --tap: 48px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding-bottom: 88px; }
h1 { font-size: 1.7rem; margin: .2em 0 .4em; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 1.4em 0 .5em; }
h3 { font-size: 1rem; margin: 0; }
a { color: var(--brand); }
#top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: 900px; margin: 0 auto; }
#top .brand { font-weight: 700; font-size: 1.2rem; color: var(--brand); text-decoration: none; margin-right: auto; }
#top a.link { text-decoration: none; padding: 8px 4px; }
main { max-width: 900px; margin: 0 auto; padding: 4px 16px 24px; }
#tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
#tabs a { flex: 1; text-align: center; padding: 14px 4px; min-height: var(--tap); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
#tabs a.on { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
@media (min-width: 760px) {
  body { padding-bottom: 0; }
  #tabs { position: static; max-width: 900px; margin: 0 auto; border: 0; background: none; padding: 0 16px; gap: 8px; }
  #tabs a { flex: 0 0 auto; padding: 10px 18px; border-radius: 999px; }
  #tabs a.on { background: var(--brand-soft); box-shadow: none; }
  #tabs { order: 0; }
  header#top { order: -1; }
}
body.nonav #tabs { display: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); font-size: .92rem; }
button, .btn, select, input, textarea { font: inherit; }
button, .btn { min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; gap: 6px; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
button.danger { color: var(--err); }
button.small { min-height: 40px; padding: 0 12px; font-size: .92rem; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #86b79c; outline-offset: 1px; }
input, select, textarea { width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid #cfc7b8; border-radius: 12px; background: #fff; color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-weight: 600; font-size: .92rem; margin: 12px 0 4px; }
.err { background: var(--err-soft); color: var(--err); padding: 10px 14px; border-radius: 12px; margin: 10px 0; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .btn, .empty button { margin-top: 12px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.banner { background: var(--brand-soft); border-radius: 12px; padding: 10px 14px; margin: 8px 0 12px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.weeknav { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; }
.weeknav .title { flex: 1; text-align: center; font-weight: 700; }
.weeknav .title small { display: block; font-weight: 400; color: var(--muted); }
.day.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.day h3::first-letter { text-transform: uppercase; }
.meal { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.meal:first-of-type { border-top: 0; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { min-width: 44px; padding: 0; }
.stepper span { min-width: 64px; text-align: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rcard { padding: 0; overflow: hidden; margin: 0; text-decoration: none; color: inherit; display: block; }
.rcard .img { height: 160px; background: var(--brand-soft) center/cover; position: relative; }
.rcard .body { padding: 10px 14px 14px; }
.herobox { margin: 4px 0 10px; }
.hero { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 220px; object-fit: cover; border-radius: var(--radius); background: var(--line); }
.srcline { font-size: .85rem; margin-top: 6px; }
.srcline a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; }
.credit { font-size: .72rem; color: var(--muted); }
.credit a { color: var(--muted); }
.imgtoggle { margin-top: 4px; }
.ing { list-style: none; padding: 0; margin: 0; }
.ing li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ing .amt { min-width: 90px; font-weight: 600; text-align: right; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps li { counter-increment: s; display: flex; gap: 14px; padding: 12px 0; font-size: 1.08rem; }
.steps li::before { content: counter(s); flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.cat { margin-top: 18px; }
.cat h2 { margin: 0 0 6px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.line { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 8px 10px 8px 14px; }
.line .main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Kompakt: én ramme per kategori, varene som rader med tynn strek imellom (48 px per rad, samme skriftstørrelse). */
.catlines { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.catlines .line { background: none; border: 0; border-radius: 0; margin: 0; padding: 2px 6px 2px 4px; min-height: 48px; }
.catlines .line + .line { border-top: 1px solid var(--line); }
.catlines .line .name, .catlines .line .tick, .catlines .line .havebtn { min-height: 44px; }
.line .main { flex-wrap: nowrap; }
.line .tick { flex: 0 0 auto; width: 44px; min-height: 44px; padding: 0; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; }
.line .tick::before { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.line .tick { position: relative; }
.line .tick .uiicon { position: relative; color: #fff; }
.line .tick.on::before { background: var(--brand); border-color: var(--brand); }
.line .havebtn { flex: 0 0 auto; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--muted); font-size: .85rem; border-radius: 10px; }
.line .havebtn.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.line .name { flex: 1 1 0; min-width: 0; text-align: left; background: none; border: 0; min-height: 44px; justify-content: flex-start; padding: 0; font-weight: 600; }
.line .name .amt { font-weight: 400; color: var(--muted); margin-left: 8px; }
.line.done .name { text-decoration: line-through; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; min-height: 44px; padding: 0 12px; background: #fff; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: #fff; font-weight: 600; }
.alert { margin: 2px 0 6px; font-size: .9rem; color: var(--warn); background: var(--warn-soft); padding: 6px 10px; border-radius: 8px; }
.detail { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; font-size: .95rem; }
.detail li { margin: 4px 0; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .form-grid.add { grid-template-columns: 2fr 1fr 1fr 1.5fr auto; align-items: end; } }
.ing-row { display: grid; grid-template-columns: 1fr 90px 100px; gap: 6px; margin-bottom: 4px; }
.ing-row .cat-sel, .ing-row .rm { grid-column: span 3; display: flex; gap: 6px; }
.ing-row .cat-sel select { flex: 1; }
@media (min-width: 640px) { .ing-row { grid-template-columns: 2fr 90px 100px 1.5fr 48px; } .ing-row .cat-sel, .ing-row .rm { grid-column: auto; } }
#status { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 20; padding: 8px 16px; border-radius: 999px; font-size: .92rem; background: #231f1b; color: #fff; display: none; max-width: 92vw; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
#status.show { display: block; }
#status.error { background: var(--err); }
dialog { border: 0; border-radius: 18px; padding: 18px; width: min(520px, 94vw); max-height: 90vh; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.auth { max-width: 420px; margin: 28px auto; }
.ing-row .hint { grid-column: 1 / -1; font-size: .85rem; color: var(--warn); background: var(--warn-soft); padding: 4px 10px; border-radius: 8px; margin-bottom: 6px; }
.pick{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.pickbtn{padding:0;text-align:left;cursor:pointer;overflow:hidden}
.pickbtn img{width:100%;height:110px;object-fit:cover;display:block}
.pickbtn span{display:block;padding:6px 8px;font-size:12px}
[hidden] { display: none !important; }
:root { --tabh: 52px; }
.counter { font-weight: 700; color: var(--brand); }
/* Kjøkkenmodus: stor tekst, ingen animasjoner/transisjoner som flytter innhold */
.kitchen { font-size: 20px; line-height: 1.5; }
.kitchen.has-dock { padding-bottom: 96px; }
.kitchen h1 { font-size: 1.5rem; }
.kitchen .muted { font-size: .85rem; }
.cookbar { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 8px 0 6px; margin: 6px 0; border-bottom: 1px solid var(--line); }
.cookbar .counter { font-size: 1.1rem; }
.cookview .hero { aspect-ratio: 3 / 1; max-height: 130px; }
.cookview .herobox { margin: 2px 0 6px; }
.cookview .metarow { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.cookview .metarow .timeline { margin: 0; }
.cookview .aftercook { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.cookbar .track { height: 6px; border-radius: 3px; background: var(--line); margin-top: 6px; overflow: hidden; }
.cookbar .fill { display: block; height: 100%; background: var(--brand); }
.cook { list-style: none; margin: 8px 0 0; padding: 0; }
.cook .step { margin: 0 0 8px; }
.steprow { width: 100%; min-height: 56px; display: flex; align-items: flex-start; justify-content: flex-start; gap: 14px; text-align: left; padding: 10px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); font-size: 1em; line-height: 1.45; }
.steprow.ro { cursor: default; }
.steprow .box { flex: 0 0 44px; height: 44px; width: 44px; border-radius: 12px; border: 2px solid #b9b19f; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); background: #fff; }
.steprow .txt { padding-top: 6px; flex: 1; min-width: 0; }
.steprow .amts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.amt-chip { font-size: .72em; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 1px 10px; font-weight: 600; }
.steprow .undo { align-self: center; font-size: .75em; font-weight: 600; color: var(--brand); border: 1px solid var(--brand); border-radius: 999px; padding: 4px 12px; }
.step.next .steprow { border: 3px solid var(--brand); background: #eef7f1; font-weight: 600; padding: 8px 12px; }
.step.next .box { border-color: var(--brand); color: var(--brand); }
.step.done .steprow { background: transparent; color: var(--muted); font-weight: 400; }
.step.done .t { text-decoration: line-through; }
.step.done .amts { display: none; }
.step.done .box { background: var(--brand); border-color: var(--brand); color: #fff; }
.dock { position: fixed; left: 0; right: 0; bottom: calc(var(--tabh) + env(safe-area-inset-bottom)); z-index: 7; display: flex; gap: 8px; padding: 8px 12px; background: var(--card); border-top: 1px solid var(--line); max-width: 900px; margin: 0 auto; }
.dock button { min-height: 56px; font-size: .85em; padding: 0 12px; }
.dock .grow { flex: 1 1 auto; }
@media (min-width: 760px) { .dock { bottom: 0; } body { padding-bottom: 0; } }
.ingbox { margin: 8px 0; }
.ingbox summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.meal.cooked > a { color: var(--muted); }
.meal.cooked .tick { color: var(--brand); font-weight: 700; }
.meal .badge { margin-left: 8px; font-weight: 600; }
.meal.cooked { opacity: .75; }
.small { font-size: .85rem; }
.dlgrow { margin-top: 14px; justify-content: flex-end; }
.dlgbtn { min-height: 48px; min-width: 96px; font-size: 1rem; }
button.danger-fill { background: var(--err); border-color: var(--err); color: #fff; font-weight: 600; }
.ing-row .cat-hint { display: none; color: var(--warn); font-weight: 600; }
.ing-row.needs-cat .cat-hint { display: block; }
.ing-row.needs-cat .c { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.photoitem { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.photoitem img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: 0 0 64px; }
.photoitem button { min-width: 44px; min-height: 44px; }
.formimg { display: block; width: 100%; max-width: 360px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin: 8px 0; background: var(--line); }
.pickrecipe { text-align: left; width: 100%; cursor: pointer; font: inherit; min-height: 56px; display: block; }
.pickrecipe .usage { color: var(--brand); font-weight: 600; font-size: .85rem; }
.chips .chip { min-height: 44px; }
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 560px; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.sheetbtn { min-height: 52px; width: 100%; font-size: 1rem; }
.col { display: flex; flex-direction: column; gap: 8px; }
.timegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.timegrid input { text-align: center; }
.timeline { font-weight: 600; margin: 4px 0; }
.timebadge { color: var(--brand); }
.chip.quick { min-height: 44px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.tagpick { display: flex; flex-wrap: wrap; gap: 8px; }
.tagchip { min-height: 44px; padding: 0 14px; border-radius: 999px; }
.tagchip.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.tagchip.sugg { border-style: dashed; border-color: var(--brand); color: var(--brand); }
.tagchip.on.ai { background: var(--brand-soft); color: var(--brand); border: 2px dashed var(--brand); }
.taghelp { margin: 8px 0; }
.taghelp summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--brand); }
.taghelp p { margin: 6px 0; font-size: .92rem; }

/* Tagger: grupper med ulik farge, filterknapp og bunnark */
.tag.g-what { background: #e5f0e9; color: #1f5a3c; }
.tag.g-time { background: #fdf0e1; color: #8a3f06; }
.tag.g-occ { background: #efe7f7; color: #5b3a85; }
.tag.g-diet { background: #e3eef9; color: #1d4f80; }
.tag.g-kind { background: #fbe6ee; color: #8a2b52; }
.tag.g-other { background: #eee9e1; color: #5a554d; }
.tag.more { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.searchrow { display: flex; gap: 8px; align-items: center; }
.searchrow input { flex: 1 1 auto; min-width: 0; margin: 0; }
.filterbtn { flex: 0 0 auto; white-space: nowrap; }
.filterbtn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.activetags { margin: 8px 0 0; gap: 6px; }
.activetags[hidden] { display: none; }
.tag.xchip { min-height: 36px; padding: 0 12px; font-size: .85rem; border: 0; cursor: pointer; border-radius: 999px; }
.tag.xchip.reset { background: transparent; color: var(--err); border: 1px solid var(--line); }
dialog.filtersheet { max-height: 88vh; overflow-y: auto; }
.fgroup h4 { margin: 14px 0 6px; font-size: .95rem; }
.fchip { min-height: 44px; }
.fchip.on.g-what { background: #2f6f4f; border-color: #2f6f4f; }
.fchip.on.g-time { background: #b4540a; border-color: #b4540a; }
.fchip.on.g-occ { background: #6f46a6; border-color: #6f46a6; }
.fchip.on.g-diet { background: #2a6aa8; border-color: #2a6aa8; }
.fchip.on.g-kind { background: #a8426d; border-color: #a8426d; }
.fchip.on { color: #fff; }
.filtersheet .dlgrow > * { flex: 1; }

/* Legg til vare + mengdesteg */
.addgrid { display: grid; gap: 10px; }
.fld { position: relative; min-width: 0; }
.fld input, .fld select { width: 100%; }
.autotag { position: absolute; top: -8px; right: 8px; font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--brand-soft); color: var(--brand); padding: 1px 6px; border-radius: 999px; pointer-events: none; }
.autotag[hidden] { display: none; }
.amountrow { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px minmax(0, 1fr); gap: 6px; align-items: center; }
.stepbtn { min-width: 48px; min-height: 48px; padding: 0; font-size: 1.4rem; line-height: 1; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.stepline { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.stepline .stepbtn { min-width: 44px; min-height: 44px; font-size: 1.3rem; }
.stepamt { min-width: 84px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 560px) { .addgrid { grid-template-columns: 2fr 2.4fr 1.5fr; align-items: end; } }

/* Velger: kort med forhåndsvisning + egen «Velg»-knapp */
.pickrecipe { display: flex; flex-direction: column; text-align: left; }
.pickhit { display: block; color: inherit; text-decoration: none; flex: 1 1 auto; }
.pickbtn { margin: 0 14px 14px; min-height: 48px; }
.servrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; }

/* Start og forslag */
.startrow { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; font: inherit; cursor: pointer; padding: 12px 14px; min-height: 56px; margin-bottom: 8px; }
.startrow.on { border-color: var(--brand); background: var(--brand-soft); }
.startrow .check { flex: 0 0 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.startrow.on .check { background: var(--brand); border-color: var(--brand); }
.startmeta { display: block; }
.suggestcta { display: flex; align-items: center; gap: 12px; }
.suggrow .suggbody { display: flex; gap: 12px; align-items: flex-start; }
.suggimg { flex: 0 0 72px; height: 72px; border-radius: 10px; background: var(--brand-soft) center/cover; }
.reasons { font-size: .82rem; margin-top: 4px; }
.fh { margin: 14px 0 4px; }
.suggrow .small { min-height: 44px; min-width: 56px; }

/* Rating */
.stars { display: flex; gap: 2px; margin: 4px 0; }
.star { min-width: 48px; min-height: 48px; padding: 0; font-size: 1.8rem; line-height: 1; background: none; border: 0; color: #c9c2b6; touch-action: manipulation; }
.star.on { color: #e0a100; }
.ratingrow { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; margin: 4px 0 8px; }
.ratingrow .stars { margin: 0; gap: 0; }
.ratingrow .star { min-width: 44px; min-height: 44px; font-size: 1.35rem; }
.ratingrow .ratinglabel { font-size: .9rem; }
.ratingrow .ratingline { flex: 1 0 100%; font-size: .85rem; margin-top: -6px; }
.ratingbadge { color: #8a5a00; font-weight: 600; }

/* Deling */
.topbar { align-items: center; margin-bottom: 4px; }
.iconbtn { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; color: var(--brand); background: var(--card); }
.shareicon { display: inline-flex; }
.sharedline { margin: 2px 0 6px; }
.linkbtn { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--brand); text-decoration: underline; font: inherit; cursor: pointer; }

/* Stort kortbilde med tid og rating oppå */
.imgpill { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.94); color: var(--ink); border-radius: 999px; font-size: .8rem; font-weight: 600; padding: 3px 10px; }
.imgpill.rate { left: auto; right: 10px; color: #8a5a00; }
.suggimg { flex-basis: 80px; width: 80px; height: 80px; }
.startimg { flex: 0 0 72px; height: 72px; border-radius: 12px; background: var(--brand-soft) center/cover; }

/* Reservebilde (fargeflate + motiv) */
.img.ph, .suggimg.ph { display: flex; align-items: center; justify-content: center; }
.img.ph .phglyph { font-size: 56px; line-height: 1; }
.suggimg.ph .phglyph { font-size: 34px; line-height: 1; }

/* Profil: varm serif til overskrifter, aksentfarge, myk skygge på kort */
h1, h2, h3, #top .brand { font-family: var(--serif); font-weight: 600; }
h1 { letter-spacing: -.01em; }
#top .brand { font-size: 1.4rem; letter-spacing: -.02em; }
.card { box-shadow: 0 1px 3px rgba(35, 31, 27, .08); }
.ratingbadge, .imgpill.rate { color: var(--accent-ink); }
.suggestcta { background: var(--butter); border-color: #ecd486; }
.suggestcta .muted { color: #5b4a12; }
.reasons { color: var(--accent-ink); }

/* Bunnmeny med ikon over tekst */
#tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px 8px; min-height: 56px; font-size: .78rem; }
#tabs .tabicon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 760px) { #tabs a { flex-direction: row; gap: 8px; min-height: var(--tap); font-size: .95rem; padding: 10px 18px; } }

/* Søkefelt med ikon, filterknapp med ikon, rund «Bytt» */
.searchfield { position: relative; flex: 1 1 auto; min-width: 0; }
.searchfield .uiicon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchfield input { padding-left: 42px; margin: 0; }
.uiicon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.filterbtn { gap: 6px; }
button.iconbtn { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 999px; color: var(--brand); }

/* Bruk en tidligere uke */
dialog.sheet:has(.weekopt) { max-height: 88vh; overflow-y: auto; }
.weekopt { margin: 0 0 10px; }
.weekmeals { list-style: none; margin: 6px 0 10px; padding: 0; font-size: .92rem; }
.weekmeals li { padding: 2px 0; }

/* Merkevare: logo + ordmerke i topplinjen */
#top .brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
#top .brandlogo { width: 28px; height: 28px; border-radius: 7px; display: block; }
.authbrand { text-align: center; margin: 8px 0 18px; }
.authbrand img { width: 64px; height: 64px; border-radius: 16px; display: block; margin: 0 auto 8px; }
.authbrand .wordmark { font-family: var(--serif); font-weight: 600; font-size: 2rem; letter-spacing: -.02em; color: var(--brand); }
.authbrand .tagline { font-size: .9rem; color: var(--muted); }
.pickbanner { background: var(--brand-soft); color: var(--brand); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; }

/* Finn frem ingredienser */
.gatherbtn { width: 100%; min-height: 52px; margin: 6px 0 10px; font-weight: 600; }
dialog.gathersheet { max-height: 88vh; overflow-y: auto; }
.gatherrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; margin-bottom: 6px; text-align: left; font: inherit; cursor: pointer; }
.gatherrow .check { flex: 0 0 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.gatherrow.on { background: var(--brand-soft); color: var(--muted); }
.gatherrow.on .check { background: var(--brand); border-color: var(--brand); }
.gatherrow.on .gname { text-decoration: line-through; }
.gatherrow .gname { flex: 1 1 auto; }
.gatherrow .gamt { font-weight: 600; white-space: nowrap; }
.gatherfoot { position: sticky; bottom: 0; background: var(--card); padding-top: 8px; }

/* Ukesmeny: fremdrift, hero for i dag, kompakte middagskort, stiplede tomme dager */
.weekprog { margin: 0 0 12px; }
.weekprogtext { font-weight: 600; margin-bottom: 6px; }
.seg7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.seg7 span { height: 6px; border-radius: 3px; background: var(--line); }
.seg7 span.on { background: var(--brand); }
.allset { margin-top: 8px; color: var(--brand); font-weight: 600; }
.daygroup { margin-bottom: 10px; }
.dlabel { font-size: .78rem; color: var(--muted); text-transform: none; }
.dlabel::first-letter { text-transform: uppercase; }
.mcard { display: flex; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.mcard.cooked { opacity: .8; }
.mlink { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 8px 4px 8px 8px; text-decoration: none; color: inherit; min-height: 72px; }
.mthumb { flex: 0 0 64px; height: 64px; border-radius: 10px; background: var(--brand-soft) center/cover; display: inline-flex; align-items: center; justify-content: center; }
.mthumb .phglyph { font-size: 1.6rem; }
.mtext { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mtitle { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.mmeta { font-size: .85rem; }
.mstatus { color: var(--brand); font-weight: 600; }
.chev { color: var(--muted); font-size: 1.5rem; padding: 0 4px; }
.morebtn { flex: 0 0 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--muted); align-self: center; }
.emptyrow { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 0 14px; margin: 0 0 8px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: transparent; color: var(--muted); font: inherit; text-align: left; cursor: pointer; justify-content: flex-start; }
.emptyrow.ro { cursor: default; }
.emptyrow .dlabel { font-size: inherit; color: inherit; font-weight: 600; margin-right: 4px; }
.heroday { background: var(--card); border: 1.5px solid var(--brand); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.heroday .herolink { display: block; text-decoration: none; }
.heroday .img { height: auto; aspect-ratio: 2 / 1; max-height: 260px; background-color: var(--brand-soft); background-size: cover; background-position: center 40%; background-repeat: no-repeat; position: relative; }   /* uten cover ble bildet vist i full størrelse: kun et lite utsnitt */
.herobody { padding: 12px 14px 14px; }
.herobody h3 { margin: 2px 0 2px; }
.herobody .morebtn { align-self: flex-start; }
.herocta { width: 100%; min-height: 52px; margin-top: 10px; }
.herodone { margin-top: 10px; color: var(--brand); font-weight: 700; }

/* Flere retter samme dag: én ramme */
.daybox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.daybox.today { border: 1.5px solid var(--brand); }
.dayboxhead { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 4px; }
.dayboxhead .dlabel { font-size: .85rem; font-weight: 600; }
.countpill, .coursepill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); align-self: flex-start; }
.coursepill { margin-bottom: 2px; }
.mrow { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.dayboxhead + .mrow { border-top: 0; }
.mrow.cooked { opacity: .8; }
.mthumb.small { flex: 0 0 44px; height: 44px; border-radius: 8px; }
.mthumb.small .phglyph { font-size: 1.2rem; }
.heroday.inbox { border: 0; border-radius: 0; margin: 0; border-top: 1px solid var(--line); }
.dayboxhead + .heroday.inbox { border-top: 0; }

/* Flytt dagen: overskrift, bunnark og dra-og-slipp */
.dayhead { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 0 0 2px; }
.dayhead .dlabel, .dayboxhead .dlabel { font-weight: 600; font-size: .85rem; flex: 1; }
.dayhead .countpill { flex: 0 0 auto; }
.dayboxhead { min-height: 44px; gap: 8px; padding: 0 0 0 14px; }
.dayboxhead .dlabel { flex: 1; }
.daymore { flex: 0 0 44px; align-self: center; }
.draggable, .draggable a, .draggable img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.daygroup, .daybox { position: relative; }
.lifted { z-index: 20; transform-origin: center; box-shadow: 0 10px 28px rgba(35, 31, 27, .25); outline: 2px solid var(--brand); border-radius: var(--radius); pointer-events: none; transition: none; }
.droptarget { outline: 2px dashed var(--brand); outline-offset: 2px; background: var(--brand-soft); border-radius: var(--radius); }
body.daydragging { -webkit-user-select: none; user-select: none; }
.dayopt { display: flex; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; }
.dayopt.here { border-color: var(--brand); background: var(--brand-soft); }
.dayopt:disabled { opacity: .55; }
.daynote { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 6px; min-height: 2.8em; color: var(--muted); font-size: .9rem; }
.daynote b { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; color: var(--ink); }
.daynote b::first-letter { text-transform: uppercase; }
/* Ukevelger i «Legg til i ukeplan»: sju dager i én rad (aldri bredere enn arket), runde «tallerkener» med rettens farge */
dialog.sheet .weekband { margin: 6px 0 10px; padding: 8px 6px; }
.weekband button.wbarrow { border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 22px; color: inherit; }
.weekband button.wbarrow:disabled { opacity: .3; cursor: default; }
.dstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.dayp { min-width: 0; width: 100%; min-height: 76px; padding: 6px 0 4px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; cursor: pointer; }
.dayp small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dayp .pl { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 600; }
.dayp .pl .cnt { position: absolute; right: -5px; top: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--butter); color: var(--ink); font-size: 11px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--bg); }
.dayp .lab { font-size: 10px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 13px; padding: 0 1px; }
.dayp.today small { color: var(--brand); font-weight: 700; }
.dayp:disabled { opacity: .35; cursor: default; }
.dayp.sel { background: var(--brand); }
.dayp.sel small, .dayp.sel .lab { color: var(--brand-ink); }
.dayp.sel .pl { box-shadow: 0 0 0 3px var(--butter); border-color: transparent; }

/* Tilberedning (skilt fra navnet, så handlelisten bare viser varen) og ingredienser under stegene */
.ing-row .p { grid-column: 1 / -1; }
.prep { color: var(--muted); font-size: .9em; }
.chipprep { font-weight: 400; }
.steps .stext { flex: 1; min-width: 0; }
.steps .amts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.steps .amt-chip { font-size: .78rem; }

/* Tidsmerke og snarvei i ukenavigasjonen */
.weeknavwrap { margin: 0 0 8px; }
.weekband { display: flex; align-items: center; gap: 8px; border-radius: 16px; padding: 12px 10px; }
.weekband.past { background: #e1ddd5; color: #3f3b35; }
.weekband.now { background: var(--brand); color: var(--brand-ink); }
.weekband.fut { background: var(--brand-soft); color: #1f4d37; }
.wbmid { flex: 1; text-align: center; line-height: 1.15; }
.wbmid small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.wbmid b { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 2px 0; }
.wbmid em { font-style: normal; font-size: 13px; }
.wbarrow { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; text-decoration: none; color: inherit; background: rgba(0,0,0,.08); flex: none; }
.weekband.now .wbarrow { background: rgba(255,255,255,.2); }
.weekhome { display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 2px 0 0; color: var(--brand); font-weight: 600; font-size: 14px; text-decoration: none; }
body.pastweek { background: #f1eee8; }

/* Hyller på Oppskrifter-siden (prototype): korte rader med sveip, neste kort stikker ut */
.shelf { margin: 14px 0 4px; }
.shelfhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shelfhead h2 { margin: 0; font-size: 1.2rem; }
button.shelfall { min-height: 44px; border: 0; background: none; color: var(--brand); font-weight: 600; padding: 0 4px; }
.shelfrow { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 16px; margin: 0 -16px; padding: 4px 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shelfrow::-webkit-scrollbar { display: none; }
.shelfrow > .card { flex: 0 0 68%; max-width: 250px; margin: 0; scroll-snap-align: start; }
.shelfrow .rcard .img { height: 130px; }
.shelfrow .rcard .tags, .shelfrow .rcard .usage { display: none; }
.allhead { margin: 18px 0 0; font-size: 1.2rem; }
.shelves[hidden], .allhead[hidden] { display: none; }

/* Kjøkken (Middag fra ulike verdenshjørner) */
.shelfrow.cuisines > .cuisinecard { flex: 0 0 46%; max-width: 190px; scroll-snap-align: start; }
button.cuisinecard { display: flex; flex-direction: column; padding: 0; min-height: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); text-align: left; align-items: stretch; justify-content: flex-start; gap: 0; font: inherit; color: inherit; }
.cuisinetop { height: 84px; position: relative; display: flex; align-items: center; justify-content: center; }
.cuisinetop .uiicon { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cuisineflag { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; display: flex; }
.cuisineflag b { flex: 1; }
.cuisinebody { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.cuisinebody strong { font-family: var(--serif); font-size: 1.05rem; }
.cuisinelist { font-size: .8rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cuisinecount { margin-top: 4px; font-size: .75rem; font-weight: 600; color: var(--brand); }
.tag.g-cuisine { background: #e8eef7; color: #2F5DA8; }
.fchip.g-cuisine.on { background: #2F5DA8; color: #fff; border-color: #2F5DA8; }

/* Legg til vare: flytende knapp over bunnmenyen, åpner et bunnark med skjemaet */
.fab { position: fixed; right: 16px; bottom: calc(var(--tabh, 0px) + env(safe-area-inset-bottom) + 14px); z-index: 6; min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--brand); color: #fff; border: 0; font-weight: 600; font-size: 1rem; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.fab .uiicon { color: #fff; }
.fabspace { height: 76px; }
.addform { margin: 0 0 8px; }

.moreopts summary { min-height: 44px; display: flex; align-items: center; color: var(--muted); font-size: .9rem; cursor: pointer; }
.moreopts[open] summary { margin-bottom: 4px; }
.addedlist { list-style: none; margin: 6px 0 10px; padding: 0; color: var(--brand); font-weight: 600; }
.addedlist:empty { display: none; }
.addedlist li { padding: 3px 0; }

.namerow { display: flex; gap: 8px; align-items: stretch; }
.namerow .fld { flex: 1 1 auto; min-width: 0; }
.addform button.addok { flex: 0 0 auto; width: 52px; min-height: 48px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }
.addform button.addok .uiicon { color: #fff; }

.listfilter { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin: 4px -16px 10px; padding: 0 16px 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.listfilter::-webkit-scrollbar { display: none; }
.listfilter .chip { flex: 0 0 auto; white-space: nowrap; }

/* Kilde = bok: søkefelt med treffliste, valgt bok som rad */
.bookpick { display: grid; gap: 6px; }
.bookres { display: grid; gap: 4px; }
.bookopt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 44px; width: 100%; padding: 8px 12px; font-weight: 400; }
.bookopt.own { color: var(--accent-ink, inherit); font-weight: 600; }
.bookchosen { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line, #ddd); border-radius: 10px; }
.bookchosen .grow { min-width: 0; overflow-wrap: anywhere; }
.bookline { margin-top: 6px; }

/* Forbered først (kjøkkenvisning) */
.prepbox { background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; }
.prepbox ul { list-style: none; margin: 6px 0 0; padding: 0; }
.prepbox li { padding: 4px 0; border-top: 1px solid var(--line); }
.prepbox li:first-child { border-top: 0; }
.prepbox .prep { color: var(--muted); }

/* Mengde og tilberedning rett etter råvaren i stegteksten */
.inl { display: inline-block; margin: 0 2px 0 5px; padding: 0 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .72em; font-weight: 600; line-height: 1.6; vertical-align: .12em; white-space: nowrap; }
.cookbar .ingbtn { min-height: 44px; }

/* Bunnlinje i kjøkkenvisningen: smal tilbake-knapp og bred primærknapp */
.dock .backbtn { flex: 0 0 56px; min-width: 56px; font-size: 1.6rem; line-height: 1; padding: 0; }
.dock .grow { font-size: 1rem; }
.cook .step { scroll-margin-top: 84px; }
.markcooked { display: block; width: 100%; min-height: 52px; margin: 14px 0 4px; font-weight: 600; }

/* Frakoblet: varer som venter på å bli sendt */
.pendingline .name { display: flex; align-items: center; flex: 1; min-height: 44px; padding-left: 10px; color: var(--muted); }
.pendingline .badge { white-space: nowrap; }

/* Meg: profil og husstand på én side */
.mehead { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.mehead h1 { margin: 0; font-family: var(--serif); }
.avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font: 700 1.15rem var(--serif); }
.avatar.big { width: 64px; height: 64px; font-size: 1.7rem; background: var(--brand); color: var(--brand-ink); }
.avatar.soft { background: var(--butter); color: var(--accent-ink); }
.mestats .bigline { margin: 0 0 10px; font-size: 1.05rem; }
.mestats .bigline strong { font: 700 1.9rem var(--serif); color: var(--brand); margin-right: 4px; }
.metiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metile { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 8px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--ink); text-decoration: none; }
.metile strong { font: 700 1.4rem var(--serif); color: var(--brand); line-height: 1.1; }
.metile span { font-size: .92rem; }
.prefchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.prefchips .chip { min-height: 44px; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.person:first-child { border-top: 0; padding-top: 0; }
a.tel { display: inline-flex; align-items: center; min-height: 44px; }
.person .grow a.tel { display: flex; }
button.addperson { width: 100%; justify-content: center; border-style: dashed; color: var(--brand); font-weight: 600; }
.mecontrol summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
button.linkbtn.danger { color: var(--err); }
.person .grow { flex: 1 1 0; min-width: 120px; }
.person > .row { flex: 1 0 100%; padding-left: 56px; }

/* Importdialog: lenkefelt med Lim inn-knapp og forslag fra utklippstavlen */
.urlrow { display: flex; gap: 8px; align-items: stretch; }
.urlrow input { flex: 1; min-width: 0; min-height: 48px; }
.urlrow .pastebtn { min-height: 48px; min-width: 48px; white-space: nowrap; }

/* Duplikatvarsler: samme adresse ved import, lik tittel i skjemaet. Aldri en sperre. */
.dupwarn { background: var(--butter, #fbf0cf); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.dupwarn p { margin: 4px 0 10px; }
.dupnote { font-size: .92rem; color: var(--muted, #6b6b6b); min-height: 0; margin: 4px 0 0; }
.dupnote a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; font-weight: 600; }

/* Handleliste: ferdige kategorier minimeres til én rad og samles under «Ferdig»; når alt er dekket vises et rolig avslutningskort. */
.donehead { margin: 22px 0 6px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cat.doneitem { margin-top: 6px; }
.catdone { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px 0 12px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font: inherit; }
.catdone .catname { flex: 1; font-weight: 600; color: var(--ink); }
.catdone .catcount { font-size: .85rem; }
.catdone .chev { font-size: 1.3rem; line-height: 1; transition: transform .15s; }
.catdone.open .chev { transform: rotate(90deg); }
.catdone.open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.catdone + .catlines { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 1px solid var(--line); }
.catdot { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.alldone { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); border: 1px solid #cfe3d6; }
.alldone .adtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alldone strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.alldone .adquote { font-size: .9rem; color: #4d5a52; }
.alldone .adby { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.alldone .adbtn { align-self: flex-start; margin-top: 6px; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; }
.alldone .bowls { flex: 0 0 auto; overflow: visible; }
.alldone .lb { transform-origin: 34px 14px; transform: translate(-2px, 0) rotate(-14deg); }
.alldone .rb { transform-origin: 2px 14px; transform: translate(2px, 0) rotate(14deg); }
.alldone .sp { opacity: 0; transform-origin: 36px 8px; }
@keyframes lbowl { 0% { transform: translate(-22px, 2px) rotate(-30deg); } 55% { transform: translate(0, 0) rotate(-6deg); } 100% { transform: translate(-2px, 0) rotate(-14deg); } }
@keyframes rbowl { 0% { transform: translate(22px, 2px) rotate(30deg); } 55% { transform: translate(0, 0) rotate(6deg); } 100% { transform: translate(2px, 0) rotate(14deg); } }
@keyframes spark { 0%, 50% { opacity: 0; transform: scale(.5); } 62% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes cardin { 0% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 1; transform: none; } }
.alldone.play { animation: cardin .3s ease-out; }
.alldone.play .lb { animation: lbowl 1.1s ease-in-out; }
.alldone.play .rb { animation: rbowl 1.1s ease-in-out; }
.alldone.play .sp { animation: spark 1.3s ease-out; }
@media (prefers-reduced-motion: reduce) { .alldone.play, .alldone.play .lb, .alldone.play .rb, .alldone.play .sp { animation: none; } }

/* Retter en vare trengs til: lite symbol rett etter navnet (tall ved flere), popup ved trykk. */
.line .name.hassrc { flex: 0 1 auto; }
.line .name.hassrc ~ .havebtn, .line .name.hassrc ~ .badge { margin-left: auto; }
.line .name .amt { white-space: nowrap; }
.line .srcbtn { flex: 0 0 auto; width: 44px; margin: 0 -5px 0 -11px; min-height: 44px; padding: 0; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; }
.line .srcdot { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; border: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.line .srcbtn.many .srcdot { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 700; }
.line.done .srcbtn { opacity: .55; }
.srcpop { position: fixed; z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); padding: 6px; max-height: 60vh; overflow: auto; }
.srcpop .srchead { padding: 6px 10px 2px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.srcpop .srcrow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; background: none; border-radius: 10px; text-align: left; font: inherit; }
.srcpop .srcrow:active { background: var(--brand-soft); }
.srcpop .srcday { flex: 0 0 auto; width: 2.4em; color: var(--muted); font-size: .85rem; }
.srcpop .srctitle { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srcpop .srcamt { flex: 0 0 auto; color: var(--muted); font-size: .85rem; }
.srcpop .srcextra { padding: 6px 10px 8px; font-size: .85rem; color: var(--muted); }
