/* Bryglog – Som Man Siger. Mørk skovgrøn som logoet, humlegrøn og gul som accent. */
:root {
  --bg: #0e1710; --panel: #16221a; --panel2: #1c2c20; --line: #2a3d2e; --line2: #3a5340;
  --text: #eef3ea; --muted: #9fb2a0; --hop: #94c11f; --hop-d: #5b7813; --yellow: #e2de00;
  --danger: #ff7a66; --amber: #f2b13b; --blue: #7cc4ff;
  --r: 14px; --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); font-variant-numeric: tabular-nums; min-height: 100vh;
  background-image: radial-gradient(1200px 600px at 90% -10%, #1d3320 0%, transparent 60%); background-attachment: fixed; }
a { color: var(--hop); }
/* Overskrifter i Fraunces (blød serif), brødtekst i Bricolage Grotesque */
h1, h2, h3, .brand { font-family: "Fraunces", Georgia, serif; font-optical-sizing: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.005em; }
h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }

p { margin: 0 0 .6em; }
.muted { color: var(--muted); }
.err { color: var(--danger); }
small { font-size: 13px; }

/* navigation: top på store skærme, bund på telefonen */
#nav[hidden] { display: none; }
#nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px max(16px, env(safe-area-inset-left)); background: rgb(14 23 16 / .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; }
.brand img { width: 30px; height: 33px; object-fit: contain; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav-links a.on { color: var(--text); background: var(--panel2); }
.who { margin-left: auto; color: var(--muted); font-size: 14px; }
.queue { background: var(--amber); color: #201400; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
@media (max-width: 720px) {
  /* headeren ruller med siden; menuen er en flydende knap nederst til højre, der folder sig ud */
  #nav { position: static; padding-top: max(10px, env(safe-area-inset-top)); backdrop-filter: none; background: none; border-bottom: 0; }
  #nav .menu-fab { display: grid; }
  .nav-links { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 41; flex-direction: column; gap: 2px; margin: 0; padding: 8px; min-width: 210px;
    background: var(--panel2); border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 18px 50px rgb(0 0 0 / .5);
    opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right; pointer-events: none; transition: .18s ease; }
  #nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  main { padding-bottom: 96px !important; }
}
.menu-fab { display: none; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 42; width: 56px; height: 56px; place-items: center;
  border-radius: 50%; border: 0; background: var(--hop); box-shadow: 0 10px 30px rgb(0 0 0 / .45); cursor: pointer; }
.menu-fab span, .menu-fab span::before, .menu-fab span::after { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: #10200a; transition: .2s; position: relative; }
.menu-fab span::before, .menu-fab span::after { content: ""; position: absolute; left: 0; }
.menu-fab span::before { top: -7px; } .menu-fab span::after { top: 7px; }
#nav.open .menu-fab span { background: transparent; }
#nav.open .menu-fab span::before { top: 0; transform: rotate(45deg); }
#nav.open .menu-fab span::after { top: 0; transform: rotate(-45deg); }
@media (min-width: 721px) and (max-width: 1023px) { #nav { position: static; } }

main { max-width: 980px; margin: 0 auto; padding: 22px 16px 60px; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
/* loaderen: glasset fyldes op (2,4 s), skummet lægger sig, bobler stiger */
.beer-loader { display: grid; justify-items: center; gap: 10px; padding: 48px 0; color: var(--muted); font-size: 14px; }
.beer-loader svg { width: 56px; height: 74px; overflow: visible; }
.bl-glass { fill: none; stroke: rgb(238 243 234 / .75); stroke-width: 2.2; stroke-linejoin: round; }
.bl-shine { stroke: rgb(255 255 255 / .35); stroke-width: 2; stroke-linecap: round; }
.bl-beer { fill: #e9b23a; } .bl-foam { fill: #f7f1df; }
.bl-bub { fill: rgb(255 255 255 / .7); animation: bl-bub 1.2s linear infinite; } .bl-bub.b2 { animation-delay: .4s; } .bl-bub.b3 { animation-delay: .8s; }
.bl-fill { animation: bl-fill 2.4s cubic-bezier(.45, .05, .35, 1) infinite; }
@keyframes bl-fill { 0% { transform: translateY(80px); } 70%, 88% { transform: translateY(12px); } 100% { transform: translateY(12px); opacity: 0; } }
@keyframes bl-bub { from { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-55px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bl-fill { animation: none; transform: translateY(30px); } .bl-bub { animation: none; opacity: 0; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--hop); margin: 0 0 4px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 4px; }
.section-title { margin: 30px 0 12px; font-size: 22px; font-weight: 700; color: var(--text); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.card.empty { text-align: center; color: var(--muted); padding: 30px 16px; }
.card.err { border-color: var(--danger); color: var(--danger); }
.card.ai-note { border-color: var(--hop-d); background: #1b2a16; }
.warn-card, .hint-card { border-color: #6b5a18; background: #2a2510; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row > input, .row > select { flex: 1; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.full { grid-column: 1 / -1; }

/* knapper og felter */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 11px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font: 600 15px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--hop-d); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.primary { background: var(--hop); border-color: var(--hop); color: #10200a; }
.btn.primary:hover { background: #a6d528; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #2a0700; }
.btn.danger.ghost { background: transparent; color: var(--danger); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.wide { width: 100%; margin-top: 10px; }
.icon { background: none; border: 0; color: var(--muted); font-size: 16px; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; flex: none; }
.icon:hover { background: var(--panel2); color: var(--text); }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); background: #0f1912; color: var(--text); font: 16px var(--font); }
input[type=checkbox] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--hop); }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--hop); outline-offset: 1px; border-color: transparent; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* login */
.login { max-width: 420px; margin: 8vh auto; text-align: center; }
.login .field { text-align: left; }
.who-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 18px; }
.who-pick .btn { justify-content: center; padding: 16px 10px; font-size: 17px; font-weight: 700; }
.who-pick .btn.on { background: var(--hop); color: #0e1710; border-color: var(--hop); }
.login-logo { width: 150px; margin: 0 auto 18px; display: block; }

/* forside */
.notes .note-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.note-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hop); }
.note-item.alert .dot { background: var(--danger); }
.note-item time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.brew-card { display: block; color: var(--text); text-decoration: none; transition: border-color .15s; }
.brew-card:hover, .brew-card:focus-visible { border-color: var(--hop-d); }
.brew-card h3 { margin: 0; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--panel2); border: 1px solid var(--line2); white-space: nowrap; }
.chip.s-brygdag { background: #3a3410; border-color: #6b5f12; color: var(--yellow); }
.chip.s-gaering { background: #22340f; border-color: var(--hop-d); color: var(--hop); }
.chip.s-fadet { background: #13283a; border-color: #23506f; color: var(--blue); }
.live { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.live b { font-size: 26px; font-weight: 800; display: block; line-height: 1.1; }
.live small { color: var(--muted); }
.step-now { margin: 8px 0 0; font-size: 14px; color: var(--hop); font-weight: 600; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat b { display: block; font-size: 24px; font-weight: 800; line-height: 1.15; }
.stat small { color: var(--muted); }
.stat.lav b, .stat.høj b { color: var(--amber); }
.stat.ok b { color: var(--hop); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 13px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; color: var(--text); text-decoration: none; }
a.list-item:hover { border-color: var(--hop-d); }
.nums { color: var(--muted); font-size: 14px; }

/* opskrift */
.recipe-stats { position: sticky; top: 58px; z-index: 5; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; background: rgb(22 34 26 / .95); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 8px; }
.recipe-stats .stat b { font-size: 21px; }
.recipe-stats small { font-size: 11px; }
@media (max-width: 720px) { .recipe-stats { grid-template-columns: repeat(3, 1fr); top: 54px; } }
.swatch { display: block; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .25); }
.style-check { color: var(--amber); font-size: 14px; margin-bottom: 10px; }
.tbl-row { display: grid; grid-template-columns: 2.2fr repeat(4, 1fr) 36px; gap: 8px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cell .lbl { font-size: 11px; }
.cell.c-mash, .cell.c-dry { align-items: center; }
.tbl .btn { margin-top: 10px; }
@media (max-width: 720px) {
  .tbl-row { grid-template-columns: repeat(3, 1fr) 36px; }
  .cell.c-name { grid-column: 1 / -2; }
  .tbl-row .rm { grid-column: -2; grid-row: 1; }
}
.warn-row { display: grid; grid-template-columns: 1fr 2fr 36px; gap: 8px; margin-bottom: 8px; }
@media (max-width: 720px) { .warn-row { grid-template-columns: 1fr 36px; } .warn-row input { grid-column: 1 / -1; grid-row: 2; } }
.danger-zone { margin: 30px 0 10px; text-align: center; }

/* bryg */
.status-sel { width: auto; }
.compare .stat small { font-size: 12px; }
/* OG, FG, ABV og effektivitet altid på én række (to og to på smalle telefoner) */
.stat-strip.compare { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compare .stat { min-width: 0; }
@media (max-width: 420px) { .stat-strip.compare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 4px 0 14px; padding-bottom: 2px; scrollbar-width: none; }
.tabs a { padding: 10px 16px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 700; white-space: nowrap; }
.tabs a.on { background: var(--hop); color: #10200a; }
.step { position: relative; }
.step.done { opacity: .62; }
.step.done p, .step.done .point, .step.done .timer, .step.done .warn { display: none; }
.step.current { border-color: var(--hop); box-shadow: 0 0 0 1px var(--hop), 0 12px 40px -18px rgb(148 193 31 / .5); }
.step-head { display: flex; gap: 12px; align-items: flex-start; }
.step-head h3 { margin: 4px 0 0; }
.check { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line2); background: transparent; color: #10200a; font-weight: 800; cursor: pointer; }
.check.on { background: var(--hop); border-color: var(--hop); }
.step p { margin: 10px 0 0 46px; }
.warn { margin: 10px 0 0 46px; padding: 10px 12px; border-radius: 10px; background: #3b3108; border: 1px solid #8a7410; color: #ffe95c; font-weight: 700; }
.step .timer, .step .point { margin: 12px 0 0 46px; }
.point { margin-top: 12px; }
@media (max-width: 520px) { .step p, .warn, .timer, .point { margin-left: 0; } }
.timer-start { width: 100%; }
.timer small { display: block; margin-top: 6px; }
.clock { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.timer.over .clock { color: var(--amber); }
.bar { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--hop); border-radius: 99px; transition: width .9s linear; }
.bar.big { height: 12px; margin: 12px 0; }
.point { padding: 10px 12px; background: var(--panel2); border-radius: 12px; }
.point-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-weight: 700; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.val { background: #22340f; border-color: var(--hop-d); color: var(--text); font-weight: 600; }
.preview { display: block; color: var(--hop); margin-top: 4px; min-height: 18px; }
.extra { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; }
@media (max-width: 720px) { .extra { grid-template-columns: 1fr 1fr; } }

.live-big { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.live-big .stat b { font-size: 30px; }
@media (max-width: 520px) { .live-big { grid-template-columns: repeat(2, 1fr); } }
.now-step { border-color: var(--hop-d); }
.plan-row { display: grid; grid-template-columns: 28px 1.4fr 90px 1.1fr 80px 2fr 36px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan-row.past { opacity: .5; }
.plan-row.now .plan-n { background: var(--hop); color: #10200a; }
.plan-n { width: 26px; height: 26px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.p-temp { display: flex; align-items: center; gap: 4px; }
.plan.remind .plan-row { grid-template-columns: 28px 1.4fr 1.1fr 80px 2fr 36px; }
@media (max-width: 720px) {
  .plan-row { grid-template-columns: 28px 1fr 1fr 36px; }
  .p-name { grid-column: 2 / 4; } .p-temp { grid-column: 2; } .p-type { grid-column: 3; } .p-val { grid-column: 2; } .p-rem { grid-column: 2 / 4; }
  .plan-row .rm { grid-column: 4; grid-row: 1; }
}
.plan .row { margin-top: 10px; flex-wrap: wrap; }
.chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.ch-ax.sg { fill: var(--hop); } .ch-ax.temp { fill: var(--amber); }
.ch-sg { fill: none; stroke: var(--hop); stroke-width: 2.5; }
.ch-temp { fill: none; stroke: var(--amber); stroke-width: 1.6; opacity: .9; }
.ch-target { fill: none; stroke: var(--amber); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .7; }
.ch-man { fill: var(--yellow); stroke: var(--bg); stroke-width: 2; }
.ch-mark { stroke: var(--line2); stroke-dasharray: 2 3; } .ch-mark-t { fill: var(--muted); font-size: 10px; }
.ch-empty { fill: var(--muted); font-size: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend span::before { content: ""; display: inline-block; width: 16px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.l-sg::before { background: var(--hop); } .l-temp::before { background: var(--amber); } .l-target::before { background: repeating-linear-gradient(90deg, var(--amber) 0 4px, transparent 4px 7px); } .l-man::before { background: var(--yellow); width: 8px !important; height: 8px !important; border-radius: 50% !important; }

table.readings { width: 100%; border-collapse: collapse; font-size: 15px; }
.readings th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line2); }
.readings td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.readings .v { display: inline-block; margin-right: 8px; }
.readings .v.out { text-decoration: line-through; color: var(--danger); }
@media (max-width: 720px) {
  .readings thead { display: none; }
  .readings tr { display: grid; grid-template-columns: 1fr auto 40px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .readings td { border: 0; padding: 2px 6px; }
  .readings td:nth-child(3), .readings td:nth-child(4) { grid-column: 1 / -1; font-size: 14px; }
  .readings td:nth-child(3):empty { display: none; }
  .readings td:last-child { grid-column: 3; grid-row: 1; }
}
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 120px 1fr 32px; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.log time { color: var(--muted); font-size: 13px; }
.log li.alert span { color: var(--danger); } .log li.reminder span { color: var(--hop); } .log li.command span { color: var(--amber); }
@media (max-width: 520px) { .log li { grid-template-columns: 1fr 32px; gap: 0 8px; } .log li time { grid-column: 1; } .log li span { grid-column: 1; } .log li .rm { grid-column: 2; grid-row: 1 / 3; } }
.log li .rm { opacity: .45; } .log li:hover .rm, .log li .rm:focus-visible { opacity: 1; }

.label-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 760px) { .label-layout { grid-template-columns: 1fr; } }
.label-canvas { width: 100%; height: auto; border-radius: 10px; display: block; margin-bottom: 12px; background: #000; }
pre { background: #0b130d; border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }

/* dialog og beskeder */
.modal { width: min(560px, calc(100vw - 24px)); border: 1px solid var(--line2); border-radius: 16px; padding: 0; background: var(--panel); color: var(--text); }
.modal::backdrop { background: rgb(0 0 0 / .6); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 0; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 12px 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: .25s; z-index: 100; background: #e9f3dd; color: #10200a; padding: 12px 18px; border-radius: 12px; font-weight: 600; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgb(0 0 0 / .4); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #2a0700; }
.toast.alarm { background: var(--yellow); color: #1b1a00; font-size: 18px; }
@media (max-width: 720px) { .toast { bottom: 84px; } }

/* tidligere bryg ved målepunkter og i sammenligningen */
.hist { list-style: none; margin: -2px 0 10px; padding: 0; font-size: 14px; }
.hist li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: baseline; padding: 3px 0; color: var(--muted); }
.hist li b { color: var(--text); }
.hist li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist li.avg { border-top: 1px solid var(--line2); margin-top: 3px; padding-top: 6px; }
.hist li.avg b { color: var(--hop); }
.chip.val.off, td.off b { color: var(--amber); }
.chip.val.off { border-color: #8a6a14; background: #33280c; }
.scroll-x { overflow-x: auto; }
table.compare-tbl { border-collapse: collapse; min-width: 100%; font-size: 15px; white-space: nowrap; }
.compare-tbl th, .compare-tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.compare-tbl th:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); font-weight: 600; }
.compare-tbl thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.compare-tbl thead a { color: var(--muted); }
.compare-tbl .now { background: #1b2a16; }
.compare-tbl thead .now { color: var(--hop); }
.icon.tiny { width: 24px; height: 24px; font-size: 12px; margin-left: 4px; vertical-align: middle; }

/* ingrediens-liste i et trin (valsning, humle) */
.items { list-style: none; margin: 10px 0 0 46px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.items li { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; align-items: baseline; padding: 10px 12px; border-top: 1px solid var(--line); }
.items li:first-child { border-top: 0; }
.items b { font-size: 18px; }
.items small { color: var(--hop); font-weight: 700; }
.items li.skip { background: #241f0d; }
.items li.skip small { color: var(--amber); }
.step.done .items { display: none; }
@media (max-width: 520px) { .items { margin-left: 0; } }

.bulk { margin-top: 12px; }
.bulk summary { cursor: pointer; color: var(--hop); font-weight: 600; padding: 6px 0; }

.old-notes summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.old-notes[open] summary { margin-bottom: 10px; }
.old-notes pre { white-space: pre-wrap; word-break: normal; font-family: var(--font); font-size: 14px; color: var(--muted); }
.small { font-size: 13px; }

/* ---------- bryg-kort (farvekant i øllens farve) ---------- */
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.brew-card { border-left: 6px solid var(--beer, var(--hop)); padding: 14px 16px; }
.bc-head { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; }
.bc-head h3 { margin: 0; font-size: 17px; }
.bc-head small { display: block; margin-top: 2px; }
.glass { width: 22px; height: 28px; margin-top: 2px; background: var(--beer, var(--hop)); border-radius: 3px 3px 6px 6px; box-shadow: inset 0 5px 0 rgb(255 255 255 / .75); }
.nr { color: var(--muted); font-weight: 600; }
.badge { white-space: nowrap; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line2); }
.badge.go { background: #22340f; border-color: var(--hop-d); color: var(--hop); }
.badge.late { background: #3a1a12; border-color: #7a3322; color: var(--danger); }
.prog { margin-top: 12px; }
.prog .bar { position: relative; height: 18px; margin: 0 0 6px; }
.prog .bar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #10200a; }
.livevals { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; font-weight: 600; }
.livevals .sg { color: var(--hop); } .livevals .temp { color: var(--amber); }
.row.small { margin-top: 10px; font-size: 13px; flex-wrap: wrap; }
.stars { color: var(--yellow); letter-spacing: 1px; white-space: nowrap; }
.grid.cards.compact .brew-card { padding: 12px 14px; }

/* ---------- faser ---------- */
.phases { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.phases li { flex: 1; min-width: 92px; }
.phases button { width: 100%; padding: 9px 6px; border: 0; border-bottom: 3px solid var(--line2); background: none; color: var(--muted); font: 700 13px var(--font); cursor: pointer; white-space: nowrap; }
.phases li.past button { border-color: var(--hop-d); color: var(--text); }
.phases li.now button { border-color: var(--hop); color: var(--hop); background: #1b2a16; border-radius: 8px 8px 0 0; cursor: default; }

/* ---------- brygdag med Nu-panel ---------- */
.brewday { display: block; }
.nowpanel { position: sticky; bottom: 0; z-index: 8; margin: 14px -16px 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: rgb(22 34 26 / .97); backdrop-filter: blur(10px); border-top: 1px solid var(--hop-d); }
.nowpanel h3 { margin: 0 0 6px; }
.nowpanel .eyebrow { margin: 6px 0 2px; }
.stages { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; }
.stages li { flex: 1; height: 5px; border-radius: 3px; background: var(--line2); font-size: 0; }
.stages li.done { background: var(--hop-d); } .stages li.now { background: var(--hop); }
.np-clock { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; }
.np-clock[hidden] { display: none; }
.np-clock b { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.np-clock small { color: var(--muted); }
.np-alarm { margin: 10px 0 4px; display: grid; gap: 8px; }
.np-alarm[hidden] { display: none; }
.np-al { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--yellow); color: #1b1a00; animation: pulse 1s ease-in-out infinite alternate; }
.np-al small { display: block; font-size: 12px; opacity: .8; }
.np-al .btn { background: #1b1a00; color: var(--yellow); border-color: #1b1a00; }
@keyframes pulse { to { box-shadow: 0 0 0 6px rgb(226 222 0 / .25); } }
@media (prefers-reduced-motion: reduce) { .np-al { animation: none; } }
@media (max-width: 720px) {
  .nowpanel { bottom: 0; padding-right: 84px; }
  .nowpanel .btn.wide { margin-top: 6px; min-height: 40px; }
  .nowpanel .muted.small, .nowpanel .eyebrow { display: none; }
}

/* ---------- stilbjælker ---------- */
.sbar { display: grid; grid-template-columns: 52px 1fr 64px; gap: 10px; align-items: center; padding: 9px 0; }
.sb-k { font-size: 13px; font-weight: 700; color: var(--muted); }
.sb-track { position: relative; height: 10px; border-radius: 99px; background: var(--panel2); margin: 0 0 14px; }
.sb-range { position: absolute; top: 0; bottom: 0; background: #2f4a1c; border: 1px solid var(--hop-d); border-radius: 99px; }
.sb-lo, .sb-hi { position: absolute; top: 13px; font-size: 10px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.sb-mark { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--hop); box-shadow: 0 0 0 2px var(--panel); }
.sb-mark.off { background: var(--amber); }
.sb-v { text-align: right; font-size: 15px; }
.sb-v.off { color: var(--amber); }
.lessons ul { margin: 0; padding-left: 18px; } .lessons li { margin: 4px 0; }

/* ---------- smag ---------- */
.star-input { display: flex; gap: 6px; margin: 6px 0 14px; }
.star-input button { font-size: 38px; line-height: 1; background: none; border: 0; color: var(--line2); cursor: pointer; padding: 0 2px; }
.star-input button.on { color: var(--yellow); }

/* ---------- iPad og Mac: sidebjælke og to kolonner ---------- */
@media (min-width: 1024px) {
  #nav { position: fixed; inset: 0 auto 0 0; width: 220px; flex-direction: column; align-items: stretch; gap: 6px; padding: 22px 14px; border-bottom: 0; border-right: 1px solid var(--line); }
  #nav .brand { padding: 0 8px 18px; font-size: 20px; }
  #nav .brand img { width: 36px; height: 36px; }
  .nav-links { flex-direction: column; margin: 0; gap: 2px; }
  .nav-links a { padding: 11px 12px; font-size: 15px; }
  .who { margin: auto 8px 0; }
  .queue { align-self: flex-start; margin-left: 8px; }
  #nav:not([hidden]) ~ main { margin-left: 220px; }
  main { max-width: 1240px; padding: 30px 36px 60px; }
  .recipe-stats { top: 12px; }
  .recipe-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
  .recipe-side { position: sticky; top: 120px; }
  .brewday { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
  .nowpanel { position: sticky; top: 24px; bottom: auto; margin: 0; border: 1px solid var(--hop-d); border-radius: var(--r); padding: 16px; }
  .nowpanel .np-clock b { font-size: 56px; }
  .brewday .section-title:first-child { margin-top: 0; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .recipe-layout { grid-template-columns: 1fr; }
  .recipe-side { position: static; order: -1; }
}
@media (max-width: 1023px) { .recipe-side .style-bars { margin-top: 0; } .recipe-layout { display: flex; flex-direction: column-reverse; } }
.sb-avg { position: absolute; top: 1px; bottom: 1px; width: 2px; margin-left: -1px; background: var(--hop); opacity: .8; }
.sb-bjcp { position: absolute; top: -4px; bottom: -4px; border: 1.5px dashed #8fa08f; border-radius: 6px; }
.style-bars .toggle { margin-top: 10px; color: var(--muted); font-weight: 500; }
output.pct { display: flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--muted); }
.malt-total { margin: 10px 0 0; }
.optimal { margin: 12px 0 0 46px; padding: 10px 12px; border-radius: 12px; background: #1b2a16; border: 1px solid var(--hop-d); }
.optimal .eyebrow { margin: 0 0 6px; }
.optimal table { width: 100%; border-collapse: collapse; font-size: 15px; }
.optimal th { text-align: left; font-weight: 700; padding: 4px 8px 4px 0; }
.optimal td { padding: 4px 8px; color: var(--text); }
.optimal td:last-child { color: var(--hop); font-weight: 700; text-align: right; }
.step.done .optimal { display: none; }
.target { color: var(--hop); font-weight: 600; }
@media (max-width: 520px) { .optimal { margin-left: 0; } .optimal td:nth-child(2) { display: none; } }

/* lager */
.inv h2 { margin-bottom: 6px; }
.inv-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; padding: 12px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.inv h2 + .inv-row { border-top: 0; }
.inv-row:hover .inv-name { color: var(--hop); }
.inv-name { font-weight: 700; }
.inv-amt { font-size: 18px; text-align: right; }
.inv-upd { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.inv-row.stale .inv-upd { color: var(--amber); }
.inv-row.empty .inv-amt { color: var(--danger); }
.stock { color: var(--hop); font-weight: 600; } .stock.off { color: var(--amber); }
.items li span small.stock { display: block; }
.deduct-row { display: grid; grid-template-columns: 1fr 110px 1.3fr; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.deduct-row .amt { display: flex; align-items: center; gap: 4px; } .deduct-row .amt input { min-height: 38px; padding: 6px 8px; }
.deduct-row select { min-height: 38px; padding: 6px 8px; }
@media (max-width: 520px) { .deduct-row { grid-template-columns: 1fr 110px; } .deduct-row select { grid-column: 1 / -1; } }
.shopping summary { cursor: pointer; font-weight: 700; font-family: "Fraunces", Georgia, serif; font-size: 18px; }
.shopping ul { list-style: none; padding: 0; margin: 10px 0; }
.shopping li { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.shopping li small { color: var(--muted); }
/* menupunkter før navn/kø, både i topbjælken (tablet) og sidebjælken (Mac) */
.nav-links { order: 1; } .who, .queue { order: 2; }
@media (min-width: 721px) and (max-width: 1023px) { .who { margin-left: 0; } .nav-links { margin-right: auto; } }
@media (max-width: 720px) { .recipe-stats { top: 8px; } }

/* ---------- gennemgang: tilgængelighed ---------- */
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--hop); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- ølglasset (appens kendetegn) ---------- */
.beer-glass { flex: none; overflow: visible; }
.beer-glass.big { width: 52px; height: 84px; }
.beer-glass.small { width: 40px; height: 64px; }
.beer-glass .bg-empty { fill: rgb(255 255 255 / .04); }
.beer-glass .rim { fill: none; stroke: rgb(238 243 234 / .55); stroke-width: 2.5; stroke-linejoin: round; }
.beer-glass .foam { fill: #fbf6e8; }
.brew-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; border-left: 1px solid rgb(255 255 255 / .065); padding: 16px; }
.bc-text { min-width: 0; }
.bc-status { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--hop); }
.s-planlagt .bc-status { color: var(--muted); }
.brew-card h3 { margin: 0; font-size: 21px; }
.bc-meta { margin: 2px 0 8px; color: var(--muted); font-size: 14px; }
.bc-line { margin: 0; font-size: 14px; }
.bc-vals { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 18px; margin: 4px 0 6px; }
.bc-vals dt { font-size: 12px; color: var(--muted); }
.bc-vals dd { margin: 0; font-weight: 700; font-size: 17px; }
.shelf-head { align-items: baseline; flex-wrap: wrap; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; padding: 16px 12px 0; border-bottom: 6px solid #2b3d2f; border-radius: 4px; background: linear-gradient(to bottom, transparent 60%, rgb(255 255 255 / .02)); }
.shelf-item { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px; align-items: end; padding: 8px 6px 12px; color: var(--text); text-decoration: none; border-radius: 10px; }
.shelf-item:hover { background: rgb(255 255 255 / .03); }
.shelf-item .beer-glass { grid-row: 1 / 4; }
.si-name { font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.si-meta { font-size: 12px; color: var(--muted); }
.shelf-item .stars { font-size: 12px; }

/* ---------- brygdagen som forløb ---------- */
.steps { position: relative; }
.step .check { font: 800 14px var(--font); color: var(--muted); background: var(--panel); }
.step.current .check { border-color: var(--hop); color: var(--hop); }
.step .check.on { color: #10200a; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 32px; top: 52px; bottom: -14px; width: 2px; background: var(--line2); z-index: 0; }
.step.done:not(:last-child)::after { background: var(--hop-d); }
.step { z-index: 1; }

/* ---------- gem-bjælke på opskriften ---------- */
.savebar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 18px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--hop-d); box-shadow: 0 16px 40px rgb(0 0 0 / .5); transition: transform .2s ease; white-space: nowrap; }
body.dirty .savebar { transform: translate(-50%, 0); }
@media (max-width: 720px) { .savebar { left: 16px; right: 88px; transform: translateY(140%); justify-content: space-between; } body.dirty .savebar { transform: none; } }
@media (min-width: 1024px) { .savebar { left: calc(50% + 110px); } }

/* ---------- lager på store skærme ---------- */
@media (min-width: 1024px) { #main > .card.inv { break-inside: avoid; } }
@media (min-width: 1200px) { .inv-cols { columns: 2; column-gap: 16px; } .inv-cols > .card { break-inside: avoid; } }
.beer-glass .shine { fill: rgb(255 255 255 / .22); }
.bc-vals dd { white-space: nowrap; }
@media (max-width: 400px) { .bc-vals { grid-template-columns: repeat(2, auto); } }
/* hver række på hylden står på sin egen hyldeplanke */
.shelf { gap: 0; padding: 0; border-bottom: 0; background: none; }
.shelf-item { border-radius: 0; border-bottom: 6px solid #2b3d2f; padding-top: 14px; }
.shelf-item:hover { background: rgb(255 255 255 / .03); border-radius: 8px 8px 0 0; }
.step .check.on { background: var(--hop); border-color: var(--hop); color: #10200a; }
/* forløbslinjen kun hvor trinnenes indhold er rykket ind (ellers krydser den teksten) */
@media (max-width: 520px) { .step:not(:last-child)::after { display: none; } }
.step.current::after { top: auto; height: 14px; bottom: -14px; }

/* ---------- billeder ---------- */
.photo-add-row { display: grid; grid-template-columns: 160px 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 620px) { .photo-add-row { grid-template-columns: 1fr; } .photo-add-row .btn { width: 100%; } }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumb { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--panel2); cursor: zoom-in; aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 12px; text-align: left; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / .7)); }
.photo-view img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: #000; display: block; margin-bottom: 8px; }
.modal.wide { width: min(900px, calc(100vw - 24px)); }
.taste-photo { margin: 0 0 14px; }
.taste-photo img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--r); display: block; cursor: zoom-in; }
.taste-photo figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }
.photo-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.photo-cta p { margin: 0; flex: 1 1 260px; }
.glass-photo { grid-row: 1 / 4; width: 40px; height: 64px; object-fit: cover; clip-path: polygon(4% 4%, 96% 4%, 84% 98%, 16% 98%); border-radius: 2px; }

/* ---------- brygdagens sektioner (som i noterne) ---------- */
.sec-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding: 2px; }
.sec-nav a { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.sec-nav a.now { border-color: var(--hop); color: var(--hop); background: #1b2a16; }
.sec-nav a.done { color: var(--text); border-color: var(--hop-d); }
.sec { margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: rgb(255 255 255 / .015); scroll-margin-top: 12px; }
.sec > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary h2 { margin: 0; font-size: 22px; }
.sec > summary::after { content: ""; width: 9px; height: 9px; margin-left: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); flex: none; align-self: center; transition: transform .15s; }
.sec[open] > summary::after { transform: rotate(-135deg); }
.sec-prog { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.sec.done .sec-prog { color: var(--hop); }
.sec.now { border-color: var(--hop-d); }
.sec-steps { padding: 0 12px 2px; }
.sec-steps .step:last-child { margin-bottom: 12px; }
@media (max-width: 520px) { .sec-steps { padding: 0 8px 2px; } .sec > summary h2 { font-size: 20px; } }
@media (min-width: 721px) { .sec-nav { flex-wrap: wrap; overflow: visible; } }

/* ---------- Nu-panelet: kompakt ---------- */
.np-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.np-info { flex: 1; min-width: 0; }
.np-sec { margin: 0; font-size: 12px; font-weight: 600; color: var(--hop); }
.nowpanel h3 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-clock { margin: 2px 0 0; gap: 8px; }
.np-clock b { font-size: 22px; }
.np-next { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.np-actions { display: flex; gap: 8px; flex: none; }
.np-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-width: 44px; padding: 0 12px; border-radius: 22px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font: 700 14px var(--font); cursor: pointer; }
.np-btn.primary { background: var(--hop); border-color: var(--hop); color: #10200a; }
.np-ico { font-size: 15px; line-height: 1; }
.stages li { height: 3px; }
@media (max-width: 1023px) {
  .nowpanel { padding-top: 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .np-lbl, .np-next { display: none; }          /* kun ikoner på små skærme */
  .np-btn { width: 44px; padding: 0; }
}
@media (min-width: 1024px) {
  .np-row { flex-direction: column; align-items: stretch; }
  .nowpanel h3 { white-space: normal; font-size: 18px; }
  .np-clock b { font-size: 44px; }
  .np-actions { flex-direction: column; }
  .np-btn { height: 46px; border-radius: 12px; }
}
/* menuknappen er navigation, ikke en handling: mørk, så den grønne ✓ står alene */
.menu-fab { background: var(--panel2); border: 1px solid var(--line2); }
.menu-fab span, .menu-fab span::before, .menu-fab span::after { background: var(--text); }
#nav.open .menu-fab span { background: transparent; }
.recipe-changed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-color: #8a7410; background: #2a2510; }
.recipe-changed p { margin: 0; flex: 1 1 260px; }
.ai-write { margin: 4px 0 10px; } .ai-write select { width: auto; flex: none; }
.suggestions { display: grid; gap: 10px; margin-bottom: 14px; }
.suggestion { padding: 12px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); }
.suggestion p { margin: 0 0 8px; }
.suggestion .eyebrow { margin-bottom: 4px; }

.steps-help { margin: 0 0 14px; padding-left: 1.3em; line-height: 1.55; }
.steps-help li { margin: 4px 0; }

.rapt-steps { list-style: none; margin: 14px 0 12px; padding: 0; display: grid; gap: 2px; }
.rapt-steps li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 8px; font-size: 15px; }
.rapt-steps li.past { opacity: .45; }
.rapt-steps li.now { background: #1b2a16; color: var(--hop); font-weight: 700; }
.rapt-steps li .muted { text-align: right; font-weight: 400; }
@media (max-width: 520px) { .rapt-steps li { flex-direction: column; gap: 0; } .rapt-steps li .muted { text-align: left; } }
@media (max-width: 720px) {
  .plan.remind .plan-row { grid-template-columns: 28px 1fr 1fr 36px; }
  .plan.remind .p-type { grid-column: 2; } .plan.remind .p-val { grid-column: 3; }
}
/* menu-ikoner: ens streg-ikoner (ølglas, notesbog, maltsæk, skydeknapper) */
svg.ni { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-links a.on svg.ni { stroke: var(--hop); }
.nav-links a:hover svg.ni { stroke: var(--text); }
.nav-links a.on:hover svg.ni { stroke: var(--hop); }

/* Untappd */
.si-ut { grid-column: 2; font-size: 12px; color: var(--muted); } .si-ut b { color: var(--yellow, #e2de00); font-size: 13px; }
.ut-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 14px 0; }
.ut-photos button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; }
.ut-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; transition: transform .15s; }
.ut-photos button:hover img { transform: scale(1.03); }
.ut-photos button:focus-visible { outline: 2px solid var(--hop); outline-offset: 2px; }
.ut-list { list-style: none; margin: 8px 0 10px; padding: 0; }
.ut-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ut-r { font-weight: 800; color: var(--yellow, #e2de00); }

/* lightbox */
dialog.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(6 10 7 / .96); color: var(--text); display: grid; place-items: center; }
dialog.lightbox::backdrop { background: rgb(0 0 0 / .7); }
.lightbox figure { margin: 0; display: grid; gap: 12px; justify-items: center; max-width: min(1100px, 92vw); }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 190px); object-fit: contain; border-radius: 10px; transition: filter .2s; }
.lightbox img.loading { filter: blur(3px); }
.lightbox figcaption { width: 100%; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.lb-cap { display: grid; gap: 2px; } .lb-cap span { color: var(--muted); font-size: 14px; } .lb-cap p { margin: 4px 0 0; } .lb-cap a { color: var(--hop); font-size: 14px; margin-top: 4px; }
.lb-count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.lb-x, .lb-nav { position: fixed; border: 1px solid var(--line2); background: rgb(22 34 26 / .85); color: var(--text); border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lb-x { top: max(16px, env(safe-area-inset-top)); right: 16px; width: 44px; height: 44px; font-size: 18px; z-index: 2; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 32px; line-height: 1; padding-bottom: 4px; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-x:hover, .lb-nav:hover { border-color: var(--hop); color: var(--hop); }
@media (max-width: 720px) { .lb-nav { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); transform: none; width: 46px; height: 46px; } .lightbox img { max-height: calc(100dvh - 230px); } .lightbox figure { max-width: 94vw; } }
/* Beskeder: luft mellem overskrift, streg og linjer – ens over og under (Kasper, 1. nov 2026) */
.notes > .row.between { margin-bottom: 14px; }
.notes > .row.between h2 { margin: 0; }
.notes .note-item { padding: 14px 0; align-items: center; }
.notes .note-item:last-child { padding-bottom: 0; }
.notes .note-item .dot { align-self: center; }

.tg-types { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 6px; margin: 12px 0; display: grid; gap: 2px; }
.tg-types legend { padding: 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.check-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--hop); flex: none; }

/* ---------- Materiale: korn, lys og dybde (Kasper, 1. nov 2026) ----------
   Filmkorn over hele appen, kort der løfter sig, knapper man kan trykke ned, forsænkede felter og en træhylde.
   Alt er statisk – ingen animation – så det koster intet på telefonen. */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --lift: inset 0 1px 0 rgb(255 255 255 / .055), 0 1px 0 rgb(0 0 0 / .55), 0 14px 30px -14px rgb(0 0 0 / .7);
}
body::after { content: ""; position: fixed; inset: 0; z-index: 900; pointer-events: none; background: var(--grain); background-size: 180px; opacity: .085; mix-blend-mode: overlay; }
body { background-image: radial-gradient(1200px 600px at 90% -10%, #1f3822 0%, transparent 60%), radial-gradient(900px 700px at -10% 110%, #0a110c 0%, transparent 60%); }

.card { background: linear-gradient(180deg, rgb(255 255 255 / .04), rgb(255 255 255 / 0) 120px), var(--panel); border-color: rgb(255 255 255 / .065); box-shadow: var(--lift); }
.card.ai-note { background: linear-gradient(180deg, rgb(148 193 31 / .09), transparent 120px), #1b2a16; }

.btn { background: linear-gradient(180deg, #25392b, #1a2a1f); border-color: rgb(255 255 255 / .09); box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 1px 2px rgb(0 0 0 / .55); transition: transform .06s, box-shadow .06s, border-color .15s; }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 2px 5px rgb(0 0 0 / .45); }
.btn.primary { background: linear-gradient(180deg, #abd63c, #87b117); border-color: #6c8f12; color: #10200a; text-shadow: 0 1px 0 rgb(255 255 255 / .25);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), inset 0 -2px 0 rgb(0 0 0 / .14), 0 2px 7px rgb(0 0 0 / .45); }
.btn.primary:hover { background: linear-gradient(180deg, #b8e246, #93be1d); }
.btn.primary:active:not(:disabled) { box-shadow: inset 0 2px 6px rgb(0 0 0 / .3); }
.btn.danger { background: linear-gradient(180deg, #ff8f7d, #ef6650); }
.btn.ghost, .btn.danger.ghost { background: transparent; box-shadow: none; border-color: rgb(255 255 255 / .1); }

input, select, textarea { background: #0b140e; border-color: rgb(255 255 255 / .08); box-shadow: inset 0 2px 5px rgb(0 0 0 / .5), 0 1px 0 rgb(255 255 255 / .04); }
input[type=checkbox], input[type=radio] { box-shadow: none; }

/* sidemenu og menuknap: samme lys */
.nav-links a.on { background: linear-gradient(180deg, #24372a, #1b2b20); box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), 0 1px 2px rgb(0 0 0 / .5); }
.menu-fab { background: linear-gradient(180deg, #25392b, #1a2a1f); box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 10px 30px rgb(0 0 0 / .5); }

/* hylden med de færdige øl: en planke af mørkt træ med skygge under */
.shelf-item { border-bottom: 0; position: relative; padding-bottom: 20px; }
.shelf-item::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; border-radius: 2px;
  background: var(--grain), repeating-linear-gradient(90deg, rgb(0 0 0 / .06) 0 3px, transparent 3px 11px), linear-gradient(180deg, #5a4129, #3d2b1a 60%, #2c1f13);
  background-size: 120px, auto, auto; box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 8px 10px -4px rgb(0 0 0 / .65); }
.shelf-item:hover { border-radius: 8px; }

/* målepunkt: bryggets egen værdi stort; OG og FG side om side på Gæring-fanen */
.pt-now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 10px; }
.pt-now b { font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--hop); }
.pt-now.off b { color: var(--amber); }
.pt-now small { color: var(--muted); }
.og-fg { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.og-fg .point { margin: 0; border: 1px solid rgb(255 255 255 / .06); box-shadow: inset 0 1px 0 rgb(255 255 255 / .04); }

.recipe-curves .curve { margin: 16px 0 0; }
.recipe-curves figcaption { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.recipe-curves figcaption a { text-decoration: none; }
.toggle:has(.bjcp-what) { display: flex; flex-wrap: wrap; margin-top: 12px; }
.bjcp-what { display: block; flex-basis: 100%; margin: 6px 0 0 28px; line-height: 1.45; font-weight: 400; }

/* kurve: markør og boks med datapunkter */
.chart-wrap { position: relative; }
.ch-hit { cursor: crosshair; }
.ch-vline { stroke: var(--text); stroke-width: 1; opacity: .35; }
.ch-dot { stroke: var(--bg); stroke-width: 2; } .ch-dot.sg { fill: var(--hop); } .ch-dot.temp { fill: var(--amber); }
.ch-tip { position: absolute; top: 8px; z-index: 5; pointer-events: none; min-width: 170px; padding: 9px 12px; border-radius: 10px; font-size: 13px;
  background: rgb(14 23 16 / .94); border: 1px solid var(--line2); box-shadow: 0 10px 24px rgb(0 0 0 / .5); backdrop-filter: blur(6px); }
.ch-row { display: flex; justify-content: space-between; gap: 14px; line-height: 1.6; }
.ch-row.when { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.ch-row span { color: var(--text); } .ch-row.when span { color: var(--muted); }
.ch-row.sg b { color: var(--hop); } .ch-row.temp b, .ch-row.tgt b { color: var(--amber); } .ch-row.man b { color: var(--yellow); } .ch-row.abv b { color: var(--text); }
/* "Alle trin er klaret": luft under trinstregerne, og teksten må gerne bryde */
.np-done { margin-top: 12px; }
.np-done h3 { margin: 0 0 4px; white-space: normal; }
.np-done p { margin: 0; }
/* Faserne som trin i en proces: nummererede cirkler med streg og pil imellem, flueben på de klarede (Kasper, 1. nov 2026) */
.phases { counter-reset: fase; gap: 0; margin-bottom: 18px; padding-top: 2px; }
.phases li { position: relative; flex: 1; min-width: 66px; counter-increment: fase; }
.phases button { display: grid; justify-items: center; gap: 6px; padding: 0 2px 4px; border: 0; background: none; border-radius: 10px; font-size: 12.5px; }
.phases button::before { content: counter(fase); position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line2); background: var(--bg); color: var(--muted); font: 800 13px var(--font); transition: background .2s, border-color .2s; }
.phases li.past button { color: var(--text); }
.phases li.past button::before { content: "✓"; background: var(--hop-d); border-color: var(--hop-d); color: var(--text); }
.phases li.now button { background: none; color: var(--hop); }
.phases li.now button::before { background: var(--hop); border-color: var(--hop); color: #10200a; }
.phases li:not(.now) button:hover::before { border-color: var(--hop); }
/* stregen fra forrige trin til dette, med en lille pil midt på */
/* stregen mellem to trin: fra cirkel til cirkel, grøn hen til (og med) det aktuelle trin */
.phases li + li::before { content: ""; position: absolute; top: 14px; left: calc(-50% + 15px); right: calc(50% + 15px); height: 2px; border-radius: 2px; background: var(--line2); }
.phases li.past + li::before { background: var(--hop-d); }
.phases li.past + li.now::before { background: linear-gradient(90deg, var(--hop-d), var(--hop)); }

/* bryg-sidens top: kompakt titel + ét kort med processen og næste skridt (Kasper, 1. nov 2026) */
.brew-head { margin-bottom: 12px; }
.brew-head .back { display: inline-block; margin-bottom: 4px; }
.bh-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.bh-title h1 { font-size: clamp(28px, 4.5vw, 38px); margin: 0; }
.bh-meta { margin: 2px 0 0; }
.proc { display: flex; align-items: center; gap: 12px 20px; padding: 4px 0 18px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.proc .phases { flex: 1; margin: 0; justify-content: flex-start; overflow: visible; }
.proc .phases li { flex: 1 1 0; max-width: 132px; min-width: 58px; }
.proc .phases button { gap: 3px; }
.proc .phases button::before { margin-bottom: 3px; }
.ph-name { font-weight: 700; }
.ph-sub { font-size: 11px; font-weight: 500; color: var(--muted); min-height: 1.3em; white-space: nowrap; }
.phases li.now .ph-sub { color: var(--hop); }
.proc-next { flex: none; }
.proc-done { flex: none; font-weight: 700; color: var(--hop); }
@media (max-width: 720px) {
  .proc { flex-direction: column; align-items: stretch; padding: 4px 0 16px; }
  .proc .phases li { max-width: none; }
  .proc-next { width: 100%; }
}

/* ---------- mikroanimationer: kun på det, der er aktuelt eller lige er sket (Kasper, 1. nov 2026) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* den fase, I er i: en ring, der roligt breder sig ud fra cirklen og forsvinder */
  .phases li.now button::before { animation: ph-ring 2.6s cubic-bezier(.2, .6, .3, 1) infinite; }
  @keyframes ph-ring { 0% { box-shadow: 0 0 0 0 rgb(148 193 31 / .55); } 75%, 100% { box-shadow: 0 0 0 11px rgb(148 193 31 / 0); } }
  /* næste skridt-knappen får et lille glimt, når siden vises */
  .proc-next { position: relative; overflow: hidden; }
  .proc-next::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .45) 50%, transparent 65%); transform: translateX(-120%); animation: shine 1.4s .6s ease-out 1; pointer-events: none; }
  @keyframes shine { to { transform: translateX(120%); } }
  /* fremskridt fyldes op */
  .bar i { animation: bar-grow 1s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
  @keyframes bar-grow { from { transform: scaleX(0); } }
  /* RAPT-programmets aktuelle trin */
  .rapt-steps li.now { animation: now-glow 2.6s ease-in-out infinite; }
  @keyframes now-glow { 0%, 100% { background: #1b2a16; } 50% { background: #22341b; } }
  /* ølglassene hældes op, og mens øllen gærer, stiger der bobler */
  .beer-glass .liquid { animation: pour .9s cubic-bezier(.3, .8, .3, 1) both; }
  @keyframes pour { from { transform: translateY(var(--drop)); } }
  .beer-glass .bub { fill: rgb(255 255 255 / .65); animation: bub-rise 3.2s ease-in infinite; }
  @keyframes bub-rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(calc(-1 * var(--rise))); opacity: 0; } }
  /* bryggets egen måling dukker op med et lille hop */
  .pt-now b { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
  @keyframes pop { from { transform: scale(.8); opacity: 0; } }
  /* et trin, der lige er klaret: fluebenet popper */
  .sec-nav a.done::before, .chip-done { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
}

/* kurve: zoomknapper, markering ved træk, linjer der tegnes frem */
.ch-zoom { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.ch-zbtn { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line2); background: transparent; color: var(--muted); font: 600 12.5px var(--font); cursor: pointer; }
.ch-zbtn:hover { color: var(--text); border-color: var(--hop-d); }
.ch-zbtn.on { background: #1b2a16; color: var(--hop); border-color: var(--hop-d); }
.ch-sel { fill: rgb(148 193 31 / .12); stroke: var(--hop-d); stroke-width: 1; }
@media (pointer: fine) { .ch-hit { cursor: crosshair; } }
@media (prefers-reduced-motion: no-preference) {
  .chart-wrap .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .chart-wrap.in-view .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s cubic-bezier(.4, .1, .2, 1); }
  .chart-wrap .ch-target, .chart-wrap .ch-man { opacity: 0; transition: opacity .6s 1.2s; }
  .chart-wrap.in-view .ch-target, .chart-wrap.in-view .ch-man { opacity: 1; }
  .chart-wrap.in-view .ch-target { opacity: .7; }
}
