:root {
  --paper: #faf6ed;
  --desk: #eee8dc;
  --ink: #393b3a;
  --muted: #716c64;
  --blue: #424f85;
  --coral: #b8503d;
  --yellow: #f3d675;
  --lilac: #dfd5ef;
  --mint: #dce6cf;
  --line: #ded6c7;
  --font:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--desk);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}
h1 {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  letter-spacing: -1.7px;
  line-height: 1.1;
  margin-bottom: 13px;
}
h2 {
  font-size: 1.55rem;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 1rem;
  line-height: 1.4;
}
p {
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
[hidden] {
  display: none !important;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #c0553e;
  outline-offset: 4px;
}
a {
  color: var(--blue);
}
button {
  border: 0;
}
input,
select,
textarea {
  border: 1px solid #c6bfb0;
  background: #fffdf8;
  padding: 11px 12px;
  color: var(--ink);
  border-radius: 5px;
  min-height: 46px;
  min-width: 0;
  width: 100%;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 18px;
}
textarea {
  resize: vertical;
}
form {
  margin: 0;
}
.primary,
.secondary,
.text-button,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 600;
}
.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 2px 3px 0 #303b6630;
}
.primary:hover {
  background: #313f70;
}
.secondary {
  background: var(--paper);
  color: var(--blue);
  border: 1px solid #bab6c1;
}
.text-button {
  background: transparent;
  color: var(--blue);
  padding: 7px 4px;
  text-decoration: underline;
  text-decoration-color: #424f8550;
  text-underline-offset: 4px;
}
.text-button:hover {
  text-decoration-color: var(--blue);
}
.small {
  font-size: 0.79rem;
  line-height: 1.65;
  color: var(--muted);
}
.form-error {
  font-size: 0.87rem;
  line-height: 1.5;
  color: #a23628;
  margin: 12px 0 0;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--blue);
  color: white;
  box-shadow: 3px 5px 0 #24233b30;
  padding: 15px 21px;
  border-radius: 7px;
  max-width: min(430px, 90vw);
  z-index: 30;
  line-height: 1.55;
  font-size: 0.9rem;
}
.brand {
  font-family: Georgia, serif;
  font-size: 2.9rem;
  font-weight: 700;
  letter-spacing: -2px;
  text-decoration: none;
  color: var(--blue);
  line-height: 1;
}
.brand i {
  color: var(--coral);
  font-weight: 400;
}
.brand span {
  display: block;
  font: 500 0.65rem var(--font);
  letter-spacing: 2.5px;
  margin-top: 10px;
  text-transform: uppercase;
  color: var(--muted);
}
.notebook {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: 100svh;
  max-width: 1650px;
  margin: auto;
  background: var(--paper);
}
.sidebar {
  padding: 35px 17px 30px 25px;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow-y: auto;
  border-right: 1px dashed #bdb6a7;
  display: flex;
  flex-direction: column;
  background: #f2ecdf;
}
.sidebar > .brand {
  margin: 0 0 34px 16px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  min-height: 46px;
  padding: 9px 14px;
  background: transparent;
  color: var(--ink);
  font-size: 0.84rem;
  border-radius: 3px 11px 6px 3px;
  margin: 3px 0;
  position: relative;
}
.nav-link > span {
  font-size: 1.25rem;
  width: 20px;
  text-align: center;
  color: var(--blue);
}
.nav-link:hover {
  background: #e7e0d1;
}
.nav-link.active {
  background: var(--yellow);
  font-weight: 700;
  transform: rotate(-0.8deg);
  box-shadow: 2px 2px 0 #b99d5220;
}
.nav-link[data-view="calendar"].active,
.nav-link[data-view="trip"].active {
  background: #cddfe9;
}
.nav-link[data-view="routine"].active,
.nav-link[data-view="goal"].active {
  background: var(--lilac);
}
.nav-link[data-view="medicine"].active {
  background: #f2d5c4;
}
.nav-link[data-view="finance"].active {
  background: var(--mint);
}
.sidebar-scribble {
  margin-top: auto;
  padding: 28px 8px 0;
  text-align: center;
}
.sidebar-scribble img {
  width: 145px;
  height: auto;
}
.sidebar-scribble p {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: #777064;
  line-height: 1.5;
}
.pages {
  padding: 0 clamp(22px, 4vw, 64px) 65px;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 88px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
  font-size: 0.79rem;
  color: var(--muted);
}
.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  font-size: 0.84rem;
  color: var(--ink);
  padding: 7px;
}
.profile > span:first-child {
  display: grid;
  place-items: center;
  background: var(--lilac);
  color: var(--blue);
  width: 34px;
  height: 34px;
  border-radius: 45% 55% 50% 44%;
  font-weight: 700;
}
.mobile-menu {
  display: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin: 0 0 28px;
}
.page-heading p:last-child {
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 0;
}
.page-heading .primary {
  flex-shrink: 0;
}
.page-kicker {
  font: 650 0.65rem var(--font);
  letter-spacing: 1.8px;
  color: var(--coral);
  margin-bottom: 16px;
}
.sun-doodle {
  font: 100 7rem Georgia;
  color: #c48330;
  transform: rotate(13deg);
  margin-right: 15px;
  line-height: 1;
}
.week-ribbon {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 35px;
}
.week-day {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  padding: 14px 5px;
  color: var(--muted);
  font-size: 0.72rem;
}
.week-day strong {
  font: 1.5rem Georgia;
  color: var(--ink);
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
}
.week-day.current strong {
  background: var(--coral);
  color: white;
  border-radius: 46% 54% 42% 53%;
  transform: rotate(-6deg);
}
.day-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 42px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.section-heading h2 {
  margin: 0;
  font-size: 1.5rem;
}
.section-heading .text-button {
  font-size: 0.75rem;
  flex-shrink: 0;
}
.timeline {
  margin-bottom: 30px;
}
.empty {
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.89rem;
  border-top: 1px dashed var(--line);
  line-height: 1.7;
}
.empty p {
  margin: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 57px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
}
.time-label {
  font: 1.05rem Georgia;
  color: var(--blue);
  padding-top: 2px;
}
.timeline-item h3 {
  margin: 0 0 6px;
}
.timeline-item .meta {
  font-size: 0.73rem;
  color: var(--muted);
  display: flex;
  gap: 5px 12px;
  flex-wrap: wrap;
}
.timeline-item[data-kind="routine"] .time-label {
  color: #756180;
}
.timeline-item[data-kind="medicine"] .time-label {
  color: var(--coral);
}
.timeline-item.done h3 {
  text-decoration: line-through;
  text-decoration-color: #9a9b90;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}
.action-row button {
  font-size: 0.76rem;
  min-height: 39px;
  padding: 7px 12px;
}
.sticky {
  position: relative;
  padding: 28px 23px 22px;
  transform: rotate(1.3deg);
  box-shadow: 3px 4px 0 #59462413;
  margin: 15px 0 36px;
  border-radius: 1px 3px 12px 1px;
}
.yellow {
  background: #f7e3a0;
}
.lilac {
  background: var(--lilac);
}
.tape {
  position: absolute;
  top: -10px;
  left: 35%;
  width: 75px;
  height: 23px;
  background: #e8b7a7a8;
  transform: rotate(-5deg);
  clip-path: polygon(3% 0, 98% 4%, 100% 94%, 0 100%, 5% 78%, 1% 45%);
}
.hand-note {
  font: italic 1.1rem Georgia;
  color: var(--coral);
  margin-bottom: 16px;
}
.sticky h2 {
  font-size: 1.6rem;
}
.sticky p:not(.hand-note) {
  font-size: 0.84rem;
  line-height: 1.65;
}
.sticky .text-button {
  font-size: 0.75rem;
}
.trip-note {
  border: 2px dashed #a0b3bf;
  padding: 24px 20px;
  transform: rotate(-0.7deg);
  background: #eef2ef;
}
.trip-note h2 {
  margin: 20px 0 12px;
  font-size: 1.5rem;
}
.trip-note p {
  font-size: 0.85rem;
}
.mini-route {
  font-weight: 750;
  color: var(--blue);
  letter-spacing: 4px;
  font-size: 1.3rem;
  display: flex;
  justify-content: space-between;
}
.mini-route span {
  color: var(--coral);
}
.sync-copy {
  margin: 28px 0 0;
}
.task-row {
  display: flex;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  align-items: flex-start;
}
.task-mark {
  display: grid;
  place-items: center;
  border: 1.5px solid #a69e8f;
  border-radius: 4px 6px 4px 3px;
  transform: rotate(-3deg);
  width: 25px;
  height: 25px;
  color: var(--blue);
  flex-shrink: 0;
}
.task-body {
  flex: 1;
  min-width: 0;
}
.task-title {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.task-row.done h3 {
  text-decoration: line-through;
  color: var(--muted);
}
.task-row .meta {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag {
  font-size: 0.67rem;
  background: #ece5d8;
  color: #625d55;
  border-radius: 3px;
  padding: 3px 7px;
  display: inline-block;
}
.notes {
  font-size: 0.83rem;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0;
}
.filter-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid #c6bfb0;
  color: var(--muted);
  background: transparent;
  border-radius: 22px;
  padding: 8px 15px;
  font-size: 0.78rem;
}
.chip.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.week-controls {
  display: flex;
  gap: 12px;
  align-items: end;
  margin: 28px 0;
}
.week-controls label {
  margin: 0;
  max-width: 220px;
}
.week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(125px, 1fr));
  overflow: auto;
  gap: 10px;
  padding-bottom: 12px;
  align-items: start;
  scroll-snap-type: x proximity;
}
.calendar-column {
  min-height: 250px;
  background: #f2ece0;
  padding: 12px 8px;
  scroll-snap-align: start;
  border-radius: 8px 8px 2px 2px;
}
.calendar-column:nth-child(3n + 2) {
  background: #e9e8ef;
}
.calendar-column:nth-child(3n) {
  background: #e7ecdf;
}
.calendar-column > h2 {
  font: 0.73rem var(--font);
  text-align: center;
  margin: 4px 0 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.calendar-column > h2 strong {
  display: block;
  font: 1.8rem Georgia;
  margin: 7px 0;
}
.calendar-note {
  background: #fffdf7;
  border: 1px solid #d8d1c4;
  padding: 12px 9px;
  margin-bottom: 10px;
  border-radius: 3px;
  font-size: 0.74rem;
  overflow-wrap: anywhere;
  box-shadow: 1px 2px 0 #4b3a2510;
}
.calendar-note h3 {
  font-size: 0.8rem;
  margin: 7px 0;
  line-height: 1.4;
}
.calendar-note .text-button {
  font-size: 0.69rem;
}
.calendar-note .small {
  font-size: 0.67rem;
}
.intro-strip {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 26px;
  border-radius: 4px 13px 3px 9px;
}
.intro-strip > span {
  font: 2.7rem Georgia;
  color: #6b587c;
}
.intro-strip p {
  margin: 0;
  font-size: 0.9rem;
}
.entry-card {
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
}
.entry-card h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}
.entry-card .meta {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.8;
}
.entry-card .action-row {
  flex-shrink: 0;
  align-self: start;
  margin: 0;
}
.goal-grid,
.trip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}
.goal-card {
  padding: 27px;
  background: #e8dfef;
  position: relative;
  border-radius: 3px;
  box-shadow: 3px 4px 0 #4c3c5510;
}
.goal-card:nth-child(3n + 2) {
  background: #e5e9cb;
  transform: rotate(0.5deg);
}
.goal-card:nth-child(3n) {
  background: #f2d7c0;
}
.goal-card h2 {
  margin: 8px 0 16px;
  overflow-wrap: anywhere;
}
.goal-card progress {
  accent-color: var(--blue);
  width: 100%;
  height: 11px;
  border: 0;
  border-radius: 0;
  margin: 12px 0;
}
.goal-card .small {
  color: #625b67;
}
.goal-progress {
  font: 1.4rem Georgia;
  color: var(--blue);
  margin: 0;
}
.goal-card .action-row {
  margin-top: 20px;
}
.finance-filters {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 25px 0;
}
.finance-filters label {
  margin: 0;
  max-width: 185px;
}
.money-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 25px;
  background: #e3e9d6;
  border-top: 2px solid #aebda1;
  border-bottom: 1px solid #bdc9b2;
  margin: 25px 0;
}
.money-total {
  padding: 0 22px;
  border-right: 1px solid #c3ccb9;
}
.money-total:first-child {
  padding-left: 0;
}
.money-total:last-child {
  border: 0;
}
.money-total span {
  display: block;
  font-size: 0.76rem;
  margin-bottom: 9px;
  color: var(--muted);
}
.money-total strong {
  font: 1.7rem Georgia;
}
.settlement {
  font-size: 0.86rem;
  background: #eee7d9;
  padding: 15px 19px;
  border-radius: 4px;
}
.ledger-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.ledger-row h3 {
  margin: 0 0 6px;
}
.ledger-row .small {
  margin: 0;
}
.ledger-right {
  text-align: right;
  flex-shrink: 0;
}
.ledger-value {
  font: 1.3rem Georgia;
  color: var(--coral);
}
.ledger-value.income {
  color: #476439;
}
.ledger-right .text-button {
  font-size: 0.72rem;
  display: block;
  margin-left: auto;
}
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 25px 0;
}
.category-list span {
  background: #ede7d9;
  padding: 8px 12px;
  font-size: 0.78rem;
  border-radius: 4px;
}
.care-note {
  background: #f6e2d5;
  border-left: 3px solid #c78868;
  padding: 22px 25px;
  margin-bottom: 35px;
}
.care-note p {
  font-size: 0.87rem;
  margin-bottom: 12px;
}
.care-note .small {
  font-size: 0.76rem;
  margin: 15px 0 0;
}
.section-spacer {
  margin-top: 35px;
}
.travel-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 25px 20px 35px;
  color: var(--blue);
  font: italic 1.7rem Georgia;
}
.travel-banner svg {
  max-width: 200px;
  width: 25%;
  fill: none;
  stroke: var(--coral);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 6 7;
}
.ticket {
  padding: 24px;
  background: #e6eef0;
  border: 1px solid #b9c9ce;
  border-radius: 12px 12px 4px 4px;
  position: relative;
}
.ticket-route {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font: 1.5rem Georgia;
  border-bottom: 2px dashed #b4c7cf;
  padding-bottom: 20px;
  margin: 16px 0;
}
.ticket-route span {
  max-width: 44%;
  overflow-wrap: anywhere;
}
.ticket h2 {
  font-size: 1.15rem;
  margin: 8px 0;
}
.ticket .small {
  color: #5d6a70;
}
.ticket .notes {
  border-top: 1px solid #becbd0;
  padding-top: 10px;
}
.ticket code {
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--blue);
}
.members-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
  margin: 30px 0;
}
.member-card {
  padding: 23px 18px;
  background: #ece5f1;
  border-radius: 40% 20% 3px 3px / 18px 24px 3px 3px;
}
.member-card:nth-child(2) {
  background: #f4dfb8;
}
.member-card:nth-child(3) {
  background: #dfe8d7;
}
.member-card h2 {
  font-size: 1.35rem;
  margin: 10px 0;
}
.member-card .text-button {
  font-size: 0.75rem;
}
.paper-panel {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  margin-top: 20px;
  max-width: 750px;
}
.paper-panel p {
  font-size: 0.88rem;
}
.device-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.device-row .small {
  margin: 0;
}
.device-row strong {
  font-size: 0.88rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.form-grid .primary {
  justify-self: start;
}
.entrance {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1500px;
  margin: auto;
  background: var(--paper);
}
.cover {
  background: #e6dcea;
  position: relative;
  padding: 45px 12% 55px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}
.cover > .brand {
  margin-bottom: 30px;
}
.cover > img {
  width: 100%;
  max-width: 340px;
  height: auto;
  align-self: center;
}
.cover h1 {
  font-size: clamp(2.5rem, 4vw, 4.4rem);
  margin: 5px 0 25px;
  color: #45435a;
  line-height: 1.1;
}
.cover h1 em {
  color: var(--coral);
}
.cover > p {
  font-size: 0.9rem;
  color: #655c67;
}
.paper-stamp {
  display: inline-block;
  border: 1.5px dashed #a97c68;
  color: #996650;
  font-size: 0.67rem;
  letter-spacing: 2px;
  padding: 12px 16px;
  transform: rotate(-4deg);
  margin: 20px 0 0;
  background: #f3e4c4;
}
.entrance-form {
  padding: 70px 13%;
  align-self: center;
}
.entrance-form h2 {
  font-size: 2.3rem;
  margin-bottom: 20px;
}
.entrance-form > p:not(.hand-note) {
  font-size: 0.9rem;
  color: var(--muted);
}
.entrance-form form {
  margin: 25px 0;
}
.entrance-form .primary {
  width: 100%;
}
details {
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
summary {
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}
.reminder-banner {
  padding: 20px;
  background: #f4d6c5;
  border: 2px dashed var(--coral);
  margin: 20px 0;
  line-height: 1.6;
}
.reminder-banner button {
  margin-left: 12px;
}
dialog {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b8b1a1;
  border-radius: 7px 14px 6px 9px;
  box-shadow: 6px 8px 0 #5b50412b;
  padding: 28px;
  width: calc(100% - 28px);
  max-width: 570px;
  max-height: 90svh;
}
dialog::backdrop {
  background: #302d3a70;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 1.8rem;
}
.close-dialog:not(.secondary) {
  background: none;
  color: var(--ink);
  font-size: 1.6rem;
  min-width: 42px;
  min-height: 42px;
}
.weekday-picker {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.weekday-picker label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  background: #eee6da;
  margin: 0;
  font-size: 0.75rem;
}
.weekday-picker input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  accent-color: var(--blue);
}
.checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.row-hint {
  font-size: 0.76rem;
  margin-top: -5px;
  color: var(--muted);
}
#entry-form .primary {
  margin-top: 8px;
}
@media (min-width: 1650px) {
  .notebook {
    border-left: 1px solid #d4cbbb;
    border-right: 1px solid #d4cbbb;
  }
}
@media (max-width: 1100px) {
  .notebook {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 15px;
  }
  .pages {
    padding: 0 26px 50px;
  }
  .day-layout {
    grid-template-columns: minmax(0, 1fr) 215px;
    gap: 25px;
  }
  .sticky {
    padding: 26px 17px;
  }
  .sun-doodle {
    font-size: 5rem;
  }
  .entry-card {
    flex-direction: column;
    gap: 10px;
  }
  .goal-grid,
  .trip-grid {
    gap: 17px;
  }
  .travel-banner {
    font-size: 1.4rem;
  }
  .money-total {
    padding: 0 15px;
  }
  .money-total strong {
    font-size: 1.45rem;
  }
}
@media (max-width: 760px) {
  .notebook {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    top: 66px;
    left: 12px;
    right: 12px;
    height: auto;
    max-height: calc(100svh - 85px);
    overflow: auto;
    z-index: 20;
    border: 1px solid #b8ae9c;
    box-shadow: 4px 5px 0 #44352225;
    padding: 17px;
    background: var(--paper);
  }
  .sidebar.open {
    display: block;
  }
  .sidebar > .brand,
  .sidebar-scribble {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .nav-link {
    font-size: 0.8rem;
    padding: 14px 9px;
  }
  .mobile-menu {
    display: block;
    background: transparent;
    color: var(--blue);
    font-weight: 650;
    padding: 10px 0;
    min-height: 44px;
  }
  .pages {
    padding: 0 19px 50px;
  }
  .topbar {
    height: 70px;
    margin-bottom: 27px;
  }
  .topbar > #date-label {
    display: none;
  }
  .profile {
    font-size: 0.8rem;
  }
  .page-heading {
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 2.55rem;
    letter-spacing: -1px;
  }
  .page-heading p:last-child {
    font-size: 0.87rem;
  }
  .page-heading .primary {
    font-size: 0.8rem;
    margin-top: 6px;
  }
  .page-kicker {
    font-size: 0.59rem;
    margin-bottom: 12px;
  }
  .sun-doodle {
    font-size: 4rem;
    position: absolute;
    right: 20px;
    top: 103px;
    opacity: 0.6;
    pointer-events: none;
  }
  #today-page .page-heading {
    padding-right: 60px;
  }
  .week-day {
    padding: 12px 2px;
    font-size: 0.66rem;
  }
  .week-day strong {
    font-size: 1.3rem;
  }
  .week-ribbon {
    margin-bottom: 25px;
  }
  .day-layout {
    display: block;
  }
  .day-notes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 35px;
  }
  .sticky {
    max-width: 450px;
    transform: rotate(0.5deg);
    padding: 25px;
    margin: 0 0 25px;
  }
  .trip-note {
    max-width: 450px;
  }
  .section-heading h2 {
    font-size: 1.35rem;
  }
  .section-heading .text-button {
    font-size: 0.7rem;
  }
  .timeline-item {
    gap: 11px;
    grid-template-columns: 49px minmax(0, 1fr);
  }
  .timeline-item h3 {
    font-size: 0.91rem;
  }
  .goal-grid,
  .trip-grid {
    grid-template-columns: 1fr;
  }
  .goal-card {
    padding: 24px;
  }
  .finance-filters {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .finance-filters label {
    width: 100%;
    max-width: 250px;
  }
  .money-summary {
    padding: 19px 14px;
    gap: 12px;
  }
  .money-total {
    padding: 0;
    border: 0;
  }
  .money-total span {
    font-size: 0.67rem;
  }
  .money-total strong {
    font-size: 1.17rem;
  }
  .ledger-row {
    gap: 10px;
  }
  .ledger-row h3 {
    font-size: 0.9rem;
  }
  .ledger-value {
    font-size: 1.12rem;
  }
  .care-note {
    padding: 20px;
  }
  .care-note .action-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .travel-banner {
    padding: 18px 0 27px;
    gap: 12px;
    font-size: 1.15rem;
  }
  .members-list {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .member-card {
    border-radius: 4px;
    padding: 18px 22px;
  }
  .member-card h2 {
    margin: 0 0 6px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .intro-strip {
    padding: 18px;
    gap: 17px;
  }
  .intro-strip p {
    font-size: 0.84rem;
  }
  .entry-card h2 {
    font-size: 1.25rem;
  }
  .entrance {
    display: block;
  }
  .cover {
    padding: 28px 27px 30px;
  }
  .cover > .brand {
    font-size: 2.4rem;
    margin: 0;
  }
  .cover > img {
    max-width: 210px;
    position: absolute;
    right: 12px;
    top: 10px;
    width: 47%;
  }
  .cover h1 {
    font-size: 2.7rem;
    line-height: 1.1;
    margin: 55px 0 20px;
    position: relative;
  }
  .cover > p {
    font-size: 0.82rem;
    margin: 0;
  }
  .paper-stamp {
    margin-top: 20px;
  }
  .entrance-form {
    padding: 35px 25px;
  }
  .entrance-form h2 {
    font-size: 2rem;
  }
  .toast {
    right: 16px;
    bottom: 18px;
  }
  .week-board {
    grid-template-columns: repeat(7, 155px);
  }
  dialog {
    padding: 22px;
  }
  .dialog-heading h2 {
    font-size: 1.6rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* O caderno financeiro: abas de papel e cores para orientar a leitura. */
.sidebar > .brand {
  font-size: 2.25rem;
  margin-left: 5px;
}
.mint {
  background: var(--mint);
}
.privacy-note {
  font-size: 0.83rem;
  color: #4f6353;
  max-width: 75ch;
}
.money-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  border-bottom: 1px solid #b8c4ac;
  margin: 24px 0 30px;
  padding: 4px 2px 0;
}
.money-tabs button {
  flex-shrink: 0;
  padding: 14px 17px;
  min-height: 46px;
  color: var(--ink);
  background: #e9e1d3;
  border-radius: 10px 5px 0 0;
  font-size: 0.82rem;
}
.money-tabs button:nth-child(2n) {
  background: #e6ddee;
}
.money-tabs button.active {
  background: #cfddbe;
  font-weight: 700;
  box-shadow: inset 0 -3px #6a8156;
}
.wallet-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 28px 30px;
  background: #dfe8d3;
  border-radius: 7px 30px 7px 7px;
  border: 1px solid #b8c9a8;
}
.wallet-banner h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.wallet-banner p:last-child {
  margin-bottom: 0;
}
.wallet-banner .page-kicker {
  color: #4d6545;
}
.wallet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.forecast-note {
  padding: 17px 20px;
  background: #ece4f2;
  border-left: 3px solid #a38ab6;
  font-size: 0.85rem;
  line-height: 1.7;
}
.finance-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  margin: 35px 0;
}
.finance-columns > section {
  min-width: 0;
}
.category-budget {
  margin: 18px 0;
}
.category-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.category-budget progress,
.budget-card progress {
  display: block;
  width: 100%;
  height: 10px;
  margin: 11px 0;
  accent-color: #7d9467;
  border: 0;
}
.category-budget:nth-child(3n + 2) progress {
  accent-color: #b98572;
}
.category-budget:nth-child(3n) progress {
  accent-color: #9a89b5;
}
#finance-trend svg {
  width: 100%;
  display: block;
}
#finance-trend details {
  overflow-x: auto;
}
#finance-trend table {
  border-collapse: collapse;
  font-size: 0.73rem;
  width: 100%;
  margin-top: 15px;
}
#finance-trend th,
#finance-trend td {
  padding: 10px 5px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
#finance-trend th:first-child,
#finance-trend td:first-child {
  text-align: left;
}
#finance-due {
  border-top: 1px dashed #c5baa4;
  padding: 27px 0;
}
.due-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.due-row strong {
  flex: 1;
  overflow-wrap: anywhere;
}
.overdue-note {
  color: #a23628;
  font-size: 0.85rem;
}
#finance-split-panel {
  background: #f2e4c6;
  padding: 27px;
  border-radius: 4px 5px 18px 3px;
  margin-top: 15px;
}
#finance-split-panel .settlement {
  background: transparent;
  padding: 0;
}
.contribution-note {
  font-size: 0.83rem;
}
.ledger-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  margin: 20px 0;
}
.ledger-toolbar label {
  flex: 1 1 150px;
  margin: 0;
}
.ledger-toolbar label:first-child {
  flex-basis: 240px;
}
.ledger-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 25px 0;
  font-size: 0.78rem;
}
.ledger-row > div:first-child {
  min-width: 0;
}
.ledger-row h3 {
  overflow-wrap: anywhere;
}
.ledger-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.planned-tag {
  background: #e7dbee;
  color: #5d466b;
}
.ledger-right .secondary {
  font-size: 0.74rem;
  padding: 8px;
  margin-top: 12px;
}
.account-grid,
.budget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 25px 0;
}
.account-card,
.budget-card {
  background: #e6ead8;
  padding: 25px;
  border-radius: 3px 14px 4px 3px;
  border-top: 3px solid #b4c299;
  overflow-wrap: anywhere;
}
.account-card:nth-child(2n) {
  background: #e6e3ee;
  border-color: #baabca;
}
.account-card h2 {
  margin: 17px 0 10px;
}
.account-amount {
  display: block;
  font:
    1.8rem Georgia,
    serif;
  margin-bottom: 15px;
}
.budget-card {
  background: #f3e5c7;
  border-color: #d5be82;
}
.budget-card.exceeded {
  border-color: #b8503d;
  background: #f2ddd2;
}
.budget-card.exceeded progress {
  accent-color: #b8503d;
}
.finance-footnote {
  margin: 38px 0 0;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
#ledger-series {
  border: 1px dashed #bdb19e;
  padding: 18px;
  margin: 0 0 22px;
}
#ledger-series legend {
  font-family: Georgia, serif;
  padding: 0 8px;
}
.money-form-extra {
  display: block;
  margin-top: 10px;
}
@media (max-width: 700px) {
  .finance-columns,
  .account-grid,
  .budget-grid {
    grid-template-columns: 1fr;
  }
  .wallet-banner {
    flex-direction: column;
    align-items: start;
    padding: 24px;
    gap: 18px;
  }
  .wallet-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .money-tabs {
    margin-top: 20px;
  }
  .due-row {
    flex-wrap: wrap;
  }
  .due-row strong {
    min-width: 45%;
  }
  .ledger-pagination {
    flex-wrap: wrap;
  }
  .ledger-pagination span {
    order: 3;
    width: 100%;
    text-align: center;
  }
  .ledger-row {
    gap: 10px;
  }
  .ledger-right {
    max-width: 45%;
    overflow-wrap: anywhere;
  }
  .ledger-value {
    font-size: 1.12rem;
  }
  #finance-page .section-heading {
    align-items: start;
    flex-wrap: wrap;
  }
  #finance-split-panel {
    padding: 23px 20px;
  }
}
.wallet-forecast {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 275px;
  font-size: 0.79rem;
  line-height: 1.5;
}
.wallet-forecast strong {
  font:
    1.6rem Georgia,
    serif;
}
.wallet-forecast button {
  align-self: start;
}
.wallet-banner > .small {
  max-width: 230px;
}
.category-budget progress,
.budget-card progress {
  appearance: none;
  background: #dcd6c7;
  border-radius: 5px;
  overflow: hidden;
}
.category-budget progress::-webkit-progress-bar,
.budget-card progress::-webkit-progress-bar {
  background: #dcd6c7;
}
.category-budget progress::-webkit-progress-value,
.budget-card progress::-webkit-progress-value {
  background: #7d9467;
  border-radius: 5px;
}
.category-budget:nth-child(3n + 2) progress::-webkit-progress-value {
  background: #b98572;
}
.category-budget:nth-child(3n) progress::-webkit-progress-value {
  background: #9a89b5;
}
.budget-card.exceeded progress::-webkit-progress-value {
  background: #b8503d;
}
.finance-filters label {
  max-width: 220px;
}

.finance-year-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}
.finance-year-controls strong {
  font:
    1.3rem Georgia,
    serif;
}
.finance-year-controls #money-current-month {
  margin-left: auto;
  font-size: 0.78rem;
}
.money-months {
  display: grid;
  grid-template-columns: repeat(12, minmax(44px, 1fr));
  overflow-x: auto;
  gap: 4px;
  padding-bottom: 10px;
  margin-bottom: 15px;
}
.money-month {
  background: transparent;
  color: var(--muted);
  border-radius: 7px 4px 8px 3px;
  padding: 12px 3px;
  min-height: 44px;
  font-size: 0.78rem;
}
.money-month.active {
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}
.trend-switch {
  margin-bottom: 20px;
}
.trend-chart {
  overflow-x: auto;
}
.finance-columns:has(.trend-chart.annual) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
.trend-chart.annual svg {
  min-width: 0;
}
.chart-scroll-hint {
  display: none;
}
@media (max-width: 900px) {
  .finance-columns:has(.trend-chart.annual) {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 500px) {
  .trend-chart.annual svg {
    min-width: 600px;
  }
  .chart-scroll-hint {
    display: block;
  }
}
@media (max-width: 700px) {
  .money-months {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
