/* BlisterKompass web app. Same colours as ios/PillSnap/Theme.swift:
   - --accent, --ok, … for text and icons: lifted in dark mode so they stay readable on dark cards,
   - --…-fill for surfaces carrying white text (big buttons, banners): deep in both modes. */

:root {
  --accent-fill: #0B6E8A; --ok-fill: #1E7A44; --warn-fill: #9A5B00; --bad-fill: #B3261E;
  --gray-fill: #636366; --disabled-fill: #AEAEB2;
  --accent: #0B6E8A; --ok: #1E7A44; --warn: #9A5B00; --bad: #B3261E;
  --bg: #F2F2F7; --card: #FFFFFF; --text: #111114; --muted: #5C5C62; --line: rgba(0, 0, 0, .12);
  --r: 22px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #85B7C5; --ok: #83B698; --warn: #CDAD80; --bad: #D58883;
    --bg: #000000; --card: #1C1C1E; --text: #F2F2F7; --muted: #A4A4AB; --line: rgba(255, 255, 255, .16);
    --disabled-fill: #48484A;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 19px/1.35 var(--font); -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
h1, h2, h3, p { margin: 0; }
h1 { font: 700 34px/1.15 var(--round); }
h2 { font: 700 23px/1.2 var(--round); }
h3 { font: 600 18px/1.2 var(--font); }
strong { font-weight: 700; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

.screen {
  max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 14px;
}
.loading { margin: 40vh auto 0; color: var(--muted); text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 14px; }
.row > * { flex: 1 1 0; min-width: 0; }
.tight { gap: 8px; }
.row-start { display: flex; align-items: center; gap: 14px; }
.grow { flex: 1; min-width: 0; }
.bottom { margin-top: auto; padding-top: 6px; }
.top-gap { margin-top: 6px; }
.center { text-align: center; justify-content: center; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.small { font-size: 16px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.with-icon { display: flex; align-items: center; gap: 8px; }
.with-icon .icon { align-self: flex-start; margin-top: .1em; }
.clamp1, .clamp2, .clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { -webkit-line-clamp: 1; } .clamp2 { -webkit-line-clamp: 2; } .clamp3 { -webkit-line-clamp: 3; }
.tone-ok { color: var(--ok); } .tone-warn { color: var(--warn); } .tone-bad { color: var(--bad); } .tone-accent { color: var(--accent); } .tone-muted { color: var(--muted); }

/* Buttons */
.big {
  width: 100%; height: var(--h, 120px); border: 0; border-radius: calc(var(--r) + 6px); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px;
  font: 700 26px/1.1 var(--round); text-align: center;
}
.big .icon { width: clamp(30px, calc(var(--h, 120px) * .32), 64px); height: clamp(30px, calc(var(--h, 120px) * .32), 64px); }
.big .mascot { width: calc(var(--h) * .68); height: calc(var(--h) * .68); margin: -14px 0 -8px; }
.big .icon.big-only { width: clamp(40px, calc(var(--h) * .55), 72px); height: clamp(40px, calc(var(--h) * .55), 72px); }
.big.compact { font-size: 20px; gap: 6px; padding: 6px; }
.big.compact .icon { width: 34px; height: 34px; }
.row.three { gap: 10px; }
/* Illustrated action icons carry their own white frame and replace the word (the title stays the aria-label). */
.icon.pic { object-fit: contain; border-radius: 22%; flex: none; }
.big .icon.pic, .big.compact .icon.pic { width: auto; max-width: 100%; height: calc(var(--h, 120px) * .8); aspect-ratio: 1; }
.tile .icon.pic { width: 92px; height: 92px; }
.big:active:not(:disabled), .tile:active, .day-row:active, .card:is(button):active { transform: scale(.98); }
.fill-accent { background: var(--accent-fill); } .fill-ok { background: var(--ok-fill); } .fill-warn { background: var(--warn-fill); }
.fill-bad { background: var(--bad-fill); } .fill-gray { background: var(--gray-fill); } .fill-disabled { background: var(--disabled-fill); }
.tile {
  height: 120px; border-radius: var(--r); background: var(--card); color: var(--accent);
  border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font: 700 20px/1.15 var(--font); text-align: center;
}
.tile .icon { width: 36px; height: 36px; }
.link { background: none; border: 0; color: var(--accent); font: 600 20px var(--font); padding: 12px; align-self: center; min-height: 48px; }
.round {
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--card); color: var(--accent);
  display: grid; place-items: center; flex: none;
}
.round .icon { width: 28px; height: 28px; }

.backbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px 12px 12px; border: 0; border-radius: 999px;
  background: var(--card); color: var(--accent); font: 600 20px var(--font); min-height: 52px;
}
.bar-title { font: 700 20px var(--round); color: var(--muted); text-align: right; }
.examples-title { font-size: 28px; overflow-wrap: anywhere; }

.banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: var(--r);
  color: #fff; font: 700 23px/1.15 var(--round); text-align: center;
}
.banner .icon { width: 28px; height: 28px; }
.banner.with-mascot { justify-content: flex-start; padding-left: 8px; text-align: left; }
.banner .mascot { width: 64px; height: 64px; margin: -14px 0; flex: none; }

.card { background: var(--card); border-radius: var(--r); padding: 12px; border: 0; color: var(--text); text-align: left; }
.card.mini { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; min-width: 0; }
.card.mini strong { font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.removable { position: relative; }
.remove {
  position: absolute; top: -6px; right: -6px; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: var(--bad-fill); color: #fff; display: grid; place-items: center;
}
.remove .icon { width: 18px; height: 18px; }

div.info { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--card); color: var(--text); }
.info-icon { width: 46px; display: grid; place-items: center; color: var(--accent); flex: none; }
.info.tone-warn .info-icon { color: var(--warn); } .info.tone-bad .info-icon { color: var(--bad); } .info.tone-ok .info-icon { color: var(--ok); }
.info-icon .icon { width: 30px; height: 30px; }
.info-title { font: 600 16px var(--font); color: var(--muted); }
.info-value { font: 600 20px/1.25 var(--font); }

.tip { display: flex; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--card); align-items: flex-start; }
.tip .icon { width: 28px; height: 28px; color: var(--warn); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--card); font: 600 17px var(--font); }
.chip.lg { font-size: 20px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); flex: none; }

/* Pills */
.pilltile { width: var(--box); height: var(--box); display: grid; place-items: center; flex: none; }
.pilltile .pill { max-width: 100%; max-height: 100%; height: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .2)); overflow: visible; }
.pilltile.bgtile { width: calc(var(--box) + 8px); height: calc(var(--box) + 8px); background: var(--bg); border-radius: 16px; }
.pilltile.card { background: var(--card); border-radius: 18px; padding: 0; }
.formtile { color: var(--muted); }

/* Home */
.privacy { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font: 600 15px var(--font); }
.privacy .icon { width: 18px; height: 18px; }
/* Home top row: privacy note left, the voice advisor (bonus, a separate web app) top right. */
.topbar { display: flex; align-items: center; gap: 10px; }
.topbar .privacy { flex: 1; min-width: 0; justify-content: flex-start; text-align: left; }
.voice-btn { flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 44px; min-height: 44px; padding: 5px 10px; border: 2px solid var(--accent); border-radius: 16px; background: var(--card); color: var(--accent); font: 700 14px/1.1 var(--round); cursor: pointer; }
.voice-btn .icon { width: 22px; height: 22px; }
a.big { text-decoration: none; box-sizing: border-box; }
.onboarding { display: flex; flex-direction: column; align-items: stretch; gap: 18px; text-align: center; }
.hero-icon { color: var(--accent); display: flex; justify-content: center; padding-top: 8px; }
.hero-icon .mascot { width: min(60vw, 240px); height: auto; }
.lead { font-size: 21px; }
.onboarding .tip { text-align: left; }
.plan-hint {
  display: flex; gap: 14px; align-items: center; width: 100%; padding: 14px; border: 0; border-radius: var(--r);
  background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.plan-hint img { width: 132px; height: auto; flex: none; border-radius: 6px; border: 1px solid rgba(128, 128, 128, .35); background: #fff; }
.plan-hint-text { display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.plan-hint-zoom { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--accent); }
.plan-hint-zoom .icon { width: 18px; height: 18px; }
dialog.plan-hint-popup { max-height: 94dvh; overflow-y: auto; }
dialog.plan-hint-popup h2 { text-align: left; }
.popup-close { align-self: flex-end; display: inline-flex; align-items: center; gap: 6px; }
.plan-hint-page { width: 100%; height: auto; border-radius: 8px; border: 1px solid rgba(128, 128, 128, .35); background: #fff; }
.plan-hint-code { width: 220px; height: auto; align-self: center; border-radius: 8px; image-rendering: pixelated; }
.plan-hint-note { font-size: 15px; color: var(--muted); }

.install {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px; border-radius: var(--r);
  background: var(--accent-fill); color: #fff;
}
.install-text { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.install-text span { font-size: 17px; opacity: .92; }
.install-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; border: 0; border-radius: 16px;
  background: #fff; color: #0B6E8A; font: 700 19px var(--font);
}
.install .link { color: #fff; font-size: 17px; padding: 8px 10px; min-height: 44px; }
.inline-icon { display: inline-flex; vertical-align: -0.25em; }

.day { display: flex; flex-direction: column; gap: 10px; }
.day-head { display: flex; align-items: center; gap: 10px; }
.day-head h2 { font-size: 25px; }
.day-head .muted { font-size: 16px; margin-right: auto; }
.day-section { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.day-section.now { gap: 10px; padding-top: 0; }
.pill-label {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; color: #fff; border-radius: 999px;
  padding: 6px 14px; font: 700 17px var(--round);
}
.now .pill-label { font-size: 22px; padding: 10px 16px; }
.day-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; border-radius: 16px;
  background: var(--card); color: var(--text); text-align: left;
}
.day-row.due { gap: 16px; padding: 12px; border-radius: var(--r); }
.day-text { flex: 1; min-width: 0; }
.day-name { font: 700 21px/1.2 var(--round); overflow: hidden; text-overflow: ellipsis; }
.day-row.due .day-name { font-size: 28px; }
.day-name.small { font: 600 17px/1.25 var(--font); }
.day-count { font-weight: 600; font-size: 17px; }
.day-row.due .day-count, .day-row.due .muted { font-size: 20px; }

/* Analyzing */
.scanbox { position: relative; height: 340px; border-radius: var(--r); overflow: hidden; background: var(--card); }
.photo-fill { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanline {
  position: absolute; left: 0; right: 0; top: 0; height: 60px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--accent) 60%, transparent));
  animation: scan 1s ease-in-out infinite alternate;
}
@keyframes scan { to { transform: translateY(280px); } }
.analyzing-status { display: flex; align-items: center; justify-content: center; gap: 14px; font: 600 21px var(--font); }
.analyzing-status.asking { justify-content: flex-start; font: 700 23px var(--round); }
.analyzing-status .icon { width: 28px; height: 28px; color: var(--accent); }
.analyzing-status .mascot.scanning { width: 76px; height: 76px; margin: -16px 0; flex: none; animation: scanpulse 1.1s ease-in-out infinite; }
@keyframes scanpulse { 0%, 100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.06); filter: brightness(1.2); } }
.spinner {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  border: 4px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.seen { display: flex; flex-direction: column; gap: 10px; }
.field {
  width: 100%; font: 600 24px var(--font); padding: 16px; border-radius: var(--r); border: 2px solid var(--accent);
  background: var(--card); color: var(--text); min-height: 60px;
}
.field::placeholder { color: var(--muted); font-weight: 400; }

/* Plan import */
.lookup { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.lookup-pic { width: 56px; height: 56px; display: grid; place-items: center; background: var(--bg); border-radius: 12px; flex: none; }
.lookup-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lookup-text strong { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaflet-pick .big { font-size: 19px; text-decoration: none; box-sizing: border-box; }
.leaflet-pick .big .icon { width: 28px; height: 28px; }
.leaflet-pick .link { font-size: 16px; padding: 4px 8px; min-height: 44px; display: flex; align-items: center; }
.mark .icon { width: 26px; height: 26px; }
h2.with-icon .icon { color: var(--accent); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.grid3.tight, .grid4.tight { gap: 8px; }

/* Results */
.compare-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.equal .icon { width: 30px; height: 30px; }
.photo-sq { width: 112px; height: 112px; object-fit: cover; border-radius: 18px; display: block; }
.photo-sm { width: 80px; height: 80px; object-fit: cover; border-radius: 14px; flex: none; }
.photo-wide { width: 100%; height: 220px; object-fit: cover; border-radius: var(--r); display: block; }
.photo-strip { width: 100%; height: 90px; object-fit: cover; border-radius: var(--r); display: block; }
.med-title { text-align: center; }
.med-title h1 { font-size: 36px; overflow-wrap: anywhere; }
.strength { font: 600 24px var(--font); }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border-radius: 16px;
  background: var(--card); color: #fff; text-align: center;
}
.slot.off { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.slot .icon { width: 28px; height: 28px; }
.slot-label { font: 600 16px var(--font); }
.slot-amount { font: 700 28px var(--round); }
.slot-pills { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; align-content: center; gap: 4px; max-width: 72px; min-height: 34px; }
.tile-pill { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.compare { display: flex; align-items: flex-start; gap: 8px; }
.side { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.side .photo-sq { width: 120px; height: 120px; }
.arrows { padding-top: 64px; }
.arrows .icon { width: 30px; height: 30px; }
.compare-box { background: color-mix(in srgb, var(--warn) 14%, var(--card)); display: flex; flex-direction: column; gap: 10px; }
.unknown { width: 96px; height: 96px; display: grid; place-items: center; }
.choose-head { display: flex; align-items: center; gap: 14px; }
.question { display: flex; flex-direction: column; gap: 10px; }
.question .icon { color: var(--accent); }
.answer {
  min-height: 56px; border: 0; border-radius: 16px; padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--accent); font: 700 20px var(--font);
}
.medtile { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 160px; justify-content: center; text-align: center; }
.medtile strong { font-size: 20px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.medtile.compact { min-height: 96px; padding: 8px; }
.medtile.compact strong { font-size: 16px; }
.confirm { display: flex; align-items: center; gap: 12px; width: 100%; font: 600 19px var(--font); padding: 14px; min-height: 64px; }
.confirm .icon { width: 28px; height: 28px; color: var(--accent); }

/* Picker */
.step { display: flex; align-items: center; gap: 12px; }
.step-n {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-fill); color: #fff; font: 700 21px var(--round); flex: none;
}
.color { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 80px; border: 0; background: none; padding: 4px 0; font: 600 16px var(--font); }
.dot { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: rgba(0, 0, 0, .6); }
.color.on .dot { outline: 5px solid var(--accent); outline-offset: 3px; }
.dot .icon { width: 26px; height: 26px; }
.shapes { display: flex; gap: 8px; }
.shape {
  flex: 1 1 0; min-width: 0; min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 16px; background: var(--card); font: 600 15px var(--font); padding: 4px 2px;
}
.shape.on { box-shadow: inset 0 0 0 4px var(--accent); }

/* Typing the plan */
.field.big { font-size: 24px; }
.suggest { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 16px; }
.suggest > div { flex: 1; min-width: 0; }
.plus { color: var(--accent); } .plus .icon { width: 34px; height: 34px; }
.slot-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 2px; border: 0; border-radius: 16px;
  background: var(--card); font: 600 16px var(--font);
}
.slot-btn.on { color: #fff; }
.slot-btn .icon { width: 28px; height: 28px; }
.choice {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 8px; border: 0; border-radius: 16px; min-height: 60px;
  background: var(--card); color: var(--accent); font: 600 19px var(--font);
}
.choice.on { background: var(--accent-fill); color: #fff; }

/* Examples */
.example { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; }
.example img { width: 100%; height: 130px; object-fit: contain; background: #fff; border-radius: 10px; display: block; }
.example img.pixel { image-rendering: pixelated; }
.example span { font: 600 16px/1.25 var(--font); text-align: center; }

/* Bottom sheet */
dialog.sheet {
  margin: auto auto 0; width: 100%; max-width: 560px; border: 0; border-radius: 28px 28px 0 0;
  padding: 24px 16px max(16px, env(safe-area-inset-bottom)); background: var(--bg); color: var(--text);
  display: flex; flex-direction: column; gap: 14px; animation: up .22s ease-out;
}
dialog.sheet:not([open]) { display: none; }
dialog.sheet h2 { text-align: center; font-size: 28px; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .4); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 360px) {
  .big { font-size: 22px; }
  .big.compact { font-size: 17px; }
  .tile { font-size: 18px; }
  h1 { font-size: 30px; }
}

/* Meal icons are 3:2 (tablet → plate …), wherever a square icon size is set */
svg.icon.wide { width: auto !important; aspect-ratio: 3 / 2; }

/* Plan drucken ------------------------------------------------------------------------------------------------------
   The sheet is laid out in mm (A4 landscape, 297 × 210) and always light: it is paper. On screen it is scaled with
   --scale (set from the box width); printed, it is the page itself. */
.ps-sheet {
  width: 297mm; height: 210mm; padding: 7mm 9mm 6mm; background: #fff; color: #111; color-scheme: light;
  font: 12pt/1.2 Arial, "Helvetica Neue", Helvetica, sans-serif; overflow: hidden; text-align: left;
  display: flex; flex-direction: column; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
/* Companion sheet after G_plan_review §5: ≥ 12 pt body, 14–18 pt names and doses, nothing below 9 pt, no grey text. */
.ps-head { display: grid; grid-template-columns: 100mm 1fr 46mm; gap: 6mm; align-items: start; padding-bottom: 2.5mm; border-bottom: .5mm solid #111; }
.ps-headbrand { display: flex; gap: 3mm; align-items: flex-start; }
.ps-mascot { width: 17mm; height: 17mm; flex: none; }
.ps-title { font-size: 24pt; font-weight: 700; line-height: 1.05; }
.ps-page { font-size: 13pt; margin-top: 1.5mm; }
.ps-for { display: flex; align-items: flex-end; gap: 2mm; font-size: 12pt; margin-bottom: 1.5mm; }
.ps-write { flex: 1; border-bottom: .3mm solid #111; height: 6mm; }
.ps-belongs { font-weight: 700; margin-bottom: 1mm; }
.ps-nocode { border: .4mm solid #111; padding: 2mm; font-size: 10pt; }
.ps-table { width: 100%; border-collapse: collapse; margin-top: 3mm; table-layout: fixed; }
.ps-table th, .ps-table td { border: .3mm solid #111; padding: 1mm 1.6mm; vertical-align: middle; }
.ps-table th { font-size: 12pt; font-weight: 700; text-align: left; background: #fff; }
.ps-table th.ps-slot { font-size: 10pt; padding: .6mm .3mm; text-align: center; line-height: 1; }
.ps-slot-ic { display: block; } .ps-slot-ic .icon { width: 6mm; height: 6mm; }
/* no automatic hyphens: a broken word ("Levothyroxin-Na-trium") is harder to read than a wrapped line */
.ps-table td { overflow-wrap: break-word; hyphens: manual; -webkit-hyphens: manual; }
.ps-table td.ps-zero { font-weight: 400; }
/* German hyphenation (the sheet is lang="de") where single long words meet narrow columns, so a word is split at a
   syllable ("Acetylsalicyl-säure", "Nebenhöhlen-entzündung") instead of anywhere, at full size (no smaller "long" variant). */
.ps-table td.ps-reason, .ps-table .ps-sub, .ps-table .ps-look-main { hyphens: auto; -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 3; -webkit-hyphenate-limit-before: 3; -webkit-hyphenate-limit-after: 3; }   /* never "Na-trium" */
.ps-table .ps-center { text-align: center; }
.ps-c-nr { width: 12mm; } .ps-c-pic { width: 25mm; } .ps-c-big { width: 29mm; } .ps-c-desc { width: 31mm; } .ps-c-med { width: 45mm; }
.ps-c-n { width: 17mm; } .ps-c-reason { width: 31mm; }   /* the rest goes to Hinweise (auto width) */
.ps-table th.ps-th-pic { line-height: 1.05; } .ps-th-pic small { display: block; font-size: 9.5pt; font-weight: 400; }
.ps-table td.ps-big { text-align: center; padding: 1mm; }
.ps-big > svg { display: inline-block; vertical-align: middle; }
.ps-alike { margin-top: .8mm; font-weight: 700; }
/* labels never stick out of their cell: they may wrap inside it */
.ps-table .ps-meal, .ps-table .ps-day-tag { max-width: 100%; box-sizing: border-box; }
.ps-table .ps-meal .icon { flex: none; }
.ps-table .ps-meal { font-size: 9.5pt; padding: .3mm 1.5mm; white-space: normal; }   /* may wrap inside a narrow Hinweise cell */
.ps-day-tag { display: inline-block; margin-top: .8mm; padding: .4mm 2mm; border-radius: 1.5mm; background: #111; color: #fff;
  font-size: 12pt; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.ps-table tbody tr { height: 15mm; }
.ps-nr { text-align: center; font-size: 18pt; font-weight: 700; white-space: nowrap; }
.ps-table td.ps-pic { text-align: center; padding: 1mm; }
.ps-pic > svg { display: inline-block; vertical-align: middle; }
.ps-scale { font-size: 9pt; line-height: 1.1; margin-top: .6mm; }
.ps-desc { font-size: 11pt; line-height: 1.15; overflow: hidden; padding-block: .6mm; }
.ps-look-main { font-size: 12.5pt; font-weight: 700; }
.ps-size { font-size: 10pt; }
.ps-src { font-size: 9pt; }
.ps-sub { font-size: 14pt; font-weight: 700; } .ps-str { font-size: 12pt; }
.ps-brand { font-size: 11pt; }
.ps-when { font-size: 12pt; font-weight: 700; margin-top: .5mm; }
.ps-n { text-align: center; font-size: 18pt; font-weight: 700; }
.ps-unit { font-size: 11pt; font-weight: 400; }
.ps-free { text-align: center; font-size: 13pt; font-weight: 700; }
.ps-reason { font-size: 12pt; font-weight: 700; } .ps-note { font-size: 12pt; }
.ps-sec td { font-size: 13pt; font-weight: 700; padding: 1.5mm 2mm; height: auto; }
.ps-foot { margin-top: auto; border-top: .4mm solid #111; padding-top: 1.5mm; font-size: 10pt; }
.ps-foot p { margin: 0 0 .8mm; }
.ps-bar-row { display: flex; align-items: center; gap: 4mm; font-size: 9pt; }
.ps-bar { display: inline-block; width: 50mm; height: 1.6mm; background: #111; flex: none; }
/* meal labels from the Hinweise, colour-coded (white text ≥ 4.5:1; distinct from the time-of-day colours) */
.ps-meal { display: inline-flex; align-items: center; gap: .8mm; margin-bottom: .6mm; padding: .3mm 1.8mm; border-radius: 2.5mm;
  color: #fff; font-size: 10pt; font-weight: 700; white-space: nowrap; }
.ps-meal .icon { width: 3.4mm; height: 4.4mm; }
.ps-meal.m-fasting { background: #0277BD; } .ps-meal.m-before { background: #2E7D32; }
.ps-meal.m-with { background: #C2185B; }    .ps-meal.m-after { background: #6D4C41; }


.ps-preview { position: relative; display: block; width: 100%; aspect-ratio: 297 / 210; overflow: hidden; border-radius: 10px;
  background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); cursor: zoom-in; }
.ps-preview > .ps-sheet { position: absolute; top: 0; left: 0; transform: scale(var(--scale, .3)); transform-origin: 0 0; pointer-events: none; }
.ps-expand { position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; border: 0; padding: 0; cursor: zoom-in; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-fill); color: #fff; }
.privacy.left { justify-content: flex-start; text-align: left; }
.day-meal { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; }
.slot-unit { font-size: .8em; font-weight: 600; }

.ps-zoom { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: transparent; overflow: hidden; }
.ps-zoom::backdrop { background: rgba(0, 0, 0, .88); }
.ps-stage { position: absolute; inset: 0; overflow: hidden; }
/* Centred by position, not by grid: the page is wider than the phone before it is scaled. */
.ps-stage > .ps-sheet { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(var(--scale, .4)); border-radius: 2mm; }
.ps-stage.turn > .ps-sheet { transform: translate(-50%, -50%) rotate(90deg) scale(var(--scale, .4)); }
.ps-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; background: rgba(255, 255, 255, .2); color: #fff; }

.print-root { display: none; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  body > :not(.print-root) { display: none !important; }
  .print-root { display: block; }
  .print-root .ps-sheet { break-after: page; page-break-after: always; }
  .print-root .ps-sheet:last-child { break-after: auto; page-break-after: auto; }
}
