:root {
  --bg: #f6f7f2;
  --paper: #fffefa;
  --ink: #253e33;
  --muted: #7b857a;
  --line: #e5e9df;
  --green: #385d48;
  --wake: #b9923c;
  --break: #5a987c;
  --bed: #8b83b0;
  --study: #62866a;
  --relax: #b99052;
  --sleep: #8b83b0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #a0bc86;
  outline-offset: 3px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -80px;
  z-index: 5;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 228px;
  background: #f0f2e9;
  border-right: 1px solid #e0e5d8;
  padding: 38px 24px 24px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-family: Georgia, serif;
  font-size: 58px;
  font-weight: bold;
  line-height: 1;
  letter-spacing: -4px;
  align-self: flex-start;
}
.brand-dot {
  color: #90aa61;
}
.brand-caption {
  font-size: 9px;
  letter-spacing: 2px;
  color: #8b9586;
  margin: 14px 0 62px;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #8f9889;
  margin: 0 0 17px 13px;
}
.nav-button {
  width: 100%;
  border: 0;
  background: none;
  border-radius: 9px;
  padding: 15px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  margin-bottom: 9px;
  color: #7e897b;
  line-height: 1.6;
  font-size: 13px;
}
.nav-button small {
  display: block;
  font-size: 10px;
  color: #8f9a87;
  letter-spacing: 0.1px;
}
.nav-button.active {
  background: #e2e8d7;
  color: #355443;
}
.nav-button.active small {
  color: #738264;
}
.nav-button:hover {
  background: #e6ebdd;
}
.nav-indicator {
  margin-left: auto;
}
.active .nav-indicator {
  width: 5px;
  height: 5px;
  background: #68834c;
  border-radius: 50%;
}
.sidebar-note {
  margin-top: auto;
  padding: 24px 12px 48px;
  color: #859079;
}
.little-sun {
  font-size: 38px;
  color: #9eaf7c;
  line-height: 1;
}
.sidebar-note p {
  line-height: 1.9;
  font-size: 15px;
  letter-spacing: 1px;
  margin: 20px 0 12px;
}
.sidebar-note > span {
  font-size: 10px;
  color: #99a18f;
  font-family: Georgia, serif;
  font-style: italic;
}
.sidebar-bottom {
  border-top: 1px solid #dfe5d6;
  padding: 21px 8px 0;
  color: #6f7c65;
  font-size: 11px;
}
.sidebar-bottom small {
  display: block;
  padding: 9px 0 0 13px;
  font-size: 10px;
  color: #9ba38f;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8ba76d;
  display: inline-block;
  flex-shrink: 0;
}
.workspace {
  margin-left: 228px;
}
.topbar {
  height: 76px;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #919888;
}
.breadcrumb {
  display: flex;
  gap: 16px;
  align-items: center;
}
.breadcrumb strong {
  font-weight: 500;
  color: #566750;
}
.breadcrumb > span {
  color: #bec4b5;
}
.today {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-nav {
  display: flex;
  align-items: center;
  gap: 9px;
}
.date-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.date-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 4px 2px;
  color: #66745d;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.date-display:hover {
  color: var(--green);
}
.date-display {
  min-height: 44px;
  padding: 6px 10px;
}
#calendar-dialog {
  width: min(380px, calc(100vw - 32px));
  padding: 22px;
}
.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.calendar-week,
#calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.calendar-week {
  font-size: 12px;
  margin-bottom: 8px;
}
#calendar-days button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--green);
}
#calendar-days button:hover:not(:disabled) {
  background: #edf1e6;
}
#calendar-days button[aria-pressed="true"] {
  background: var(--green);
  color: white;
}
#calendar-days button:disabled {
  opacity: 0.3;
}
#calendar-dialog label {
  display: block;
  margin: 16px 0;
}
#auth-dialog label {
  display: block;
  margin: 20px 0;
}
#auth-password {
  display: block;
  width: 100%;
  margin-top: 8px;
}
#auth-error {
  color: #a34444;
}
.date-step {
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: #708064;
  font:
    18px/20px Georgia,
    serif;
}
.date-step:hover:not(:disabled) {
  background: #edf1e6;
}
.date-step:disabled {
  opacity: 0.35;
}
.date-nav .date-step {
  min-width: 36px;
  min-height: 44px;
  flex-shrink: 0;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 44px 48px 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 500;
  color: #8a967d;
}
h1 {
  font-size: 30px;
  letter-spacing: 1px;
  line-height: 1.4;
  font-weight: 550;
  margin: 12px 0 10px;
}
h1 > span {
  color: #a0b17d;
}
.page-heading p {
  font-size: 12px;
  color: #8b9385;
  letter-spacing: 0.4px;
  margin: 0;
  line-height: 1.8;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 11px 15px;
  font-size: 12px;
  white-space: nowrap;
}
.button.primary {
  background: var(--green);
  color: white;
  box-shadow: 0 3px 5px #23482b0a;
}
.button.primary:hover {
  background: #284b38;
}
.quick-actions {
  display: flex;
  gap: 9px;
  align-items: stretch;
}
.quick-action {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 9px;
  min-width: 88px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: var(--green);
}
.quick-action:hover {
  background: #edf2e6;
  transform: translateY(-1px);
}
.quick-action .icon {
  width: 20px;
  height: 20px;
}
.quick-action span {
  font-size: 12px;
  font-weight: 550;
}
.quick-action small {
  display: block;
  color: #93a08b;
  font-size: 9px;
  font-weight: 400;
  margin-top: 2px;
}
.sleep-action {
  color: #756b99;
  border-color: #e5e0ef;
}
.wake-action {
  color: #9b782c;
  border-color: #eee5cf;
}
.relax-action {
  color: #4f886f;
  border-color: #dbeadf;
}
.button.subtle {
  border-color: var(--line);
  background: var(--paper);
  color: #687760;
}
.button.subtle:hover {
  background: #edf1e6;
}
.text-button {
  border: 0;
  background: none;
  padding: 6px 0;
  font-size: 11px;
  color: #778567;
}
.text-button:hover {
  color: var(--green);
  text-decoration: underline;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
}
.view-description {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
  color: #8d9587;
}
.view-description > span:nth-child(2) {
  color: #5f7154;
}
.toolbar-divider {
  width: 1px;
  height: 11px;
  background: #d9dfd0;
  margin: 0 4px;
}
.toolbar-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
select {
  padding: 9px 30px 9px 13px;
  border: 1px solid #e0e5d8;
  border-radius: 6px;
  background: var(--paper);
  color: #65725a;
  font-size: 11px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 25px;
}
.daily-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 28px;
}
.daily-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 23px 27px 17px;
  border-bottom: 1px solid #edf0e7;
}
.daily-card-heading h2 {
  font-size: 16px;
  font-weight: 550;
  margin: 8px 0 6px;
}
.daily-card-heading p {
  margin: 0;
  color: #98a08e;
  font-size: 10px;
}
.daily-content {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
}
.daily-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 20px 27px;
  border-right: 1px solid #edf0e7;
}
.daily-time-group {
  display: grid;
  gap: 7px;
  align-content: start;
}
.daily-time-group > small,
.daily-items-heading small {
  color: #a0a895;
  font-size: 9px;
}
.daily-time-item {
  display: grid;
  grid-template-columns: 7px 1fr auto;
  gap: 7px;
  align-items: center;
  min-height: 27px;
  color: #718065;
  font-size: 10px;
}
.daily-time-item strong {
  color: var(--color);
  font:
    14px Georgia,
    serif;
}
.daily-time-item small {
  grid-column: 2 / -1;
  color: #9ba590;
  font-size: 8px;
  margin-top: -4px;
}
.daily-items {
  padding: 20px 27px;
}
.daily-items-heading {
  display: flex;
  justify-content: space-between;
  color: #66745d;
  font-size: 11px;
  margin-bottom: 11px;
}
.item-form {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
}
.item-form input {
  min-width: 0;
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #e0e5d8;
  border-radius: 6px;
  color: #63715a;
  font-size: 10px;
}
.item-form .button {
  padding: 8px 10px;
  font-size: 10px;
}
.item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
}
.item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #718065;
  font-size: 10px;
  min-height: 25px;
}
.item-row.done > span {
  color: #a4ad9a;
  text-decoration: line-through;
}
.item-check,
.item-delete {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: #789067;
  padding: 0;
}
.item-check {
  width: 17px;
  height: 17px;
  border: 1px solid #cdd8c4;
  border-radius: 5px;
  font-size: 12px;
  line-height: 15px;
}
.item-row.done .item-check {
  background: #dce8d4;
}
.item-row > span {
  flex: 1;
}
.item-delete {
  color: #abb3a5;
  font-size: 16px;
}
.items-empty {
  color: #a1aa97;
  font-size: 10px;
}
.metric-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.metric-card::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  border: 1px solid var(--tint);
  border-radius: 50%;
  right: -34px;
  bottom: -44px;
  box-shadow:
    0 0 0 13px var(--wash),
    0 0 0 14px var(--tint);
}
.metric-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--wash);
  color: var(--color);
}
.metric-top small {
  font-size: 10px;
  color: #98a08f;
  margin-left: auto;
}
.metric-value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 39px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: #344832;
  margin: 14px 0 7px;
  white-space: nowrap;
}
.metric-value .next-day {
  font:
    11px -apple-system,
    sans-serif;
  color: #8a83aa;
  margin-right: 5px;
}
.metric-value .unit {
  font:
    12px -apple-system,
    sans-serif;
  color: #8b9582;
}
.metric-bottom {
  font-size: 10px;
  color: #95a08b;
  display: flex;
  align-items: center;
  gap: 5px;
}
.metric-bottom .dot {
  width: 4px;
  height: 4px;
  background: var(--color);
  border-radius: 50%;
}
.chart-card,
.records-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 27px 12px;
  gap: 18px;
}
.card-heading h2 {
  font-size: 16px;
  font-weight: 550;
  margin: 9px 0 6px;
  letter-spacing: 0.4px;
}
.card-heading p {
  margin: 0;
  font-size: 10px;
  color: #98a08e;
  line-height: 1.7;
}
.legend {
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 10px;
  color: #7b8671;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: var(--color);
}
.chart-slot {
  position: relative;
  min-height: 225px;
  padding: 12px 21px 0;
}
.chart-slot svg {
  display: block;
  width: 100%;
  height: 225px;
  overflow: visible;
}
.chart-slot text {
  fill: #99a18f;
  font:
    10px -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}
.chart-slot .chart-grid-line {
  stroke: #eaece4;
  stroke-dasharray: 3 4;
}
.chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 5px 27px 0;
  padding: 14px 0 17px;
  border-top: 1px solid #edf0e7;
  color: #a0a794;
  font-size: 9px;
}
.chart-foot > span:last-child {
  font-family: Georgia, serif;
  font-style: italic;
}
.chart-empty {
  position: absolute;
  inset: 25px 0 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  pointer-events: none;
}
.chart-empty strong {
  font-size: 12px;
  color: #849375;
  font-weight: 500;
}
.chart-empty p {
  font-size: 10px;
  color: #a7af9d;
  margin: 0;
}
.chart-empty .icon {
  color: #bac6a8;
  width: 29px;
  height: 29px;
  margin-bottom: 3px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 15px;
}
.section-heading h2 {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.5px;
}
.section-heading > span {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #a1aa95;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.small-chart .card-heading {
  padding: 20px 20px 0;
}
.small-chart h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 6px;
}
.small-chart .card-heading p {
  font-size: 9px;
}
.small-chart .icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.small-chart .chart-slot {
  padding: 13px 13px 2px;
  min-height: 150px;
}
.small-chart .chart-slot svg {
  height: 145px;
}
.small-chart .chart-footer {
  border-top: 1px solid #f0f1eb;
  margin: 0 20px;
  padding: 12px 0;
  font-size: 9px;
  color: #97a18b;
}
.small-chart .chart-empty {
  inset: 15px 0 10px;
}
.small-chart .chart-empty strong {
  font-size: 10px;
}
.small-chart .chart-empty p {
  display: none;
}
.small-chart .chart-empty .icon {
  width: 23px;
  height: 23px;
}
.total-card {
  background: #eaf0e1;
  border: 1px solid #dde6d1;
  border-radius: 11px;
  padding: 25px 28px;
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 38px;
  margin-bottom: 25px;
}
.total-card h2 {
  font-size: 17px;
  font-weight: 500;
  margin: 8px 0;
}
.total-card p {
  font-size: 11px;
  color: #899879;
  line-height: 1.8;
  margin: 0;
}
.total-value {
  font-family: Georgia, serif;
  font-size: 39px;
  margin: 12px 0;
}
.total-value small {
  font:
    11px -apple-system,
    sans-serif;
  color: #8a977c;
}
.total-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: center;
}
.total-item h3 {
  font-size: 11px;
  font-weight: 400;
  color: #7c8a6d;
}
.total-item strong {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 22px;
}
.total-item small {
  display: block;
  color: #8c987d;
  font-size: 10px;
  margin-top: 9px;
}
.total-bar {
  display: flex;
  height: 7px;
  border-radius: 6px;
  overflow: hidden;
  background: #dfe7d5;
  grid-column: 1/-1;
}
.total-bar span {
  background: var(--color);
  height: 100%;
}
.count-badge {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #edf1e4;
  color: #82926b;
  margin-left: 7px;
  vertical-align: middle;
}
.records-card .card-heading {
  padding-bottom: 22px;
}
.record-tools {
  display: flex;
  gap: 8px;
}
.record-tools .button {
  padding: 8px 11px;
  font-size: 10px;
}
.record-tools .icon {
  width: 14px;
  height: 14px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
  font-size: 11px;
}
th {
  font-weight: 400;
  color: #99a18e;
  background: #f8f9f4;
  padding: 13px 27px;
  border-top: 1px solid #edf0e6;
  border-bottom: 1px solid #edf0e6;
}
td {
  padding: 15px 27px;
  border-bottom: 1px solid #eff1e9;
  color: #718065;
  font-variant-numeric: tabular-nums;
}
th:last-child,
td:last-child {
  text-align: right;
}
td:first-child {
  color: #4a6040;
  font-weight: 500;
}
.date-link {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
}
.date-link:hover {
  color: var(--green);
  text-decoration: underline;
}
.selected-row td {
  background: #f7f9f2;
}
td .weekday {
  font-size: 9px;
  color: #9ca58f;
  margin-left: 8px;
  font-weight: 400;
}
.value-pill {
  background: var(--wash);
  color: var(--color);
  padding: 5px 9px;
  border-radius: 5px;
  display: inline-block;
  font-size: 11px;
}
.table-empty {
  padding: 40px 20px 45px;
  text-align: center;
  color: #829373;
  border-top: 1px solid var(--line);
}
.empty-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid #e4e9d9;
  background: #f6f8ef;
  border-radius: 50%;
  margin: 0 auto 16px;
}
.table-empty h3 {
  font-size: 14px;
  font-weight: 500;
}
.table-empty p {
  font-size: 11px;
  color: #9aa58e;
  line-height: 1.8;
}
.table-empty .button {
  margin-top: 8px;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 25px;
  color: #9ba590;
  font-size: 10px;
}
.table-footer > div {
  display: flex;
  gap: 8px;
}
.table-footer .button {
  padding: 6px 9px;
  font-size: 9px;
}
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 27px 1px 25px;
  color: #a4ac97;
  font-size: 10px;
}
.page-footer > span:first-child {
  font:
    italic 22px Georgia,
    serif;
  color: #82916f;
}
.footer-motto {
  font:
    10px -apple-system,
    sans-serif;
  padding-left: 12px;
  color: #a4ac97;
}
.notice {
  background: #eaf0de;
  border: 1px solid #d9e5c7;
  border-radius: 7px;
  padding: 13px 16px;
  margin-bottom: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  line-height: 1.7;
}
.notice.error {
  background: #fff0e8;
  border-color: #ecd2c4;
  color: #925b43;
}
dialog {
  border: 1px solid #e1e6d6;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  padding: 28px 30px;
  width: min(590px, calc(100% - 28px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  box-shadow: 0 25px 100px #233c3326;
}
dialog::backdrop {
  background: #24392b55;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-heading h2 {
  font-size: 24px;
  letter-spacing: 0.4px;
  font-weight: 500;
  margin: 8px 0;
}
.close-button {
  border: 0;
  background: none;
  color: #98a189;
  font-size: 28px;
  line-height: 1;
  padding: 7px;
}
.dialog-intro {
  font-size: 12px;
  color: #8e9982;
  margin: 8px 0 24px;
}
.date-field {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 9px;
}
.date-field input {
  width: 100%;
}
input[type="date"],
input[type="time"],
input[type="number"] {
  border: 1px solid #dfe5d6;
  background: #fafbf6;
  border-radius: 6px;
  padding: 10px 9px;
  color: #536446;
  min-width: 0;
  height: 42px;
}
fieldset {
  border: 0;
  padding: 22px 0 5px;
  margin: 20px 0 0;
  border-top: 1px solid var(--line);
}
legend {
  padding: 0 12px 0 0;
  font-size: 10px;
  color: #a0ad8b;
  letter-spacing: 1px;
}
legend > span {
  font-size: 12px;
  color: #566b46;
  padding-left: 7px;
  letter-spacing: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.form-grid > label,
.duration-label {
  font-size: 12px;
  color: #617251;
}
.form-grid label small {
  display: block;
  color: #9faa93;
  font-size: 9px;
  margin: 6px 0 12px;
}
.form-grid input[type="time"] {
  width: 100%;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #8b9780;
  margin-top: 15px;
}
.checkbox-label input {
  accent-color: #628551;
}
.duration-inputs {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #9aa68a;
}
.duration-inputs input {
  width: 52px;
  padding: 8px 5px;
}
.duration-inputs input::-webkit-inner-spin-button {
  opacity: 1;
}
.field-hint {
  font-size: 10px;
  color: #96a188;
  line-height: 1.8;
  margin: 8px 0 16px;
}
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 22px;
}
.spacer {
  flex: 1;
}
.danger {
  color: #b56c55;
  border-color: #ecd8ce;
  background: #fff7f1;
}
.form-error {
  color: #b5674f;
  font-size: 12px;
  line-height: 1.6;
  margin: 15px 0 0;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 9px;
  background: #314e3d;
  box-shadow: 0 8px 30px #2a492922;
  color: white;
  padding: 14px 22px;
  font-size: 12px;
  z-index: 20;
  max-width: 90vw;
  line-height: 1.8;
}
#confirm-dialog {
  max-width: 420px;
}
#confirm-dialog h2 {
  font-size: 20px;
  font-weight: 500;
}
#confirm-message {
  font-size: 13px;
  line-height: 1.9;
  color: #7b896d;
}
@media (min-width: 1600px) {
  main {
    padding-top: 52px;
  }
  .chart-slot svg {
    height: 250px;
  }
  .chart-slot {
    min-height: 250px;
  }
  .small-chart .chart-slot svg {
    height: 165px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 200px;
    padding-left: 18px;
    padding-right: 18px;
  }
  .workspace {
    margin-left: 200px;
  }
  main {
    padding: 32px 28px 0;
  }
  .topbar {
    padding: 0 28px;
  }
  .metric-card {
    padding: 18px;
  }
  .metric-top small {
    display: none;
  }
  h1 {
    font-size: 25px;
  }
  .card-heading {
    padding: 22px 22px 12px;
  }
  .chart-grid {
    gap: 12px;
  }
  .small-chart .card-heading {
    padding: 16px 14px 0;
  }
  th,
  td {
    padding: 14px 18px;
  }
  .metric-value {
    font-size: 34px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 160px;
    padding: 27px 12px 20px;
  }
  .workspace {
    margin-left: 160px;
  }
  .brand {
    font-size: 48px;
    margin-left: 13px;
  }
  .brand-caption {
    font-size: 7px;
    letter-spacing: 1px;
    margin-left: 13px;
  }
  .nav-button {
    padding: 13px 9px;
    gap: 8px;
    font-size: 11px;
  }
  .nav-button small {
    font-size: 8px;
  }
  .nav-label {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .nav-indicator {
    display: none;
  }
  .sidebar-note {
    padding-left: 10px;
  }
  .sidebar-bottom {
    font-size: 9px;
    padding-left: 0;
  }
  .sidebar-bottom small {
    font-size: 8px;
  }
  .metric-grid {
    gap: 10px;
  }
  .metric-card {
    padding: 15px;
  }
  .metric-top {
    gap: 7px;
    font-size: 10px;
  }
  .icon-badge {
    width: 28px;
    height: 28px;
  }
  .metric-value {
    font-size: 29px;
  }
  .metric-bottom {
    font-size: 9px;
  }
  .legend {
    gap: 10px;
    font-size: 9px;
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .small-chart .chart-slot svg {
    height: 155px;
  }
  .small-chart .chart-slot {
    padding: 10px 18px;
  }
  .total-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .total-breakdown {
    gap: 12px;
  }
  .total-value {
    margin: 5px 0;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading > .button {
    margin-top: 28px;
  }
  .section-heading > span {
    font-size: 7px;
    letter-spacing: 1px;
  }
}
@media (max-width: 650px) {
  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid #e0e5d8;
    padding: 18px 20px 0;
    display: block;
  }
  .brand {
    font-size: 43px;
    margin: 0;
  }
  .brand-caption {
    display: inline-block;
    font-size: 8px;
    margin: 0 0 0 14px;
    vertical-align: middle;
    letter-spacing: 1.5px;
  }
  .nav-label,
  .sidebar-note,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    gap: 12px;
    margin-top: 18px;
  }
  .nav-button {
    width: 50%;
    margin: 0;
    border-radius: 7px 7px 0 0;
    padding: 12px 10px;
  }
  .nav-button small {
    font-size: 9px;
    display: inline;
    margin-left: 8px;
  }
  .nav-button .icon {
    width: 17px;
    height: 17px;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    height: 50px;
    padding: 0 20px;
    font-size: 9px;
  }
  .date-nav {
    gap: 5px;
  }
  .date-step {
    width: 22px;
    height: 22px;
    font-size: 16px;
  }
  .date-display {
    gap: 5px;
    font-size: 9px;
  }
  .breadcrumb {
    gap: 10px;
  }
  main {
    padding: 26px 20px 0;
  }
  .page-heading {
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
  }
  .page-heading > .button {
    margin-top: 2px;
    padding: 10px 13px;
  }
  h1 {
    font-size: 23px;
    margin-top: 10px;
    letter-spacing: 0;
  }
  .eyebrow {
    font-size: 8px;
  }
  .page-heading p {
    font-size: 10px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar-actions {
    gap: 12px;
  }
  .view-description {
    font-size: 9px;
    gap: 5px;
  }
  .toolbar-divider {
    margin: 0 2px;
  }
  .toolbar-actions select {
    font-size: 10px;
    padding: 8px;
  }
  .text-button {
    font-size: 10px;
  }
  .metric-grid {
    gap: 8px;
    margin-bottom: 18px;
  }
  .metric-card {
    padding: 12px 10px;
  }
  .daily-card-heading {
    padding: 18px 16px 14px;
    align-items: center;
  }
  .daily-card-heading h2 {
    font-size: 14px;
  }
  .daily-card-heading p {
    font-size: 9px;
    line-height: 1.5;
  }
  .daily-card-heading .button {
    padding: 8px 9px;
    font-size: 9px;
  }
  .daily-content {
    grid-template-columns: 1fr;
  }
  .daily-times {
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid #edf0e7;
  }
  .daily-items {
    padding: 16px;
  }
  .metric-top {
    gap: 6px;
    font-size: 10px;
  }
  .metric-top .icon-badge {
    width: 23px;
    height: 23px;
    border-radius: 6px;
  }
  .metric-top .icon {
    width: 15px;
    height: 15px;
  }
  .metric-value {
    font-size: 28px;
    margin-top: 14px;
    line-height: 1.3;
  }
  .metric-value .unit {
    font-size: 9px;
  }
  .metric-value .next-day {
    font-size: 8px;
    display: block;
    margin: 0;
  }
  .metric-bottom {
    font-size: 8px;
    line-height: 1.5;
  }
  .metric-card::after {
    width: 60px;
    height: 60px;
    right: -32px;
    bottom: -33px;
  }
  .card-heading {
    padding: 20px 18px 8px;
    align-items: flex-start;
  }
  .combined > .card-heading {
    flex-wrap: wrap;
    gap: 13px;
  }
  .card-heading h2 {
    font-size: 15px;
  }
  .card-heading p {
    font-size: 9px;
  }
  .legend {
    font-size: 9px;
    gap: 16px;
  }
  .chart-slot {
    padding: 12px 10px 0;
  }
  .chart-slot svg {
    height: 195px;
  }
  .chart-slot {
    min-height: 195px;
  }
  .chart-foot {
    margin: 0 18px;
    font-size: 8px;
    line-height: 1.6;
  }
  .chart-foot > span:last-child {
    display: none;
  }
  .section-heading {
    margin-top: 24px;
  }
  .section-heading h2 {
    font-size: 12px;
  }
  .section-heading > span {
    display: none;
  }
  .chart-grid {
    gap: 12px;
  }
  .small-chart .card-heading {
    padding: 18px 18px 0;
  }
  .small-chart .chart-slot svg {
    height: 150px;
  }
  .records-card .card-heading {
    flex-wrap: wrap;
    gap: 15px;
  }
  .record-tools {
    margin-left: auto;
  }
  .record-tools .button {
    font-size: 9px;
  }
  table {
    font-size: 10px;
  }
  th,
  td {
    padding: 13px 14px;
  }
  td .weekday {
    display: none;
  }
  .value-pill {
    font-size: 10px;
    padding: 5px 7px;
  }
  .table-footer {
    padding: 13px;
    font-size: 9px;
  }
  .page-footer > span:last-child {
    display: none;
  }
  .total-card {
    padding: 22px 20px;
  }
  .total-item strong {
    font-size: 18px;
  }
  .total-item small {
    font-size: 9px;
  }
  .total-value {
    font-size: 34px;
  }
  .total-breakdown {
    gap: 9px;
  }
  .notice {
    font-size: 10px;
  }
  dialog {
    padding: 24px 20px;
  }
  .form-grid {
    gap: 10px;
  }
  .duration-inputs {
    gap: 3px;
    flex-wrap: wrap;
  }
  .duration-inputs input {
    width: 38px;
  }
  .dialog-actions .button {
    padding: 10px 11px;
    font-size: 11px;
  }
  .dialog-intro {
    font-size: 11px;
  }
  .checkbox-label {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (max-width: 650px) {
  .nav-button small {
    display: block;
    margin: 2px 0 0;
    font-size: 8px;
    white-space: nowrap;
  }
  .duration-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    gap: 3px;
  }
  .duration-inputs input {
    width: 100%;
    padding: 8px 3px;
    appearance: textfield;
    -moz-appearance: textfield;
  }
  .duration-inputs input::-webkit-inner-spin-button,
  .duration-inputs input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .metric-bottom {
    font-size: 9px;
  }
}
.point-field {
  min-width: 0;
}
.point-field > label {
  display: block;
  font-size: 12px;
  color: #617251;
}
.point-field > select {
  width: 100%;
  margin-top: 8px;
  font-size: 11px;
  padding: 8px 9px;
}
.point-hint {
  display: block;
  line-height: 1.6;
  font-size: 10px;
  color: #80906f;
  margin-top: 8px;
  min-height: 16px;
}
.point-date {
  display: block;
  font-size: 9px;
  color: #92a085;
  font-weight: 400;
  margin-top: 6px;
}
.chart-zero-line {
  stroke: #a7b797;
  stroke-width: 1.25;
  stroke-dasharray: none;
}
@media (max-width: 650px) {
  .quick-actions {
    width: 100%;
    gap: 7px;
  }
  .quick-action {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 9px 6px;
  }
  .quick-action span {
    font-size: 11px;
  }
  .metric-value.point-value {
    font-size: 24px;
  }
  .point-hint {
    font-size: 9px;
  }
  .point-field > select {
    padding: 8px 5px;
    font-size: 10px;
  }
  .point-date {
    font-size: 8px;
  }
}
