:root {
  color-scheme: light;
  --ink: #242522;
  --muted: #777871;
  --line: #e8e6df;
  --paper: #fbfaf7;
  --white: #ffffff;
  --green: #2f705b;
  --green-soft: #e2f0e8;
  --orange: #dc7443;
  --orange-soft: #fbe8dc;
  --yellow: #d9a529;
  --yellow-soft: #fff3d7;
  --purple: #7565a8;
  --purple-soft: #eeeaf8;
  --blue: #4e79a7;
  --blue-soft: #e8f0f8;
  --red: #bd5149;
  --red-soft: #f8e5e3;
  --shadow: 0 18px 54px rgba(55, 54, 48, 0.09);
  --shadow-small: 0 8px 26px rgba(55, 54, 48, 0.07);
  --font-body: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(242, 219, 190, 0.42), transparent 26rem),
    var(--paper);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 18px;
  place-items: center;
  background:
    radial-gradient(circle at 18% 16%, rgba(226, 240, 232, 0.9), transparent 28rem),
    radial-gradient(circle at 86% 90%, rgba(251, 232, 220, 0.78), transparent 25rem);
}

.auth-card {
  width: min(100%, 430px);
  padding: 38px;
  border: 1px solid rgba(232, 230, 223, 0.95);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.auth-brand div {
  display: grid;
  gap: 1px;
}

.auth-brand small {
  color: var(--muted);
  font: 600 10px/1.2 "Manrope", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-brand strong {
  font: 700 22px/1.2 var(--font-display);
}

.auth-copy h1 {
  margin: 4px 0 10px;
  font: 700 34px/1.25 var(--font-display);
}

.auth-copy > p:last-child,
.auth-note,
.auth-loading p {
  color: var(--muted);
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 15px;
  margin-top: 28px;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 3px;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.auth-error {
  margin: -3px 0 0;
  padding: 11px 13px;
  border-radius: 12px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 13px;
  line-height: 1.5;
}

.auth-note {
  margin: 20px 0 0;
  font-size: 11px;
  text-align: center;
}

.auth-loading {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 106px;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px max(20px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid rgba(232, 230, 223, 0.82);
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 3px 0;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px 13px 13px 5px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 20px rgba(47, 112, 91, 0.22);
}

.brand-mark::after {
  position: absolute;
  width: 18px;
  height: 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.84);
  border-radius: 100% 0 100% 0;
  content: "";
  transform: rotate(31deg);
}

.brand-copy {
  display: grid;
  text-align: left;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.member-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.member-switch button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 11px 5px 7px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.member-switch button.active {
  color: var(--ink);
  background: var(--green-soft);
}

.avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #6e4e37;
  background: #f5d9c2;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.avatar.husband {
  color: #3b5875;
  background: #dce8f4;
}

.icon-btn {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
}

.icon-btn:hover {
  border-color: #d4d2ca;
  box-shadow: var(--shadow-small);
}

.main {
  width: min(100% - 40px, 1160px);
  margin: 0 auto;
  padding: 34px 0 0;
}

.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 54px;
  align-items: start;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.eyebrow::before {
  width: 18px;
  height: 2px;
  border-radius: 10px;
  background: currentColor;
  content: "";
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.16;
}

.page-title .highlight {
  position: relative;
  color: var(--green);
  white-space: nowrap;
}

.page-title .highlight::after {
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: 4px;
  left: -4px;
  height: 10px;
  background: #dceadf;
  content: "";
  transform: rotate(-1deg);
}

.title-note {
  max-width: 600px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.summary-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  margin: 30px 0 38px;
  padding: 21px 22px;
  border: 1px solid #e3e8e2;
  border-left: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.72);
}

.summary-copy {
  display: flex;
  align-items: center;
  gap: 16px;
}

.summary-number {
  font-family: "Manrope", sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.summary-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.summary-copy strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.progress-wrap {
  width: 170px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e9e4;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 260ms ease;
}

.task-section {
  margin: 0 0 42px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.count-badge {
  min-width: 25px;
  padding: 3px 8px;
  border-radius: 99px;
  color: var(--green);
  background: var(--green-soft);
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.section-description {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.section-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reset-today-btn {
  padding: 5px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.reset-today-btn:hover:not(:disabled) {
  color: var(--red);
}

.reset-today-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 2px 0 rgba(54, 55, 50, 0.02);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.task-card:hover {
  border-color: #d8d5cb;
  box-shadow: var(--shadow-small);
  transform: translateY(-1px);
}

.task-card.overdue {
  border-left: 3px solid var(--red);
}

.task-card.completed-card {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.66);
}

.task-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 23px;
}

.task-icon.floor {
  color: var(--orange);
  background: var(--orange-soft);
}

.task-icon.laundry {
  color: var(--blue);
  background: var(--blue-soft);
}

.task-icon.organize {
  color: var(--purple);
  background: var(--purple-soft);
}

.task-icon.kitchen {
  color: #9b7522;
  background: var(--yellow-soft);
}

.task-icon.baby {
  color: #ac5c69;
  background: #f9e7eb;
}

.task-icon.bathroom {
  color: #397c82;
  background: #e1f0f0;
}

.task-icon.small {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 17px;
}

.task-main {
  min-width: 0;
}

.task-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 3px;
}

.task-kicker span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.task-kicker .status-overdue {
  color: var(--red);
}

.task-kicker .status-due {
  color: var(--orange);
}

.task-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.45;
}

.task-description {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.completion-note {
  max-width: 100%;
  margin: 9px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #b8d3c8;
  border-radius: 0 8px 8px 0;
  color: #50675f;
  background: #f2f7f4;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.claim-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 800;
}

.timing-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  margin-right: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #5f665e;
  background: #f1f2ed;
  font-size: 10px;
  font-weight: 700;
}

.subtasks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.subtask {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #60615c;
  background: #faf9f6;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.subtask input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--green);
}

.subtask.checked {
  border-color: #cfe3d9;
  color: var(--green);
  background: #eff7f2;
  text-decoration: line-through;
}

.task-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 6px;
  align-self: center;
  min-width: 220px;
}

.task-secondary-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 5px;
}

.task-text-action {
  min-height: 32px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.task-text-action:hover,
.task-text-action.active {
  color: var(--green);
  background: var(--green-soft);
}

.task-text-action:disabled {
  opacity: .58;
  cursor: default;
}

.completed-toggle {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--green);
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.btn {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.btn:hover {
  border-color: #cecbc2;
  background: #faf9f6;
}

.btn.primary {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.btn.primary:hover {
  border-color: #265e4c;
  background: #265e4c;
}

.btn.tomorrow {
  border-color: #d7ded9;
  color: #53655d;
  background: #f1f5f2;
}

.btn.tomorrow:hover {
  border-color: #bdcec4;
  color: var(--green);
  background: var(--green-soft);
}

.btn.ghost {
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

.btn.danger {
  color: var(--red);
}

.btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.sidebar {
  position: sticky;
  top: 104px;
}

.sidebar-card {
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.sidebar-card.accent {
  overflow: hidden;
  border: 0;
  color: #f7f9f6;
  background: #294f43;
  box-shadow: 0 20px 46px rgba(41, 79, 67, 0.16);
}

.schedule-card {
  border-color: #e3ded2;
  background: #faf6ee;
}

.schedule-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #8b6b42;
  background: #f0e2cc;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
}

.schedule-people {
  display: grid;
  gap: 8px;
  margin-top: 17px;
}

.schedule-person {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 8px;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e6e0d5;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.schedule-person .avatar {
  width: 30px;
  height: 30px;
}

.schedule-person div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.schedule-person strong {
  font-size: 11px;
}

.schedule-person div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.status-dot.busy {
  background: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.status-dot.soon {
  background: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-soft);
}

.status-dot.free {
  box-shadow: 0 0 0 3px var(--green-soft);
}

.status-dot.recovery {
  background: #8b78a8;
  box-shadow: 0 0 0 3px rgba(139, 120, 168, 0.16);
}

.schedule-card.recovering {
  border-color: #d8cce6;
  background: #f7f3fb;
  box-shadow: 0 0 0 3px rgba(139, 120, 168, 0.08);
}

.recovery-callout {
  display: grid;
  gap: 3px;
  margin: 14px 0 0;
  padding: 10px 11px;
  border-radius: 10px;
  color: #5f4d78;
  background: #eee7f5;
}

.recovery-callout.light {
  color: #745d31;
  background: #f5ead4;
}

.recovery-callout strong {
  font-size: 10px;
}

.recovery-callout span {
  font-size: 9px;
  line-height: 1.55;
}

.schedule-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.schedule-link {
  width: 100%;
  margin-top: 10px;
  border-color: transparent;
  color: var(--green);
  background: transparent;
  text-align: left;
}

.sidebar-card.accent::after {
  display: block;
  width: 94px;
  height: 48px;
  margin: 15px -20px -30px auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100% 0 100% 0;
  content: "";
  transform: rotate(-14deg);
}

.sidebar-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.accent .sidebar-label {
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.4;
}

.sidebar-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.accent .sidebar-text {
  color: rgba(255, 255, 255, 0.66);
}

.trigger-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 15px;
}

.accent .btn {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.accent .btn.primary {
  border-color: #fff;
  color: #294f43;
  background: #fff;
}

.balance-row {
  display: grid;
  grid-template-columns: 55px 1fr 48px;
  gap: 9px;
  align-items: center;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
}

.balance-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #ecebe6;
}

.balance-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #e5ad88;
}

.balance-row.husband .balance-bar span {
  background: #88a8c8;
}

.balance-time {
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  text-align: right;
}

.empty-state {
  padding: 30px 22px;
  border: 1px dashed #d7d4ca;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 3px;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 18px;
}

.bottom-nav {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  padding: 10px max(16px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(224, 222, 214, 0.92);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(18px);
}

.bottom-nav-inner {
  display: grid;
  width: min(100%, 510px);
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.more-page {
  max-width: 760px;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.more-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: var(--white);
  box-shadow: var(--shadow-small);
  cursor: pointer;
}

.more-card > span:nth-child(2) {
  display: grid;
  gap: 5px;
}

.more-card strong {
  font-size: 15px;
}

.more-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.more-card > b {
  color: var(--muted);
  font-size: 24px;
}

.more-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
}

.more-icon svg {
  width: 22px;
  height: 22px;
}

/* 가계부 */
.finance-page {
  display: grid;
  gap: 18px;
}

.finance-header {
  margin-bottom: 4px;
}

.finance-header-actions,
.shopping-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.finance-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #efeee9;
}

.finance-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.finance-tabs button.active {
  color: var(--green);
  background: var(--white);
  box-shadow: 0 3px 12px rgba(36, 53, 44, .08);
}

.finance-summary-card,
.finance-breakdown,
.recurring-panel,
.expense-history-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(38, 49, 42, 0.045);
}

.finance-summary-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #285e4d, #4d8974);
}

.finance-month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.finance-month-nav button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}

.finance-month-nav button:disabled { opacity: .35; cursor: default; }
.finance-month-nav strong { font-size: 13px; }
.finance-total { display: grid; gap: 3px; margin: 25px 0 18px; }
.finance-total span { color: rgba(255,255,255,.72); font-size: 12px; }
.finance-total strong { font-family: var(--font-display); font-size: clamp(34px, 7vw, 50px); letter-spacing: -.05em; }
.finance-total small { color: rgba(255,255,255,.78); font-size: 12px; }
.budget-track { overflow: hidden; height: 7px; border-radius: 99px; background: rgba(255,255,255,.2); }
.budget-track div { height: 100%; border-radius: inherit; background: #f5d79c; }
.budget-copy { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; }
.budget-copy strong.over { color: #ffe1da; }
.budget-warning { margin: 10px 0 0; color: #fff1cf; font-size: 11px; font-weight: 700; }
.budget-empty { padding: 0; border: 0; color: #fff; background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; }
.finance-inline-link { float: right; margin-top: 8px; padding: 4px; border: 0; color: rgba(255,255,255,.82); background: none; cursor: pointer; font-size: 11px; }

.finance-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 14px; }
.finance-breakdown, .recurring-panel, .expense-history-panel { padding: 21px; }
.finance-breakdown h2, .recurring-panel h2, .expense-history-panel h2 { margin: 0; font-family: var(--font-display); font-size: 20px; }
.category-bars { display: grid; gap: 12px; margin-top: 18px; }
.category-bars > div { display: grid; grid-template-columns: 76px minmax(50px,1fr) auto; align-items: center; gap: 9px; font-size: 12px; }
.category-bars i { overflow: hidden; height: 6px; border-radius: 99px; background: #edf0ec; }
.category-bars i b { display: block; height: 100%; border-radius: inherit; background: #70a28f; }
.category-bars strong { font-size: 12px; }
.payer-totals { display: grid; gap: 11px; margin-top: 18px; }
.payer-totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.personal-total { margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 11px; }
.finance-empty-copy { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.recurring-list { display: grid; gap: 8px; margin-top: 17px; }
.recurring-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 13px; background: var(--paper); }
.recurring-row.inactive { opacity: .52; }
.recurring-row > div { display: grid; gap: 3px; }
.recurring-row strong { font-size: 13px; }
.recurring-row span { color: var(--muted); font-size: 11px; }
.recurring-row b { font-size: 12px; }
.recurring-row button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; }

.pending-recurring-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding: 15px;
  border-radius: 14px;
  background: #fff7e5;
}

.pending-recurring-list > h3 {
  margin: 0 0 2px;
  color: #7c5d22;
  font-size: 13px;
}

.pending-recurring-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(160, 125, 55, .16);
}

.pending-recurring-row > div:first-child {
  display: grid;
  gap: 4px;
}

.pending-recurring-row strong {
  font-size: 13px;
}

.pending-recurring-row span,
.finance-gentle-note {
  color: var(--muted);
  font-size: 11px;
}

.pending-recurring-row > div:last-child {
  display: flex;
  gap: 6px;
}

.pending-recurring-row .btn {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 11px;
}

.expense-history-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 14px;
}

.finance-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, .45fr) minmax(120px, .45fr) auto auto;
  gap: 8px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 13px;
  background: var(--paper);
}

.finance-filters .btn {
  min-height: 42px;
}

.finance-month-nav.plain {
  color: var(--green);
}

.finance-month-nav.plain button {
  color: var(--green);
  border-color: var(--line);
  background: var(--paper);
}

.expense-day { margin-top: 20px; }
.expense-day h3 { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.expense-row { display: grid; grid-template-columns: minmax(0,1fr) 32px; align-items: center; border-top: 1px solid #eeece7; }
.expense-main { display: grid; grid-template-columns: 60px minmax(0,1fr) auto; align-items: center; gap: 12px; min-width: 0; padding: 14px 4px; border: 0; text-align: left; background: transparent; cursor: pointer; }
.expense-category { padding: 6px; border-radius: 8px; color: #446555; background: #edf5f0; font-size: 11px; font-weight: 800; text-align: center; }
.expense-copy { display: grid; min-width: 0; gap: 3px; }
.expense-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.expense-copy small { color: var(--muted); font-size: 11px; }
.expense-copy em { overflow: hidden; color: #7c7b74; font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.expense-main > b { font-size: 13px; }
.expense-delete { width: 30px; height: 30px; border: 0; border-radius: 50%; color: #aaa79f; background: transparent; cursor: pointer; }
.finance-empty { display: grid; place-items: center; padding: 40px 18px 26px; text-align: center; }
.finance-empty span { display: grid; width: 50px; height: 50px; place-items: center; margin-bottom: 12px; border-radius: 50%; color: #6c8e7e; background: #edf5f0; font-size: 20px; }
.finance-empty strong { font-size: 13px; }
.finance-empty p { margin: 6px 0; color: var(--muted); font-size: 12px; }

.finance-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.finance-form-grid .full { grid-column: 1 / -1; }
.expense-items-details { padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.expense-items-details summary { cursor: pointer; font-size: 11px; font-weight: 800; }
.expense-items-details p, .form-help { margin: 7px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.expense-items-details textarea { margin-top: 8px; }
.checkout-items { display: grid; gap: 9px; padding: 14px; border-radius: 13px; background: var(--green-soft); }
.checkout-items > strong { color: var(--green); font-size: 12px; }
.checkout-items > div { display: flex; flex-wrap: wrap; gap: 6px; }
.checkout-items span { padding: 5px 8px; border-radius: 99px; color: #4c6259; background: rgba(255,255,255,.75); font-size: 11px; font-weight: 700; }
.checkout-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.checkout-more { padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f6; }
.checkout-more summary { color: var(--green); cursor: pointer; font-size: 11px; font-weight: 800; }
.checkout-more[open] summary { margin-bottom: 12px; }
.recurring-active { display: flex; align-items: center; gap: 10px; justify-self: start; }
.recurring-active b { font-size: 11px; }

@media (max-width: 680px) {
  .bottom-nav { padding-inline: 6px; }
  .bottom-nav-inner { gap: 1px; }
  .nav-btn { font-size: 9px; }
  .nav-btn svg { width: 18px; height: 18px; }
  .finance-header-actions { width: 100%; }
  .finance-header-actions .btn { flex: 1; }
  .finance-grid { grid-template-columns: 1fr; }
  .finance-summary-card, .finance-breakdown, .recurring-panel, .expense-history-panel { border-radius: 16px; padding: 17px; }
  .expense-main { grid-template-columns: 50px minmax(0,1fr) auto; gap: 9px; }
  .expense-copy small { white-space: normal; }
  .finance-form-grid { grid-template-columns: 1fr; }
  .finance-form-grid .full { grid-column: auto; }
  .recurring-row { grid-template-columns: minmax(0,1fr) auto; }
  .recurring-row button { grid-column: 1 / -1; justify-self: end; }
  .pending-recurring-row { grid-template-columns: 1fr; }
  .pending-recurring-row > div:last-child { width: 100%; }
  .pending-recurring-row .btn { flex: 1; }
  .expense-history-heading { grid-template-columns: 1fr auto; align-items: center; }
  .expense-history-heading > div:first-child { grid-column: 1 / -1; }
  .expense-history-heading > .btn { justify-self: end; }
  .finance-filters { grid-template-columns: 1fr 1fr; }
  .finance-filters > input { grid-column: 1 / -1; }
  .finance-filters .btn { width: 100%; }
  .more-grid { grid-template-columns: 1fr; }
}

.nav-btn {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 54px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: #90908a;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.nav-btn.active {
  color: var(--green);
  background: #edf5f0;
}

.nav-dot {
  position: absolute;
  top: 6px;
  left: calc(50% + 8px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 99px;
  color: #fff;
  background: var(--orange);
  font-family: "Manrope", sans-serif;
  font-size: 8px;
  line-height: 11px;
}

.inner-page {
  max-width: 900px;
  margin: 0 auto;
}

.shopping-page {
  max-width: 760px;
}

.shopping-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.shopping-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 9px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(226, 240, 232, 0.58), rgba(255, 255, 255, 0.45));
}

.shopping-form label {
  min-width: 0;
}

.shopping-form .form-control {
  width: 100%;
  height: 44px;
  background: #fff;
}

.shopping-summary {
  display: flex;
  justify-content: space-between;
  padding: 13px 18px;
  color: var(--muted);
  background: #fcfbf8;
  font-size: 11px;
  font-weight: 700;
}

.shopping-summary strong {
  color: var(--green);
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.shopping-list {
  padding: 0 18px;
}

.shopping-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 32px;
  gap: 11px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.shopping-row:last-child {
  border-bottom: 0;
}

.shopping-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1.5px solid #c9c8c1;
  border-radius: 9px;
  color: #fff;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

.shopping-content {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.shopping-content strong,
.shopping-content span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopping-content strong {
  font-size: 14px;
}

.shopping-content span {
  color: var(--muted);
  font-size: 10px;
}

.shopping-row.checked .shopping-check {
  border-color: var(--green);
  background: var(--green);
}

.shopping-row.checked .shopping-content strong {
  color: #969790;
  text-decoration: line-through;
}

.shopping-delete {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #a2a29b;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.shopping-delete:hover {
  color: var(--red);
  background: var(--red-soft);
}

.shopping-empty {
  display: grid;
  justify-items: center;
  padding: 58px 20px 64px;
  color: var(--muted);
  text-align: center;
}

.shopping-empty > span {
  margin-bottom: 13px;
  font-size: 34px;
}

.shopping-empty strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
}

.shopping-empty p {
  margin: 6px 0 0;
  font-size: 11px;
}

.inner-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.inner-header h1 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: -0.055em;
}

.inner-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.filter-bar {
  display: flex;
  gap: 7px;
  overflow: auto;
  margin-bottom: 16px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.filter-chip.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.all-task-list {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}

.all-task-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  gap: 13px;
  align-items: center;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}

.all-task-row:last-child {
  border-bottom: 0;
}

.all-task-row.inactive {
  opacity: 0.52;
}

.all-task-row h3 {
  margin: 0;
  font-size: 13px;
}

.all-task-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.row-status {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.toggle input {
  width: 0;
  height: 0;
  opacity: 0;
}

.toggle span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: #d8d6cf;
  cursor: pointer;
  transition: background 150ms ease;
}

.toggle span::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  content: "";
  transition: transform 150ms ease;
}

.toggle input:checked + span {
  background: var(--green);
}

.toggle input:checked + span::before {
  transform: translateX(16px);
}

.history-group {
  margin-bottom: 31px;
}

.history-date {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.history-date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.history-date-row .history-date {
  flex: 1;
  margin-bottom: 0;
}

.history-date::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.history-list {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}

.history-row {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.history-row:last-child {
  border-bottom: 0;
}

.history-check {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 800;
}

.history-check.not-needed {
  color: var(--blue);
  background: var(--blue-soft);
}

.history-row h3 {
  margin: 0;
  font-size: 12px;
}

.history-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.history-action {
  display: flex;
  gap: 7px;
  align-items: center;
}

.settings-section {
  margin-bottom: 25px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  overflow: hidden;
}

.settings-section h2 {
  margin: 0;
  padding: 18px 20px 12px;
  font-size: 14px;
}

.settings-details > summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 14px 48px 14px 20px;
  list-style: none;
  cursor: pointer;
}

.settings-details > summary::-webkit-details-marker {
  display: none;
}

.settings-details > summary::after {
  position: absolute;
  right: 20px;
  color: var(--muted);
  content: "⌄";
  font-size: 18px;
  transition: transform 160ms ease;
}

.settings-details[open] > summary::after {
  transform: rotate(180deg);
}

.settings-details > summary span {
  font-size: 14px;
  font-weight: 800;
}

.settings-details > summary small {
  color: var(--muted);
  font-size: 10px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 280px);
  gap: 24px;
  align-items: center;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
}

.setting-row h3 {
  margin: 0;
  font-size: 12px;
}

.setting-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.form-control {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: #fcfbf8;
  font-size: 12px;
}

.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 112, 91, 0.1);
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.work-schedule-control {
  display: grid;
  gap: 12px;
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.weekday-btn {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: #fcfbf8;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.weekday-btn.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.time-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 7px;
  align-items: end;
}

.time-pair > span {
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
}

.recovery-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  align-items: end;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #ded5e8;
  border-radius: 12px;
  background: #faf7fd;
}

.recovery-setting > div {
  display: grid;
  gap: 4px;
}

.recovery-setting strong {
  font-size: 12px;
}

.recovery-setting span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.history-recovery-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #ded5e8;
  border-radius: 10px;
  color: #67587b;
  background: #faf7fd;
  font-size: 10px;
  line-height: 1.6;
}

.offday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.offday-btn {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 47px;
  place-items: center;
  padding: 5px 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fcfbf8;
  cursor: pointer;
}

.offday-btn small {
  font-size: 8px;
}

.offday-btn strong {
  font-family: "Manrope", sans-serif;
  font-size: 9px;
}

.offday-btn.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  box-shadow: 0 5px 12px rgba(47, 112, 91, 0.16);
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 20px;
  border: 1px solid #edd5d2;
  background: #fffafa;
}

.danger-zone h3 {
  margin: 0;
  color: var(--red);
  font-size: 12px;
}

.danger-zone p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 20px;
  background: rgba(29, 31, 27, 0.4);
  backdrop-filter: blur(3px);
  animation: fade-in 140ms ease-out;
}

.modal {
  width: min(100%, 500px);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 24px;
  border-radius: 22px 22px 12px 12px;
  background: var(--white);
  box-shadow: 0 24px 80px rgba(25, 27, 24, 0.2);
  animation: slide-up 180ms ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 25px;
  letter-spacing: -0.04em;
}

.modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: var(--paper);
  cursor: pointer;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 18px;
}

.choice {
  position: relative;
  display: grid;
  min-height: 74px;
  place-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice.selected {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

.modal-form {
  display: grid;
  gap: 15px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.modal-actions .btn {
  min-height: 43px;
  padding-inline: 17px;
}

.toast-root {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: 92px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 220px;
  padding: 12px 15px;
  border-radius: 10px;
  color: #fff;
  background: #2e332f;
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 700;
  animation: toast-in 180ms ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(18px); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

@media (min-width: 700px) {
  .modal-backdrop {
    align-items: center;
  }

  .modal {
    border-radius: 18px;
  }
}

@media (max-width: 930px) {
  .today-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
  }

  .sidebar-card {
    margin-bottom: 0;
  }
}

@media (max-width: 680px) {
  .auth-card {
    padding: 30px 22px;
    border-radius: 22px;
  }

  .auth-copy h1 {
    font-size: 30px;
  }

  .shopping-form {
    grid-template-columns: 1fr auto;
    padding: 14px;
  }

  .shopping-form .shopping-name {
    grid-column: 1 / -1;
  }

  .shopping-list {
    padding: 0 14px;
  }

  body {
    background: var(--paper);
  }

  .app-shell {
    padding-bottom: 92px;
  }

  .topbar {
    min-height: 62px;
    padding: 9px 16px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
  }

  .brand-copy small,
  .member-switch button span:not(.avatar) {
    display: none;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .member-switch button {
    padding: 3px;
  }

  .member-switch .avatar {
    width: 29px;
    height: 29px;
  }

  .icon-btn {
    width: 37px;
    height: 37px;
  }

  .main {
    width: min(100% - 30px, 1160px);
    padding-top: 25px;
  }

  .page-title {
    font-size: 35px;
  }

  .title-note {
    font-size: 12px;
  }

  .summary-strip {
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 24px 0 32px;
    padding: 18px;
  }

  .progress-wrap {
    width: 100%;
  }

  .section-heading {
    align-items: center;
  }

  .section-description {
    display: none;
  }

  .section-heading-actions {
    margin-left: auto;
  }

  .task-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 15px;
  }

  .task-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 20px;
  }

  .task-actions {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr 1.35fr;
    grid-column: 1 / -1;
    margin-top: 2px;
  }

  .task-actions .btn {
    min-width: 0;
    padding-inline: 9px;
  }

  .task-secondary-actions {
    justify-content: center;
    padding-top: 2px;
  }

  .task-card.completed-card {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .task-card.completed-card .task-actions {
    display: flex;
    width: auto;
    min-width: 0;
    grid-column: auto;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    padding: 20px;
  }

  .inner-header {
    align-items: start;
    flex-direction: column;
    margin-bottom: 24px;
  }

  .inner-header h1 {
    font-size: 33px;
  }

  .inner-header > .btn {
    width: 100%;
  }

  .all-task-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px;
  }

  .row-status {
    display: none;
  }

  .setting-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .choice-grid {
    gap: 5px;
  }

  .choice {
    min-height: 66px;
    padding: 6px;
    font-size: 10px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
    padding: 20px;
  }

  .toast-root {
    right: 14px;
    bottom: 82px;
    left: 14px;
  }

  .toast {
    min-width: 0;
  }
}

/* 2026-07 생활 흐름 개선 */
.sync-pill,
.sync-detail,
.setting-ok {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.sync-pill.saving,
.sync-detail.saving {
  color: #86621b;
  background: var(--yellow-soft);
}

.sync-pill.offline,
.sync-detail.offline {
  color: var(--red);
  background: var(--red-soft);
}

.system-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 38px;
  padding: 7px 16px;
  color: #fff;
  background: #294f43;
  font-size: 11px;
  font-weight: 700;
}

.system-banner.install-banner {
  color: #4e4538;
  background: #f4eadb;
}

.system-banner div {
  display: flex;
  gap: 5px;
}

.system-banner button {
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 7px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}

.today-notices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: -18px 0 34px;
}

.today-notices:empty {
  display: none;
}

.today-notices .sidebar-card {
  margin: 0;
  padding: 17px;
}

.today-notices .sidebar-title {
  font-size: 18px;
}

.today-notices .schedule-people {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.schedule-card.needs-plan {
  border-color: #e6ba7e;
  box-shadow: 0 0 0 3px rgba(230, 186, 126, 0.12);
}

.date-postpone {
  color: var(--green) !important;
}

.postpone-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.postpone-choice {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfbf8;
  cursor: pointer;
  text-align: left;
}

.postpone-choice:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.postpone-choice strong {
  font-size: 13px;
}

.postpone-choice span {
  color: var(--muted);
  font-size: 10px;
}

.postpone-date-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: end;
  margin-top: 4px;
}

.weekly-summary-panel {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid #d9e6df;
  border-radius: 18px;
  background: linear-gradient(135deg, #f2f8f4, #fff);
}

.weekly-summary-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.weekly-summary-heading h2 {
  margin: 0;
  font-size: 19px;
}

.weekly-summary-heading > span,
.weekly-gentle-note {
  color: var(--muted);
  font-size: 10px;
}

.weekly-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.weekly-summary-grid > div {
  display: grid;
  gap: 3px;
  padding: 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.weekly-summary-grid strong {
  color: var(--green);
  font: 800 20px/1.2 "Manrope", sans-serif;
}

.weekly-summary-grid span,
.repeated-postponed span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.repeated-postponed {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #dfe8e2;
  font-size: 11px;
}

.repeated-postponed div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.repeated-postponed span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
}

.shopping-header-actions,
.shopping-row-actions,
.offday-calendar-actions > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shopping-recent {
  border-top: 1px solid var(--line);
  background: #fffdf9;
}

.shopping-group > h2 {
  margin: 0 -18px;
  padding: 9px 18px;
  color: var(--muted);
  background: #f7f6f2;
  font-size: 10px;
  letter-spacing: .04em;
}

.shopping-row {
  grid-template-columns: 30px minmax(0, 1fr) auto;
}

.shopping-row-actions button {
  min-width: 30px;
  min-height: 30px;
  padding: 4px 6px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.shopping-row-actions button:hover {
  color: var(--green);
  background: var(--green-soft);
}

.trip-mode .shopping-setup {
  display: none;
}

.trip-mode .shopping-panel {
  box-shadow: 0 18px 44px rgba(47, 112, 91, .12);
}

.shopping-finish-bar {
  position: fixed;
  z-index: 45;
  right: 0;
  bottom: calc(76px + env(safe-area-inset-bottom));
  left: 0;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.shopping-finish-bar .btn {
  width: min(100%, 510px);
  min-height: 52px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(47, 112, 91, .24);
  pointer-events: auto;
  font-size: 14px;
}

.trip-mode.shopping-page {
  padding-bottom: 76px;
}

.offday-details {
  min-width: 0;
}

.offday-details > summary,
.backup-snapshots > summary {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--green);
  background: #f6faf7;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  list-style-position: inside;
}

.offday-details[open] > summary {
  margin-bottom: 12px;
}

.highlight-setting {
  box-shadow: 0 0 0 4px rgba(47, 112, 91, .08);
}

.backup-snapshots {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #faf9f6;
}

.backup-snapshots p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.backup-snapshot-list {
  display: grid;
  margin-top: 8px;
}

.backup-snapshot-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}

.backup-snapshot-list > div:last-child {
  border-bottom: 0;
}

.backup-snapshot-list span {
  display: grid;
  gap: 2px;
}

.backup-snapshot-list strong {
  font-size: 11px;
}

.backup-snapshot-list small {
  color: var(--muted);
  font-size: 8px;
}

.recurrence-panel {
  padding: 12px;
  border-radius: 12px;
  background: #f7f6f2;
}

.recurrence-panel[hidden] {
  display: none;
}

.task-weekday-picker {
  margin-top: 7px;
}

.weekday-choice input {
  position: absolute;
  opacity: 0;
}

.weekday-choice span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.weekday-choice input:checked + span {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

@media (max-width: 680px) {
  .sync-pill.synced,
  .sync-pill.idle {
    display: none;
  }

  .sync-pill.offline,
  .sync-pill.saving {
    position: fixed;
    z-index: 31;
    top: 64px;
    right: 10px;
  }

  .system-banner {
    justify-content: space-between;
    font-size: 9px;
  }

  .today-notices,
  .today-notices .schedule-people,
  .weekly-summary-grid {
    grid-template-columns: 1fr;
  }

  .today-notices {
    margin-top: -14px;
  }

  .task-text-action {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .postpone-options {
    grid-template-columns: 1fr;
  }

  .postpone-date-form {
    grid-template-columns: 1fr;
  }

  .weekly-summary-heading,
  .shopping-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-summary-heading > span {
    align-self: start;
  }

  .shopping-header-actions {
    width: 100%;
  }

  .shopping-header-actions .btn {
    width: 100%;
  }

  .shopping-group > h2 {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .shopping-row-actions {
    flex-direction: column;
  }

  .offday-calendar-actions > div {
    flex-wrap: wrap;
  }

  .toast {
    flex-wrap: wrap;
  }
}

.history-page {
  max-width: 1040px;
}

.history-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.history-calendar-card {
  position: sticky;
  top: 92px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.history-calendar-heading {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 7px;
  align-items: center;
  margin-bottom: 15px;
  text-align: center;
}

.history-calendar-heading strong {
  font-family: var(--font-display);
  font-size: 17px;
}

.calendar-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fcfbf8;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.calendar-arrow:disabled {
  cursor: default;
  opacity: 0.25;
}

.history-weekdays,
.history-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.history-weekdays {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.history-weekdays span:first-child {
  color: var(--red);
}

.calendar-blank,
.history-calendar-day {
  aspect-ratio: 1;
}

.history-calendar-day {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font: 700 10px/1 "Manrope", sans-serif;
}

.history-calendar-day:hover:not(:disabled) {
  background: #f4f3ef;
}

.history-calendar-day.today {
  color: var(--green);
  font-weight: 900;
}

.history-calendar-day.selected {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  box-shadow: 0 5px 13px rgba(47, 112, 91, 0.2);
}

.history-calendar-day:disabled {
  cursor: default;
  opacity: 0.22;
}

.history-calendar-day i {
  display: flex;
  min-height: 5px;
  gap: 3px;
  align-items: center;
}

.done-dot,
.missed-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.missed-dot {
  background: var(--orange);
}

.history-calendar-day.selected .done-dot {
  background: #dff1e8;
}

.history-calendar-day.selected .missed-dot {
  background: #ffd3b8;
}

.history-calendar-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.history-calendar-footer span {
  display: flex;
  gap: 4px;
  align-items: center;
}

.calendar-today-btn {
  margin-left: auto;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  cursor: pointer;
  font-size: 8px;
  font-weight: 900;
}

.history-day-panel {
  min-width: 0;
}

.history-day-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.history-day-heading .eyebrow {
  margin-bottom: 4px;
}

.history-day-heading h2 {
  margin: 0;
  font: 700 25px/1.25 var(--font-display);
}

.history-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.history-summary-cards > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 13px 14px;
  border: 1px solid #d7e5de;
  border-radius: 12px;
  color: var(--green);
  background: #f5faf7;
}

.history-summary-cards > div:nth-child(2) {
  border-color: #d9e2ee;
  color: var(--blue);
  background: #f5f8fc;
}

.history-summary-cards > div.missed {
  border-color: #efd8cb;
  color: var(--orange);
  background: #fff8f3;
}

.history-summary-cards strong {
  font: 800 22px/1 "Manrope", sans-serif;
}

.history-summary-cards span {
  font-size: 9px;
  font-weight: 800;
}

.history-detail-section {
  margin-bottom: 23px;
}

.history-detail-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.history-detail-title h3 {
  margin: 0;
  font-size: 13px;
}

.history-detail-title span {
  color: var(--muted);
  font-size: 9px;
}

.history-mini-empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  text-align: center;
}

.history-check.missed {
  color: var(--orange);
  background: var(--orange-soft);
}

.missed-row {
  grid-template-columns: 31px minmax(0, 1fr) auto;
}

.history-missed-label {
  padding: 5px 7px;
  border-radius: 999px;
  color: #9c5534;
  background: var(--orange-soft);
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.history-missed-label.postponed {
  color: var(--purple);
  background: var(--purple-soft);
}

.history-all-done {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 20px;
  border: 1px solid #cfe0d7;
  border-radius: 13px;
  background: #f3f9f6;
}

.history-all-done > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.history-all-done strong {
  font-size: 11px;
}

.history-all-done p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 760px) {
  .history-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .history-calendar-card {
    position: static;
    padding: 15px;
  }

  .history-calendar-day {
    min-height: 38px;
    font-size: 11px;
  }

  .history-day-heading {
    align-items: start;
    flex-direction: column;
  }

  .history-day-heading .reset-today-btn {
    align-self: stretch;
  }

  .history-detail-title {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }

  .history-row {
    padding: 13px 12px;
  }

  .history-summary-cards > div {
    justify-content: center;
    padding: 12px 7px;
  }

  .history-missed-label {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}

.offline-pill {
  padding: 6px 9px;
  border-radius: 999px;
  color: #7b6428;
  background: var(--yellow-soft);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.quick-shopping {
  display: grid;
  gap: 11px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.quick-shopping > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.quick-shopping strong {
  font-size: 12px;
}

.quick-shopping span {
  color: var(--muted);
  font-size: 9px;
}

.quick-shopping-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-shopping-chip {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #cfe0d7;
  border-radius: 999px;
  color: var(--green);
  background: #f3f9f6;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.quick-shopping-chip:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.shopping-form {
  grid-template-columns: minmax(0, 1.5fr) minmax(92px, 0.55fr) minmax(0, 1fr) auto;
}

.shopping-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.shopping-title-line strong {
  min-width: 0;
}

.shopping-title-line em {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.shopping-content .shopping-detail {
  color: var(--ink);
  font-size: 10px;
}

.shopping-content .shopping-meta {
  color: var(--muted);
  font-size: 9px;
}

.device-member-choice,
.notification-actions,
.data-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.offday-calendar-wrap {
  display: grid;
  gap: 8px;
}

.offday-calendar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.offday-calendar-actions > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.offday-calendar-actions .btn {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 9px;
}

.offday-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.offday-blank {
  min-height: 47px;
}

.notification-status {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfbf8;
}

.notification-status.enabled {
  border-color: #cfe0d7;
  background: #f3f9f6;
}

.notification-status strong {
  font-size: 12px;
}

.notification-status span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.toast {
  display: flex;
  align-items: center;
  gap: 14px;
}

.toast > span {
  flex: 1;
}

.toast > button {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  color: #1f4f40;
  background: #dff1e8;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}

@media (max-width: 680px) {
  .offline-pill {
    position: fixed;
    top: 64px;
    right: 12px;
    z-index: 31;
  }

  .quick-shopping {
    padding: 14px;
  }

  .shopping-form {
    grid-template-columns: minmax(96px, 0.65fr) minmax(0, 1fr) auto;
  }

  .shopping-form .shopping-name {
    grid-column: 1 / -1;
  }

  .device-member-choice,
  .notification-actions,
  .data-actions {
    justify-content: stretch;
  }

  .device-member-choice .btn,
  .notification-actions .btn,
  .data-actions .btn {
    flex: 1 1 auto;
  }

  .offday-setting {
    gap: 14px;
  }

  .offday-calendar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .recovery-setting {
    grid-template-columns: 1fr;
  }
}
