@charset "UTF-8";
@font-face {
  font-family: "Rubik Wordmark";
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/rubik-wordmark.woff2") format("woff2");
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/rubik-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/rubik-approx.woff2") format("woff2");
  unicode-range: U+2248;
}
:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --paper: #fff;
  --ink: #19261f;
  --muted: #59675e;
  --line: #dce2d9;
  --control: #eef1eb;
  --soft: #e7f1e5;
  --accent: #21694e;
  --accent-on: #fff;
  --ring: #34805b;
  --track: #e4ebe1;
  --glass: rgb(246 247 242 / .97);
  --cover: #d1ebcb;
  --cover-ink: #143d2e;
  --error: #9d3127;
  font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
:root.tg-dark {
  color-scheme: dark;
  --bg: #121915;
  --paper: #1c2620;
  --ink: #eff5ec;
  --muted: #b0beb1;
  --line: #37433b;
  --control: #29352c;
  --soft: #293f32;
  --accent: #a0dab2;
  --accent-on: #13261c;
  --ring: #9bccaa;
  --track: #37463b;
  --glass: rgb(18 25 21 / .97);
  --cover: #244b39;
  --cover-ink: #e1f2d9;
  --error: #ffaba0;
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
body { min-height: 100vh; line-height: 1.42; }
[hidden] { display: none !important; }
.wrap { width: min(1144px, calc(100% - 96px)); margin-inline: auto; }
h1, h2, h3 { font-weight: 600; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(36px, 4vw, 54px); font-weight: 660; letter-spacing: -.055em; }
h2 { font-size: clamp(23px, 2.15vw, 29px); letter-spacing: -.04em; }
h3 { font-size: 21px; letter-spacing: -.025em; }
button, input, textarea { font: inherit; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { border: 0; border-radius: 13px; background: var(--control); cursor: pointer; font-weight: 600; padding: 10px 17px; min-height: 44px; }
button:disabled { cursor: default; opacity: .5; }
button:not(:disabled):active { transform: scale(.98); }
a { color: var(--accent); }
:where(button,a,summary,input,textarea):focus-visible, .file-zone:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.mast { background: var(--bg); border-bottom: 1px solid var(--line); }
.mast-inner { min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { width: fit-content; display: inline-flex; gap: 9px; align-items: center; min-height: 44px; color: var(--accent); text-decoration: none; }
.brand-name { font: italic 800 29px/1.1 "Rubik Wordmark", "Rubik", sans-serif; letter-spacing: -.045em; word-spacing: .065em; white-space: nowrap; }
.brand-mark {
  flex: none;
  width: 37px;
  height: 37px;
  background-color: currentColor;
  -webkit-mask: url("/do-ukusa-logo.png?v=du") center / contain no-repeat;
  mask: url("/do-ukusa-logo.png?v=du") center / contain no-repeat;
}
@media (forced-colors: active) { .brand-mark { forced-color-adjust: none; background-color: LinkText; } }
nav { display: flex; align-items: center; gap: 4px; }
nav a, .target-button, .cover-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
nav a { padding: 8px 16px; min-height: 44px; border-radius: 24px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
nav a[aria-current] { color: var(--accent); background: var(--soft); font-weight: 600; }
.target-button { justify-self: end; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; font-size: 14px; font-weight: 550; }
.symbol { display: inline-block; position: relative; flex: 0 0 auto; width: 18px; height: 18px; color: inherit; }
.symbol::before, .symbol::after { position: absolute; content: ""; }
.calendar::before { inset: 3px 1px 1px; border: 1.6px solid; border-radius: 4px; }
.calendar::after { inset: 7px 3px auto; border-top: 1.5px solid; }
.clock::before, .target::before { inset: 1px; border: 1.6px solid; border-radius: 50%; }
.clock::after { width: 4px; height: 4px; border-left: 1.5px solid; border-bottom: 1.5px solid; left: 8px; top: 5px; }
.bars::before { bottom: 2px; left: 2px; height: 7px; width: 3px; border-radius: 2px; background: currentColor; box-shadow: 5px -3px currentColor, 10px -7px currentColor; }
.target::after { inset: 5px; border: 1.5px solid; border-radius: 50%; }
.camera::before { inset: 4px 0 1px; border: 1.6px solid; border-radius: 4px; }
.camera::after { width: 5px; height: 5px; border: 1.6px solid; border-radius: 50%; top: 7px; left: 6px; }
main.wrap { padding-block: 40px 72px; }
.today-heading, .pagehead { margin-bottom: 24px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
#date { color: var(--muted); font-size: 15px; }
.overview { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 20px; }
.cover { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 288px; border-radius: 24px; background: var(--cover); color: var(--cover-ink); }
.cover-image { position: absolute; inset: 0 0 0 auto; width: min(44%,calc(100% - 244px)); height: 100%; object-fit: cover; object-position: 75% 50%; clip-path: polygon(23% 0,100% 0,100% 100%,0 100%); z-index: -1; }
.cover-copy { padding: 32px; }
.cover h2 { font-size: clamp(36px,3.75vw,55px); font-weight: 700; line-height: 1.04; letter-spacing: -.045em; }
.cover-actions { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.cover-actions button { border-radius: 24px; padding-inline: 16px; font-size: 14px; }
.photo-action { background: var(--cover-ink); color: var(--cover); }
.manual-action { background: var(--cover); color: var(--cover-ink); border: 1px solid color-mix(in srgb,var(--cover-ink) 35%,var(--cover)); }
.paper, dialog { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 26px 28px; }
.overview-card {
  --macro-protein: var(--ring);
  --macro-fat: #b58444;
  --macro-carb: #8585ac;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  font-variant-numeric: tabular-nums;
}
.overview-card h2 { font-family: inherit; font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
.summary-body { display: grid; gap: 14px; }
.energy-core { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.energy-core > p:first-child { min-width: 0; color: var(--muted); font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.energy-core strong { color: var(--ink); font-size: clamp(34px,3.5vw,48px); font-weight: 650; line-height: 1.05; letter-spacing: -.055em; }
#energyGoal { color: var(--muted); font-size: 13px; line-height: 1.35; }
.overview-card progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--track);
  color: var(--accent);
  accent-color: var(--accent);
}
.overview-card progress::-webkit-progress-bar { background: var(--track); border-radius: inherit; }
.overview-card progress::-webkit-progress-value { background: var(--accent); border-radius: inherit; }
.overview-card progress::-moz-progress-bar { background: var(--accent); border-radius: inherit; }
.overview-card progress[hidden] + .macros { border-top: 1px solid var(--line); padding-top: 14px; }
.macros { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.macros dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.macros dd { color: var(--muted); margin-top: 5px; font-size: 13px; overflow-wrap: anywhere; }
.macros strong { color: var(--ink); font-size: clamp(18px,1.65vw,24px); font-weight: 600; line-height: 1.15; letter-spacing: -.045em; }
.dot { display: inline-block; width: 11px; height: 4px; border-radius: 2px; flex: 0 0 auto; }
.protein { background: var(--macro-protein); } .fat { background: var(--macro-fat); } .carb { background: var(--macro-carb); }
.goal-note { color: var(--muted); font-size: 13px; line-height: 1.4; }
.ledger > div { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; padding: 10px 0; }
.ledger > div + div { border-top: 1px solid var(--line); }
.ledger dd, .meal-kcal { font-variant-numeric: tabular-nums; }
.record, .report-grid { margin-top: 20px; }
.record { background: transparent; border: 0; padding: 8px 0 0; }
.section-top, .date-controls, .report-controls, .actions, .date-end { display: flex; align-items: center; gap: 10px; }
.section-top { justify-content: space-between; flex-wrap: wrap; }
.text-link, .quiet-button { color: var(--accent); font-size: 14px; font-weight: 550; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; text-decoration: none; }
.chevron { width: 7px; height: 7px; border-top: 1.7px solid; border-right: 1.7px solid; transform: rotate(45deg); }
.list-empty, .meal { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 18px; }
.list-empty { position: relative; padding: 24px 0 12px 62px; min-height: 85px; }
.list-empty::before { content: ""; position: absolute; left: 0; top: 20px; width: 46px; height: 46px; border-radius: 15px; background: var(--soft); }
.list-empty::after { content: ""; position: absolute; left: 10px; top: 35px; width: 22px; height: 13px; border: 1.8px solid var(--accent); border-radius: 2px 2px 18px 18px; }
.list-empty strong { display: block; font-size: 16px; font-weight: 600; }
.fine, .date-end, small { color: var(--muted); }
.fine, small { font-size: 14px; line-height: 1.5; }
.list-empty .fine, .section-top .fine, .paper>h2+.fine { margin-top: 5px; }
.meal-line, .ingredients li { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; }
.meal-name { font-weight: 575; font-size: 17px; overflow-wrap: anywhere; }
.meal-kcal { color: var(--accent); font-weight: 610; white-space: nowrap; }
.meal .fine { margin-top: 4px; }
summary { cursor: pointer; color: var(--accent); width: fit-content; padding: 10px 0; font-size: 14px; }
.ingredients { list-style: none; margin: 0; padding: 0; }
.ingredients li { padding-block: 5px; }
.pagehead { align-items: center; }
.history-layout, .report-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 20px; align-items: start; }
.report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.ledger { margin-top: 15px; }
.ledger dt { color: var(--muted); }
.ledger dd { font-size: 18px; font-weight: 610; }
#recentDays { border-top: 1px solid var(--line); padding-top: 19px; margin-top: 16px; }
.day-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.day-links a { color: var(--accent); background: var(--soft); border-radius: 12px; padding: 10px; text-decoration: none; font-size: 14px; }
.day-links a[aria-current] { box-shadow: inset 0 0 0 1px var(--accent); }
.switcher { display: inline-flex; background: var(--control); padding: 3px; border-radius: 15px; }
.switcher button { border-radius: 12px; background: transparent; font-size: 14px; color: var(--muted); min-height: 38px; padding: 7px 15px; }
.switcher button[aria-pressed=true] { background: var(--paper); box-shadow: 0 1px 3px #0002; color: var(--ink); }
.date-controls, .report-controls { flex-wrap: wrap; }
.date-controls { gap: 5px; }
.date-controls button { padding: 0; min-width: 44px; font-size: 20px; }
.date-end { gap: 7px; font-size: 14px; }
input:not([type=file]), textarea { display: block; width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--control); color: var(--ink); font-size: 16px; }
input[type=date] { width: auto; min-height: 44px; }
.report-caption { color: var(--muted); margin-top: 22px; font-weight: 550; }
.plot { display: flex; align-items: stretch; gap: 10px; margin: 18px 0 9px; }
.energy-scale { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: 8px 0 20px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.chart { display: flex; flex: 1; min-width: 0; gap: 5px; align-items: stretch; overflow-x: auto; }
.bar-day { flex: 1; min-width: 0; height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; padding: 0; border-radius: 0; background: transparent; }
.bar-value { width: min(62%,60px); min-height: 3px; border-radius: 5px 5px 0 0; background: var(--ring); }
.bar-day[data-empty] .bar-value { background: transparent; border-top: 2px dashed var(--muted); min-height: 0; height: 2px; }
.bar-label { min-height: 18px; font-size: 12px; line-height: 18px; color: var(--muted); }
.chart button:focus-visible { outline-offset: -3px; }
dialog { width: min(480px,calc(100% - 32px)); color: var(--ink); max-height: 88dvh; overflow: auto; overscroll-behavior: contain; box-shadow: 0 18px 80px #0003; }
body:has(dialog[open]) { overflow: hidden; }
dialog::backdrop { background: #12191773; }
dialog .section-top { flex-wrap: nowrap; }
dialog h2 { font-size: 25px; }
.icon-button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border-radius: 50%; font-weight: 400; font-size: 25px; }
.entry > .switcher { margin-top: 20px; margin-bottom: 12px; }
.file-zone { position: relative; display: grid; justify-items: center; gap: 5px; padding: 20px 12px; border: 1px dashed var(--ring); border-radius: 16px; background: var(--soft); text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.file-zone > .camera { color: var(--accent); margin-bottom: 3px; }
.file-zone input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
#preview { display: block; max-width: 100%; max-height: 170px; margin-top: 10px; border-radius: 12px; }
.field { display: block; margin: 16px 0; font-size: 14px; font-weight: 600; }
.field small { margin-left: 5px; font-weight: 400; }
.field input, .field textarea { font-weight: 400; margin-top: 6px; }
textarea { min-height: 74px; resize: vertical; }
.primary { background: var(--accent); color: var(--accent-on); }
.quiet-button { background: transparent; padding-inline: 0; }
.draft { margin-top: 16px; }
.draft pre { white-space: pre-wrap; font: inherit; line-height: 1.6; }
.actions { flex-wrap: wrap; gap: 7px; }
.notice:not(:empty) { background: var(--soft); border: 1px solid var(--line); color: var(--accent); border-radius: 14px; padding: 12px 16px; margin: 0 0 16px; }
#entryMessage:not(:empty) { margin: 15px 0 0; }
.notice.error:not(:empty), #goalError { color: var(--error); }
.launch-screen { max-width: 650px; padding-block: 80px; }
.launch-screen p { margin-top: 20px; }
.skip,.visually-hidden { position: absolute; clip-path: inset(100%); width: 1px; height: 1px; overflow: hidden; }
.skip:focus { z-index: 9; clip-path: none; width: auto; height: auto; left: 10px; top: 10px; padding: 10px; background: var(--paper); }
.in-telegram body { min-height: var(--tg-viewport-stable-height,100vh); padding-top: max(env(safe-area-inset-top),var(--tg-content-safe-area-inset-top,0px)); padding-left: max(env(safe-area-inset-left),var(--tg-content-safe-area-inset-left,0px)); padding-right: max(env(safe-area-inset-right),var(--tg-content-safe-area-inset-right,0px)); }
@media (hover:hover) {
  button:not(:disabled):hover, nav a:hover, .day-links a:hover { filter: brightness(.95); }
  .text-link:hover, summary:hover { text-decoration: underline; text-underline-offset: 3px; }
  .bar-day:hover .bar-value { background: var(--accent); }
}
@media (max-width:920px) {
  .wrap { width: calc(100% - 44px); }
  .overview { grid-template-columns: 1.2fr 1fr; gap: 16px; }
  .cover-copy, .paper { padding: 20px; }
  .record { padding: 4px 0 0; }
  .mast-inner { gap: 10px; }
  nav a { padding-inline: 12px; }
}
@media (max-width:740px) {
  .wrap { width: calc(100% - 32px); }
  .mast-inner { min-height: 64px; display: flex; justify-content: space-between; }
  .brand { gap: 7px; }
  .brand-name { font-size: 26px; }
  .brand-mark { width: 33px; height: 33px; }
  .target-button { min-height: 44px; padding: 6px 12px; }
  nav { position: fixed; z-index: 3; inset: auto 0 0; justify-content: center; border-top: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(16px); padding: 5px max(12px,env(safe-area-inset-right),var(--tg-content-safe-area-inset-right,0px)) calc(5px + max(env(safe-area-inset-bottom),var(--tg-content-safe-area-inset-bottom,0px))) max(12px,env(safe-area-inset-left),var(--tg-content-safe-area-inset-left,0px)); }
  nav a { flex: 1; max-width: 144px; gap: 5px; flex-direction: column; min-height: 48px; padding: 5px; font-size: 12px; line-height: 1.1; border-radius: 12px; }
  nav a[aria-current] { color: var(--accent); background: transparent; }
  nav a .symbol { isolation: isolate; }
  nav a[aria-current] .symbol { box-shadow: 0 0 0 3px var(--soft); background: var(--soft); border-radius: 5px; }
  main.wrap { padding-top: 24px; padding-bottom: calc(82px + max(env(safe-area-inset-bottom),var(--tg-content-safe-area-inset-bottom,0px))); }
  h1 { font-size: clamp(32px,8.5vw,42px); }
  .today-heading { align-items: baseline; margin-bottom: 16px; }
  #date { font-size: 13px; }
  .overview, .history-layout, .report-grid { grid-template-columns: 1fr; gap: 12px; }
  .cover { min-height: 194px; border-radius: 20px; }
  .cover-copy { padding: 20px; }
  .cover h2 { font-size: clamp(29px,8vw,42px); }
  .cover-image { width: min(41%,calc(100% - 212px)); }
  .cover-actions { margin-top: 20px; gap: 6px; }
  .cover-actions button { font-size: 13px; padding-inline: 12px; gap: 6px; }
  .paper { padding: 20px; border-radius: 20px; }
  .record { padding: 4px 0 0; }
  h2 { font-size: 22px; }
  .overview-card { gap: 14px; }
  .record { margin-top: 20px; }
  .report-grid { margin-top: 12px; }
  .pagehead { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .report-controls, .date-controls { width: 100%; }
  .report-controls { justify-content: space-between; gap: 6px; }
  .chart:has(.bar-day:nth-child(8)) .bar-day { flex: 1 0 40px; }
  .chart { gap: 2px; }
  .bar-day { height: 128px; }
  .energy-scale { font-size: 10px; }
  .chart-card .section-top { align-items: flex-start; }
  .chart-card .section-top button { font-size: 13px; }
  .meal-line { flex-wrap: wrap; gap: 3px 10px; }
  .list-empty { padding-left: 53px; }
  dialog { position: fixed; inset: auto 0 0; margin: 0 auto; width: min(100%,540px); max-width: 100%; max-height: min(90dvh,var(--tg-viewport-stable-height,90dvh)); border-radius: 25px 25px 0 0; padding: 22px 20px calc(24px + max(env(safe-area-inset-bottom),var(--tg-content-safe-area-inset-bottom,0px))); }
}
@media (max-width:365px) {
  .wrap { width: calc(100% - 24px); }
  .paper { padding: 16px; }
  .record { padding: 4px 0 0; }
  .cover-copy { padding: 16px; }
  .summary-body { gap: 12px; }
  .macros dt { gap: 4px; font-size: 12px; }
}
@media (prefers-reduced-transparency:reduce) { nav { backdrop-filter: none; background: var(--paper); } }
