:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  color: #17171b;
  --sleep: #634ab0;
  --day: #8a5c0f;
  --feed: #0d6e73;
  --sleep-wash: #e9e4fb;
  --day-wash: #faefd3;
  --feed-wash: #ddf1ef;
  --secondary: #595966;
  --tertiary: #5c5c69;
  --separator: #e3e2e7;
  --surface: rgba(255, 255, 255, 0.67);
  --group: #f2f2f7;
  --primary: #634ab0;
  --diary-safe-top: max(
    env(safe-area-inset-top, 0px),
    calc(
      var(--tg-safe-area-inset-top, 0px) +
        var(--tg-content-safe-area-inset-top, 0px)
    )
  );
  --diary-safe-bottom: max(
    env(safe-area-inset-bottom, 0px),
    calc(
      var(--tg-safe-area-inset-bottom, 0px) +
        var(--tg-content-safe-area-inset-bottom, 0px)
    )
  );
  --diary-safe-left: max(
    env(safe-area-inset-left, 0px),
    calc(
      var(--tg-safe-area-inset-left, 0px) +
        var(--tg-content-safe-area-inset-left, 0px)
    )
  );
  --diary-safe-right: max(
    env(safe-area-inset-right, 0px),
    calc(
      var(--tg-safe-area-inset-right, 0px) +
        var(--tg-content-safe-area-inset-right, 0px)
    )
  );
  color-scheme: light;
  line-height: 1.35;
  background: var(--group);
}
:root[data-theme="dark"] {
  color: #f3f3f5;
  --sleep: #b8a6fc;
  --day: #f0bd59;
  --feed: #63c9c7;
  --sleep-wash: #2a2540;
  --day-wash: #3a2f1b;
  --feed-wash: #14332f;
  --secondary: #c2c3d0;
  --tertiary: #a5a8ba;
  --separator: #454758;
  --surface: rgba(44, 44, 49, 0.78);
  --group: #090c13;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  background: linear-gradient(
    125deg,
    rgba(99, 74, 176, 0.16),
    transparent 55%,
    rgba(13, 110, 115, 0.08)
  );
  background-attachment: fixed;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 5% 4%, #3d3366, transparent 80%),
    radial-gradient(ellipse at 100% 80%, #122f32, transparent 80%), #090c13;
  background-attachment: fixed;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 0;
  color: var(--sleep);
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  line-height: 1.25;
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--sleep);
  outline-offset: 3px;
}
a {
  color: var(--sleep);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}
h1 {
  font-family:
    ui-rounded,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 2rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 1.1765rem;
  font-weight: 650;
  line-height: 1.25;
}
h3 {
  font-size: 1rem;
  font-weight: 650;
}
small,
.note {
  font-size: 0.7647rem;
}
strong {
  font-weight: 650;
}
small {
  display: block;
  color: var(--secondary);
  line-height: 1.35;
}
.muted {
  color: var(--secondary);
}
.sleep {
  color: var(--sleep);
}
.day {
  color: var(--day);
}
.feed {
  color: var(--feed);
}
.symbol {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.symbol.chevron {
  width: 12px;
  height: 16px;
  color: var(--tertiary);
}
.round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--separator);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: inherit;
  flex-shrink: 0;
}
.round.plain {
  border: 0;
  background: transparent;
}
.layout {
  display: block;
  max-width: 560px;
  margin: 0 auto;
}
.topbar {
  max-width: 560px;
  margin: auto;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
main {
  padding: calc(8px + var(--diary-safe-top)) max(20px, var(--diary-safe-right))
    calc(var(--diary-dock-height, 104px) + 18px)
    max(20px, var(--diary-safe-left));
  min-height: 100svh;
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 50;
  background: var(--group);
  padding: 8px;
}
.skip:focus {
  top: 16px;
}
.notice {
  max-width: 520px;
  margin: calc(10px + var(--diary-safe-top)) auto 0;
  padding: 8px 20px;
  font-size: 0.7059rem;
  color: var(--secondary);
}
.notice:not([hidden]) + .layout main {
  padding-top: 8px;
}
.diary-header {
  margin-bottom: 14px;
}
.diary-header > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.date-title {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  color: inherit;
  padding: 0;
  min-height: 44px;
  text-align: left;
}
.date-title > .symbol {
  width: 22px;
}
.child-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
  font-size: 0.8824rem;
}
.child-name {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
  font-size: 0.8824rem;
  font-weight: 500;
}
.child-name .symbol {
  width: 14px;
  height: 14px;
}
.child-line > span {
  white-space: nowrap;
}
.diary-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card {
  min-width: 0;
  container-type: inline-size;
  padding: 20px;
  border-radius: 28px;
  background: var(--surface);
  border: 0.75px solid color-mix(in srgb, var(--separator) 65%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.card-head,
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-head h2 {
  flex: 1 1 8em;
  min-width: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--separator);
  border-radius: 24px;
  background: var(--surface);
  padding: 6px 10px;
  min-height: 44px;
  font-size: 0.7647rem;
  white-space: normal;
  max-width: 100%;
}
.pill .symbol {
  width: 17px;
  height: 17px;
}
.timer-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content 44px;
  gap: 5px;
  align-items: center;
  margin-bottom: 12px;
}
.timer-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.timer-name > .symbol {
  width: 23px;
}
.timer-name strong {
  display: block;
  font-size: 1rem;
}
.timer-name small {
  font-size: 0.7647rem;
  margin-top: 3px;
}
.timer-digits {
  font-family:
    ui-rounded,
    -apple-system,
    sans-serif;
  font-size: 1.5882rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 550;
  white-space: nowrap;
}
.timer-heading .round {
  width: 44px;
  padding: 5px;
}
.timer-heading .round .symbol {
  width: 21px;
}
.timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.capsule {
  border-radius: 28px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  padding: 12px 10px;
}
.capsule .symbol {
  width: 18px;
  height: 18px;
}
.primary {
  color: white;
  background: var(--primary);
  border-radius: 28px;
  font-weight: 600;
  min-height: 48px;
}
.capsule.primary {
  background: var(--primary);
}
.timer-actions.day .primary {
  color: var(--day);
  background: var(--day-wash);
}
.timer-actions.feed .primary {
  background: var(--feed);
  color: var(--group);
}
.secondary {
  background: var(--sleep-wash);
  color: var(--sleep);
}
.timer-hint {
  padding: 12px;
  border-radius: 14px;
  background: var(--sleep-wash);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.button-row > * {
  flex: 1;
}
.segmented {
  background: color-mix(in srgb, var(--separator) 65%, transparent);
  padding: 3px;
  border-radius: 9px;
  display: flex;
  flex-wrap: wrap;
  margin: 14px 0;
  gap: 2px;
}
.segmented button {
  flex: 1 1 auto;
  color: inherit;
  font-size: 0.8824rem;
  min-height: 44px;
  padding: 5px 8px;
  border-radius: 7px;
}
.segmented button.selected {
  background: var(--surface);
  box-shadow: 0 2px 5px #0002;
}
.rhythm-dial {
  display: block;
  width: 100%;
  margin-top: 6px;
  aspect-ratio: 320/178;
  overflow: visible;
}
.rhythm-dial .track {
  color: var(--separator);
}
.rhythm-dial .tick {
  color: var(--tertiary);
  opacity: 0.6;
}
.tick-label {
  font-size: 0.6471rem;
  fill: var(--secondary);
  stroke: none;
  text-anchor: middle;
  font-weight: 500;
}
.dial-endpoints {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.dial-endpoints > span:last-child {
  text-align: right;
}
.dial-endpoints strong {
  display: block;
  font-family: ui-rounded, system-ui;
  font-size: 1.1765rem;
  font-variant-numeric: tabular-nums;
}
.dial-endpoints small {
  margin-top: 4px;
  font-size: 0.7059rem;
}
.dial-endpoints .symbol {
  width: 14px;
  height: 14px;
  margin-right: 4px;
}
.legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.7059rem;
  color: var(--secondary);
  padding: 8px 0;
  width: 100%;
  min-height: 44px;
  flex-wrap: wrap;
}
.legend .symbol {
  width: 14px;
  height: 14px;
}
.line {
  display: inline-block;
  width: 15px;
  height: 5px;
  border-radius: 3px;
  background: currentColor;
  margin-left: 4px;
}
.line.dashed {
  background: none;
  border: 1px dashed var(--secondary);
  height: 7px;
}
.predictions {
  border-top: 1px solid var(--separator);
}
.predictions > p {
  padding-top: 16px;
  font-size: 0.8824rem;
}
.prediction {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  text-align: left;
  color: inherit;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid var(--separator);
}
.prediction:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.prediction > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.prediction strong {
  font-size: 0.8824rem;
}
.prediction small {
  font-size: 0.7059rem;
  margin-top: 5px;
}
.prediction .prediction-time {
  font-size: 1.5294rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
  max-width: 100%;
}
@container (max-width: 18em) {
  .prediction > span {
    flex-basis: calc(100% - 50px);
  }
  .prediction .prediction-time {
    margin-left: 38px;
    max-width: calc(100% - 38px);
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .prediction > .symbol:last-child {
    margin-left: auto;
  }
}
.last-events {
  padding: 6px 8px;
}
.last-events p {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8824rem;
  min-height: 30px;
}
.last-events p > span:first-of-type {
  color: var(--secondary);
  flex: 1;
}
.last-events p .symbol {
  width: 20px;
  height: 20px;
}
.section-head {
  margin-top: 6px;
}
.section-head .text-button {
  font-size: 0.8824rem;
}
.records {
  display: flex;
  flex-direction: column;
}
.record-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: inherit;
  width: 100%;
  padding: 13px 0;
  border-bottom: 1px solid var(--separator);
}
.record-row:last-child {
  border: 0;
}
.record-row > .symbol:first-child {
  width: 26px;
  height: 28px;
}
.record-row > span {
  flex: 1;
  min-width: 0;
}
.record-row strong {
  font-size: 1rem;
}
.record-row small {
  font-size: 0.8824rem;
  margin-top: 5px;
}
.record-row small.recency {
  font-size: 0.7059rem;
  color: var(--tertiary);
}
.record-row em {
  font-size: 0.7647rem;
  color: var(--feed);
  font-style: normal;
}
.brand-footer {
  text-align: center;
  color: var(--tertiary);
  font-size: 0.6471rem;
}
.empty {
  color: var(--secondary);
  padding: 8px 0;
}
.record-dock {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  padding: 8px max(16px, var(--diary-safe-right))
    max(7px, var(--diary-safe-bottom)) max(16px, var(--diary-safe-left));
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  z-index: 10;
  background: linear-gradient(transparent, var(--group) 90%);
}
.dock-button,
.dock-plus {
  border: 1px solid color-mix(in srgb, currentColor 38%, transparent);
  border-radius: 40px;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px;
  box-shadow: 0 2px 8px #0001;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.dock-plus {
  flex: 0 0 46px;
  width: 46px;
  padding: 10px;
  background: var(--sleep-wash);
}
.dock-plus .symbol {
  width: 26px;
  height: 26px;
}
.dock-button {
  flex: 1 1 auto;
  min-width: 0;
}
.dock-button.sleep {
  background: var(--sleep-wash);
}
.dock-button.feed {
  background: var(--feed-wash);
}
.dock-button.day {
  background: var(--day-wash);
}
.dock-button .symbol {
  width: 23px;
  height: 23px;
}
.dock-button > span {
  text-align: left;
  min-width: 0;
  overflow-wrap: break-word;
}
.dock-button strong {
  display: block;
  font-size: 1rem;
}
.dock-button small {
  margin-top: 3px;
  font-size: 0.7647rem;
}
.dock-button.single {
  min-height: 48px;
}
.screen-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px -10px 20px;
}
.screen-header h1 {
  font-size: 1.7647rem;
  min-width: 0;
  flex: 1;
}
.screen-header .round {
  background: none;
  border: 0;
  color: var(--sleep);
}
.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  text-align: left;
  width: 100%;
  color: inherit;
  border-bottom: 1px solid var(--separator);
  padding: 12px 0;
}
.form-row:last-child {
  border: 0;
}
.form-row > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.form-row small {
  margin-top: 3px;
}
.form-section {
  margin-bottom: 22px;
}
.form-section > h2,
.form-section > h3 {
  color: var(--secondary);
  font-size: 0.7647rem;
  font-weight: 500;
  margin: 0 16px 7px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-section > .card {
  padding: 4px 16px;
  border-radius: 14px;
}
.form-section p {
  margin-top: 8px;
}
.metric-grid,
.tiles,
.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.metric-grid,
.tiles {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8em), 1fr));
}
.two-fields {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15em), 1fr));
}
.metric {
  border-radius: 20px;
  padding: 14px;
  background: var(--sleep-wash);
  min-width: 0;
}
.metric.day {
  background: var(--day-wash);
}
.metric.feed {
  background: var(--feed-wash);
}
.metric > label {
  font-size: 0.8235rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
}
.metric .symbol {
  width: 17px;
  height: 17px;
}
.metric strong {
  font-size: 1.4706rem;
  display: block;
  font-family: ui-rounded, system-ui;
  font-weight: 650;
}
.metric small {
  margin-top: 4px;
}
.timeline {
  padding-left: 0;
  list-style: none;
}
.timeline li {
  padding: 10px 0;
  border-bottom: 1px solid var(--separator);
}
.grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.toolbar,
.date-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}
.toolbar > * {
  min-width: 0;
}
.section {
  margin-top: 16px;
}
.wide {
  width: 100%;
}
.note {
  color: var(--secondary);
}
.card > p,
.card > h3 {
  margin-top: 10px;
}
.page-header {
  margin: 12px 0 20px;
}
.page-header h1 {
  font-size: 1.6471rem;
}
.eyebrow {
  font-size: 0.7647rem;
  color: var(--secondary);
  margin-bottom: 4px;
}
.header-note {
  font-size: 0.8824rem;
  margin-top: 8px;
}
.chip {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 10px;
  background: var(--sleep-wash);
  font-size: 0.7059rem;
  color: var(--sleep);
}
.chip.warm {
  background: var(--day-wash);
  color: var(--day);
}
.chip.green {
  background: var(--feed-wash);
  color: var(--feed);
}
.price {
  font-size: 2rem;
  font-weight: 650;
}
.member {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--separator);
}
.member > div {
  min-width: 0;
  flex: 1 1 9em;
  overflow-wrap: anywhere;
}
.member > button {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.form-field {
  margin-bottom: 8px;
}
.issue {
  padding: 12px 0;
  border-top: 1px solid var(--separator);
}
pre {
  font-size: 0.7059rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
label {
  display: block;
  font-size: 0.8824rem;
  color: var(--secondary);
  margin: 14px 0 6px;
}
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--separator);
  background: var(--surface);
  color: inherit;
}
textarea {
  resize: vertical;
}
input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  color: inherit;
}
.checkbox > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.two-fields > * {
  min-width: 0;
}
.two-fields > label {
  grid-column: 1/-1;
}
.error {
  color: #a22;
  padding-top: 8px;
}
dialog {
  border: 1px solid var(--separator);
  width: calc(100% - 16px);
  max-width: 544px;
  max-height: min(
    90svh,
    calc(var(--diary-viewport-height, 100dvh) - var(--diary-safe-top) - 16px)
  );
  padding: 20px;
  border-radius: 24px 24px 0 0;
  margin: 0 auto;
  background: var(--group);
  color: inherit;
  position: fixed;
  top: auto;
  bottom: var(--diary-viewport-bottom, 0px);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #0005;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 1.2941rem;
  margin-bottom: 18px;
}
dialog button[type="button"].round {
  position: absolute;
  top: 10px;
  right: 10px;
}
dialog .form-actions {
  position: sticky;
  bottom: -20px;
  background: var(--group);
  padding: 16px 0 max(16px, var(--diary-safe-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.form-actions > button {
  flex: 1 1 7em;
  min-width: 0;
}
.loading {
  padding: 60px 20px;
  text-align: center;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.text-button .symbol {
  width: 18px;
}
.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 6em), 1fr));
  gap: 10px;
}
.food-tile {
  border-radius: 20px;
  background: var(--surface);
  padding: 10px 8px;
  text-align: left;
  color: inherit;
  min-width: 0;
}
.food-tile img {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 8px;
  object-fit: contain;
}
.food-tile strong {
  font-size: 0.8235rem;
  display: block;
  overflow-wrap: anywhere;
}
.food-tile small {
  font-size: 0.7059rem;
}
.mini-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.mini-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.chart-bars {
  height: 180px;
  display: flex;
  gap: 7px;
  align-items: flex-end;
}
.chart-bars button {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  min-width: 0;
}
.chart-bars i {
  display: block;
  width: 100%;
  border-radius: 5px;
  background: var(--sleep);
}
.chart-bars small {
  font-size: 0.5882rem;
}
.destructive {
  color: #c53835;
}
.menu-tile {
  background: var(--sleep-wash);
  border-radius: 20px;
  min-height: 90px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: var(--sleep);
  font-weight: 600;
}
.menu-tile.feed {
  background: var(--feed-wash);
  color: var(--feed);
}
.menu-tile.day {
  background: var(--day-wash);
  color: var(--day);
}
#toast {
  position: fixed;
  bottom: calc(var(--diary-dock-height, 88px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  width: max-content;
  border-radius: 20px;
  padding: 12px 16px;
  background: var(--group);
  box-shadow: 0 3px 15px #0003;
  font-size: 0.8824rem;
  z-index: 30;
}
.undo {
  display: flex;
  gap: 10px;
  align-items: center;
}
.undo button {
  font-weight: 650;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (min-width: 700px) {
  main {
    padding-top: calc(20px + var(--diary-safe-top));
  }
  .notice {
    margin-top: calc(16px + var(--diary-safe-top));
  }
  dialog {
    border-radius: 24px;
    bottom: auto;
    top: calc(
      var(--diary-viewport-top, 0px) + var(--diary-viewport-height, 100dvh) / 2
    );
    transform: translateY(-50%);
  }
}
@container (max-width: 18em) {
  .timer-heading {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
  .timer-heading .round {
    grid-column: 2;
    grid-row: 1;
  }
  .timer-digits {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
}
@media (max-width: 350px) {
  .timer-heading {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
  .timer-heading .round {
    grid-column: 2;
    grid-row: 1;
  }
  .timer-digits {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
    font-size: 1.5882rem;
  }
  .timer-name strong {
    font-size: 0.8824rem;
  }
  .timer-name > .symbol {
    width: 19px;
  }
  .timer-actions {
    flex-direction: column;
    gap: 8px;
  }
  .dock-button {
    padding: 8px;
    gap: 5px;
  }
  .dock-button strong {
    font-size: 0.8824rem;
  }
  .dock-button .symbol {
    width: 19px;
  }
  .food-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .legend {
    font-size: 0.6471rem;
  }
  .prediction .prediction-time {
    font-size: 1.2941rem;
  }
}
@media (prefers-contrast: more) {
  .card,
  .round {
    background: var(--group);
    border: 1px solid var(--separator);
  }
  body {
    background: var(--group) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
.breast-times {
  display: flex;
  gap: 12px;
  color: var(--secondary);
  font-size: 0.7059rem;
  margin-top: 8px;
  justify-content: space-between;
}
.breast-times b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.sleep-timeline {
  height: 235px;
  display: flex;
  align-items: stretch;
  gap: 5px;
  margin-top: 16px;
}
.sleep-timeline > button {
  flex: 1;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.timeline-track {
  display: block;
  position: relative;
  flex: 1;
  min-height: 205px;
  width: 100%;
  border-radius: 8px;
  background: var(--group);
}
.timeline-track i {
  position: absolute;
  width: 100%;
  left: 0;
  border-radius: 4px;
  background: currentColor;
}
.right {
  text-align: right;
}
.growth-chart {
  width: 100%;
  display: block;
  margin-top: 12px;
}
.food-preview {
  display: flex;
  gap: 8px;
}
.food-preview img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.food-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.chart-bars i.day {
  background: var(--day);
}
.chart-bars i.sleep {
  background: var(--sleep);
}
.metric-button {
  padding: 0;
  color: inherit;
  text-align: left;
  border-radius: 20px;
  overflow: hidden;
}
.night-value {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.night-value strong {
  font-size: 1.7647rem;
  color: var(--sleep);
  font-family: ui-rounded, system-ui;
}
.missed-night,
.timer-review {
  border: 1px solid var(--day);
}
.form-field {
  min-width: 0;
}
.food-tile img[hidden] + strong {
  margin-top: 64px;
}
.form-section .card {
  backdrop-filter: none;
}
.card + .form-section {
  margin-top: 20px;
}

.layout-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.layout-row label {
  flex: 1;
  min-width: 170px;
}
.layout-row .button-row {
  flex-wrap: nowrap;
}
.layout-row button {
  min-width: 44px;
  min-height: 44px;
}

.awake-state {
  display: flex;
  gap: 14px;
  align-items: center;
}
.awake-state > .symbol {
  width: 28px;
  height: 28px;
}
.awake-state p {
  margin-top: 3px;
}

.invite-code {
  overflow-wrap: anywhere;
  font-family: monospace;
}

.subscription-entry {
  margin-top: 12px;
}
.subscription-benefits {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
  margin: 22px 0;
}
.subscription-benefits li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.subscription-benefits .symbol {
  flex-shrink: 0;
  color: var(--sleep);
}
