:root {
  --forest-950: #102019;
  --forest-900: #173024;
  --forest-800: #1d4630;
  --forest-700: #1b6f3e;
  --forest-600: #248a4b;
  --lake-700: #0a6a8f;
  --lake-600: #1687ad;
  --ember-700: #a43120;
  --ember-600: #d34a2c;
  --amber-500: #dd9614;
  --paper: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #f7f7f9;
  --line: #e5e5ea;
  --line-strong: #c7c7cc;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --shadow: 0 16px 46px rgba(0, 0, 0, 0.08);
  --soft-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --sidebar: 232px;
  --content-max: 430px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  max-width: 100%;
  overflow-x: hidden;
}

body.auth-open {
  height: 100dvh;
  overflow: hidden;
}

body.auth-open .app-shell {
  display: none;
}

body.drawer-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
  min-width: 0;
}

svg {
  width: 1em;
  height: 1em;
}

.app-shell {
  display: block;
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  padding: 8px 8px 24px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--forest-700);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1;
  letter-spacing: 0;
}

.brand strong {
  font-size: 1.22rem;
  font-weight: 700;
}

.brand small {
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.side-nav {
  display: grid;
  gap: 7px;
}

.nav-item,
.mobile-nav-item {
  border: 0;
  background: transparent;
  color: inherit;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
}

.nav-item svg,
.mobile-nav-item svg {
  width: 21px;
  height: 21px;
}

.nav-item:hover,
.nav-item.is-active {
  background: var(--surface-soft);
  color: var(--text);
}

.sidebar-card {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.sidebar-card strong,
.sidebar-card span {
  display: block;
}

.sidebar-card strong {
  font-size: 0.9rem;
}

.sidebar-card span {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.profile-card {
  display: grid;
  gap: 10px;
  margin-top: auto;
  margin-bottom: 12px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.profile-card.is-hidden {
  display: none;
}

.profile-card strong,
.profile-card span {
  display: block;
}

.profile-card strong {
  font-size: 0.92rem;
}

.profile-card span {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profile-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--forest-800);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(8, 22, 14, 0.54), rgba(8, 22, 14, 0.7)),
    url("assets/cabin-hero.png") center center / cover no-repeat;
  overflow: hidden;
}

.auth-screen.is-hidden {
  display: none;
}

.auth-card {
  width: min(100%, 520px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 26px 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.auth-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.08;
}

.auth-brand p {
  margin: 6px 0 0;
  color: #4f5e53;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-person-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.auth-person-heading {
  display: grid;
  gap: 3px;
}

.auth-person-heading strong {
  font-size: 0.94rem;
  line-height: 1.2;
}

.auth-person-heading span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.auth-person-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.auth-person {
  display: grid;
  min-width: 0;
  min-height: 50px;
  align-content: center;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.auth-person strong,
.auth-person span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-person strong {
  font-size: 0.86rem;
  line-height: 1.1;
}

.auth-person span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.auth-person.is-selected {
  border-color: rgba(27, 111, 62, 0.45);
  background: #f3fbf5;
  color: var(--forest-800);
  box-shadow: 0 0 0 2px rgba(27, 111, 62, 0.08);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}

.auth-submit,
.auth-wide {
  min-height: 48px;
}

.auth-divider {
  position: relative;
  display: grid;
  place-items: center;
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: auto 0;
  height: 1px;
  background: var(--line);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: var(--surface);
}

.auth-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: #9be27b;
  box-shadow: 0 0 0 4px rgba(155, 226, 123, 0.15);
  flex: 0 0 auto;
}

.main {
  width: 100%;
  min-width: 0;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 0 calc(108px + env(safe-area-inset-bottom));
  background: var(--paper);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  justify-content: flex-end;
  padding: 14px 14px 0;
  background: linear-gradient(180deg, rgba(245, 245, 247, 0.96), rgba(245, 245, 247, 0));
  backdrop-filter: blur(14px);
}

.app-session {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--soft-shadow);
}

.app-session.is-hidden {
  display: none;
}

.app-session span {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.app-session button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--forest-800);
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-media {
  position: relative;
  min-height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: none;
  background: var(--surface);
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.2) 46%, rgba(0, 0, 0, 0.06)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.18));
}

.hero-copy {
  position: absolute;
  left: clamp(22px, 5vw, 54px);
  right: 24px;
  bottom: 30px;
  color: #fff;
}

.hero-copy h1 {
  max-width: 840px;
  margin: 0 0 10px;
  font-size: clamp(2.3rem, 4.4vw, 3.9rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 0;
  font-size: clamp(1rem, 1.55vw, 1.16rem);
  font-weight: 650;
}

.location-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  font-size: 1rem;
  font-weight: 700;
}

.location-row svg {
  width: 20px;
  height: 20px;
}

.hero-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-user {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  max-width: 180px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: var(--soft-shadow);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-user.is-hidden {
  display: none;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: var(--soft-shadow);
  font-size: 0.83rem;
  font-weight: 700;
}

.sync-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(232, 161, 26, 0.18);
}

.sync-status.is-live .sync-status-dot {
  background: var(--forest-600);
  box-shadow: 0 0 0 4px rgba(28, 122, 66, 0.18);
}

.sync-status.is-offline .sync-status-dot {
  background: var(--ember-600);
  box-shadow: 0 0 0 4px rgba(217, 81, 43, 0.16);
}

.icon-button {
  display: inline-grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: var(--soft-shadow);
}

.icon-button:hover {
  transform: translateY(-1px);
}

.icon-button.dark {
  background: var(--forest-900);
  color: #fff;
  border-color: var(--forest-800);
  box-shadow: none;
}

.icon-button.light {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  box-shadow: none;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--lake-700);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.hero-copy .text-button {
  color: #fff;
}

.trip-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 14px;
}

.status-action {
  display: grid;
  min-height: 70px;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.status-action:hover {
  border-color: var(--line-strong);
  background: #fbfbfd;
}

.status-action strong,
.status-action span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-action strong {
  color: var(--forest-800);
  font-size: 1.35rem;
  line-height: 1;
}

.status-action span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
  position: relative;
  z-index: 2;
}

.summary-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 12px;
  align-items: center;
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.summary-card strong,
.summary-card small {
  display: block;
}

.summary-card strong {
  font-size: 1.28rem;
  line-height: 1;
}

.summary-card small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.summary-icon {
  grid-row: span 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
}

.summary-icon svg {
  width: 25px;
  height: 25px;
}

.summary-icon.green {
  background: rgba(28, 122, 66, 0.12);
  color: var(--forest-600);
}

.summary-icon.blue {
  background: rgba(22, 127, 166, 0.12);
  color: var(--lake-600);
}

.summary-icon.amber {
  background: rgba(232, 161, 26, 0.14);
  color: #b56e00;
}

.action-panel,
.notice-panel,
.board-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.action-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px;
}

.action-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.large-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(28, 122, 66, 0.1);
  color: var(--forest-600);
  flex: 0 0 auto;
}

.large-icon svg {
  width: 38px;
  height: 38px;
}

.action-panel h2,
.notice-panel h2,
.section-heading h2,
.panel-heading h1 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0;
}

.action-panel h2,
.notice-panel h2,
.section-heading h2 {
  font-size: 1.1rem;
}

.action-panel p,
.notice-panel p,
.section-heading p,
.panel-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border-radius: var(--radius);
  padding: 0 22px;
  font-weight: 700;
}

.primary-action {
  border: 1px solid var(--forest-700);
  background: var(--forest-700);
  color: #fff;
  box-shadow: none;
}

.primary-action:hover {
  filter: brightness(1.04);
}

.primary-action svg {
  width: 19px;
  height: 19px;
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--forest-800);
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: none;
}

.compact-action {
  min-height: 48px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.notice-panel {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border-color: #f1b29f;
  background: linear-gradient(180deg, #fff8f5, #fff);
}

.install-panel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.install-panel.is-hidden {
  display: none;
}

.install-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(22, 127, 166, 0.1);
  color: var(--lake-700);
}

.install-icon svg {
  width: 24px;
  height: 24px;
}

.install-panel h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.install-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-actions {
  background: transparent;
  border: 0;
  padding: 0;
}

.claiming-panel {
  display: grid;
  grid-template-columns: minmax(170px, 0.45fr) 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.claiming-panel h2,
.claiming-panel p {
  margin: 0;
}

.claiming-panel h2 {
  font-size: 1rem;
  line-height: 1.15;
}

.claiming-panel p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.quick-family-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-family {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
}

.quick-family span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-family.is-selected {
  border-color: rgba(27, 111, 62, 0.4);
  background: #f3fbf5;
  color: var(--forest-800);
}

.quick-family.is-locked,
.family-option.is-locked {
  cursor: not-allowed;
  opacity: 0.45;
}

.quick-action {
  display: grid;
  grid-template-columns: 42px 1fr 22px;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.quick-action:hover {
  border-color: var(--line-strong);
  background: #fbfbfd;
}

.primary-quick-action {
  border-color: rgba(27, 111, 62, 0.22);
  background: #f3fbf5;
}

.quick-action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--forest-700);
}

.primary-quick-action .quick-action-icon {
  background: var(--forest-700);
  color: #fff;
}

.quick-action strong,
.quick-action small {
  display: block;
  min-width: 0;
}

.quick-action strong {
  font-size: 1rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.quick-action small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.quick-action-arrow {
  color: var(--muted);
}

.top-needed-panel {
  margin-bottom: 18px;
}

.calendar-panel {
  margin-top: 14px;
}

.calendar-board {
  display: grid;
  gap: 12px;
}

.calendar-day-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.calendar-day-header {
  padding: 14px;
  background: var(--forest-800);
  color: #fff;
}

.calendar-day-header strong,
.calendar-day-header span {
  display: block;
}

.calendar-day-header strong {
  font-size: 1rem;
}

.calendar-day-header span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.77);
  font-size: 0.82rem;
}

.calendar-day-grid {
  display: grid;
  gap: 0;
}

.calendar-slot {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 12px 14px 12px 18px;
  border-top: 1px solid var(--line);
  border-left: 4px solid #d4c29a;
  background: #fffdf9;
}

.calendar-slot strong,
.calendar-slot span {
  display: block;
}

.calendar-slot strong {
  font-size: 0.98rem;
  color: var(--text);
}

.calendar-slot-kind {
  color: #8c6d33;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.calendar-slot-time {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.calendar-slot-travel {
  border-left-color: var(--forest-700);
  background: #f7fbf8;
}

.calendar-slot-empty {
  border-left-color: #d8d8d8;
  background: #fcfcfc;
}

.open-meals-panel {
  margin-bottom: 16px;
}

.needed-list {
  display: grid;
  gap: 8px;
}

.needed-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.bringing-list,
.bringing-groups,
.bringing-group-list {
  display: grid;
  gap: 10px;
}

.bringing-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.bringing-group-header,
.bringing-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.bringing-group-header span,
.bringing-row span {
  color: var(--muted);
}

.bringing-row {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.bringing-row-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.bringing-row-main > div {
  min-width: 0;
}

.bringing-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.bringing-thumb {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  object-fit: cover;
  flex: 0 0 auto;
}

.bringing-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.bringing-row-empty {
  grid-template-columns: 1fr;
}

.needed-row strong,
.needed-row span {
  display: block;
  min-width: 0;
}

.needed-row > div,
.supply-row > div,
.activity-card > div,
.meal-name,
.meal-time,
.meal-meta {
  min-width: 0;
}

.needed-row strong {
  font-size: 0.96rem;
  overflow-wrap: anywhere;
}

.needed-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.notice-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(217, 81, 43, 0.1);
  color: var(--ember-600);
}

.notice-icon svg {
  width: 25px;
  height: 25px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  gap: 18px;
}

.board-panel {
  padding: 18px;
}

.board-panel.wide {
  min-width: 0;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.panel-heading h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.day-tabs button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 700;
}

.day-tabs button span {
  display: block;
  margin-top: 4px;
  font-size: 0.76rem;
  font-weight: 650;
}

.day-tabs button.is-selected {
  background: var(--forest-700);
  border-color: var(--forest-700);
  color: #fff;
}

.meal-list,
.supply-list,
.activity-stack,
.families-grid,
.activity-grid,
.meal-board {
  display: grid;
  gap: 10px;
}

.meal-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) 1fr;
  align-items: start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.meal-row:first-child {
  border-top: 0;
}

.meal-icon,
.meal-time,
.supply-type {
  color: var(--muted);
}

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

.meal-name strong,
.meal-name span,
.meal-time strong,
.meal-time span,
.family-card strong,
.family-card span,
.supply-row strong,
.supply-row span,
.activity-card strong,
.activity-card span {
  display: block;
}

.meal-name strong,
.meal-time strong {
  font-size: 0.94rem;
}

.meal-name span,
.meal-time span,
.supply-row span,
.activity-card span,
.gear-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.35;
}

.claim-button,
.claimed-pill {
  min-height: 44px;
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 700;
}

.claim-button {
  border: 1px dashed var(--forest-600);
  background: #fff;
  color: var(--forest-700);
}

.claim-button:hover {
  background: rgba(28, 122, 66, 0.08);
}

.claim-button:disabled {
  cursor: default;
  border-style: solid;
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.item-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.text-mini-button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--forest-700);
  font-size: 0.75rem;
  font-weight: 730;
}

.text-mini-button.danger {
  color: #9b2f19;
}

.claimed-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--forest-900);
}

.claimed-pill.shell {
  background: #fce8e2;
  border-color: #f4b09c;
}

.claimed-pill.nick {
  background: #f6ead7;
  border-color: #e6c38a;
}

.claimed-pill.nat {
  background: #e3f1f5;
  border-color: #9fd4e4;
}

.claimed-pill.bear {
  background: #e7f2dd;
  border-color: #b7d9a0;
}

.activity-card {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.activity-thumb {
  display: grid;
  width: 70px;
  height: 56px;
  place-items: center;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(22, 127, 166, 0.18), rgba(28, 122, 66, 0.24)),
    var(--surface-soft);
  color: var(--forest-700);
}

.activity-thumb svg {
  width: 28px;
  height: 28px;
}

.vote-button {
  display: inline-flex;
  min-width: 86px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--forest-700);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.vote-button span {
  display: block;
  font-size: 0.82rem;
  line-height: 1.1;
}

.vote-button span:last-child {
  color: var(--muted);
  font-size: 0.76rem;
}

.vote-button.is-selected {
  border-color: #9bcf9e;
  background: #eef8ef;
  color: var(--forest-800);
}

.vote-button.is-selected span:last-child {
  color: var(--forest-700);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-pill.warn {
  background: #ffe8df;
  color: var(--ember-700);
}

.fridge-meter {
  display: grid;
  gap: 12px;
}

.fridge-meter strong,
.fridge-meter span {
  display: block;
}

.fridge-meter span {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 3px;
}

.meter {
  height: 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: 62%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-600), var(--amber-500));
}

.kid-stack {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-right: -8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--forest-800);
  font-size: 0.82rem;
  font-weight: 700;
}

.avatar.more {
  background: var(--forest-700);
  color: #fff;
}

.gear-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.gear-row > span:first-child {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(28, 122, 66, 0.1);
  color: var(--forest-600);
}

.gear-row svg {
  width: 31px;
  height: 31px;
}

.content-panel {
  min-height: calc(100vh - 48px);
  padding: 26px;
}

.content-panel.is-hidden,
.is-hidden {
  display: none !important;
}

.families-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.family-card {
  min-height: 154px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.family-color {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.family-card strong {
  font-size: 1rem;
}

.family-card span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.family-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  margin-top: 12px;
  background: var(--surface-soft);
  color: var(--forest-800);
  font-size: 0.76rem;
  font-weight: 700;
}

.two-column,
.supply-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.question-list,
.detail-list {
  display: grid;
  gap: 10px;
}

.question-list label,
.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-weight: 710;
}

.question-list label.is-checked {
  border-color: rgba(27, 111, 62, 0.28);
  background: rgba(27, 111, 62, 0.08);
  color: var(--forest-800);
}

.question-list label.is-checked span {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(27, 111, 62, 0.32);
}

.question-list input,
.checkbox-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--forest-600);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud span {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--forest-800);
  font-size: 0.84rem;
  font-weight: 650;
}

.meal-board {
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  align-items: start;
}

.meal-day-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.meal-day-header {
  padding: 14px;
  background: var(--forest-800);
  color: #fff;
}

.meal-day-header strong,
.meal-day-header span {
  display: block;
}

.meal-day-header strong {
  font-size: 1rem;
}

.meal-day-header span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.77);
  font-size: 0.82rem;
}

.meal-day-card .meal-row {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.meal-row-empty {
  min-height: 74px;
}

.meal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-chip {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.supply-list {
  gap: 8px;
}

.supply-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.supply-row.is-claimed {
  background: var(--surface-soft);
}

.supply-row.is-claimed .claim-button:not(:disabled) {
  border-style: solid;
  background: var(--forest-700);
  color: #fff;
}

.supply-type {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin-bottom: 7px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.fridge-map {
  align-self: start;
}

.shelf-grid {
  display: grid;
  gap: 9px;
}

.shelf-grid div {
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--lake-600);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.shelf-grid strong,
.shelf-grid span,
.detail-list span,
.detail-list strong {
  display: block;
}

.shelf-grid span,
.detail-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.detail-list div {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.detail-list div:first-child {
  border-top: 0;
}

.detail-list span {
  margin: 0;
  font-weight: 650;
}

.detail-list strong {
  font-size: 0.94rem;
}

.activity-grid {
  display: grid;
  gap: 18px;
}

.guide-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.guide-highlight {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 146px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.guide-highlight span,
.activity-rank,
.activity-group-heading span,
.activity-meta dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.guide-highlight strong {
  font-size: 0.98rem;
}

.guide-highlight p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.activity-group {
  display: grid;
  gap: 10px;
}

.activity-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.activity-group-heading h2 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.2;
}

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

.activity-group-grid .activity-card {
  min-height: 144px;
  grid-template-columns: 86px 1fr;
  align-items: start;
}

.activity-group-grid .activity-thumb {
  width: 86px;
  height: 86px;
}

.activity-group-grid .activity-copy {
  display: grid;
  gap: 8px;
}

.activity-rank {
  display: block;
}

.activity-meta {
  display: grid;
  gap: 7px;
  margin: 2px 0;
}

.activity-meta div {
  display: grid;
  gap: 2px;
}

.activity-meta dt,
.activity-meta dd {
  margin: 0;
}

.activity-meta dd {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
}

.activity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.activity-tags span {
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 18, 10, 0.42);
}

.checkin-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 41;
  width: min(100vw, 450px);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.24);
}

.item-drawer {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 41;
  width: min(100vw - 36px, 430px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 72px rgba(0, 0, 0, 0.18);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 22px 18px;
}

.drawer-header h2,
.drawer-header p,
.form-step h3 {
  margin: 0;
}

.drawer-header h2 {
  font-size: 1.5rem;
}

.drawer-header p {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 710;
}

.progress-track {
  height: 8px;
  margin: 0 22px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  background: var(--forest-600);
  transition: width 180ms ease;
}

.checkin-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.item-form {
  display: grid;
}

.item-form-section {
  display: grid;
  gap: 14px;
  padding: 4px 22px 22px;
}

.item-image-preview {
  display: grid;
  gap: 12px;
}

.item-image-preview.is-hidden {
  display: none;
}

.item-image-preview img {
  width: 100%;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  object-fit: cover;
}

.form-step {
  flex: 1;
  padding: 24px 22px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.form-step h3 {
  margin-bottom: 18px;
  font-size: 1.4rem;
  line-height: 1.16;
}

.family-picker {
  display: grid;
  gap: 10px;
}

.family-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  text-align: left;
}

.family-option.is-selected {
  border-color: var(--forest-600);
  background: rgba(28, 122, 66, 0.08);
}

.family-option strong,
.family-option span {
  display: block;
}

.family-option span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.family-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

.form-step label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--forest-900);
  font-size: 0.88rem;
  font-weight: 700;
}

.item-form label {
  display: grid;
  gap: 8px;
  color: var(--forest-900);
  font-size: 0.88rem;
  font-weight: 700;
}

.day-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.day-picker legend {
  padding: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.day-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.day-chip {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
}

.day-chip.is-selected {
  border-color: var(--forest-700);
  background: #eef8ef;
  color: var(--forest-800);
}

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

select,
input {
  min-height: 48px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.4;
}

select:focus,
textarea:focus,
input:focus,
button:focus-visible {
  outline: 3px solid rgba(22, 127, 166, 0.28);
  outline-offset: 2px;
}

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

.drawer-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px 22px 22px;
  padding-bottom: max(22px, calc(16px + env(safe-area-inset-bottom)));
  border-top: 1px solid var(--line);
  background: #fff;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translateX(-50%);
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--forest-950);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 650;
}

.mobile-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  width: min(100%, var(--content-max));
  overflow: hidden;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 72px;
  padding: 7px 2px max(7px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(22px);
}

.mobile-profile-card {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 20px), calc(var(--content-max) - 20px));
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 31;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(22px);
}

.mobile-profile-card.is-hidden {
  display: none;
}

.mobile-profile-card strong,
.mobile-profile-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-profile-card strong {
  color: var(--text);
  font-size: 0.88rem;
}

.mobile-profile-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
}

.mobile-profile-actions {
  display: flex;
  gap: 6px;
}

.mobile-profile-actions button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--forest-800);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Phone-first shell: keep the app arranged like an iPhone surface even on wider screens. */
.hero {
  background: #fff;
}

.hero-media {
  min-height: 148px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.hero-shade {
  background:
    linear-gradient(180deg, rgba(3, 18, 10, 0.16), rgba(3, 18, 10, 0.74)),
    linear-gradient(90deg, rgba(3, 18, 10, 0.36), rgba(3, 18, 10, 0.08));
}

.hero-copy {
  left: 18px;
  right: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
}

.hero-copy h1 {
  max-width: 250px;
  font-size: 2rem;
}

.hero-copy p {
  font-size: 0.98rem;
}

.hero-actions {
  top: 16px;
  right: 16px;
  left: auto;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: end;
  align-items: start;
  gap: 8px;
}

.hero-user {
  min-height: 34px;
  padding: 0 10px;
  max-width: 128px;
  font-size: 0.74rem;
}

.sync-status {
  position: static;
  grid-column: 1 / 3;
  justify-self: end;
  min-height: 34px;
  padding: 0 9px;
  font-size: 0.72rem;
}

.summary-grid,
.dashboard-grid,
.two-column,
.supply-layout,
.guide-highlights,
.families-grid,
.meal-board,
.activity-group-grid {
  grid-template-columns: 1fr;
}

.action-panel,
.notice-panel,
.install-panel,
.top-needed-panel,
.claiming-panel,
.trip-status,
.dashboard-grid,
.content-panel {
  margin-left: 14px;
  margin-right: 14px;
}

.trip-status {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.status-action {
  min-height: 62px;
  padding: 10px;
}

.status-action strong {
  font-size: 1.15rem;
}

.status-action span {
  font-size: 0.75rem;
  line-height: 1.2;
}

.claiming-panel {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
}

.claiming-panel p {
  display: none;
}

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

.quick-family {
  min-height: 44px;
  padding: 0 8px;
}

.bringing-group-header,
.bringing-row,
.meal-row,
.needed-row {
  grid-template-columns: 1fr;
}

.meal-row {
  align-items: start;
  gap: 8px;
}

.needed-row .claim-button,
.meal-row .claim-button,
.meal-row .claimed-pill {
  width: 100%;
  justify-self: stretch;
}

.board-panel {
  padding: 15px;
}

.content-panel {
  min-height: auto;
  padding: 18px 14px;
  box-shadow: none;
}

.panel-heading,
.section-heading {
  display: grid;
  gap: 12px;
}

.panel-heading h1 {
  font-size: 2rem;
}

.toast {
  bottom: calc(88px + env(safe-area-inset-bottom));
  max-width: min(398px, calc(100vw - 28px));
}
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px 18px 152px;
  }

  .summary-grid,
  .dashboard-grid,
  .two-column,
  .supply-layout,
  .guide-highlights {
    grid-template-columns: 1fr;
  }

  .meal-board,
  .activity-group-grid,
  .families-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 72px;
    padding: 7px 2px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--muted);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(22px);
  }

  .mobile-nav-item {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 58px;
    padding: 0 1px;
    border-radius: var(--radius);
    font-size: 0.62rem;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-item.is-active {
    color: var(--text);
    background: var(--surface-soft);
  }

  .mobile-profile-card {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    z-index: 31;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(22px);
  }

  .mobile-profile-card.is-hidden {
    display: none;
  }

  .mobile-profile-card strong,
  .mobile-profile-card span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-profile-card strong {
    color: var(--text);
    font-size: 0.88rem;
  }

  .mobile-profile-card span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.74rem;
  }

  .mobile-profile-actions {
    display: flex;
    gap: 6px;
  }

  .mobile-profile-actions button {
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--forest-800);
    font-size: 0.72rem;
    font-weight: 700;
  }
}

@media (max-width: 720px) {
  body {
    background: var(--paper);
  }

  .main {
    padding: 0 0 calc(108px + env(safe-area-inset-bottom));
  }

  .app-topbar {
    padding: max(10px, env(safe-area-inset-top)) 14px 0;
  }

  .app-session {
    min-height: 38px;
    padding: 0 7px 0 12px;
  }

  .app-session span {
    font-size: 0.76rem;
  }

  .app-session button {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .hero {
    background: #fff;
  }

  .hero-media {
    min-height: 136px;
    border-radius: 0;
    box-shadow: none;
    border-left: 0;
    border-right: 0;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(3, 18, 10, 0.16), rgba(3, 18, 10, 0.74)),
      linear-gradient(90deg, rgba(3, 18, 10, 0.36), rgba(3, 18, 10, 0.08));
  }

  .hero-copy {
    left: 18px;
    right: 18px;
    bottom: 18px;
    max-width: calc(100vw - 36px);
  }

  .hero-copy h1 {
    max-width: 350px;
    font-size: 1.86rem;
    line-height: 1;
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .hero-actions {
    top: 16px;
    right: 16px;
    left: auto;
    display: grid;
    grid-template-columns: auto auto;
    justify-content: end;
    align-items: start;
    gap: 8px;
  }

  .hero-user {
    min-height: 34px;
    padding: 0 10px;
    max-width: 128px;
    font-size: 0.74rem;
  }

  .sync-status {
    position: static;
    grid-column: 1 / 3;
    justify-self: end;
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.72rem;
  }

  .summary-grid {
    display: none;
  }

  .action-panel,
  .notice-panel,
  .install-panel,
  .top-needed-panel,
  .claiming-panel,
  .trip-status,
  .dashboard-grid,
  .content-panel {
    margin-left: 14px;
    margin-right: 14px;
  }

  .trip-status {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
  }

  .install-panel {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 14px;
  }

  .install-icon {
    width: 38px;
    height: 38px;
  }

  .install-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .status-action {
    min-height: 62px;
    padding: 10px;
  }

  .status-action strong {
    font-size: 1.15rem;
  }

  .status-action span {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .action-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
  }

  .primary-quick-action {
    grid-column: 1 / -1;
  }

  .quick-action {
    min-height: 64px;
    grid-template-columns: 36px 1fr;
    padding: 10px 12px;
  }

  .quick-action-icon {
    width: 36px;
    height: 36px;
  }

  .quick-action-arrow {
    display: none;
  }

  .claiming-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .claiming-panel p {
    display: none;
  }

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

  .quick-family {
    min-height: 44px;
    padding: 0 8px;
  }

  .needed-row {
    grid-template-columns: 1fr;
  }

  .bringing-group-header,
  .bringing-row {
    grid-template-columns: 1fr;
  }

  .needed-row .claim-button {
    width: 100%;
  }

  .action-identity {
    align-items: flex-start;
  }

  .large-icon {
    display: none;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .notice-panel {
    grid-template-columns: 36px 1fr;
  }

  .notice-panel .text-button {
    grid-column: 2;
    justify-self: start;
  }

  .board-panel {
    padding: 15px;
  }

  .dashboard-grid {
    display: grid;
    gap: 14px;
  }

  .section-heading,
  .panel-heading {
    display: grid;
    gap: 12px;
  }

  .day-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .day-tabs button {
    min-height: 54px;
    font-size: 0.84rem;
  }

  .meal-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .meal-icon {
    display: none;
  }

  .meal-time {
    grid-column: auto;
  }

  .meal-row .claim-button,
  .meal-row .claimed-pill {
    grid-column: auto;
    justify-self: start;
  }

  .activity-card {
    grid-template-columns: 58px 1fr auto;
    gap: 10px;
  }

  .activity-thumb {
    width: 58px;
    height: 50px;
  }

  .content-panel {
    min-height: auto;
    padding: 18px 14px;
    box-shadow: none;
  }

  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .item-drawer {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 88dvh;
    overflow: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .panel-heading h1 {
    font-size: 2.2rem;
  }

  .families-grid,
  .meal-board,
  .activity-group-grid {
    grid-template-columns: 1fr;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .activity-group-grid .activity-card {
    grid-template-columns: 72px 1fr;
  }

  .activity-group-grid .activity-thumb {
    width: 72px;
    height: 72px;
  }

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

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

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

  .auth-card {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .hero-copy h1 {
    font-size: 2.08rem;
  }

  .location-row {
    font-size: 0.9rem;
  }

  .summary-card strong {
    font-size: 0.95rem;
  }

  .summary-card small {
    font-size: 0.68rem;
  }

  .notice-panel {
    padding: 14px;
  }

  .activity-card {
    grid-template-columns: 1fr auto;
  }

  .activity-group-grid .activity-card {
    grid-template-columns: 1fr;
  }

  .activity-group-grid .activity-thumb,
  .activity-stack .activity-thumb {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .icon-button,
  .primary-action,
  .claim-button,
  .vote-button,
  .family-option {
    transition: transform 150ms ease, filter 150ms ease, background 150ms ease, border-color 150ms ease;
  }
}
