:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-soft: #eef5ef;
  --ink: #17211c;
  --muted: #66706a;
  --line: #dbe0da;
  --accent: #2b6f5b;
  --accent-dark: #1d4f44;
  --clay: #b9613c;
  --sky: #d9e9f1;
  --lime: #d7e66d;
  --shadow: 0 18px 50px rgba(35, 43, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body.preview-mode,
body.signup-mode {
  position: relative;
  overflow-x: hidden;
  background: #17211c;
}

body.preview-mode::before,
body.signup-mode::before {
  content: "";
  position: fixed;
  inset: -3vmax;
  z-index: 0;
  pointer-events: none;
  background-image: url("assets/auth-background.jpg");
  background-position: center;
  background-size: cover;
  animation: auth-background-zoom 34s ease-in-out infinite alternate;
  will-change: transform;
}

body.preview-mode::after,
body.signup-mode::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 23, 27, 0.42), rgba(14, 23, 27, 0.1) 55%, rgba(14, 23, 27, 0.32)),
    rgba(255, 255, 255, 0.08);
}

@keyframes auth-background-zoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.preview-mode::before,
  body.signup-mode::before {
    animation: none;
  }
}

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

button {
  cursor: pointer;
}

.preview-screen {
  display: none;
  min-height: 100vh;
  padding: 32px;
}

.preview-mode .preview-screen {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: center;
}

.preview-mode .app-shell {
  display: none;
}

.app-mode .preview-screen,
.signup-mode .preview-screen {
  display: none;
}

.signup-mode .app-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1fr);
  background: transparent;
}

.signup-mode .sidebar {
  display: none;
}

.preview-hero,
.preview-grid article {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 22px 70px rgba(25, 31, 35, 0.18);
  backdrop-filter: blur(18px);
}

.preview-hero {
  display: grid;
  gap: 22px;
  padding: 32px;
}

.preview-hero .brand {
  color: var(--ink);
}

.preview-hero .brand span {
  color: var(--muted);
}

.preview-hero h1 {
  max-width: 780px;
}

.preview-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.policy-links a {
  color: var(--accent-dark);
}

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

.preview-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.preview-grid span {
  color: var(--muted);
  line-height: 1.4;
}

.app-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  background: #17211c;
  color: #f7f5ef;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: #17211c;
  background: var(--lime);
  font-weight: 900;
}

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

.brand span {
  display: block;
  max-width: 180px;
  color: rgba(247, 245, 239, 0.68);
  font-size: 12px;
  line-height: 1.35;
}

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

.nav-item {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(247, 245, 239, 0.78);
  background: transparent;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.toggle-line {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
}

.toggle-line.is-disabled,
.form-grid fieldset label.is-disabled {
  opacity: 0.58;
}

.field-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.bot-field {
  display: none !important;
}

.eyebrow {
  color: rgba(247, 245, 239, 0.58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 4;
}

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

h1 {
  font-size: 42px;
  line-height: 1.04;
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
}

.topbar-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
  justify-items: end;
}

.invite-status {
  grid-column: 1 / -1;
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.invite-status:empty {
  display: none;
}

.invite-status a {
  color: var(--accent-dark);
  font-weight: 800;
}

.primary-action,
.secondary-action,
.message-box button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

.primary-action:disabled,
.secondary-action:disabled,
.message-box button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-action {
  color: var(--accent-dark);
  background: var(--sky);
}

.view {
  display: none;
  padding: 24px 32px 32px;
}

.view.active {
  display: block;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  width: min(440px, 100%);
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-box span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip,
.tag {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

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

.member-card {
  min-width: 0;
}

.member-card-button {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  min-height: 138px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(35, 43, 38, 0.04);
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.member-card-button:hover,
.member-card-button.selected {
  transform: translateY(-2px);
  border-color: rgba(43, 111, 91, 0.38);
  box-shadow: var(--shadow);
}

.photo-wrap {
  position: relative;
  width: 112px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--sky);
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-initial {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--accent-dark);
  background: var(--surface-soft);
  font-size: 30px;
  font-weight: 900;
}

.status-dot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #37b36b;
}

.member-copy {
  min-width: 0;
}

.member-title {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.member-title h3 {
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-score {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.member-copy p {
  display: -webkit-box;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag {
  min-height: 26px;
  padding: 4px 8px;
  background: #f4f1ea;
  font-size: 12px;
}

.detail-panel,
.planner-side,
.profile-editor,
.privacy-panel,
.instagram-panel,
.signup-card,
.signup-side,
.chat-panel,
.thread-list,
.planner-board,
.feed-list,
.feed-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(35, 43, 38, 0.07);
}

.signup-mode .topbar {
  border-bottom-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 40px rgba(25, 31, 35, 0.12);
}

.signup-mode .view {
  padding-top: 32px;
}

.signup-mode .signup-card,
.signup-mode .signup-side {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 22px 70px rgba(25, 31, 35, 0.18);
  backdrop-filter: blur(18px);
}

.signup-mode .sync-card,
.signup-mode .form-grid input,
.signup-mode .form-grid textarea,
.signup-mode .form-grid fieldset {
  background-color: rgba(255, 255, 255, 0.72);
}

.detail-panel {
  position: sticky;
  top: 118px;
  overflow: hidden;
}

.detail-hero {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  background-size: cover;
  background-position: center;
}

.detail-hero.empty-photo {
  background: linear-gradient(135deg, #173028, #5e7c6c);
  color: #fff;
}

.detail-hero.empty-photo span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  font-size: 34px;
  font-weight: 900;
}

.detail-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

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

.detail-title h2 {
  font-size: 26px;
}

.intent-badge {
  padding: 7px 9px;
  border-radius: 8px;
  color: #fff;
  background: var(--clay);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

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

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.meta-row strong {
  max-width: 58%;
  color: var(--ink);
  text-align: right;
}

.profile-insight {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(43, 111, 91, 0.2);
  border-radius: 8px;
  background: var(--surface-soft);
}

.profile-insight strong {
  color: var(--accent-dark);
  font-size: 13px;
}

.profile-insight span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.action-row button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 850;
}

.action-row button:first-child {
  color: #fff;
  background: var(--accent);
}

.action-row button:last-child {
  color: var(--accent-dark);
  background: var(--surface-soft);
}

.planner-layout,
.messages-layout,
.profile-layout,
.feed-layout,
.signup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}

.messages-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 620px;
}

.planner-board,
.planner-side,
.profile-editor,
.privacy-panel,
.instagram-panel,
.signup-card,
.signup-side,
.feed-side {
  padding: 18px;
}

.signup-layout {
  align-items: start;
}

.feed-layout {
  align-items: start;
}

.feed-list {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.feed-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  min-height: 190px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.feed-item img {
  width: 100%;
  height: 100%;
  min-height: 166px;
  border-radius: 8px;
  object-fit: cover;
}

.feed-copy {
  display: grid;
  align-content: space-between;
  gap: 16px;
  min-width: 0;
}

.feed-meta,
.feed-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.feed-meta strong,
.feed-meta span {
  display: block;
}

.feed-meta span,
.feed-footer span,
.sync-card span {
  color: var(--muted);
  font-size: 13px;
}

.feed-type {
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--accent-dark) !important;
  background: var(--surface-soft);
  font-size: 12px !important;
  font-weight: 900;
}

.feed-copy p {
  color: var(--ink);
  line-height: 1.45;
}

.feed-footer button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 850;
}

.secondary-link {
  display: inline-grid;
  min-height: 36px;
  padding: 0 12px;
  place-items: center;
  border-radius: 8px;
  color: var(--accent-dark);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.sync-card {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f5;
}

.sync-card + .sync-card {
  margin-top: 10px;
}

.inline-form,
.availability-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.inline-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.inline-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.availability-form label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  font-size: 13px;
  font-weight: 760;
}

.saved-window-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
}

.my-time {
  background: #173028;
  color: #fff;
}

.empty-note,
.save-status,
#instagram-sync-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.empty-state {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f5;
}

.empty-state.centered {
  place-content: center;
  min-height: 100%;
  text-align: center;
}

.empty-state span {
  color: var(--muted);
  font-size: 13px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading.with-action {
  display: flex;
  gap: 14px;
  align-items: start;
  justify-content: space-between;
}

.section-heading.with-action .secondary-action {
  flex: 0 0 auto;
}

.section-heading h2 {
  font-size: 23px;
}

.section-heading p,
.privacy-note,
.chat-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.day-column {
  min-width: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f5;
}

.day-column h3 {
  margin-bottom: 10px;
  font-size: 13px;
}

.time-pill {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
}

.empty-day {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.plan-card,
.thread-button {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f5;
  text-align: left;
}

.plan-card + .plan-card,
.thread-button + .thread-button {
  margin-top: 10px;
}

.plan-card strong,
.thread-button strong {
  display: block;
  margin-bottom: 4px;
}

.plan-card span,
.thread-button span {
  color: var(--muted);
  font-size: 13px;
}

.thread-list {
  padding: 12px;
}

.thread-button.active {
  border-color: rgba(43, 111, 91, 0.45);
  background: var(--surface-soft);
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.chat-header {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow: auto;
  background: #fbfaf7;
}

.bubble {
  max-width: min(560px, 78%);
  padding: 11px 13px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(35, 43, 38, 0.06);
}

.bubble.mine {
  align-self: flex-end;
  color: #fff;
  background: var(--accent);
}

.message-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.message-box input,
.form-grid input:not([type="checkbox"]),
.form-grid textarea,
.form-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fff;
}

.message-box input {
  min-height: 42px;
  padding: 0 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.form-grid input:not([type="checkbox"]),
.form-grid select {
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
}

.form-grid textarea {
  min-height: 118px;
  padding: 12px;
  color: var(--ink);
  resize: vertical;
}

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

.form-grid fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.form-grid legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.form-grid fieldset label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.form-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.profile-photo-preview {
  display: grid;
  aspect-ratio: 4 / 3;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.privacy-panel {
  background: #173028;
  color: #fff;
}

.privacy-panel .section-heading p,
.privacy-panel .privacy-note,
.privacy-panel label {
  color: rgba(255, 255, 255, 0.72);
}

.privacy-panel fieldset {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.privacy-panel legend,
.privacy-panel fieldset label {
  color: rgba(255, 255, 255, 0.84);
}

.privacy-panel .form-grid {
  margin-top: 18px;
}

.privacy-panel .private-grid {
  grid-template-columns: 1fr;
}

.privacy-note {
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.privacy-note.compact-note {
  margin-top: 10px;
}

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

.settings-save-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(35, 43, 38, 0.07);
}

.settings-save-panel span {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
}

.profile-public-preview {
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(35, 43, 38, 0.07);
}

.profile-public-preview[hidden] {
  display: none;
}

.profile-preview-frame {
  max-width: 420px;
}

.profile-preview-frame .detail-panel {
  position: static;
}

.profile-preview-frame .action-row button:disabled {
  cursor: default;
  opacity: 0.55;
}

.admin-layout {
  display: grid;
  gap: 18px;
}

.admin-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(35, 43, 38, 0.07);
}

.admin-stat-grid,
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-stat-grid article,
.admin-actions-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.admin-stat-grid strong {
  font-size: 28px;
  line-height: 1;
}

.admin-stat-grid span,
.admin-actions-grid span,
.admin-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-table td strong,
.admin-table td span {
  display: block;
}

.admin-table td span {
  margin-top: 3px;
  color: var(--muted);
}

.admin-pill {
  display: inline-block;
  margin: 0 5px 5px 0;
  padding: 5px 7px;
  border-radius: 999px;
  background: #edf3ef;
  color: var(--ink) !important;
  font-size: 11px;
  font-weight: 820;
}

.full-width-action {
  width: 100%;
}

.signup-card {
  min-width: 0;
}

.signup-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.signup-actions .primary-action {
  flex: 0 0 auto;
}

.signup-actions span {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
}

.thanks-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.thanks-card {
  display: grid;
  gap: 20px;
  width: min(620px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.policy-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.policy-card {
  display: grid;
  gap: 16px;
  width: min(760px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.policy-card h1,
.policy-card h2,
.policy-card p {
  margin: 0;
}

.policy-card h2 {
  margin-top: 10px;
  font-size: 18px;
}

.policy-card p {
  color: var(--muted);
  line-height: 1.55;
}

.policy-card a {
  color: var(--accent-dark);
}

.thanks-card .brand {
  color: var(--ink);
}

.thanks-card .brand span,
.thanks-card p {
  color: var(--muted);
}

.primary-link {
  display: inline-grid;
  width: fit-content;
  min-height: 42px;
  padding: 0 16px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1120px) {
  .content-grid,
  .planner-layout,
  .profile-layout,
  .feed-layout,
  .signup-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }

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

@media (max-width: 820px) {
  .preview-mode .preview-screen {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .preview-hero {
    padding: 20px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    gap: 14px;
    padding: 14px;
  }

  .brand span {
    display: none;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 78px;
    padding: 0 4px;
    font-size: 13px;
    text-align: center;
  }

  .topbar,
  .toolbar,
  .chat-header,
  .section-heading.with-action {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    grid-template-columns: 1fr 1fr;
    justify-items: stretch;
  }

  .topbar-actions button {
    width: 100%;
  }

  .invite-status {
    max-width: none;
    text-align: left;
  }

  .topbar,
  .view {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 26px;
  }

  .messages-layout {
    grid-template-columns: 1fr;
  }

  .feed-item {
    grid-template-columns: 1fr;
  }

  .feed-item img {
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 0;
  }

  .thread-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
  }

  .thread-button {
    min-width: 230px;
  }

  .form-grid,
  .action-row,
  .admin-stat-grid,
  .admin-actions-grid,
  .signup-actions,
  .settings-save-panel {
    grid-template-columns: 1fr;
  }

  .signup-actions,
  .settings-save-panel {
    display: grid;
    align-items: stretch;
  }

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

  .member-card-button {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .photo-wrap {
    width: 96px;
  }
}
