:root {
  --g: #1f5b46; --g2: #2f7d5f; --g3: #174536; --sage: #e4ebdc; --sage2: #f0f4ea; --cream: #fbf7ee; --paper: #fff;
  --ink: #1d2b25; --muted: #6c7b73; --line: #e7eadf; --lemon: #f1c94b; --blush: #f6dcd3; --danger: #c4553d;
  --r: 20px; --shadow: 0 1px 2px rgba(31, 91, 70, .05), 0 8px 24px -12px rgba(31, 91, 70, .18);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: #e9eee3; overflow-x: hidden; }
body { margin: 0; font: 16px/1.45 var(--sans); color: var(--ink); background: var(--cream); min-height: 100dvh; max-width: 560px; margin-inline: auto; position: relative; box-shadow: 0 0 60px rgba(31, 91, 70, .08); overflow-x: hidden; }
body.noscroll { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 26px; line-height: 1.15; } h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; } h3 { font-size: 16px; } h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--sans); margin: 14px 0 4px; }
p { margin: 0; } a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--g2) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
.ico { display: inline-flex; flex: none; } .ico svg { display: block; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .grow { flex: 1; min-width: 0; }
.pos { color: var(--g2); } .neg { color: var(--danger); }
small { font-size: 13px; }

/* Code Snippet Inline Pill */
.code-pill {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: var(--paper, #fff);
  border: 1.5px solid var(--line, #ccd7c4);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 12.5px;
  color: var(--g, #1f5b46);
  font-weight: 700;
  vertical-align: baseline;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* shell */
#app { min-height: 100dvh; padding-bottom: 92px; overflow-x: hidden; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--cream) 92%, transparent); backdrop-filter: blur(14px); gap: 8px; max-width: 100%; box-sizing: border-box; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; overflow: hidden; }
.brand > div { min-width: 0; overflow: hidden; }
.brand b { font-family: var(--serif); font-size: 16px; display: block; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: var(--muted); font-size: 11.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-right-slot { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pill-short { display: none; }
.sync-short { display: none; }
.mono { width: 36px; height: 36px; border-radius: 50%; background: var(--g); color: var(--cream); display: grid; place-items: center; font: 700 14px var(--serif); letter-spacing: .02em; box-shadow: inset 0 0 0 2px var(--lemon); flex-shrink: 0; }
.lang { display: flex; background: var(--sage); border-radius: 999px; padding: 3px; }
.lang button { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--g); letter-spacing: .04em; }
.lang button.on { background: var(--g); color: var(--cream); }
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(560px, 100%); display: flex; justify-content: space-around; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); z-index: 30; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 14px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.nav a.on { color: var(--g); background: var(--sage2); }

@media (max-width: 520px) {
  .top { padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .brand .mono { width: 32px; height: 32px; font-size: 12px; }
  .brand b { font-size: 14px; max-width: 120px; }
  .brand small { display: none; }
  .header-right-slot { gap: 4px; }
  .pill-full { display: none; }
  .pill-short { display: inline; }
  .sync-status-badge { padding: 3px 6px !important; font-size: 10px !important; }
  .sync-full { display: none; }
  .sync-short { display: inline; }
  .chip { padding: 4px 7px !important; font-size: 11px !important; }
}

.page { padding: 6px 16px 24px; display: flex; flex-direction: column; gap: 14px; animation: in .28s ease both; box-sizing: border-box; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
.page-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding-top: 4px; }
.page-h h1 { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; } .stack-sm { display: flex; flex-direction: column; gap: 10px; }

/* hero */
.hero { position: relative; overflow: hidden; background: var(--g); color: var(--cream); border-radius: 28px; padding: 22px 22px 24px; box-shadow: var(--shadow); }
.hero small { opacity: .8; font-size: 14px; } .hero h1 { font-size: 34px; margin: 2px 0 10px; }
.hero .quote { font-family: var(--serif); font-style: italic; font-size: 15.5px; max-width: 78%; opacity: .92; }
.hero-leaf { position: absolute; right: -14px; bottom: -22px; color: var(--lemon); opacity: .28; transform: rotate(-12deg); }
.hero.small { padding: 18px 22px; } .hero.small h1 { font-size: 30px; margin-bottom: 4px; } .hero.small .quote { font-style: normal; font-family: var(--sans); }

/* cards & rows */
.card { background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.card > .row:first-of-type, .card-h + .row { border-top: 0; }
.card-row { background: var(--paper); border-radius: 18px; padding: 12px 14px; border: 0; box-shadow: var(--shadow); }
.list { display: flex; flex-direction: column; gap: 10px; }
.row .right { text-align: right; display: flex; flex-direction: column; } .row b { font-weight: 650; } .row small { display: block; }
.row.pick { width: 100%; text-align: left; } .row.pick:active { background: var(--sage2); }
.avatar { border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; flex: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--paper); border-radius: 18px; padding: 12px 8px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font: 700 24px var(--serif); color: var(--g); } .stat small { color: var(--muted); font-size: 12px; line-height: 1.2; display: block; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px; border-radius: 18px; background: var(--sage); color: var(--g); font-size: 12px; font-weight: 700; text-align: center; line-height: 1.15; }
.tile:nth-child(2) { background: var(--blush); color: #7a3f2e; } .tile:nth-child(3) { background: #f7edbc; color: #6b5412; } .tile:nth-child(4) { background: #dfe8f0; color: #2e4a63; }
.banner { display: flex; gap: 12px; align-items: center; background: #26323d; color: #fff; padding: 14px 16px; border-radius: 18px; } .banner small { display: block; opacity: .75; }
.mythcard .myth { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; } .tag { flex: none; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 9px; border-radius: 99px; margin-top: 2px; }
.tag.x { background: var(--blush); color: #8a3a27; } .tag.v { background: var(--sage); color: var(--g); }
.tipcard { background: linear-gradient(160deg, #f7edbc, #fbf7ee); } .tipcard b { font: 700 17px var(--serif); }
.tool { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.tool > div:nth-child(2) { flex: 1; } .tool b { display: block; font-family: var(--serif); font-size: 17px; } .tool small { color: var(--muted); }
.tool > .ico:last-child { transform: rotate(180deg); color: var(--muted); }
.tool-i { width: 50px; height: 50px; border-radius: 16px; background: var(--sage); color: var(--g); display: grid; place-items: center; }
.tool:nth-child(2) .tool-i { background: #f7edbc; color: #6b5412; } .tool:nth-child(3) .tool-i { background: var(--blush); color: #7a3f2e; } .tool:nth-child(4) .tool-i { background: #dfe8f0; color: #2e4a63; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: var(--g); color: var(--cream); font-weight: 700; font-size: 15px; transition: transform .1s, background .15s; text-align: center; }
.btn:active { transform: scale(.97); } .btn:hover { background: var(--g3); }
.btn.small { padding: 8px 14px; font-size: 13.5px; } .btn.block { width: 100%; }
.btn.ghost { background: var(--sage); color: var(--g); } .btn.ghost:hover { background: #d8e3cd; }
.btn.danger { background: #fbe9e4; color: var(--danger); } .btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); flex: none; font-size: 20px; font-weight: 700; }
.icon-btn:hover { background: var(--sage2); } .icon-btn.tint { background: var(--sage); color: var(--g); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; } .chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--sage2); color: var(--g); font-weight: 650; font-size: 14px; border: 1.5px solid transparent; white-space: nowrap; }
.chip.on { background: var(--g); color: var(--cream); }
.tabs, .days { display: flex; gap: 4px; background: var(--sage); border-radius: 16px; padding: 4px; }
.tabs button, .days button { flex: 1; padding: 9px 4px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--g); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tabs button.on, .days button.on { background: var(--paper); box-shadow: 0 2px 8px rgba(31, 91, 70, .14); }
.days button { font-size: 13px; } .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--g2); display: block; }
.field { display: flex; flex-direction: column; gap: 6px; } .field > span { font-size: 13px; font-weight: 650; color: var(--muted); }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); outline: none; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--g2); }
textarea { resize: vertical; } input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--g); flex: none; }
.form { display: flex; flex-direction: column; gap: 14px; } .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two > .btn, .two > .field { min-width: 0; }
.search { position: relative; } .search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); } .search input { padding-left: 42px; border-radius: 999px; }
.mini { width: 110px; padding: 8px 12px; text-align: right; } .row-sm { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.inline { display: flex; gap: 10px; } .inline input { flex: 1; }
.check { display: flex; align-items: center; gap: 12px; padding: 8px 0; }

/* kpis, ring, bars */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--sage2); border-radius: 14px; padding: 10px 10px 8px; display: flex; flex-direction: column; } .kpi small { color: var(--muted); font-size: 11.5px; line-height: 1.15; }
.kpi b { font: 700 20px var(--serif); line-height: 1.2; margin-top: 2px; } .kpi em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.kpi.hi { background: var(--g); color: var(--cream); } .kpi.hi small, .kpi.hi em { color: color-mix(in srgb, var(--cream) 78%, transparent); }
.ring { position: relative; flex: none; } .ring-t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; } .ring-t b { font: 700 20px var(--serif); } .ring-t small { color: var(--muted); font-size: 11.5px; }
.totals { flex-direction: row; align-items: center; gap: 16px; }
.mb { margin: 2px 0 8px; } .mb-h { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; } .mb-h span { color: var(--muted); }
.mb-bar { height: 7px; background: var(--sage); border-radius: 9px; overflow: hidden; margin-top: 4px; } .mb-bar i { display: block; height: 100%; border-radius: 9px; background: var(--g2); transition: width .3s; }
.mb-bar i.c { background: var(--lemon); } .mb-bar i.f { background: #e59a86; }
.chart { width: 100%; height: auto; } .ct { font: 10.5px var(--sans); fill: var(--muted); } .ct.b { font-weight: 700; fill: var(--g); font-size: 12px; stroke: #fff; stroke-width: 4px; paint-order: stroke; stroke-linejoin: round; }

/* client / plan */
.chead { display: flex; align-items: center; gap: 10px; } .chead h1 { font-size: 22px; }
.plan-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.kc { display: flex; align-items: center; gap: 4px; } .kc b { font: 700 32px var(--serif); color: var(--g); } .kc .icon-btn { background: var(--sage); width: 34px; height: 34px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .actions .btn { padding-inline: 10px; }
.actions-sm { display: flex; gap: 6px; align-items: center; }
.days button { text-transform: capitalize; }
.meal .row.item { padding: 7px 0; } .meal .item small { margin-top: 0; }
.step { display: flex; align-items: center; gap: 4px; } .step button { width: 30px; height: 30px; border-radius: 50%; background: var(--sage); color: var(--g); font-weight: 800; font-size: 18px; line-height: 1; }
.step input { width: 58px; padding: 6px 4px; text-align: center; border-radius: 10px; -moz-appearance: textfield; } .step span { font-size: 13px; color: var(--muted); margin-right: 2px; }
.addfood { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 14px; border: 1.5px dashed #c8d4bd; color: var(--g2); font-weight: 700; font-size: 14px; }
.addfood:hover { background: var(--sage2); }
.empty { text-align: center; padding: 34px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--g2); } .empty h3 { font-size: 20px; color: var(--ink); } .empty p { color: var(--muted); max-width: 300px; }
.meal-h { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; } .meal-h b { flex: 1; font-family: var(--serif); font-size: 16.5px; }
.tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #c8d4bd; display: grid; place-items: center; color: #fff; flex: none; transition: all .15s; }
.meal.done .tick { background: var(--g2); border-color: var(--g2); } .meal.done { background: var(--sage2); } .meal.done .ro { opacity: .65; }
.row.ro { padding: 5px 0 5px 40px; border-top: 0; font-size: 15px; }
.glasses { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; } .glasses button { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; background: var(--sage2); color: #b9c9b0; transition: all .15s; } .glasses button.on { background: #dcebf5; color: #3a86b8; }
.note { flex-direction: row; gap: 12px; align-items: flex-start; background: #f7edbc; }
.tipline { display: flex; gap: 8px; align-items: flex-start; background: var(--sage2); padding: 10px 12px; border-radius: 14px; color: var(--g); } .tipline .ico { margin-top: 2px; }

/* scan & cards */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px; border-radius: 24px; border: 2px dashed #b9c9b0; background: var(--sage2); color: var(--g); } .drop small { color: var(--muted); }
.scan-prev { display: flex; flex-direction: column; gap: 10px; } .scan-prev img { width: 100%; max-height: 340px; object-fit: cover; border-radius: 22px; }
.err { color: var(--danger); font-size: 14px; word-break: break-word; } .setup { align-items: flex-start; background: linear-gradient(160deg, #dfe8f0, #fbf7ee); color: #2e4a63; } .setup h3 { color: var(--ink); }
.spin { width: 16px; height: 16px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: sp .8s linear infinite; } @keyframes sp { to { transform: rotate(360deg); } }
.cv-wrap { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); } .card-cv { width: 100%; height: auto; display: block; }

/* sheet & toast */
.sheet-back { position: fixed; inset: 0; background: rgba(20, 35, 28, .45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s both; }
.sheet { width: min(560px, 100%); max-height: 92dvh; background: var(--cream); border-radius: 28px 28px 0 0; display: flex; flex-direction: column; animation: up .28s cubic-bezier(.2, .8, .2, 1) both; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 6px 22px; } .sheet-body { padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); overflow: auto; display: flex; flex-direction: column; gap: 12px; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(40px); opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); background: var(--g3); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { padding-top: 8px; }
.kv-dev-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 0 20px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.78;
  text-align: center;
}
.kv-dev-badge a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  transition: opacity .15s, color .15s;
}
.kv-dev-badge a:hover {
  color: var(--g);
  text-decoration: underline;
  opacity: 1;
}
.kv-dev-badge .kv-logo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g2);
  display: inline-block;
}

/* Official K&V Systems Brand Footer */
.kv-brand-footer {
  margin-top: 24px;
  padding: 16px 12px;
  text-align: center;
  border-top: 1px solid var(--line, #e7eadf);
}
.kv-brand-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted, #6c7b73);
}
.kv-brand-name {
  font-weight: 700;
  color: var(--ink, #1d2b25);
}
.kv-sep {
  opacity: 0.5;
}
.kv-brand-link {
  color: var(--g, #1f5b46);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.kv-brand-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Sync Badge */
.sync-status-badge {
  transition: all 0.2s ease;
}
.sync-status-badge:hover {
  filter: brightness(0.95);
}

/* Responsive Adaptive Navigation: Mobile Bottom Bar vs Tablet/Desktop Sidebar (Rule 6) */
.desktop-sidebar {
  display: none;
}

@media (min-width: 768px) {
  body {
    max-width: 100% !important;
    margin: 0 !important;
    background: #f4f6f0;
    display: flex;
    flex-direction: row;
    min-height: 100vh;
  }
  #app {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 100vh;
    padding-bottom: 0;
  }
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    background: var(--paper, #fff);
    border-right: 1px solid var(--line, #e7eadf);
    padding: 20px 14px;
    flex: none;
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
    z-index: 25;
  }
  .desktop-sidebar .brand {
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line, #e7eadf);
  }
  .desktop-sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
  }
  .desktop-sidebar .sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--muted, #6c7b73);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s;
  }
  .desktop-sidebar .sidebar-nav a:hover {
    background: var(--sage2, #f0f4ea);
    color: var(--g, #1f5b46);
  }
  .desktop-sidebar .sidebar-nav a.on {
    background: var(--sage, #e4ebdc);
    color: var(--g, #1f5b46);
    font-weight: 700;
  }
  .desktop-sidebar .sidebar-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line, #e7eadf);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .app-main-wrap {
    flex: 1;
    min-width: 0;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
  }
  /* Hide fixed mobile bottom nav on desktop */
  .nav {
    display: none !important;
  }
}

/* print */
#print-area { display: none; }
@media print {
  html, body { background: #fff !important; box-shadow: none; max-width: none; }
  #app, #toast, .sheet-back { display: none !important; }
  #print-area { display: block; font: 12px/1.4 var(--sans); color: #111; padding: 6mm; }
  .p-head { display: flex; justify-content: space-between; border-bottom: 2px solid var(--g); padding-bottom: 8px; margin-bottom: 10px; }
  .p-head h1 { color: var(--g); font-size: 20px; } .p-client { text-align: right; }
  .p-day { width: 100%; border-collapse: collapse; margin-bottom: 8px; break-inside: avoid; }
  .p-day th { background: var(--g); color: #fff; text-align: left; padding: 4px 8px; font-family: var(--serif); -webkit-print-color-adjust: exact; print-color-adjust: exact; } .p-day th:last-child { text-align: right; }
  .p-day td { padding: 3px 8px; border-bottom: 1px solid #ddd; vertical-align: top; } .p-day .pm { width: 22%; font-weight: 700; color: var(--g); } .p-day .pk { text-align: right; width: 12%; white-space: nowrap; }
  .p-note { margin-top: 8px; padding: 8px; background: #f7edbc; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
