:root {
  --bg: #f2ebdd;
  --bg-soft: #f7f1e6;
  --surface: #fbf6ed;
  --surface-muted: #eee5d4;
  --surface-strong: #e4d8c4;
  --text: #2f2a28;
  --muted: #625b56;
  --accent: #c46e52;
  --accent-strong: #ac5c43;
  --accent-soft: #e6c8bb;
  --support: #6b7150;
  --line: #d9ccb8;
  --line-strong: #c8b89d;
  --focus: 0 0 0 3px rgba(196, 110, 82, 0.25);
  --shadow: 0 12px 30px rgba(47, 42, 40, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 84% -14%, #eddcc8 0%, transparent 36%),
    radial-gradient(circle at -6% 20%, #ede2cf 0%, transparent 33%),
    linear-gradient(160deg, var(--bg) 0%, #efe5d6 100%);
}

body {
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

.wrap {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

main.wrap {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 235, 221, 0.9);
  backdrop-filter: blur(12px);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.82rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(47, 42, 40, 0.12));
}

.brand-name {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  gap: 0.5rem;
}

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

.top-nav a {
  text-decoration: none;
  color: #2f2a28;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 1.05rem;
  transition: 120ms ease;
}

.top-nav a.is-active {
  background: #e4e0db;
}

.avatar-menu {
  position: relative;
}

.avatar-button {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
}

.avatar-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.avatar-button::-webkit-details-marker {
  display: none;
}

.avatar-dropdown {
  position: absolute;
  right: 0;
  margin-top: 0.6rem;
  min-width: 170px;
  display: grid;
  gap: 0.2rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(175deg, #fdf8ef, #f3e9d9);
  box-shadow: var(--shadow);
}

.avatar-dropdown a,
.avatar-menu-logout {
  border: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  padding: 0.42rem 0.55rem;
  cursor: pointer;
}

.avatar-dropdown a:hover,
.avatar-menu-logout:hover {
  color: var(--text);
  background: #e8dcc9;
}

.top-nav a:hover {
  color: var(--text);
  background: #e8dcc9;
}

.planner-stage {
  margin-top: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(155deg, var(--surface), #faf5eb);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2.4vw, 1.6rem);
}

.planner-hero .eyebrow,
.page-head .eyebrow {
  margin: 0;
  color: var(--support);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.74rem;
  font-weight: 800;
}

.planner-hero h2 {
  margin: 0.34rem 0 0.52rem;
  font-family: "Fraunces", serif;
  font-size: clamp(1.45rem, 3.2vw, 2.2rem);
  line-height: 1.16;
}

.muted {
  color: var(--muted);
}

.planner-controls {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.58rem;
}

.planner-week-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.24rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(165deg, #f8f2e7, #f1e8dc);
}

.week-nav-label {
  min-width: 5.5rem;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  color: #4a3f2f;
}

.week-nav-label-button {
  border: 0;
  background: transparent;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  cursor: pointer;
}

.week-nav-label-button:hover {
  color: #2f2415;
  background: rgba(74, 63, 47, 0.08);
}

.week-nav-arrow {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.planner-week-range {
  margin: 0.75rem 0 0.25rem;
  color: var(--muted);
  font-weight: 700;
}

.planner-hint {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  font-weight: 700;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.64rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.inline-field input {
  width: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.54rem 0.86rem;
  transition: transform 110ms ease, filter 110ms ease;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

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

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn:disabled {
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.2) opacity(0.62);
}

.btn-primary,
.btn:not(.btn-muted):not(.btn-warn):not(.btn-danger):not(.btn-quiet) {
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
}

.btn-muted {
  color: var(--text);
  border-color: var(--line);
  background: linear-gradient(165deg, var(--surface), var(--surface-muted));
}

.btn-quiet {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(145deg, #7a8060, var(--support));
}

.btn-warn {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(150deg, #8c7459, #6b5a45);
}

.btn-danger {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(150deg, #c24f4f, #9f3d3d);
}

.planner-lines {
  margin: 1rem 0 2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #f8f2e8, #efe5d6);
  overflow: hidden;
}

.day-line {
  display: grid;
  grid-template-columns: 136px 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid rgba(196, 110, 82, 0.28);
  background: linear-gradient(90deg, #f4ecde, #faf6ee);
}

.day-line:last-child {
  border-bottom: 0;
}

.day-line--eating-out {
  border-left-color: rgba(107, 113, 80, 0.36);
  background: linear-gradient(90deg, #ece3d4, #f5ecde);
}

.day-name {
  color: var(--accent);
  font-size: 0.79rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.day-display {
  min-height: 2.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf8, #f4ecde);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 1px 2px rgba(47, 35, 18, 0.07);
  padding: 0.2rem 0.6rem;
  overflow: hidden;
}

.day-line--editing .day-display {
  align-items: stretch;
  overflow: visible;
}

.day-line.spinning .day-display {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 2px rgba(196, 110, 82, 0.22),
    0 0 16px rgba(196, 110, 82, 0.16);
}

.day-recipe-link {
  width: 100%;
  text-decoration: none;
}

.day-recipe-link:hover .flap-text {
  color: var(--accent-strong);
}

.day-recipe-link--disabled {
  pointer-events: none;
}

.flap-text {
  font-family: "Fraunces", "Times New Roman", serif;
  color: #2d2619;
  font-weight: 650;
  letter-spacing: 0.01em;
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.day-line--eating-out .flap-text {
  color: #564933;
}

.day-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a3400;
  background: linear-gradient(160deg, #f1c571, #e8b255);
  border: 1px solid rgba(90, 52, 0, 0.18);
}

.day-manual-edit {
  width: 100%;
  display: grid;
  gap: 0.42rem;
}

.day-manual-input {
  font-size: 0.95rem;
  padding: 0.46rem 0.56rem;
}

.day-manual-suggestions {
  display: grid;
  gap: 0.28rem;
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #d8ccba;
  border-radius: 10px;
  background: #fffdf9;
  padding: 0.3rem;
}

.day-manual-suggestion {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.32rem 0.44rem;
  background: transparent;
  color: #2d2619;
  font: inherit;
  cursor: pointer;
}

.day-manual-suggestion:hover,
.day-manual-suggestion:focus-visible {
  outline: none;
  border-color: #cfbfa8;
  background: #f8f2e7;
}

.day-manual-empty {
  padding: 0.32rem 0.44rem;
  color: #6a5f4f;
  font-size: 0.9rem;
}

.day-manual-actions {
  display: flex;
  gap: 0.36rem;
  justify-content: flex-end;
}

.day-manual-actions .btn {
  padding: 0.34rem 0.56rem;
}

.day-actions {
  display: flex;
  gap: 0.45rem;
}

.hidden {
  display: none;
}

.empty {
  margin-top: 1rem;
  color: var(--muted);
}

.page-head {
  margin-top: 1.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.page-head h2 {
  margin: 0.36rem 0 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.34rem, 2.9vw, 2rem);
}

.actions {
  display: flex;
  gap: 0.56rem;
}

.actions form,
.actions-row form {
  margin: 0;
}

.toolbar {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-search {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: nowrap;
  width: min(520px, 100%);
}

.toolbar-search input[type="text"] {
  min-width: 0;
  flex: 1;
}

.btn-toggle-active {
  box-shadow: inset 0 0 0 1px rgba(90, 52, 0, 0.18);
}

.table-controls-row th {
  padding-bottom: 0.35rem;
  border-bottom: 0;
}

.table-controls-cell {
  text-align: right;
}

.table-status-toggle {
  display: inline-flex;
}

.table-status-toggle-empty {
  margin-top: 0.25rem;
}

label {
  display: block;
  font-weight: 700;
}

.recipe-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(165deg, #fffdf9, #f6efe4);
}

.ingredient-groups-editor {
  display: grid;
  gap: 0.75rem;
}

.ingredient-groups-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ingredient-groups-head h3 {
  margin: 0;
}

.ingredient-groups-head p {
  margin: 0.25rem 0 0;
}

.ingredient-groups-list {
  display: grid;
  gap: 0.75rem;
}

.ingredient-group {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.ingredient-group-title-row,
.ingredient-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.ingredient-items {
  display: grid;
  gap: 0.45rem;
}

.legacy-ingredients-field {
  display: none;
}

.ingredient-section-title {
  margin: 0.7rem 0 0.25rem;
  color: #6b3d1f;
}

.ingredient-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.65rem;
  margin: 0.65rem 0 0.9rem;
}

.ingredient-card {
  min-height: 128px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.35rem;
  padding: 0.55rem;
  border: 1px solid rgba(200, 184, 157, 0.82);
  border-radius: 16px;
  background: linear-gradient(170deg, #fffaf0, #f1e4d0);
  box-shadow: 0 8px 18px rgba(47, 42, 40, 0.06);
}

.ingredient-card-image {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: cover;
  background: #eadcc8;
}

.ingredient-card-image-placeholder {
  display: grid;
  place-items: center;
  color: #7c5137;
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  font-weight: 800;
}

.ingredient-card-title {
  max-width: 100%;
  text-align: center;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.ingredient-card-amount {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

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

.import-upload-options {
  margin-top: 0.2rem;
}

.import-upload-option {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefb, #f4ede1);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.import-upload-option:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.import-upload-option:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(163, 95, 45, 0.14);
}

.import-upload-option.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #fff8ee, #f4e4d0);
  box-shadow: 0 0 0 1px rgba(163, 95, 45, 0.24);
}

.import-upload-option-title {
  font-weight: 800;
  font-size: 0.98rem;
}

.import-upload-option-help {
  font-size: 0.9rem;
}

.import-upload-picker {
  margin-top: 0.24rem;
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.import-upload-picker-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #332c1f;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.3rem 0.54rem;
}

.import-upload-picker-name {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.import-upload-option.is-active .import-upload-picker-btn {
  border-color: #a35f2d;
  background: #f8ecde;
}

.import-upload-error {
  margin: 0;
  border: 1px solid #d89d6a;
  border-radius: 8px;
  background: #faead8;
  color: #6f3f09;
  padding: 0.5rem 0.62rem;
  font-weight: 700;
}

.btn.is-loading {
  gap: 0.5rem;
}

.import-submit-spinner {
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 999px;
  animation: import-spin 700ms linear infinite;
}

.import-upload-loading {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-weight: 700;
}

.import-upload-loading.hidden {
  display: none;
}

.import-upload-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: import-spin 800ms linear infinite;
}

@keyframes import-spin {
  to {
    transform: rotate(360deg);
  }
}

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

.table-wrap {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: linear-gradient(165deg, #fffdf9, #f7f0e5);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.detail-grid {
  margin: 1rem 0 1.25rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(165deg, #fffdf9, #f6efe3);
  padding: 0.9rem;
}

.panel-full {
  grid-column: 1 / -1;
}

.nutrition-breakdown-editor {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(165deg, #fffdf9, #f6efe3);
  padding: 0.9rem;
}

.nutrition-breakdown-editor h3 {
  margin-top: 0;
}

.nutrition-breakdown-wrap {
  margin-top: 0.45rem;
}

.nutrition-breakdown-wrap table {
  min-width: 760px;
}

.nutrition-warning-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: #5a2f00;
}

.import-preview {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.import-preview-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.import-preview-item {
  margin: 0;
}

.import-preview-item figcaption {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.import-warning {
  color: #5a2f00;
  background: #f7e3c6;
  border: 1px solid #e5bf8d;
  border-radius: 8px;
  padding: 0.55rem;
}

.import-diff-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.import-diff-list li {
  margin-bottom: 0.65rem;
}

.actions-row {
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(165deg, #fffdf9, #f5eee2);
  padding: 1rem;
  transition: transform 120ms ease, border-color 120ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.card h3 {
  margin: 0;
}

.card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: rgba(251, 246, 237, 0.78);
}

.site-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer-row p {
  margin: 0;
}

.site-footer-brand {
  font-family: "Fraunces", serif;
  color: var(--text);
  font-weight: 700;
}

.site-footer-contact a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.stack-form {
  display: grid;
  gap: 0.5rem;
  margin: 0.8rem 0;
  max-width: 34rem;
}

.stack-form input {
  width: 100%;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, #fffdf9, #f5eee2);
  padding: 1rem;
}

.settings-card h3 {
  margin: 0 0 0.35rem;
  font-family: "Fraunces", serif;
}

.error-banner {
  color: #8c1c13;
  background: #fdeceb;
  border: 1px solid #f4b5b0;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.success-banner {
  color: #28543a;
  background: #edf8f0;
  border: 1px solid #b7dec1;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
}

.household-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.household-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, #fffdf9, #f5eee2);
  padding: 1rem;
}

.household-item-joined {
  border-color: var(--support);
  box-shadow: 0 0 0 3px rgba(107, 113, 80, 0.12);
  background: linear-gradient(165deg, #fcf9f1, #eef5e7);
}

.household-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.household-item-head h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
}

.household-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.household-joined-note {
  margin: 0.65rem 0 0;
  color: var(--support);
  font-weight: 700;
}

.household-members {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.household-members h4 {
  margin: 0 0 0.65rem;
}

.household-member-list {
  display: grid;
  gap: 0.55rem;
}

.household-member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.household-member-email {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.household-member-meta {
  margin: 0.2rem 0 0;
}

.household-member-action {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.household-member-action .inline-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.household-member-action select {
  min-width: 7rem;
  padding-block: 0.45rem;
}

.household-invite-form {
  margin-top: 0.8rem;
  max-width: 26rem;
}

.household-actions-grid {
  margin-top: 1.25rem;
}

.household-action-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, #faf4e8, #f4ecdf);
  padding: 1rem;
}

.household-action-panel h2 {
  margin-top: 0;
}

.link-button {
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

@media (max-width: 760px) {
  .header-row,
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-end;
  }

  .site-footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .household-item-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .household-member-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav-main {
    gap: 0.25rem;
  }

  .top-nav-main a {
    font-size: 0.95rem;
    padding: 0.42rem 0.7rem;
  }

  .avatar-button {
    width: 48px;
    height: 48px;
  }

  .planner-controls {
    width: 100%;
  }

  .planner-week-nav {
    width: 100%;
    justify-content: space-between;
  }

  .inline-field {
    width: 100%;
    justify-content: space-between;
  }

  .inline-field input {
    width: 56%;
  }

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

  .toolbar-search {
    width: 100%;
  }

  .table-controls-row th {
    padding: 0.55rem 0.8rem 0.35rem;
  }

  .table-controls-row th:first-child {
    display: none;
  }

  .table-controls-cell {
    text-align: left;
  }

  .day-line {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .day-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .day-manual-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .import-submit-spinner,
  .import-upload-spinner {
    animation: none;
  }
}
