:root {
  --bg: #edf4ef;
  --paper: rgba(255, 255, 255, 0.86);
  --paper-strong: #ffffff;
  --ink: #1d2330;
  --muted: #667085;
  --line: rgba(29, 35, 48, 0.12);
  --accent: #167c80;
  --accent-strong: #0f5f63;
  --berry: #d85c7c;
  --shadow: 0 20px 60px rgba(31, 45, 61, 0.12);
  --overlay: rgba(19, 27, 38, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(22, 124, 128, 0.16), transparent 28rem),
    radial-gradient(circle at right bottom, rgba(216, 92, 124, 0.13), transparent 24rem),
    linear-gradient(180deg, #f4f8f3 0%, #e7efe7 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(520px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 1.25rem;
}

.auth-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.auth-legal a,
.policy-card a {
  color: var(--accent-strong);
  text-decoration: none;
}

.auth-legal a:hover,
.policy-card a:hover {
  text-decoration: underline;
}

.policy-shell {
  min-height: 100vh;
  padding: 1.25rem;
}

.policy-card {
  width: min(900px, 100%);
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 1.5rem;
}

.policy-updated {
  margin-bottom: 1.25rem;
  color: var(--muted);
}

.policy-list {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  padding-left: 1.2rem;
}

.policy-list li {
  margin-bottom: 0.5rem;
}

.policy-return {
  margin-top: 2rem;
}

.page-shell {
  width: min(1200px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
}

.hero,
.top-nav,
.stats-grid,
.screen-stack {
  margin-bottom: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: stretch;
}

.hero-actions {
  display: grid;
  gap: 0.75rem;
}

.hero-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.2rem 0;
}

.hero-user-name {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.quick-menu {
  position: relative;
}

.quick-menu summary {
  list-style: none;
}

.quick-menu summary::-webkit-details-marker {
  display: none;
}

.quick-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  min-height: 3rem;
  padding: 0.75rem;
}

.hamburger-lines {
  display: grid;
  gap: 0.24rem;
  width: 1.1rem;
}

.hamburger-lines span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.quick-menu-list {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 10;
  display: grid;
  gap: 0.45rem;
  min-width: 12rem;
  padding: 0.45rem;
  border-radius: 18px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 32px rgba(31, 45, 61, 0.12);
}

.quick-menu-item {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(29, 35, 48, 0.08);
  text-align: left;
}

.quick-menu-item:hover {
  background: rgba(22, 124, 128, 0.08);
  color: var(--accent-strong);
}

.quick-menu-item-danger {
  color: var(--berry);
}

.quick-menu-item-danger:hover {
  background: rgba(216, 92, 124, 0.08);
  color: #b62f55;
}

.eyebrow,
.modal-kicker {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent-strong);
}

.modal-helper {
  max-width: 34rem;
  margin: 0.45rem 0 0;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 0.35rem;
}

.intro,
.panel-heading p,
.status,
.item-meta,
.item-notes,
.event-meta,
.event-notes,
.member-role,
.modal-inline-note {
  color: var(--muted);
}

.modal-inline-note {
  margin: 0;
}

.panel,
.summary-card,
.item-card,
.event-card,
.member-pill,
.mini-card,
.empty-state,
.top-nav,
.modal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel,
.top-nav,
.modal-card {
  border-radius: 28px;
  padding: 1.1rem;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.nav-link,
.primary-action,
.ghost-button {
  border-radius: 999px;
}

.nav-link {
  border: 1px solid rgba(29, 35, 48, 0.1);
  background: var(--paper-strong);
  color: var(--ink);
  padding: 0.72rem 1rem;
}

.nav-link.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.summary-card {
  border-radius: 22px;
  padding: 1rem 1.05rem;
}

.summary-label {
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.summary-value {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 700;
}

.summary-detail {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.summary-value[hidden] + .summary-detail {
  margin-top: 0.2rem;
}

.summary-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  font-size: 1.08rem;
}

.summary-breakdown-name {
  font-weight: 700;
}

.summary-breakdown-count,
.summary-breakdown-empty {
  color: var(--muted);
}

.summary-breakdown-count {
  font-weight: 700;
}

.summary-breakdown-empty {
  margin: 0;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

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

.week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.week-day-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.85rem;
}

.week-day-heading {
  margin-bottom: 0;
}

.week-day-name,
.week-day-date,
.week-event-time,
.week-event-title,
.week-event-members,
.week-empty {
  margin-bottom: 0.3rem;
}

.week-day-name {
  font-weight: 700;
}

.week-day-date,
.week-event-time,
.week-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.week-events {
  display: grid;
  gap: 0.6rem;
}

.week-event-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.6rem 0.7rem;
  border-radius: 14px;
  background: rgba(22, 124, 128, 0.08);
}

.week-event-title {
  font-weight: 700;
}

.week-event-members {
  font-size: 0.92rem;
}

.panel-heading {
  margin-bottom: 0.85rem;
}

.with-action {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.calendar-month-label {
  min-width: 11rem;
  margin: 0;
  text-align: center;
  font-weight: 700;
}

.calendar-frame {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.calendar-day {
  min-height: 9.5rem;
  padding: 0.7rem;
  border-radius: 18px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.calendar-day.is-muted {
  opacity: 0.5;
}

.calendar-day.is-today {
  border-color: rgba(22, 124, 128, 0.55);
  box-shadow: inset 0 0 0 1px rgba(22, 124, 128, 0.18);
}

.calendar-day-number {
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.calendar-day-events {
  display: grid;
  gap: 0.45rem;
}

.calendar-event {
  width: 100%;
  padding: 0.28rem 0.4rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(22, 124, 128, 0.08);
  text-align: left;
  overflow: hidden;
}

.calendar-event-topline {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  min-width: 0;
}

.calendar-event-time,
.calendar-day-empty {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.12rem;
}

.calendar-event-time {
  margin-top: 0;
  flex: 1 1 auto;
}

.calendar-event-heading {
  min-width: 0;
}

.calendar-event-members {
  display: inline-flex;
  gap: 0.02rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.calendar-member-icon {
  display: inline-flex;
  width: 1.28rem;
  height: 1.28rem;
  color: var(--ink);
}

.calendar-member-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-member-swatch {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 0.16rem;
  border: 1px solid rgba(29, 35, 48, 0.1);
}

.calendar-event-title {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
  margin-top: 0;
  font-size: 0.92rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

button.calendar-event {
  cursor: pointer;
  color: var(--ink);
}

button.calendar-event:hover {
  transform: none;
  background: rgba(22, 124, 128, 0.14);
  border-color: rgba(22, 124, 128, 0.24);
}

.stack,
.chip-grid,
.entry-form {
  display: grid;
  gap: 0.8rem;
}

.chore-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.shopping-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.shopping-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.shopping-tab {
  width: auto;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  background: var(--paper-strong);
  color: var(--ink);
}

.shopping-tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.shopping-category-group {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.shopping-category-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(29, 35, 48, 0.08);
}

.shopping-category-title,
.shopping-category-count {
  margin: 0;
}

.shopping-category-title {
  font-size: 1rem;
}

.shopping-category-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.shopping-history-panel,
.shopping-history-modal {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.shopping-history-modal {
  margin-top: 0.5rem;
}

.shopping-history-header h3,
.shopping-history-header p,
.shopping-history-title,
.shopping-history-meta {
  margin: 0;
}

.shopping-history-header p,
.shopping-history-meta {
  color: var(--muted);
}

.shopping-history-item {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(29, 35, 48, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.shopping-history-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.shopping-history-title {
  font-weight: 700;
}

.shopping-history-quantity {
  flex: 0 0 auto;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(22, 124, 128, 0.12);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.chore-group-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-top: 4px solid var(--group-color, #5b8def);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.chore-group-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(29, 35, 48, 0.08);
}

.chore-group-name,
.chore-group-role,
.chore-group-count {
  margin-bottom: 0.2rem;
}

.chore-group-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.chore-group-role,
.chore-group-count {
  color: var(--muted);
  font-size: 0.92rem;
}

.chore-group-count {
  white-space: nowrap;
}

.chore-group-empty {
  padding: 0.9rem 1rem;
}

.chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.backlog-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.backlog-section {
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  padding: 1rem;
}

.backlog-section h3 {
  margin-bottom: 0.75rem;
}

.backlog-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.backlog-list li {
  display: grid;
  gap: 0.2rem;
  list-style: none;
}

.backlog-item-row {
  display: grid;
  grid-template-columns: 0.9rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
}

.backlog-item-icon {
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.22rem;
  border-radius: 0.2rem;
  background: linear-gradient(135deg, var(--accent), var(--berry));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.backlog-item-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.entry-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form {
  margin-top: 1rem;
}

.modal-form {
  margin-top: 0.5rem;
}

.entry-form .full-width {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 0.4rem;
}

label span {
  font-size: 0.9rem;
  font-weight: 600;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
}

.checkbox-label input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(29, 35, 48, 0.14);
  border-radius: 16px;
  background: var(--paper-strong);
  padding: 0.8rem 0.95rem;
  color: var(--ink);
}

select[multiple] {
  min-height: 9rem;
  border-radius: 18px;
}

.member-pill-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.member-pill-option {
  position: relative;
  display: inline-flex;
}

.member-pill-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.member-pill-option span {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(29, 35, 48, 0.14);
  background: var(--paper-strong);
  color: var(--member-color, var(--ink));
  cursor: pointer;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.member-pill-option input:checked + span {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.member-pill-option span:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 124, 128, 0.45);
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  padding: 0.85rem 1.15rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition:
    transform 120ms ease,
    background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

.ghost-button {
  background: transparent;
  color: var(--berry);
  border: 1px solid rgba(216, 92, 124, 0.26);
}

.ghost-button:hover {
  background: rgba(216, 92, 124, 0.08);
}

.primary-action {
  width: 100%;
}

.item-card,
.event-card,
.member-pill,
.user-card,
.mini-card,
.empty-state {
  border-radius: 22px;
  padding: 1rem;
}

.item-card,
.event-card,
.member-pill,
.user-card {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
}

.item-main {
  display: grid;
  gap: 0.4rem;
}

.checkbox-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  font-weight: 700;
}

.item-card[data-done="true"] .item-title,
.item-card[data-done="true"] .item-meta,
.item-card[data-done="true"] .item-notes {
  text-decoration: line-through;
  opacity: 0.65;
}

.shopping-title-text {
  display: inline;
}

.shopping-quantity-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.55rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(22, 124, 128, 0.12);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  vertical-align: middle;
}

.item-toggle {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.member-pill {
  align-items: center;
}

.member-visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-height: 3rem;
  flex: 0 0 auto;
}

.member-swatch {
  width: 1rem;
  height: 3rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.member-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
}

.member-card-icon .calendar-member-icon {
  width: 100%;
  height: 100%;
}

.member-name,
.user-name,
.event-title {
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.member-inline-name {
  font-weight: 700;
}

.member-pill-option span {
  font-weight: 700;
}

.member-role {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 0;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(29, 35, 48, 0.08);
  background: rgba(102, 112, 133, 0.12);
}

.member-pill[data-role="parent"] .member-role {
  background: rgba(22, 124, 128, 0.14);
  color: #0f5f63;
}

.member-pill[data-role="kid"] .member-role {
  background: rgba(245, 158, 11, 0.18);
  color: #9a5c00;
}

.member-pill[data-role="teen"] .member-role {
  background: rgba(91, 141, 239, 0.18);
  color: #285aa8;
}

.member-pill[data-role="grandparent"] .member-role {
  background: rgba(168, 85, 247, 0.16);
  color: #6b21a8;
}

.member-pill[data-role="caregiver"] .member-role {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
}

.member-pill[data-role="other"] .member-role {
  background: rgba(102, 112, 133, 0.12);
  color: #475467;
}

.mini-card {
  background: linear-gradient(135deg, rgba(22, 124, 128, 0.1), rgba(255, 255, 255, 0.86));
}

.mini-card h3 {
  margin-bottom: 0.55rem;
}

.mini-card p:last-child,
.empty-state p:last-child {
  margin-bottom: 0;
}

.modal-shell[hidden] {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.modal-card {
  position: relative;
  width: min(760px, calc(100% - 1rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.close-button {
  width: auto;
}

.status {
  min-height: 1.5rem;
  margin: 0.5rem 0 0;
}

.status[data-error="true"] {
  color: #b62f55;
}

@media (max-width: 980px) {
  .dashboard-grid,
  .hero {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .calendar-grid {
    min-width: 48rem;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 1200px);
  }

  .panel,
  .top-nav,
  .modal-card {
    border-radius: 22px;
    padding: 0.9rem;
  }

  .entry-form,
  .hero-actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .summary-card {
    padding: 0.85rem 0.9rem;
  }

  .summary-value {
    font-size: 1.8rem;
  }

  .dashboard-grid {
    gap: 0.8rem;
  }

  .week-day-card,
  .week-event-item {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 0.7rem;
  }

  .calendar-toolbar,
  .with-action {
    flex-direction: column;
    align-items: stretch;
  }

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

  .top-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-link {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .calendar-month-label {
    min-width: 0;
    text-align: left;
  }

  .calendar-grid {
    min-width: 38rem;
    gap: 0.45rem;
  }

  .calendar-day {
    min-height: 7.4rem;
    padding: 0.45rem;
    border-radius: 14px;
  }

  .calendar-day-number {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
  }

  .calendar-day-events {
    gap: 0.3rem;
  }

  .calendar-event {
    padding: 0.22rem 0.3rem;
    border-radius: 10px;
  }

  .calendar-event-time,
  .calendar-day-empty {
    font-size: 0.74rem;
  }

  .calendar-event-title {
    font-size: 0.8rem;
  }

  .calendar-member-icon {
    width: 1.06rem;
    height: 1.06rem;
  }

  .chore-group-header {
    flex-direction: column;
  }

  .item-card,
  .event-card,
  .member-pill,
  .hero-account,
  .with-action,
  .modal-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ghost-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: calc(100% - 0.75rem);
    padding-top: 0.85rem;
  }

  .panel,
  .top-nav,
  .modal-card {
    padding: 0.8rem;
  }

  .calendar-grid {
    min-width: 34rem;
  }

  .calendar-day {
    min-height: 6.8rem;
    padding: 0.38rem;
  }
}
