/* 19 September references: mint paper, navy serif type, emerald controls. */
.my-day-design,
.statistics-design {
  --md-ink: #101431;
  --md-muted: #6577aa;
  --md-green: #08775a;
  color: var(--md-ink);
  background: linear-gradient(120deg, #f4faf6, #fbfdfc);
  font-family: var(--ui-font);
}
.my-day-design {
  padding: 18px 10px 0;
  margin: 14px 0 20px;
  border-radius: 12px;
}
.my-day-design .di,
.statistics-design .di {
  width: 25px;
  height: 25px;
  flex: none;
  vertical-align: middle;
}
.my-day-design h2,
.my-day-design h3,
.statistics-design h1,
.statistics-design h2 {
  color: var(--md-ink);
  font-family: var(--ui-font);
}
.my-day-design p,
.statistics-design p {
  margin: 0;
  color: var(--md-muted);
}
.md-heading {
  display: grid;
  grid-template-columns: 1fr 1fr 2.2fr;
  align-items: center;
  gap: 18px;
  margin: 0 8px 18px;
}
.md-heading h2 {
  font-size: 40px;
  line-height: 1.05;
  margin: 0 0 3px;
}
.md-heading p {
  font-size: 21px;
}
.md-date-picker {
  display: flex;
  align-items: center;
  background: white;
  box-shadow: 0 2px 9px #244e3820;
  border: 1px solid #e0e5e9;
  border-radius: 10px;
  min-width: 160px;
}
.md-date-picker button {
  background: transparent;
  border: 0;
  font-size: 30px !important;
  color: #6577aa;
  padding: 1px 12px;
}
.md-date-picker label {
  display: flex;
  align-items: center;
  margin: 0;
  flex: 1;
  position: relative;
  color: #193657;
}
.md-date-picker input {
  padding: 8px 0 8px 6px;
  border: 0;
  min-width: 0;
  width: 100%;
  font-size: var(--ui-caption);
  background: transparent;
  color: #243956;
}
.md-diary {
  display: flex;
  align-items: center;
  gap: 13px;
  background: white;
  border: 1px solid #edf0ef;
  border-radius: 13px;
  padding: 10px 13px;
  box-shadow: 0 3px 10px #134d3110;
}
.diary-disc {
  border-radius: 50%;
  padding: 12px;
  background: #e9f7ee;
  color: #08745b;
}
.diary-disc .di {
  width: 32px;
  height: 32px;
}
.md-diary strong {
  font-size: 21px;
  display: block;
}
.md-diary small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--md-muted);
  font-size: var(--ui-caption);
  margin-top: 4px;
}
.md-diary small .di {
  width: 16px;
  height: 16px;
}
.client-layout .md-open {
  margin-left: auto;
  background: linear-gradient(125deg, #218c70, #005840);
  color: white;
  min-width: 135px;
  border: 1px solid #087258;
  font-size: 22px;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.md-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.97fr) minmax(0, 1.12fr);
  gap: 14px;
}
.md-block {
  background: #ffffffea;
  border: 1px solid #e7edee;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 4px 14px #20483408;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.md-block > header {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 0;
  padding: 2px 4px 13px;
}
.md-block > header > .di {
  width: 37px;
  height: 37px;
  color: #007057;
}
.md-block.personal-block > header > .di {
  color: #ff786b;
  fill: #ff786b;
}
.md-block h3 {
  font-size: 26px;
  line-height: 1.1;
  margin: 0 !important;
}
.md-block h3 a {
  color: inherit;
  text-decoration: none;
}
.md-block h3 a:hover {
  text-decoration: underline;
}
.md-block header p {
  font-size: var(--ui-body);
  line-height: 1.15;
  margin-top: 3px;
}
.md-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.md-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid #edf0f2;
  border-radius: 11px;
  min-height: 105px;
  background: linear-gradient(130deg, #fff, #fcfdfd);
}
.md-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 9px;
  background: #edf8f1;
  color: #087459;
}
.md-thumb .di {
  width: 43px;
  height: 43px;
}
.md-description {
  flex: 1;
  min-width: 0;
  line-height: 1.15;
}
.md-description > strong {
  font-size: 20px;
  display: block;
  overflow-wrap: anywhere;
}
.md-time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #04765d;
  background: #edfaf4;
  border-radius: 7px;
  padding: 3px 8px;
  margin-top: 7px;
  font-size: 21px;
  white-space: nowrap;
}
.md-time .di {
  width: 23px;
  height: 23px;
}
.md-actual {
  display: block;
  color: #188361 !important;
  margin-top: 4px;
}
.md-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}
.client-layout .md-report {
  border: 1px solid #ff424c;
  background: white;
  color: #ff101c;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 8px;
  line-height: 1.05;
  font-family: var(--ui-font);
  font-size: var(--ui-caption);
  min-height: 47px;
}
.red-bang {
  border-radius: 50%;
  width: 27px;
  height: 29px;
  background: linear-gradient(110deg, #ff7169, #ff0312);
  color: white;
  display: grid;
  place-items: center;
  font: 700 24px var(--ui-font);
  box-shadow: 0 1px 2px #ff536630;
}
.client-layout .md-mark,
.client-layout .md-done {
  min-height: 47px;
  min-width: 104px;
  padding: 8px 9px;
  border: 1px solid #d3dbe4;
  background: linear-gradient(130deg, #fff, #fcfdff);
  box-shadow: 0 2px 4px #344b6510;
  color: #121735;
  font-size: var(--ui-body);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.client-layout .md-done {
  border-color: #bfe7d8;
  background: #eaf8f2;
  color: #04745a;
  box-shadow: none;
  font-size: var(--ui-caption);
  font-weight: 400;
}
.green-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  background: linear-gradient(130deg, #3db98b, #008267);
  color: white;
  flex: none;
}
.green-check .di {
  width: 23px;
  height: 23px;
}
.md-done:disabled {
  opacity: 1;
  cursor: default;
}
.md-read-status {
  color: var(--md-muted);
  font-size: var(--ui-caption);
}
.md-missed {
  border: 1px solid #f2bcc4;
  background: #fff5f6;
  border-radius: 6px;
  padding: 7px 14px;
  color: var(--ui-muted);
  white-space: nowrap;
}
.md-medicine {
  gap: 9px;
  min-height: 103px;
  padding: 8px 5px;
}
.md-medicine .md-thumb {
  width: 66px;
  height: 78px;
  flex-basis: 66px;
  object-fit: contain;
}
.md-medicine .md-description > strong {
  font-size: var(--ui-body);
}
.md-medicine .md-report {
  padding: 8px 6px;
  font-size: var(--ui-caption);
}
.md-medicine .md-mark,
.md-medicine .md-done {
  min-width: 95px;
  font-size: var(--ui-caption);
}
.md-medicine .md-description {
  min-width: 100px;
}
.med-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  font-size: var(--ui-caption);
}
.med-badges > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 3px 6px;
  line-height: 1;
  white-space: nowrap;
}
.med-badges .di {
  width: 16px;
  height: 16px;
}
.med-source {
  background: #fbf6ea;
  color: var(--ui-muted);
}
.med-source.own {
  background: #e6f5fc;
  color: #15839c;
}
.med-period.sun {
  color: #ee9700;
  background: #fff5e0;
}
.med-period.moon {
  color: #1458ec;
  background: #eaf3ff;
}
.med-food {
  color: #087555;
  background: #e7f8ef;
}
.med-food.no-food {
  color: #206a91;
  background: #eaf6ff;
}
.md-intakes {
  min-width: 88px;
  border-left: 1px solid #edf0f2;
  padding-left: 7px;
  color: #6378a8;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 124px;
}
.md-intakes small {
  font-size: var(--ui-caption);
  white-space: nowrap;
  color: inherit;
}
.md-intakes b {
  font-size: var(--ui-caption);
}
.intake-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 7px 0 4px;
}
.intake-dot {
  height: 23px;
  width: 23px;
  border: 1.5px solid #c7d0e0;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
}
.intake-dot.done {
  border-color: #28a678;
  background: #28a678;
  color: white;
}
.intake-dot.missed {
  color: #ff5e62;
  border-color: #ffb2b6;
}
.intake-dot .di {
  width: 18px;
  height: 18px;
}
.all-taken {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #006e54;
  font-size: var(--ui-caption);
}
.client-layout .md-why {
  background: none;
  border: 0;
  color: #647ba6;
  padding: 3px 0 0;
  font-size: var(--ui-caption);
  text-decoration: underline;
}
.md-calendar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #00694f;
  text-decoration: none;
  background: #ebf7ee;
  border-radius: 9px;
  padding: 10px;
  margin-top: 10px;
  font-size: var(--ui-body);
}
.md-stat-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--ui-caption);
  color: var(--ui-muted);
  margin-top: auto;
  padding: 10px 6px 0;
  text-decoration: none;
}
.md-stat-link .di {
  width: 15px;
  height: 15px;
}
.md-stat-link .di:last-child {
  margin-left: auto;
}
.md-empty {
  padding: 30px 12px;
  color: var(--ui-muted);
  text-align: center;
  font-size: var(--ui-body);
}
.client-layout .md-add {
  margin-left: auto;
  background: #eef9f4;
  color: #00694f;
  border: 1px solid #d2ebdf;
  white-space: nowrap;
  font-size: var(--ui-caption);
  padding: 7px 10px;
}
.md-personal {
  min-height: 47px;
  padding: 5px 6px;
  gap: 12px;
}
.md-personal .md-thumb {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}
.md-personal .md-thumb .di {
  width: 29px;
  height: 29px;
}
.md-personal .md-description {
  display: flex;
  align-items: center;
  gap: 20px;
}
.md-personal .md-description > strong {
  font-size: var(--ui-body);
}
.md-personal .md-time {
  background: none;
  font-size: var(--ui-body);
  padding: 0;
  margin: 0;
  color: #111b3c;
}
.md-personal .md-mark,
.md-personal .md-done {
  min-height: 35px;
  padding: 4px 7px;
}
.md-personal .md-actual {
  display: none;
}
.symbol-sun {
  color: #ffac00 !important;
  background: #fff8e9 !important;
}
.symbol-moon {
  color: #0659ed !important;
  background: #eaf4ff !important;
}
.symbol-people {
  background: #eaf7fb !important;
  color: #299582 !important;
}
.md-encouragement {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(110deg, #eef9f3, #f7fcf9);
  color: #067354;
  border-radius: 10px;
  margin-top: 8px;
  padding: 12px;
  min-height: 76px;
  font-size: var(--ui-body);
  overflow: hidden;
}
.md-encouragement > .di {
  width: 37px;
  height: 37px;
}
.walking-art {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  align-self: stretch;
}
.walking-art .di {
  width: 53px;
  height: 53px;
}
.walking-art .di:first-child,
.walking-art .di:last-child {
  opacity: 0.3;
  width: 39px;
  height: 42px;
}
.md-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 10px;
  font-size: var(--ui-body);
  color: #077458;
}
.md-footer > span {
  display: flex;
  align-items: center;
  gap: 15px;
}
.md-footer > span:last-child {
  color: #6980ac;
}
.md-footer .di {
  width: 30px;
  height: 30px;
}
.md-footer .di:last-child {
  color: #40ab86;
}
.personal-prize .prize-copy {
  min-width: 0;
  flex: 1;
}
.personal-prize .progress-portrait {
  margin: 0 0 0 auto;
  width: 190px;
  height: 185px;
  flex: none;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}
.progress-portrait > div {
  height: 162px;
  width: 115px;
  overflow: hidden;
  border-radius: 8px;
}
.progress-portrait svg,
.progress-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.progress-portrait figcaption {
  font-size: var(--ui-caption);
  color: var(--ui-muted);
  margin-top: 5px;
}
.statistics-design {
  padding: 20px 24px 25px;
  min-height: calc(100vh - 100px);
  position: relative;
  overflow: hidden;
}
.stats-back {
  display: inline-block;
  color: #06775b;
  text-decoration: none;
  font-size: var(--ui-body);
  margin: 5px 0 26px;
}
.stats-heading {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.stats-heading > div:first-child {
  flex: 1;
}
.stats-heading h1 {
  font-size: 42px;
  line-height: 1.08;
  margin: 0 0 6px;
}
.stats-heading p {
  font-size: 21px;
}
.stats-heading small {
  font-size: var(--ui-caption);
  color: #6577aa;
}
.stats-note {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 24px;
  background: linear-gradient(110deg, #e8f9ec, #f2fcf4);
  border-radius: 24px;
  font-size: 20px;
  color: #16815c;
}
.stats-note .di {
  width: 45px;
  height: 45px;
  color: #7ecc98;
}
:is(.client-layout, .client-record-view) .stats-add {
  background: linear-gradient(110deg, #29b565, #007240);
  border: 0;
  box-shadow: 0 2px 8px #29b56535;
  color: white;
  font-size: 22px;
  padding: 15px 22px;
  border-radius: 14px;
  white-space: nowrap;
}
.stats-card {
  background: #ffffffec;
  border: 1px solid #edf1f2;
  border-radius: 17px;
  padding: 20px 14px;
  box-shadow: 0 7px 17px #11513806;
}
.stats-card > header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 8px 24px;
}
.stats-card h2 {
  font-size: 30px;
  margin: 0 0 3px;
}
.stats-card header p {
  font-size: 20px;
}
.stats-type-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 78px;
  flex: none;
  background: #e8fcee;
  border-radius: 17px;
  color: #1fad61;
}
.stats-type-icon .di {
  width: 42px;
  height: 42px;
}
.stats-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-left: auto;
  color: #6379ad;
  font-size: var(--ui-body);
}
.stats-legend > span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.stats-scroll {
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
}
.stats-scroll table {
  border-collapse: separate;
  border-spacing: 0 6px;
  width: 100%;
  font-size: var(--ui-body);
  table-layout: auto;
  background: transparent;
}
.stats-scroll th,
.stats-scroll td {
  border: 0;
  padding: 6px 2px;
  text-align: center;
  vertical-align: middle;
  background: #ffffff90;
}
.stats-scroll thead th {
  font-weight: 400;
  color: #586fa5;
  height: 48px;
  border-top: 1px solid #edf1f7;
  border-bottom: 1px solid #edf1f7;
}
.stats-scroll thead th:first-child {
  font-weight: bold;
  color: #182044;
}
.stats-scroll tr > th:first-child {
  min-width: 220px;
  max-width: 270px;
  text-align: left;
  border-left: 1px solid #edf1f7;
  border-radius: 10px 0 0 10px;
  padding: 9px;
}
.stats-scroll tr > td:last-child,
.stats-scroll thead th:last-child {
  border-right: 1px solid #edf1f7;
  border-radius: 0 10px 10px 0;
  padding: 6px;
}
.stats-scroll tbody tr > th,
.stats-scroll tbody td {
  border-top: 1px solid #edf1f7;
  border-bottom: 1px solid #edf1f7;
}
.stats-row-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stats-row-name > span,
.stats-row-name > img {
  width: 48px;
  height: 57px;
  object-fit: contain;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #ecfbf1;
  color: #00835b;
}
.stats-row-name .di {
  width: 30px;
  height: 30px;
}
.stats-row-name strong {
  font-size: var(--ui-body);
  font-weight: 400;
  display: block;
  line-height: var(--ui-leading);
}
.stats-row-name small {
  display: block;
  color: var(--ui-muted);
  margin-top: 5px;
}
.stat-cell {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  min-width: 25px;
  min-height: 39px;
  border-radius: 7px;
  background: #f2f5f8;
  align-items: center;
  max-width: 60px;
}
.stat-cell.planned {
  background: #f2fbf4;
}
.stat-dot {
  display: grid;
  place-items: center;
  min-width: 21px;
  width: 24px;
  height: 36px;
  border-radius: 7px;
  color: var(--ui-muted);
  background: #f3f5f5;
  font-size: 25px;
  font-weight: 400;
}
.stat-dot.done {
  background: #e3fbed;
  color: #13a84f;
}
.stat-dot.missed {
  background: #ffedef;
  color: #ff535b;
}
.stat-dot.pending {
  background: #f8faf9;
  color: var(--ui-muted);
}
.stat-dot .di {
  width: 22px;
  height: 22px;
  stroke-width: 3;
}
.stat-cell:has(.stat-dot:nth-child(2)) {
  min-width: 42px;
}
.stat-cell:has(.stat-dot:nth-child(2)) .stat-dot {
  width: 18px;
  min-width: 17px;
  height: 22px;
  font-size: 22px;
}
.stat-cell:has(.stat-dot:nth-child(2)) .di {
  width: 16px;
  height: 16px;
}
:is(.client-layout, .client-record-view) .stats-remove {
  color: #ed4e4c;
  border: 1px solid #ffd6d8;
  background: #fff0f1;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--ui-caption);
  white-space: nowrap;
}
.stats-remove .di {
  width: 16px;
  height: 16px;
}
.stats-hidden {
  margin-top: 14px;
  font-size: var(--ui-caption);
  color: #667c72;
}
.stats-hidden > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.stats-empty {
  padding: 35px !important;
  color: var(--ui-muted);
}
.stats-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 100px;
  color: #368971;
  font-size: 23px;
  font-style: italic;
}
.stats-footer > span {
  display: flex;
  align-items: center;
  gap: 15px;
}
.stats-footer .di {
  width: 65px;
  height: 65px;
  color: #72c596;
}
.stats-footer > span:last-child {
  font-size: var(--ui-body);
  color: var(--ui-muted);
  font-style: normal;
}
@media (min-width: 1500px) {
  .client-layout {
    max-width: 1800px;
  }
  .md-medicine .md-description > strong {
    font-size: 20px;
  }
  .md-mark,
  .md-done {
    min-width: 118px !important;
  }
  .md-report {
    min-width: 130px;
  }
  .md-thumb {
    flex-basis: 94px;
    width: 94px;
    height: 94px;
  }
  .md-row {
    padding: 11px 8px;
  }
  .md-medicine .md-thumb {
    width: 74px;
    flex-basis: 74px;
    height: 87px;
  }
  .md-block {
    padding: 13px;
  }
}
@media (max-width: 1190px) {
  .md-grid {
    grid-template-columns: 1fr;
  }
  .md-heading {
    grid-template-columns: 1fr 1fr;
  }
  .md-diary {
    grid-column: 1/-1;
  }
  .md-block {
    min-height: 0;
  }
  .stats-note {
    display: none;
  }
  .stats-heading h1 {
    font-size: 35px;
  }
  .stats-card > header {
    flex-wrap: wrap;
  }
  .stats-legend {
    margin-left: 0;
  }
  .personal-prize .progress-portrait {
    width: 115px;
  }
  .md-footer {
    font-size: var(--ui-caption);
  }
}
@media (max-width: 650px) {
  .my-day-design {
    padding: 12px 0 0;
  }
  .md-heading {
    gap: 10px;
    margin: 0 6px 12px;
    grid-template-columns: 1fr 160px;
  }
  .md-heading h2 {
    font-size: 29px;
  }
  .md-heading p {
    font-size: var(--ui-body);
  }
  .md-diary {
    gap: 8px;
    padding: 9px;
  }
  .diary-disc {
    padding: 8px;
  }
  .md-diary strong {
    font-size: var(--ui-body);
  }
  .md-diary small {
    font-size: var(--ui-caption);
  }
  .client-layout .md-open {
    font-size: var(--ui-body);
    min-width: 95px;
    padding: 8px;
    gap: 7px;
  }
  .md-block h3 {
    font-size: 23px;
  }
  .md-block header p {
    font-size: var(--ui-caption);
  }
  .md-block > header {
    gap: 10px;
  }
  .md-block > header > .di {
    width: 28px;
    height: 28px;
  }
  .md-row {
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px;
    min-height: 0;
  }
  .md-thumb {
    width: 57px;
    height: 57px;
    flex-basis: 57px;
  }
  .md-description > strong {
    font-size: var(--ui-body);
  }
  .md-controls {
    margin-left: auto;
  }
  .md-row:not(.md-personal) > .md-controls {
    width: 100%;
    justify-content: flex-end;
  }
  .md-time {
    font-size: var(--ui-body);
  }
  .md-personal .md-description {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .md-personal .md-description > strong {
    font-size: var(--ui-caption);
  }
  .md-personal .md-time {
    font-size: var(--ui-caption);
  }
  .md-personal .md-mark,
  .md-personal .md-done {
    min-width: 90px;
    font-size: var(--ui-caption);
  }
  .md-missed {
    font-size: var(--ui-caption);
    padding: 4px;
  }
  .md-personal .md-missed {
    order: 4;
    margin-left: 48px;
  }
  .md-add {
    font-size: 0 !important;
    padding: 5px !important;
    white-space: normal !important;
  }
  .md-add:before {
    content: '+';
    font-size: 23px;
  }
  .md-intakes {
    min-width: 80px;
  }
  .md-medicine .md-thumb {
    flex-basis: 54px;
    width: 54px;
    height: 64px;
  }
  .md-footer {
    flex-direction: column;
    padding: 18px 7px;
    font-size: var(--ui-caption);
  }
  .walking-art {
    display: none;
  }
  .md-encouragement {
    font-size: var(--ui-body);
  }
  .statistics-design {
    padding: 16px 8px;
    min-height: 85vh;
  }
  .stats-heading {
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
  }
  .stats-heading h1 {
    font-size: 33px;
  }
  .stats-heading p {
    font-size: var(--ui-body);
  }
  :is(.client-layout, .client-record-view) .stats-add {
    font-size: var(--ui-body);
    padding: 11px 16px;
  }
  .stats-card {
    padding: 14px 6px;
  }
  .stats-card > header {
    gap: 12px;
    margin: 0 4px 15px;
  }
  .stats-card h2 {
    font-size: 25px;
  }
  .stats-card header p {
    font-size: var(--ui-body);
  }
  .stats-type-icon {
    width: 48px;
    height: 54px;
  }
  .stats-type-icon .di {
    width: 30px;
    height: 30px;
  }
  .stats-legend {
    font-size: var(--ui-caption);
    gap: 9px;
  }
  .stats-legend .stat-dot {
    width: 22px;
    height: 27px;
  }
  .stats-footer {
    margin-top: 45px;
    flex-direction: column;
    align-items: flex-start;
    font-size: 19px;
  }
  .stats-back {
    margin-bottom: 20px;
  }
  .personal-prize .progress-portrait {
    width: 100px;
    height: 160px;
  }
  .progress-portrait > div {
    height: 137px;
    width: 90px;
  }
  .progress-portrait figcaption {
    font-size: var(--ui-caption);
  }
}
@media (prefers-reduced-motion: reduce) {
  .my-day-design *,
  .statistics-design * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.md-date-picker label {
  min-width: 0;
}
.md-date-picker input {
  flex: 1;
  width: 0;
}
.md-date-picker button {
  flex: none;
}
.stats-row-name .med-badges .di,
.stats-frequency .di {
  width: 15px;
  height: 15px;
}
.stats-row-name > div {
  min-width: 0;
}
.stats-row-name .med-badges {
  gap: 4px;
  font-weight: 400;
}
.stats-scroll tr > th:first-child {
  min-width: 275px;
  width: 275px;
  color: #182044;
}
.stats-frequency {
  display: flex !important;
  align-items: center;
  gap: 5px;
  font-size: var(--ui-caption);
  background: #edf5ff;
  width: max-content;
  border-radius: 5px;
  padding: 3px 5px;
  font-weight: 400;
}
.stats-card:has(.stats-frequency) .stats-type-icon {
  color: #ff695f;
  background: #fff0f1;
}
@media (max-width: 650px) {
  .md-date-picker label > .di {
    display: none;
  }
  .md-date-picker button {
    width: 26px;
    padding: 1px 3px;
  }
  .md-date-picker input {
    font-size: var(--ui-caption);
    padding-left: 0;
  }
  .md-date-picker {
    min-width: 0;
  }
  .md-personal .md-controls {
    margin-left: auto;
  }
  .md-personal .md-missed {
    margin-left: 48px;
  }
}
/* Statistics: the reference uses compact illustrated labels and individual doses. */
.stats-period {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 0 0 26px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e5eee8;
  border-radius: 12px;
}
.stats-period-title {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  font-size: 19px;
  color: #086e53;
  margin-right: 8px;
}
.stats-period label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--ui-caption);
  color: #5c7298;
  margin: 0;
}
.stats-period input {
  width: 156px;
  padding: 8px 10px;
  font-family: var(--ui-font);
  font-size: var(--ui-body);
  min-height: 40px;
}
:is(.client-layout, .client-record-view) .stats-apply {
  background: #087b59;
  color: white;
  border: 1px solid #087b59;
  padding: 9px 19px;
  min-height: 40px;
}
:is(.client-layout, .client-record-view) .stats-reset {
  background: #f2faf5;
  border: 1px solid #dcece2;
  color: #127356;
  padding: 9px 13px;
  min-height: 40px;
}
.stats-period > small {
  flex-basis: 100%;
  font-size: var(--ui-caption);
  color: var(--ui-muted);
}
.stats-heading {
  margin-bottom: 22px;
}
.statistics-design .med-source.doctor {
  background: #e9f5ff;
  color: #006ddb;
}
.statistics-design .med-source.own {
  background: #e8faf2;
  color: #269d75;
}
.statistics-design .med-period.moon {
  background: #f3edff;
  color: #784cdd;
}
.statistics-design .med-food.no-food {
  color: #f44245;
  background: #fff0ef;
}
.statistics-design .med-badges > span {
  padding: 4px 5px;
  gap: 3px;
  border-radius: 5px;
}
.statistics-design .med-badges {
  font-size: var(--ui-caption);
}
.stats-scroll thead th small {
  display: block;
  font-size: var(--ui-caption);
  color: var(--ui-muted);
  font-weight: 400;
  line-height: var(--ui-leading);
}
.stats-scroll thead th:not(:first-child):not(:last-child) {
  min-width: 32px;
}
.stats-scroll tbody td:not(:last-child) {
  padding: 8px 2px;
}
.stats-scroll tr > th:first-child {
  min-width: 270px;
}
.stats-row-name > img {
  background: #f4f8fc;
  width: 56px;
  height: 78px;
  border-radius: 8px;
  padding: 3px;
}
.stats-row-name > div {
  flex: 1;
}
.stats-row-name strong {
  font-size: var(--ui-body);
  line-height: var(--ui-leading);
}
.statistics-vitamin .stats-row-name {
  gap: 10px;
  min-height: 86px;
}
.statistics-vitamin .stats-scroll tr > th:first-child {
  min-width: 310px;
  width: 310px;
}
.statistics-vitamin .stats-row-name .med-badges {
  flex-wrap: nowrap;
}
.stats-row-name .stats-frequency {
  color: #314f87;
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
  border-radius: 8px;
  margin-top: 5px;
}
.stats-row-name .stats-frequency .di {
  color: #69727a;
  fill: #69727a;
  stroke: white;
  stroke-width: 1.2;
}
.stats-card > header {
  gap: 17px;
}
.stats-type-icon.type-vitamin,
.stats-type-icon.type-personal {
  background: linear-gradient(130deg, #fff1f0, #ffe9e9);
  color: #ff655e;
}
.stats-type-icon.type-vitamin .di {
  width: 47px;
  height: 47px;
  fill: #ff655e;
  stroke: white;
  stroke-width: 1.5;
  filter: drop-shadow(0 2px 2px #e84c4420);
}
.stats-card header p {
  font-size: var(--ui-body);
}
.stats-card h2 {
  font-size: 29px;
}
.stats-legend {
  font-size: var(--ui-caption);
  gap: 12px;
}
.stats-legend .stat-dot {
  width: 38px;
  height: 40px;
  border-radius: 9px;
}
.pending-circle {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid #acb5b4;
  border-radius: 50%;
  background: white;
}
.stats-legend .pending-circle {
  width: 21px;
  height: 21px;
}
.stat-cell {
  margin: auto;
  min-width: 28px;
  max-width: 60px;
}
.stat-cell:not(.planned) {
  height: 45px;
  background: linear-gradient(120deg, #f0f4f6, #f5f7f9);
}
.stat-cell.all-missed {
  background: #ffedef;
}
.statistics-vitamin .intake-cell {
  width: max-content;
  min-width: 28px;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(var(--intake-columns, 1), 16px);
  justify-content: center;
  align-content: center;
  gap: 5px 3px;
  min-height: 48px;
  padding: 7px 5px;
}
.statistics-vitamin .intake-cell:not(.planned) {
  width: 100%;
  min-width: 28px;
  display: block;
}
.statistics-vitamin .intake-cell.planned {
  background: #e8f9ec;
}
.statistics-vitamin .intake-cell.all-missed {
  background: #ffecee;
}
.statistics-vitamin .intake-cell .stat-dot {
  border-radius: 50%;
  width: 16px;
  min-width: 16px;
  height: 16px;
  font-size: 0;
  background: transparent;
}
.statistics-vitamin .intake-cell .stat-dot .di {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}
.statistics-vitamin .intake-cell .stat-dot.done {
  color: #15864c;
  background: #b8ebca;
  box-shadow: inset 0 1px 2px #fff;
}
.statistics-vitamin .intake-cell .stat-dot.missed {
  color: #ff4b56;
  background: #fff0f0;
}
.statistics-vitamin .intake-cell .pending-circle {
  width: 13px;
  height: 16px;
  border: 1.5px solid #aab6b0;
  border-radius: 50%;
  background: #fff;
}
.stats-remove {
  font-family: var(--ui-font);
}
.stats-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.stats-section {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 21px;
  background: white;
  border: 1px solid #e7efeb;
  border-radius: 14px;
  text-decoration: none;
  color: #101431;
}
.stats-section:hover {
  border-color: #80b8a3;
  background: #fbfffc;
}
.stats-section > div {
  flex: 1;
}
.stats-section h2 {
  font-size: 26px;
  margin: 0 0 7px;
}
.stats-section p {
  font-size: var(--ui-body);
}
.stats-section small {
  display: block;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
  margin-top: 4px;
}
.stats-section > .di {
  color: var(--ui-muted);
  width: 22px;
  height: 22px;
}
.stats-overview {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
}
.stats-overview .stats-card {
  padding: 24px;
}
.stats-overview h2 {
  font-size: 26px;
}
.stats-weight-chart {
  width: 100%;
  height: auto;
  max-height: 220px;
  display: block;
  margin-top: 10px;
}
.stats-weight-chart text {
  fill: #81918c;
  font-size: var(--ui-caption);
}
.weight-summary {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 18px;
  color: #097456;
}
.weight-summary strong {
  font-size: 32px;
}
.weight-summary span {
  font-size: var(--ui-caption);
  color: var(--ui-muted);
}
.stats-totals {
  margin: 25px 0 22px;
}
.stats-totals > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #edf2ef;
  padding: 13px 0;
}
.stats-totals dt {
  color: #647c71;
  font-size: var(--ui-body);
}
.stats-totals dd {
  margin: 0;
  color: #087456;
  font-size: 23px;
}
:is(.client-layout, .client-record-view) .stats-journal-link {
  background: transparent;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #087456;
  font-family: var(--ui-font);
  font-size: var(--ui-body);
  text-align: left;
}
.stats-measurements {
  margin-top: 18px;
  padding: 24px;
}
.stats-delete-confirm {
  margin-top: 10px;
}
.statistics-design button:focus-visible,
.statistics-design a:focus-visible {
  outline: 3px solid #6aa88d;
  outline-offset: 3px;
}
.stats-footer {
  margin-top: 70px;
}
@media (max-width: 1190px) {
  .stats-sections {
    grid-template-columns: 1fr;
  }
  .stats-overview {
    grid-template-columns: 1fr;
  }
  .stats-card > header .stats-legend {
    flex-basis: 100%;
    justify-content: flex-start;
  }
  .stats-period-title {
    flex-basis: 100%;
  }
  .stats-section h2 {
    font-size: 24px;
  }
}
@media (max-width: 650px) {
  .stats-period {
    padding: 12px;
    gap: 10px;
  }
  .stats-period label {
    flex: 1;
    min-width: 110px;
  }
  .stats-period input {
    width: 100%;
    min-width: 0;
    font-size: var(--ui-caption);
  }
  .stats-period-title {
    font-size: var(--ui-body);
  }
  .stats-period > small {
    font-size: var(--ui-caption);
  }
  .stats-section {
    padding: 15px;
    gap: 12px;
  }
  .stats-section h2 {
    font-size: 21px;
  }
  .stats-section .stats-type-icon {
    width: 47px;
    height: 55px;
  }
  .stats-section .stats-type-icon .di {
    width: 29px;
    height: 29px;
  }
  .stats-legend {
    gap: 10px !important;
    font-size: var(--ui-caption);
  }
  .stats-legend .stat-dot {
    width: 25px;
    height: 28px;
  }
  .stats-card header p {
    font-size: var(--ui-caption);
  }
  .stats-card h2 {
    font-size: 24px;
  }
  .stats-overview .stats-card {
    padding: 17px;
  }
  .weight-summary {
    flex-wrap: wrap;
    gap: 5px 12px;
  }
  .statistics-vitamin .stats-scroll tr > th:first-child {
    min-width: 300px;
  }
}
.statistics-vitamin .stats-scroll thead th:not(:first-child):not(:last-child) {
  min-width: 28px;
}
.statistics-vitamin .intake-cell {
  grid-template-columns: repeat(var(--intake-columns, 1), 14px);
  gap: 4px 2px;
  padding: 6px 3px;
  min-height: 46px;
}
.statistics-vitamin .intake-cell .stat-dot {
  width: 14px;
  min-width: 14px;
  height: 14px;
}
.statistics-vitamin .intake-cell .stat-dot .di {
  width: 14px;
  height: 14px;
}
.statistics-vitamin .intake-cell .pending-circle {
  width: 12px;
  height: 14px;
}
.stats-scroll tr > th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}
@media (max-width: 650px) {
  .statistics-vitamin .stats-scroll tr > th:first-child {
    min-width: 228px;
    width: 228px;
    max-width: 228px;
  }
  .statistics-vitamin .stats-row-name .med-badges {
    flex-wrap: wrap;
  }
  .statistics-vitamin .stats-row-name {
    gap: 7px;
  }
  .statistics-vitamin .stats-row-name > img,
  .statistics-vitamin .stats-row-name > span {
    width: 42px;
    height: 60px;
  }
  .statistics-vitamin .stats-row-name strong {
    font-size: var(--ui-body);
  }
  .statistics-vitamin .stats-row-name .med-badges {
    font-size: var(--ui-caption);
  }
  .statistics-vitamin .stats-row-name .med-badges > span {
    padding: 3px 4px;
  }
}
/* Two clear contact destinations, matching the supplied reference. */
.month-goal .goal-copy .goal-value {
  font-family: var(--ui-font);
  font-weight: 700;
  font-size: 26px;
  color: #17745c;
  line-height: var(--ui-leading);
}
.goal-target {
  font-size: var(--ui-body);
  font-weight: 700;
  color: #17745c;
  white-space: nowrap;
}
.goal-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 8px;
}
.month-goal .goal-actions .text-button {
  display: inline-block;
  margin: 0;
  white-space: nowrap;
}
.personal-time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.personal-reminder-hint {
  display: block;
  margin: -4px 0 12px;
  line-height: var(--ui-leading);
}
.client-sidebar-footer button.small {
  font: var(--ui-caption)/var(--ui-leading) var(--ui-font);
  border-radius: 9px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #dce1d8;
  color: #234c3c;
}
.client-layout .md-skipped {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 47px;
  min-width: 104px;
  padding: 8px 9px;
  border: 1px solid #efb9c0;
  border-radius: 7px;
  background: #fff1f2;
  color: #a93945;
  font-size: var(--ui-caption);
  white-space: nowrap;
}
.md-skipped .di {
  width: 18px;
  height: 18px;
}
.md-skipped:disabled {
  opacity: 1;
  cursor: default;
}
.md-medicine .md-skipped {
  min-width: 95px;
  font-size: var(--ui-caption);
}
.action-icon {
  width: 24px;
  height: 24px;
  flex: none;
}
.md-thumb .action-icon {
  width: 43px;
  height: 43px;
}
.stats-row-name .action-icon {
  width: 30px;
  height: 30px;
}
.action-icon-picker {
  margin: 12px 0;
}
.action-icon-picker summary {
  cursor: pointer;
  color: #245a42;
}
.icon-search-label {
  margin-top: 10px !important;
}
.action-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 6px;
  max-height: 285px;
  overflow: auto;
  padding: 3px;
}
.action-icon-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  margin: 0 !important;
  padding: 8px 4px;
  border: 1px solid #e1e9df;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: center;
  position: relative;
}
.action-icon-option[hidden] {
  display: none;
}
.action-icon-option > input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.action-icon-option > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #316a4c;
}
.action-icon-option small {
  font: var(--ui-caption)/var(--ui-leading) var(--ui-font);
  color: #4b6457 !important;
}
.action-icon-option:has(input:checked) {
  border-color: #28744c;
  background: #e9f5eb;
  box-shadow: inset 0 0 0 1px #28744c;
}
.action-icon-option:focus-within {
  outline: 2px solid #75ac85;
  outline-offset: 1px;
}
.auto-icon {
  font: 700 21px var(--ui-font);
}
.inline-reminder-settings {
  margin: 7px 0 15px;
  padding: 10px 12px;
  background: #f0f6f0;
  border-radius: 8px;
}
.inline-reminder-settings summary {
  cursor: pointer;
  color: #285b41;
  font-size: var(--ui-caption);
}
.inline-reminder-settings p {
  font-size: var(--ui-caption);
}
.inline-reminder-settings small {
  display: block;
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
}
.reminder-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.reminder-controls button {
  font-size: var(--ui-caption) !important;
  padding: 7px 10px;
}
[data-reminders-status]:empty {
  display: none;
}
.client-layout .md-personal-edit {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: var(--ui-caption);
  color: #61776b;
  text-decoration: underline;
  white-space: nowrap;
}
.md-personal .md-description {
  flex-wrap: wrap;
}
.stats-row-name .med-badges {
  flex-wrap: wrap !important;
}
@media (max-width: 650px) {
  .client-layout .md-skipped {
    min-height: 42px;
    min-width: 90px;
    font-size: var(--ui-caption);
  }
  .month-goal .goal-copy .goal-value {
    font-size: 23px;
  }
  .goal-target {
    font-size: var(--ui-body);
  }
  .goal-actions {
    gap: 4px 12px;
  }
  .md-thumb .action-icon {
    width: 30px;
    height: 30px;
  }
  .personal-time-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
.journey-signpost:before {
  height: 30px;
  top: 18px;
  left: 14px;
}
.care-contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1100px;
  margin: 18px auto 8px;
  font-family: var(--ui-font);
  color: #25313c;
}
.care-contact {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px 14px;
  padding: 16px;
  border: 1px solid #e7ede5;
  border-radius: 16px;
  background: radial-gradient(ellipse at left bottom, #f1f6ee 0, transparent 53%), #fff;
  box-shadow: 0 5px 16px #2b4f3210;
  min-width: 0;
}
.contact-portrait {
  align-self: start;
  padding-top: 2px;
}
.contact-illustration {
  display: block;
  width: 68px;
  height: 68px;
}
.contact-copy {
  min-width: 0;
}
.care-contact .contact-copy h2 {
  font-family: var(--ui-font);
  color: #25313c;
  font-size: 20px;
  font-weight: 700;
  line-height: var(--ui-leading);
  margin: 0 0 6px;
  letter-spacing: -0.2px;
}
.contact-copy > p {
  color: #657488;
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
  margin: 0 0 10px;
}
.contact-copy > p br {
  display: none;
}
.client-layout .contact-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 200px;
  max-width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: linear-gradient(115deg, #436d50, #365e45);
  color: #fff;
  font: 600 var(--ui-caption)/var(--ui-leading) var(--ui-font);
  box-shadow: 0 3px 8px #284f3420;
}
.contact-primary .hi {
  width: 20px;
  height: 20px;
  flex: none;
}
.client-layout .contact-primary:hover:not(:disabled) {
  background: #315c40;
}
.client-layout .contact-primary:disabled {
  background: #e7ede7;
  color: var(--ui-muted);
  box-shadow: none;
  cursor: default;
  opacity: 1;
}
.client-layout .contact-secondary {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 7px;
  width: auto;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #527662;
  text-align: left;
  font: var(--ui-caption)/var(--ui-leading) var(--ui-font);
  margin-top: 10px;
}
.contact-secondary > span {
  text-decoration: underline;
  text-decoration-color: #a7bcae;
  text-underline-offset: 3px;
}
.contact-secondary .hi {
  width: 19px;
  height: 19px;
  flex: none;
}
.client-layout .contact-secondary:disabled {
  opacity: 0.55;
  cursor: default;
}
.contact-note {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  background: #edf4edcc;
  padding: 9px 12px;
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
  color: #52755e;
}
.contact-note .hi {
  width: 20px;
  height: 20px;
  flex: none;
}
.contact-note strong {
  font-weight: 600;
}
.care-contact button:focus-visible {
  outline: 3px solid #89b795;
  outline-offset: 4px;
}
.home-daily-phrase {
  display: flex;
  align-items: baseline;
  gap: 15px;
  margin: 10px 0 3px;
  padding: 10px 16px;
  color: #426455;
  border-left: 3px solid #8cad96;
  font-size: var(--ui-caption);
}
.home-daily-phrase strong {
  white-space: nowrap;
  font-size: var(--ui-caption);
  font-weight: 400;
  color: var(--ui-muted);
}
.home-daily-phrase p {
  margin: 0;
  font-style: italic;
  line-height: var(--ui-leading);
}
.client-footer {
  min-height: 70px;
  padding: 18px 30px;
}
.client-header .greeting {
  padding-top: 8px;
  padding-bottom: 8px;
}
.statistics-design {
  min-height: 0;
  padding-bottom: 24px;
}
.my-day-design {
  padding-bottom: 8px;
}
.md-empty {
  min-height: 0;
  padding: 20px 12px;
}
.md-block:has(.md-empty) {
  align-self: start;
}
@media (max-width: 1000px) {
  .care-contacts {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
}
@media (max-width: 650px) {
  .care-contacts {
    gap: 12px;
    margin-top: 15px;
  }
  .care-contact {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
  }
  .contact-illustration {
    width: 48px;
    height: 48px;
  }
  .contact-portrait {
    grid-column: 1;
    grid-row: 1;
  }
  .contact-copy {
    display: contents;
  }
  .care-contact .contact-copy h2 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 20px;
    margin: 0;
  }
  .contact-copy > p {
    grid-column: 1/-1;
    font-size: var(--ui-caption);
    margin: 0;
  }
  .client-layout .contact-primary {
    grid-column: 1/-1;
    justify-self: start;
    min-height: 42px;
    font-size: var(--ui-caption);
  }
  .client-layout .contact-secondary {
    grid-column: 1/-1;
    font-size: var(--ui-caption);
    margin-top: 0;
    align-items: center;
    min-height: 30px;
  }
  .contact-note {
    font-size: var(--ui-caption);
    padding: 8px 10px;
  }
  .home-daily-phrase {
    display: block;
    padding: 8px 12px;
    margin-top: 9px;
  }
  .home-daily-phrase strong {
    display: block;
    margin-bottom: 3px;
  }
  .home-daily-phrase p {
    font-size: var(--ui-caption);
  }
  .client-footer {
    padding: 18px 12px;
  }
  .md-grid .md-block {
    min-height: 0;
  }
  .statistics-design {
    min-height: 0;
  }
}

.statistics-design .stats-scroll thead th[title] {
  min-width: 96px;
  white-space: nowrap;
  font-size: var(--ui-caption);
  font-variant-numeric: tabular-nums;
}

/* Compact daily actions across food, medicines, sport and personal activities. */
body.ui-readable.client-view .my-day-design .md-heading {
  gap: 10px;
  margin-bottom: 10px;
}
body.ui-readable.client-view .my-day-design .md-grid {
  gap: 8px;
  align-items: start;
}
body.ui-readable.client-view .my-day-design .md-block {
  min-height: 0;
  align-self: start;
  padding: 8px;
}
body.ui-readable.client-view .my-day-design .md-block > header {
  gap: 9px;
  padding: 0 2px 7px;
}
body.ui-readable.client-view .my-day-design .md-block header p {
  margin: 2px 0 0;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .md-list {
  gap: 4px;
}
body.ui-readable.client-view .my-day-design .md-row {
  min-height: 0;
  gap: 7px;
  padding: 6px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}
body.ui-readable.client-view .my-day-design .md-thumb {
  width: 60px;
  height: 60px;
  flex-basis: 60px;
}
body.ui-readable.client-view .my-day-design .md-description {
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .md-description > strong {
  font-size: var(--ui-body);
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .md-time {
  margin-top: 4px;
  padding: 2px 5px;
  line-height: var(--ui-leading);
  font-size: var(--ui-caption);
  white-space: nowrap;
}
body.ui-readable.client-view .my-day-design .md-time .di {
  width: 17px;
  height: 17px;
}
body.ui-readable.client-view .my-day-design .md-controls {
  grid-column: auto;
  gap: 5px;
  margin: 0;
  width: auto;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-end;
}
body.ui-readable.client-view .my-day-design .md-controls > button {
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  padding: 5px 8px;
  line-height: 1.15;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
body.ui-readable.client-view .my-day-design .md-controls > .md-report {
  font-size: 12px;
  color: #111;
  border-color: #b8bec0;
  background: #fff;
  gap: 4px;
  font-weight: 400;
}
body.ui-readable.client-view .my-day-design .md-report .red-bang {
  background: #111;
  color: white;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  font-size: 13px;
  box-shadow: none;
}
body.ui-readable.client-view .my-day-design .md-controls :is(.md-mark, .md-done) {
  min-width: 0;
  font-size: var(--ui-caption);
}
body.ui-readable.client-view .my-day-design .md-controls .di {
  width: 17px;
  height: 17px;
}
body.ui-readable.client-view .my-day-design .md-meal-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
body.ui-readable.client-view .my-day-design .md-meal-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  min-width: 0;
  color: inherit;
  box-shadow: none;
}
body.ui-readable.client-view .my-day-design .md-meal-link:hover .md-description > strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.ui-readable.client-view .my-day-design .md-meal-link:focus-visible {
  outline: 2px solid #39765b;
  outline-offset: 3px;
  border-radius: 5px;
}
body.ui-readable.client-view .my-day-design .md-medicine .md-controls {
  grid-column: 2/-1;
}
body.ui-readable.client-view .my-day-design .med-badges {
  margin-top: 3px;
  gap: 3px;
}
body.ui-readable.client-view .my-day-design .med-badges > span {
  padding: 2px 4px;
  line-height: 1.15;
}
body.ui-readable.client-view .my-day-design .intake-dots {
  margin: 4px 0 2px;
}
body.ui-readable.client-view .my-day-design .md-stat-link {
  margin-top: 6px;
  padding: 5px 3px 0;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .md-calendar {
  margin-top: 6px;
  padding: 6px;
  gap: 8px;
}
body.ui-readable.client-view .my-day-design .md-empty {
  padding: 12px 6px;
}
body.ui-readable.client-view .my-day-design .md-personal .md-missed {
  margin-left: 0;
  order: 0;
}
@media (max-width: 1350px) {
  body.ui-readable.client-view .my-day-design .md-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  body.ui-readable.client-view .my-day-design .md-row > .md-controls {
    grid-column: 1/-1;
  }
  body.ui-readable.client-view .my-day-design .md-meal-row {
    grid-template-columns: minmax(0, 1fr);
  }
  body.ui-readable.client-view .my-day-design .md-medicine {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}
@media (max-width: 650px) {
  body.ui-readable.client-view .my-day-design .md-thumb {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }
  body.ui-readable.client-view .my-day-design .md-controls > button {
    padding: 4px 6px;
  }
  body.ui-readable.client-view .my-day-design .md-controls > .md-report {
    font-size: 11px;
  }
  body.ui-readable.client-view .my-day-design .md-heading {
    gap: 7px;
  }
}

body.ui-readable.client-view .my-day-design .md-personal-clickable {
  grid-template-columns: minmax(0, 1fr) auto;
}
@media (max-width: 1350px) {
  body.ui-readable.client-view .my-day-design .md-personal-clickable {
    grid-template-columns: minmax(0, 1fr);
  }
  body.ui-readable.client-view .my-day-design .md-personal-clickable > .md-controls {
    grid-column: 1;
  }
}

/* Icon labels and symbols remain inside their tiles at any text scale. */
body .action-icon-picker {
  min-width: 0;
  max-width: 100%;
}
body .action-icon-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 100px), 1fr));
  gap: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 4px;
}
body .action-icon-option {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 5px;
  gap: 5px;
  overflow: hidden;
}
body .action-icon-option > span {
  flex-shrink: 0;
  max-width: 100%;
  height: 30px;
  width: 30px;
}
body .action-icon-option .action-icon {
  display: block;
  width: 26px;
  height: 26px;
  max-width: 100%;
  max-height: 100%;
}
body .action-icon-option small {
  display: block;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  font-size: 13px;
  line-height: var(--ui-leading);
}
body .action-icon-option[hidden] {
  display: none;
}
body .md-thumb .action-icon,
body .ws-symbol .action-icon,
body .sport-symbol .action-icon {
  max-width: 75%;
  max-height: 75%;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  body .action-icon-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 82px), 1fr));
  }
  body .action-icon-option small {
    font-size: 12px;
  }
}

/* Two compact independent groups, followed by aligned contact cards. */
body.ui-readable.client-view .my-day-design .md-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
body.ui-readable.client-view .my-day-design .md-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
body.ui-readable.client-view .my-day-design .md-column > .md-block {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  min-height: 0;
  padding: 10px;
}
body.ui-readable.client-view .my-day-design .md-block > header {
  margin-bottom: 7px;
  padding: 0;
  gap: 8px;
}
body.ui-readable.client-view .my-day-design .md-block > header h3 {
  margin: 0;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .md-block > header p {
  margin: 2px 0 0;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .md-list {
  gap: 5px;
}
body.ui-readable.client-view .my-day-design .md-stat-link {
  margin-top: 5px;
  padding-top: 4px;
}
@media (max-width: 850px) {
  body.ui-readable.client-view .my-day-design .md-grid {
    grid-template-columns: 1fr;
  }
}

body.ui-readable.client-view .care-contacts {
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 0;
}
body.ui-readable.client-view .care-contacts .care-contact {
  padding: 12px 14px;
  gap: 10px;
  border-radius: 12px;
  box-shadow: none;
}
body.ui-readable.client-view .care-contacts .contact-identity {
  gap: 10px;
}
body.ui-readable.client-view .care-contacts .contact-identity h2 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .care-contacts .contact-avatar {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}
body.ui-readable.client-view .care-contacts .contact-primary {
  margin-top: auto;
}

.md-upcoming-sport {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #dfe8e2;
}
.md-upcoming-sport > small {
  display: block;
  color: #6c7b72;
  font-size: 12px;
  margin-bottom: 5px;
}
.md-sport-preview {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px;
  background: #f1f6f3;
  border: 1px solid #dce7df;
  border-radius: 8px;
  text-decoration: none;
  color: #2c4939;
  margin-top: 5px;
}
.md-sport-preview > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.md-sport-preview strong {
  display: block;
  font-size: 14px;
}
.md-sport-preview small {
  display: block;
  color: #68796e;
  font-size: 12px;
  line-height: var(--ui-leading);
  margin-top: 3px;
}
.md-upcoming-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #43745a;
}
.md-upcoming-icon svg {
  width: 27px;
  height: 27px;
}
.md-sport-preview:hover {
  border-color: #7c9c86;
}

/* A ceremonial sky-blue quotation on the client's home page. */
.home-dashboard .home-daily-phrase {
  position: relative;
  isolation: isolate;
  display: block;
  text-align: center;
  margin: 20px 0 12px;
  padding: 24px 38px 28px;
  border: 1px solid #b6dcf4;
  border-left: 1px solid #b6dcf4;
  border-radius: 18px;
  background: linear-gradient(135deg, #edf8ff 0%, #f9fdff 48%, #e2f3ff 100%);
  box-shadow: 0 5px 20px #4296ce12;
  color: #176aab;
  overflow: hidden;
}
.home-dashboard .home-daily-phrase::before {
  content: '“';
  position: absolute;
  z-index: -1;
  left: 18px;
  top: 5px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 100px;
  line-height: 1;
  color: #b9def5;
  pointer-events: none;
}
.home-dashboard .home-daily-phrase::after {
  content: '';
  display: block;
  width: 64px;
  height: 2px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, #6eb4e4, transparent);
}
.home-dashboard .home-daily-phrase strong {
  display: block;
  margin: 0 0 12px;
  color: #377ca9;
  font-family: var(--ui-font, Arial, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: normal;
}
.home-dashboard .home-daily-phrase p {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  color: #176aab;
  font-family: Georgia, 'Palatino Linotype', 'Book Antiqua', 'Times New Roman', serif;
  font-size: clamp(22px, 2.2vw, 29px);
  font-style: italic;
  font-weight: 400;
  line-height: var(--ui-leading);
  letter-spacing: 0.15px;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
@media (max-width: 650px) {
  .home-dashboard .home-daily-phrase {
    margin: 16px 0 10px;
    padding: 21px 20px 23px;
    border-radius: 15px;
  }
  .home-dashboard .home-daily-phrase::before {
    left: 9px;
    top: 6px;
    font-size: 78px;
  }
  .home-dashboard .home-daily-phrase strong {
    font-size: 11px;
    margin-bottom: 10px;
    letter-spacing: 1.8px;
  }
  .home-dashboard .home-daily-phrase p {
    font-size: 22px;
    line-height: var(--ui-leading);
  }
}

body.ui-readable.client-view .my-day-design .md-sport-link {
  flex: 1;
  min-width: 0;
}
.my-day-design button.md-sport-preview {
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-weight: 400;
  white-space: normal;
}
.sport-activity-card .sport-activity-state {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #e8f4ec;
  color: #2b6549;
  font-size: var(--ui-caption, 14px);
}
.sport-activity-card dl {
  margin: 0;
  display: grid;
  gap: 0;
}
.sport-activity-card dl > div {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 2fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #e0e8e2;
}
.sport-activity-card dt {
  color: var(--ui-muted, #64746a);
  font-size: var(--ui-caption, 14px);
}
.sport-activity-card dd {
  margin: 0;
  font-weight: 500;
  line-height: var(--ui-leading);
  overflow-wrap: anywhere;
}
.sport-activity-card h3 {
  margin: 20px 0 8px;
  font-size: 18px;
}
@media (max-width: 500px) {
  .sport-activity-card dl > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

.reminder-setup [data-reminders-status] {
  line-height: var(--ui-leading);
  margin: 10px 0 14px;
  overflow-wrap: anywhere;
}
.reminder-server-off [data-reminders-status] {
  padding: 12px 14px;
  border: 1px solid #d8e3dc;
  border-radius: 10px;
  background: #eff5f1;
  color: #385846;
}
.reminder-phone-guide {
  font-size: var(--ui-caption, 14px);
  line-height: var(--ui-leading);
  margin-top: 16px;
}
.reminder-phone-guide > p {
  margin: 8px 0;
}
.reminder-phone-guide > details {
  margin-top: 10px;
  border: 1px solid #dce5df;
  border-radius: 10px;
  background: #fff;
  padding: 10px 13px;
}
.reminder-phone-guide summary {
  font-weight: 600;
  line-height: var(--ui-leading);
  padding: 3px 0;
}
.reminder-phone-guide ol {
  padding-left: 22px;
  margin: 12px 0;
}
.reminder-phone-guide li {
  padding-left: 3px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.reminder-phone-guide a {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reminder-phone-guide .reminder-guide-note {
  color: var(--ui-muted, #63756a);
  margin: 10px 0;
}

/* Explicit client reports: a saved report is separate from completing the action. */
.my-day-design .md-row.md-with-violation {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 10px !important;
}
.my-day-design .md-row.md-with-violation:not(.md-meal-row):not(.md-sport-row) {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
}
.my-day-design .md-with-violation > .md-controls {
  flex-wrap: wrap !important;
  max-width: 300px;
  gap: 8px !important;
  align-items: center !important;
}
.my-day-design .md-deviation-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #f2d49b;
  border-radius: 8px;
  background: #fff3d8;
  color: #85500a;
  padding: 9px 11px;
  font-weight: 600;
  font-size: 14px;
  line-height: var(--ui-leading);
}
.my-day-design .md-deviation-status .di {
  width: 20px;
  height: 20px;
  flex: none;
}
.my-day-design .md-controls > .md-edit-mark {
  border: 1px solid #cbd7cf;
  background: #fff;
  color: #345c48;
  border-radius: 8px;
  height: auto !important;
  min-height: 36px;
  padding: 8px 12px !important;
}
.my-day-design .md-violation-note {
  grid-column: 1/-1;
  background: #fffbf2;
  border: 1px solid #f2dfb8;
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
  font-size: 14px;
  line-height: var(--ui-leading);
}
.my-day-design .md-violation-note > strong {
  display: block;
  color: #85500a;
  margin-bottom: 5px;
}
.my-day-design .md-violation-type {
  display: block;
  font-size: 13px;
  color: #785b2c;
}
.my-day-design .md-violation-comment {
  margin: 4px 0 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #182b36;
}
.my-day-design .md-violation-note small {
  display: block;
  color: #68766d;
  font-size: 12px;
}
.my-day-design .md-violation-note > div + div {
  margin-top: 10px;
}
.my-day-design .md-violation-result {
  border-top: 1px solid #efdfbf;
  padding-top: 8px;
  color: #4c5f54;
}
.my-day-design .md-with-violation .md-actual {
  display: none !important;
}
@media (max-width: 650px) {
  .my-day-design .md-row.md-with-violation {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .my-day-design .md-row.md-with-violation:not(.md-meal-row):not(.md-sport-row) {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }
  .my-day-design .md-with-violation > .md-controls {
    grid-column: 1/-1;
    max-width: none;
    width: 100% !important;
    justify-content: space-between !important;
  }
  .my-day-design .md-deviation-status {
    font-size: 13px;
  }
  .my-day-design .md-controls > .md-edit-mark {
    font-size: 13px;
  }
}

/* Scoped to meal cards in My day; other dashboard sections retain their styles. */
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  padding: 12px;
  align-items: center;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-thumb {
  width: 80px;
  height: 80px;
  flex-basis: 80px;
  object-fit: cover;
  border-radius: 10px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-times {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: #58695f;
  margin-top: 5px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-title {
  font-size: 14px;
  color: #58695f;
  overflow-wrap: anywhere;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-result {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  min-width: 0;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-state {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: #58695f;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-state.is-done {
  color: #286145;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-state.has-issue {
  color: #924b17;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-state .di {
  width: 18px;
  height: 18px;
  flex: none;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-controls {
  flex-wrap: wrap;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-controls > button {
  min-height: 44px;
  height: auto;
  white-space: normal;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-reports {
  grid-column: 1/-1;
  margin-left: 89px;
  font-size: 14px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-reason {
  margin: 0 0 5px;
  color: #924b17;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-reports summary {
  color: #345c48;
  cursor: pointer;
  padding: 5px 0;
  width: fit-content;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-detail {
  padding: 5px 0;
  color: #58695f;
  overflow-wrap: anywhere;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-detail p {
  margin: 0;
}
@media (max-width: 1350px) {
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal {
    grid-template-columns: minmax(0, 1fr);
  }
  body.ui-readable.client-view .my-day-design .meal-block .md-meal-result {
    align-items: flex-start;
  }
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-controls {
    justify-content: flex-start;
  }
  body.ui-readable.client-view .my-day-design .meal-block .md-meal-reports {
    margin-left: 0;
  }
}

/* Compact vertical rhythm only inside the approved meal cards. */
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal {
  row-gap: 3px;
  padding-top: 8px;
  padding-bottom: 8px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-description {
  gap: 1px;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-times {
  row-gap: 1px;
  margin-top: 1px;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-result {
  gap: 2px;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-controls:empty {
  display: none;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-reports {
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-reason {
  margin: 0;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-reports details {
  margin: 0;
  padding: 0;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-reports summary {
  margin: 0;
  padding: 2px 0;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-detail {
  padding: 2px 0;
  line-height: var(--ui-leading);
}

/* Personal actions: compact title followed by a shared time/status row. */
body.ui-readable.client-view .my-day-design .personal-block .md-personal-compact {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  padding: 6px 8px;
  min-height: 0;
}
body.ui-readable.client-view .my-day-design .personal-block .md-personal-compact .md-description {
  display: block;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .personal-block .md-personal-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-left: 61px;
  min-width: 0;
}
body.ui-readable.client-view .my-day-design .personal-block .md-personal-bottom .md-time {
  margin: 0;
  padding: 0;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .personal-block .md-personal-bottom .md-controls {
  margin: 0;
  width: auto;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.ui-readable.client-view .my-day-design .personal-block .md-personal-bottom .md-controls > button {
  min-height: 36px;
  height: auto;
  padding: 4px 8px;
  margin: 0;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .personal-block .md-personal-compact .md-thumb {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}
body.ui-readable.client-view .my-day-design .personal-block .md-personal-bottom {
  margin-left: 53px;
}
body.ui-readable.client-view .my-day-design .personal-block .md-list {
  gap: 3px;
}
body.ui-readable.client-view .my-day-design .personal-block > header {
  margin-bottom: 6px;
  padding-bottom: 0;
  row-gap: 3px;
}
body.ui-readable.client-view .my-day-design .personal-block > header p {
  margin: 0;
}
@media (max-width: 360px) {
  body.ui-readable.client-view .my-day-design .personal-block .md-personal-bottom {
    margin-left: 0;
  }
}

/* Pending diary is intentionally prominent. */
body.ui-readable.client-view .my-day-design .md-diary small.md-diary-waiting {
  color: #e00000 !important;
  font-weight: 600;
}
body.ui-readable.client-view .my-day-design .md-diary small.md-diary-waiting .di {
  color: inherit;
  stroke: currentColor;
}
.diary-reminder-setting {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  font-weight: 400;
}
.diary-reminder-setting input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: none;
  margin: 2px 0;
}
.diary-reminder-setting strong,
.diary-reminder-setting small {
  display: block;
}
.diary-reminder-banner {
  padding: 10px 14px;
  margin: 8px 0;
  border: 1px solid #efbbbb;
  border-radius: 10px;
  background: #fff4f4;
  color: #b30000;
}
.diary-reminder-banner a {
  color: inherit;
  font-weight: 600;
  margin-left: 8px;
}

/* Align the diary with the right content column; keep the date at the left column edge. */
body.ui-readable.client-view .my-day-design .md-heading {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-left: 0;
  margin-right: 0;
}
body.ui-readable.client-view .my-day-design .md-heading-left {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
body.ui-readable.client-view .my-day-design .md-heading-left > div:first-child {
  min-width: 0;
}
body.ui-readable.client-view .my-day-design .md-date-picker {
  margin-left: auto;
  flex: 0 1 300px;
  min-width: 0;
}
body.ui-readable.client-view .my-day-design .md-diary {
  grid-column: auto;
  min-width: 0;
}
@media (max-width: 1190px) and (min-width: 851px) {
  body.ui-readable.client-view .my-day-design .md-heading-left {
    flex-wrap: wrap;
  }
  body.ui-readable.client-view .my-day-design .md-diary {
    flex-wrap: wrap;
  }
}
@media (max-width: 850px) {
  body.ui-readable.client-view .my-day-design .md-heading {
    grid-template-columns: 1fr;
  }
  body.ui-readable.client-view .my-day-design .md-date-picker {
    flex-basis: 260px;
  }
}
@media (max-width: 480px) {
  body.ui-readable.client-view .my-day-design .md-heading-left {
    flex-wrap: wrap;
    gap: 6px;
  }
  body.ui-readable.client-view .my-day-design .md-date-picker {
    flex: 0 1 100%;
    width: 100%;
  }
}

/* Food diary: compact hierarchy and a native, keyboard-accessible details arrow. */
body.ui-readable.client-view .my-day-design .meal-block .md-list {
  gap: 4px;
}
body.ui-readable.client-view .my-day-design .meal-block header {
  margin-bottom: 6px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal {
  row-gap: 2px;
  padding: 8px 10px;
  align-items: start;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-description {
  gap: 0;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-title,
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-deadline {
  font-size: var(--ui-card);
  font-weight: 700;
  line-height: var(--ui-leading);
  color: var(--ui-ink, #2e4038);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-times {
  margin: 0;
  gap: 1px 12px;
  align-items: baseline;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-times > span {
  white-space: nowrap;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-result {
  align-self: center;
  gap: 2px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-reports {
  margin-left: 89px;
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-disclosure {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-disclosure summary {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-disclosure summary::-webkit-details-marker {
  display: none;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-disclosure summary::marker {
  content: '';
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-disclosure summary::after {
  display: none;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-disclosure summary:focus-visible {
  outline: 2px solid #497662;
  outline-offset: 2px;
  border-radius: 6px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-meal-reason {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
}
body.ui-readable.client-view .my-day-design .meal-block .md-detail-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: #edf4f0;
  color: #456e5b;
}
body.ui-readable.client-view .my-day-design .meal-block .md-detail-toggle .di {
  width: 18px;
  height: 18px;
  transform: rotate(90deg);
}
body.ui-readable.client-view .my-day-design .meal-block details[open] .md-detail-toggle .di {
  transform: rotate(-90deg);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-detail,
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-detail p,
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-detail small {
  font-family: inherit;
  font-size: var(--ui-caption);
  font-weight: 400;
  line-height: var(--ui-leading);
  margin: 0;
  padding: 0;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-detail small {
  display: block;
}
@media (max-width: 1350px) {
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-reports {
    margin-left: 0;
  }
}
@media (pointer: coarse) {
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-disclosure summary {
    min-height: 44px;
  }
}

body.ui-readable.client-view .my-day-design .meal-block {
  container-type: inline-size;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-times,
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-state {
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-receipt-time {
  white-space: nowrap;
}
@container (max-width:650px) {
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal {
    grid-template-columns: minmax(0, 1fr);
  }
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-result {
    align-items: flex-start;
    margin-left: 89px;
  }
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-controls {
    justify-content: flex-start;
  }
}
@container (max-width:420px) {
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-result,
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-reports {
    margin-left: 0;
  }
}

/* Meal selector hierarchy: meal/deadline above the dish, with a recipe arrow. */
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal {
  grid-template-columns: minmax(0, 1fr);
  background: #fff;
  border-color: #dce3de;
  border-radius: 10px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-link {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 12px;
  gap: 12px;
  width: 100%;
  align-items: center;
  color: #123c35;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-thumb {
  width: 84px;
  height: 92px;
  border-radius: 6px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-caption {
  font: 400 var(--ui-caption)/var(--ui-leading) var(--ui-font);
  color: #58695f;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-deadline {
  font: 700 var(--ui-caption)/var(--ui-leading) var(--ui-font);
  color: #205a49;
  white-space: nowrap;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-title {
  display: block;
  margin-top: 4px;
  font: 600 var(--ui-card)/var(--ui-leading) var(--ui-font);
  color: #123c35;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-chevron .di {
  width: 12px;
  height: 18px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-result {
  align-items: flex-start;
  margin-left: 96px;
}
body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-reports {
  margin-left: 96px;
}
@container (max-width:420px) {
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-result,
  body.ui-readable.client-view .my-day-design .meal-block .md-compact-meal .md-meal-reports {
    margin-left: 0;
  }
}

/* Personal actions and prescribed sports share the approved medicine row style. */
.my-day-design :is(.personal-block, .sport-block) .md-list {
  display: block;
}
.ac .ac-symbol {
  display: inline-flex;
  align-items: center;
}
.ac .ac-symbol :is(svg, img) {
  width: 18px;
  height: 18px;
  max-width: 18px;
}
.ac .ac-report svg {
  width: 15px;
  height: 15px;
  margin-right: 4px;
}
.ac .ac-report {
  font-weight: 600;
}
.ac .ac-has-report {
  box-shadow: inset 3px 0 0 #ffcb7d;
}
.ac .mi-tile:has(.mi-time > span:first-child:last-of-type) {
  min-width: 0;
}
.ac .mi-time {
  max-width: 140px;
}
.ac .mi-time > span:not(.mi-mark):not(.ac-symbol) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ac .mi-mark {
  flex: none;
}
.ac .mi-take:has(.ac-report) {
  padding-bottom: 7px;
}
.ac-detail-icon :is(svg, img) {
  width: 44px;
  height: 44px;
}
.ac-report-detail {
  white-space: pre-wrap;
}
.ac-upcoming {
  margin-top: 8px;
}
.ac-upcoming .mi-take:disabled {
  cursor: default;
}

/* Keep the calendar dot circular despite the global button gap. */
.my-day-design .ac .mi-date {
  gap: 0;
}
.my-day-design .ac .mi-date i {
  flex: none;
}
