:root {
  color-scheme: light;
  --page: #f9f8f4;
  --card: #fffefa;
  --ink: #243c33;
  --muted: #657168;
  --line: #dedfd5;
  --green: #2c5948;
  --serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --sans: Inter, 'Segoe UI', Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #bb7738;
  outline-offset: 3px;
}
button {
  background: none;
  border: 0;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
i[data-icon],
.mark,
.brand-icon,
.icon-btn,
.section-head,
.legend,
.entrytools,
.button-line,
.modal-head,
.header-row,
.brand {
  display: flex;
  align-items: center;
}
.shell {
  max-width: 1256px;
  padding: 0 48px;
  margin: auto;
}
.mast {
  background: #fffefb;
  border-bottom: 1px solid var(--line);
}
.header-row {
  min-height: 78px;
  gap: 20px;
}
.brand {
  gap: 11px;
  min-width: 0;
  text-align: left;
  padding: 0;
  font: 600 30px/1 var(--serif);
  letter-spacing: -1.25px;
}
.brand-icon {
  color: #ac622e;
  justify-content: center;
}
.brand-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.6;
}
.brand-desc {
  border-left: 1px solid #d8d9ce;
  padding-left: 19px;
  color: var(--muted);
  font-size: 13px;
}
.icon-btn {
  justify-content: center;
  padding: 7px;
}
.gear:hover,
#month-toggle:hover {
  background: #edf0e7;
  border-radius: 7px;
}
main.shell {
  padding-top: 29px;
  padding-bottom: 44px;
}
.hero {
  border-radius: 19px;
  overflow: hidden;
  position: relative;
  min-height: 218px;
  display: flex;
  align-items: center;
  padding: 26px 36px;
  background: #e9ddbc url('assets/landscape.webp') center 15% / cover no-repeat;
  border: 1px solid #d7d4bd;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #f4e9cc 0%,
    rgba(246, 234, 207, 0.96) 18%,
    rgba(245, 231, 199, 0.74) 34%,
    rgba(246, 232, 200, 0.02) 57%
  );
}
.hero-text {
  position: relative;
}
.hero h1 {
  font: normal clamp(44px, 4.8vw, 74px) / 1.06 var(--serif);
  letter-spacing: -3.3px;
  margin: 10px 0 6px;
  color: #213e32;
}
.hero p {
  margin: 0;
  color: #425345;
  font-size: 17px;
}
.date-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 42px)) auto repeat(3, minmax(0, 42px));
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
}
.date-nav button {
  display: grid;
  place-items: center;
  min-height: 40px;
  min-width: 0;
  padding: 0 5px;
  border-radius: 7px;
}
.date-nav [data-do='today'] {
  padding-inline: 12px;
  background: #eaf0e6;
  font-weight: 600;
  font-size: 14px;
}
.date-nav button:hover,
.time-controls button:hover {
  background: #e8e9df;
}
.date-nav svg,
#month-toggle svg {
  width: 16px;
  height: 16px;
}
#dashboard {
  margin-top: 28px;
}
h2,
h3,
p {
  margin: 0;
}
h2 {
  font: normal 29px/1.2 var(--serif);
  letter-spacing: -0.8px;
}
.panel h2 {
  font-size: 22px;
}
.add-entry {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 42px;
}
.add-entry svg {
  margin: 0;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
.quick {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  min-height: 112px;
  text-align: left;
  border: 1px solid var(--edge);
  background: var(--tint);
  border-radius: 13px;
  padding: 15px 13px 13px;
  transition:
    transform 0.16s,
    box-shadow 0.16s;
}
.quick:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #384a3510;
}
.quick .mark {
  border: 1px solid color-mix(in srgb, var(--tone) 20%, transparent);
  background: var(--chip);
  width: 36px;
  height: 36px;
  justify-content: center;
  border-radius: 11px;
  color: var(--tone);
}
.quick strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.activity {
  --tint: #eef2e8;
  --chip: #e0ead8;
  --edge: #d8e1cf;
  --tone: #426345;
}
.note {
  --tint: #f8f0db;
  --chip: #f0e5c5;
  --edge: #e8ddbf;
  --tone: #8c6b30;
}
.photo {
  --tint: #f1edf6;
  --chip: #e7dfef;
  --edge: #e0d9e8;
  --tone: #766087;
}
.plan {
  --tint: #eaf1f4;
  --chip: #dae7eb;
  --edge: #d4e1e5;
  --tone: #4d7281;
}
.records {
  margin-top: 29px;
}
.section-head {
  gap: 10px;
  margin-bottom: 14px;
}
.count {
  background: #e9ece2;
  border: 1px solid #dce1d5;
  color: #5d705f;
  font-size: 12px;
  border-radius: 20px;
  min-width: 25px;
  text-align: center;
}
.empty {
  border: 1px dashed #d1d6c9;
  border-radius: 15px;
  background: #f5f5ee;
  text-align: center;
  padding: 24px 16px 28px;
}
.empty svg {
  display: block;
  width: 98px;
  height: 72px;
  margin: 0 auto 10px;
}
.empty h3 {
  font: normal 23px/1.3 var(--serif);
  letter-spacing: -0.35px;
}
.empty p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 19px 21px;
}
.month-panel {
  margin-bottom: 18px;
}
#month-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
}
#month-toggle[aria-expanded='true'] svg {
  transform: rotate(180deg);
}
#month-body {
  margin-top: 14px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  gap: 2px;
}
.dow {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.6px;
  padding: 3px;
}
.cal-day {
  display: grid;
  place-content: center;
  position: relative;
  width: 100%;
  height: 30px;
  line-height: 1;
  border-radius: 8px;
  font-size: 13px;
}
.cal-day.outer {
  color: #959b90;
}
.cal-day:hover {
  background: #eef1e8;
}
.cal-day.now {
  box-shadow: inset 0 0 0 1px #9dab94;
}
.cal-day.chosen {
  background: var(--green);
  color: white;
}
.dots {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 3px;
}
.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #638769;
}
.dot.planned {
  background: #bd8550;
}
.legend {
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  cursor: pointer;
}
.toggle {
  appearance: none;
  margin: 0;
  width: 32px;
  height: 19px;
  border-radius: 16px;
  background: #dcded5;
  border: 1px solid #ced1c6;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.toggle:before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px #24372833;
}
.toggle:checked {
  background: var(--green);
  border-color: var(--green);
}
.toggle:checked:before {
  left: 15px;
}
#day-calendars {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-bottom: 12px;
}
.calendar-switch {
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  font-size: 13px;
}
.calendar-switch[aria-pressed="true"] {
  border-color: var(--green);
  font-weight: 600;
}
.hero-text {
  min-width: 0;
}
.hero:has(#day-calendars:not([hidden])):before {
  background: linear-gradient(90deg, #f4e9cc 0%, #f4e9ccef 52%, #f4e9cc80);
}
.hero[data-calendar-key]:not([data-calendar-key="civil"]) h1 {
  max-width: 34ch;
  font-size: clamp(26px, 3.2vw, 44px);
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
#day-details {
  max-width: 68ch;
  margin-top: 12px;
}
#day-details p {
  margin-top: 10px;
  font-size: 15px;
  overflow-wrap: anywhere;
}
#day-details .btn {
  margin-top: 10px;
}
#day-details a {
  color: var(--green);
  margin-right: 8px;
}
.large .cal-day {
  height: 76px;
  align-content: start;
  justify-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  gap: 5px;
}
.large .dots {
  bottom: 8px;
  justify-content: flex-start;
  padding: 0 10px;
}
.large .dow {
  padding: 10px;
}
.group-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.25px;
  margin: 17px 0 8px;
}
.entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  margin: 7px 0;
  padding: 13px;
  overflow-wrap: anywhere;
}
.entry .mark {
  border-radius: 10px;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: var(--tone);
  background: var(--chip);
}
.entry-body {
  min-width: 0;
  flex: 1;
}
.entry-body h3,
.entry-body p {
  font-size: 15px;
  font-weight: 550;
  white-space: pre-wrap;
}
.entry-body small {
  color: var(--muted);
  font-size: 12px;
}
.entrytools {
  gap: 4px;
  flex-wrap: wrap;
}
.entrytools button {
  font-size: 12px;
  padding: 5px;
  border-radius: 7px;
}
.entrytools button:hover {
  background: #e9eee5;
}
.entry img {
  display: block;
  max-width: 160px;
  max-height: 120px;
  border-radius: 8px;
}
.photo-preview {
  padding: 0;
}
.entry.done {
  opacity: 0.76;
}
.entry.done h3 {
  text-decoration: line-through;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(490px, calc(100vw - 28px));
  padding: 0;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 20px 90px #18352835;
  max-height: 90dvh;
}
dialog::backdrop {
  background: #172a2380;
}
#modal-content {
  padding: 24px;
}
.modal-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-head h2 {
  font-size: 27px;
}
.modal-head button {
  border-radius: 50%;
  background: #f0f1e9;
}
.form {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 5px;
  font-size: 14px;
}
.field > label,
.field > span,
.field legend {
  font-weight: 550;
}
input:not([type='checkbox']),
select,
textarea {
  width: 100%;
  background: white;
  border: 1px solid #bfc8ba;
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 105px;
}
.time-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
}
.time-controls button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
}
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.button-line {
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f5f5ef;
  padding: 8px 12px;
  font-size: 14px;
}
.btn.main {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn.danger {
  color: #983e36;
  margin-right: auto;
}
.btn svg {
  vertical-align: middle;
  margin-right: 5px;
}
.weekdays {
  border: 0;
  padding: 0;
  margin: 0;
}
.weekdays label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 4px;
}
.weekdays input {
  accent-color: var(--green);
}
.help,
.form-error,
.settings-copy {
  font-size: 13px;
  color: var(--muted);
}
.form-error {
  color: #92382d;
}
.settings-block + .settings-block {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.settings-block h3 {
  font: normal 20px var(--serif);
  margin-bottom: 6px;
}
.settings-block .button-line {
  justify-content: flex-start;
  margin-top: 9px;
}
.checks {
  display: flex;
  align-items: center;
  gap: 9px;
}
.checks input {
  accent-color: var(--green);
}
[hidden] {
  display: none !important;
}
.lightbox {
  display: block;
  max-width: 100%;
  max-height: 65dvh;
  margin: auto;
}
.reminder {
  display: block;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px;
}
.reminder small {
  display: block;
  color: var(--muted);
}
#toast:not(:empty) {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #213e32;
  color: #fff;
  border-radius: 10px;
  padding: 9px 16px;
  z-index: 5;
}
#toast {
  pointer-events: none;
}
.notice {
  padding: 12px;
  background: #fff1dc;
  color: #6e4420;
  border: 1px solid #e9cfa9;
  border-radius: 10px;
  margin: 10px 0;
}
@media (max-width: 1020px) {
  .shell {
    padding-inline: 27px;
  }
  .quick {
    padding: 12px 9px;
  }
  .quick strong {
    font-size: 13px;
  }
  .brand-desc {
    display: none;
  }
}
@media (max-width: 720px) {
  .shell {
    padding-inline: 16px;
  }
  .header-row {
    min-height: 59px;
    padding-block: 8px;
    gap: 8px;
  }
  .brand {
    font-size: clamp(18px, 5vw, 23px);
    line-height: 1.1;
    gap: 7px;
  }
  .brand-icon svg {
    width: 27px;
    height: 27px;
  }
  .gear svg {
    width: 17px;
  }
  .hero {
    min-height: 190px;
    padding: 20px;
    align-items: flex-start;
  }
  .hero:before {
    background: linear-gradient(90deg, #f4e9cceb 8%, #f4e9ccb0 41%, transparent 80%);
  }
  .hero h1 {
    font-size: 45px;
    letter-spacing: -2px;
  }
  .hero p {
    font-size: 15px;
  }
  #dashboard {
    margin-top: 21px;
  }
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
  }
  .quick {
    min-height: 66px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 11px;
  }
  .quick .mark {
    width: 31px;
    height: 31px;
    flex-shrink: 0;
  }
  .quick strong {
    font-size: 13px;
  }
  .records {
    margin-top: 23px;
  }
  h2 {
    font-size: 25px;
  }
  main.shell {
    padding-top: 16px;
  }
  .empty {
    padding: 18px 12px;
  }
  .panel {
    padding: 16px;
  }
  .large .cal-day {
    height: 50px;
  }
  .entrytools {
    max-width: 75px;
  }
  .entry img {
    max-width: 120px;
  }
}
@media (max-width: 440px) {
  .pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .quick-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
#map-toggle { margin-left: auto; }
#map-toggle, #day-toggle { border: 1px solid var(--line); border-radius: 8px; }
#map-toggle[aria-expanded="true"], #day-toggle[aria-expanded="true"], .route-limits [aria-pressed="true"] { background: #dce6db; }
#route-map { margin-bottom: 18px; }
.route-heading, .route-limits, .route-stops { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.route-heading { justify-content: space-between; margin-bottom: 12px; }
.route-heading h2 { font: 600 23px var(--serif); margin: 0; }
.route-limits, .route-legend { font-size: 13px; color: var(--muted); }
.route-limits .btn { padding: 4px 8px; min-height: 28px; }
.route-drawing { display: block; width: 100%; max-height: 360px; background: #eaf1ef; border-radius: 10px; }
.route-drawing line { stroke: #376453; stroke-width: 2; }
.route-drawing line.planned { stroke: #935f38; stroke-dasharray: 5 4; }
.route-drawing circle { fill: #376453; stroke: white; stroke-width: 1.8; cursor: pointer; }
.route-drawing circle.planned { fill: #935f38; }
.route-drawing circle.selected { stroke: #1a3128; stroke-width: 3; }
.route-legend { margin: 8px 0; }
.route-stop { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 13px; }
.route-stop[aria-current] { background: #e3ebdf; }
.location-template { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 7px 0;
  color: #595f5b; background: #eeefec; border-radius: 9px; text-align: left; }
.location-template small { display: block; }
#geo-status:empty { display: none; }
#observances { margin-top: 4px; font-weight: 600; color: var(--green); }
.hero h1.significant-tithi { font-weight: 650; color: var(--green); }
.location { --tint: #eaf2ec; --chip: #dce9de; --edge: #cfdcd2; --tone: #40674e; }
