/* =========================================================================
   Landing page
   ========================================================================= */

.landing-shell {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Personal-first Afterours home — July 2026 */
.personal-home-v2 {
  --home-ink: #171816;
  --home-muted: #73756f;
  --home-line: #e7e7e2;
  --home-paper: #f7f7f3;
  --home-card: #ffffff;
  --home-accent: #bdff5a;
  color: var(--home-ink);
  color-scheme: light;
  min-height: 100svh;
  padding: 0 20px calc(104px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 92% 4%, rgb(189 255 90 / 10%), transparent 24rem),
    var(--home-paper);
}

.personal-home-v2 .afterours-topbar {
  position: relative;
  inset: auto;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 0 16px;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.personal-home-v2 .afterours-wordmark {
  color: var(--home-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.personal-home-v2 .afterours-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.personal-home-v2 .afterours-greeting {
  color: var(--home-muted);
  font-size: 12px;
  font-weight: 650;
}

.personal-home-v2 .afterours-avatar-link {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #d9dad4;
  border-radius: 50%;
  color: var(--home-ink);
  background: #ebece6;
  font-size: 11px;
  font-weight: 760;
}

.personal-home-main {
  display: grid;
  max-width: 720px;
  margin: 0 auto;
  gap: 28px;
}

.personal-home-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  gap: 10px;
  border: 1px solid #dedfd9;
  border-radius: 14px;
  color: #84857f;
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 6px 28px rgb(18 20 15 / 3%);
  font-size: 13px;
  font-weight: 560;
}

.personal-home-search .ph:first-child {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #1b1d18;
  background: var(--home-accent);
  font-size: 15px;
}

.personal-home-feature {
  overflow: hidden;
  border: 1px solid #e1e2dc;
  border-radius: 20px;
  background: var(--home-card);
  box-shadow: 0 18px 60px rgb(24 27 19 / 7%);
}

.personal-home-feature-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 8.6;
  overflow: hidden;
  background: #d9dbd3;
}

.personal-home-feature-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 55%, rgb(9 12 7 / 48%));
}

.personal-home-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms cubic-bezier(.2,.75,.25,1);
}

.personal-home-feature-media:hover img { transform: scale(1.018); }

.personal-home-feature-media > span {
  position: absolute;
  z-index: 1;
  left: 16px;
  bottom: 14px;
  color: white;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.personal-home-feature-body {
  display: grid;
  padding: 20px;
  gap: 17px;
}

.personal-home-feature-body > div:first-child > p,
.personal-home-section-heading span,
.personal-home-collection-copy > small {
  margin: 0 0 5px;
  color: #7c7e77;
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.personal-home-feature h1 {
  margin: 0;
  color: var(--home-ink);
  font-family: inherit;
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 760;
  letter-spacing: -.052em;
  line-height: .98;
}

.personal-home-feature-body > div:first-child > span {
  display: block;
  margin-top: 9px;
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.45;
}

.personal-home-social {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #4c4e48;
  font-size: 12px;
  font-weight: 650;
}

.personal-home-social > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: #dfe1d9;
  font-size: 9px;
  box-shadow: 0 0 0 1px #d6d8d0;
}

.personal-home-social > .ph {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #35372f;
  background: #eceee6;
  font-size: 14px;
}

.personal-home-time {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 0;
  border-block: 1px solid #eeeeea;
}

.personal-home-time > .ph {
  margin-top: 1px;
  color: #6f774d;
  font-size: 21px;
}

.personal-home-time span { display: grid; gap: 3px; }
.personal-home-time strong { font-size: 12px; font-weight: 720; }
.personal-home-time small { color: var(--home-muted); font-size: 11px; }

.personal-home-feature-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.personal-home-primary,
.personal-home-icon-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #1d1f1a;
  border-radius: 13px;
  color: white;
  background: #1d1f1a;
  font-size: 13px;
  font-weight: 720;
  box-shadow: 0 8px 18px rgb(20 22 18 / 14%);
}

.personal-home-primary .ph { color: var(--home-accent); font-size: 18px; }
.personal-home-icon-button { width: 46px; color: var(--home-ink); background: white; box-shadow: none; }

.personal-home-section { display: grid; gap: 12px; }
.personal-home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.personal-home-section-heading h2 { margin: 0; color: var(--home-ink); font-family: inherit; font-size: 20px; font-weight: 740; letter-spacing: -.032em; }
.personal-home-section-heading a { padding-bottom: 1px; color: #696b65; font-size: 11px; font-weight: 680; }

.personal-home-momentum-list {
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 17px;
  background: rgb(255 255 255 / 72%);
}

.personal-home-momentum-row,
.personal-home-empty-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 72px;
  padding: 12px 14px;
  align-items: center;
  gap: 12px;
  color: var(--home-ink);
}

.personal-home-momentum-row + .personal-home-momentum-row { border-top: 1px solid var(--home-line); }

.personal-home-context-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #d5d6cf;
  border-radius: 50%;
  background: #e6e7e1;
  font-size: 11px;
  font-weight: 760;
}

.personal-home-context-avatar img { width: 100%; height: 100%; object-fit: cover; }
.personal-home-momentum-copy { display: grid; min-width: 0; gap: 2px; }
.personal-home-momentum-copy small { color: #72746d; font-size: 10px; font-weight: 700; }
.personal-home-momentum-copy strong { overflow: hidden; font-size: 13px; font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.personal-home-momentum-copy em { overflow: hidden; color: #898b84; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.personal-home-momentum-row > .ph,
.personal-home-empty-row > .ph:last-child { color: #8b8d86; font-size: 15px; }

.personal-home-empty-row > .ph:first-child {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #3c402d;
  background: #e9f9cf;
  font-size: 19px;
}

.personal-home-empty-row span { display: grid; gap: 4px; }
.personal-home-empty-row strong { font-size: 13px; }
.personal-home-empty-row small { color: var(--home-muted); font-size: 10px; line-height: 1.35; }

.personal-home-collection {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  min-height: 94px;
  padding: 8px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--home-line);
  border-radius: 17px;
  color: var(--home-ink);
  background: rgb(255 255 255 / 74%);
}

.personal-home-collection > img { width: 82px; height: 76px; border-radius: 12px; object-fit: cover; filter: saturate(.82) contrast(.95); }
.personal-home-collection-copy { display: grid; min-width: 0; gap: 2px; }
.personal-home-collection-copy > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.personal-home-collection-copy > em { color: var(--home-muted); font-size: 10px; font-style: normal; }
.personal-home-collection > .ph { margin-right: 9px; color: #858780; font-size: 16px; }
.personal-home-progress { display: block; height: 3px; margin-top: 8px; overflow: hidden; border-radius: 4px; background: #e8e9e3; }
.personal-home-progress i { display: block; height: 100%; border-radius: inherit; background: #728d45; }

.personal-plans-header {
  max-width: 580px;
  padding: 28px 0 10px;
}

.personal-plans-header > span {
  color: #74776f;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.personal-plans-header h1 {
  max-width: 520px;
  margin: 10px 0 14px;
  color: var(--home-ink);
  font-family: inherit;
  font-size: clamp(38px, 10vw, 60px);
  font-weight: 760;
  letter-spacing: -.065em;
  line-height: .94;
}

.personal-plans-header p {
  max-width: 500px;
  margin: 0;
  color: var(--home-muted);
  font-size: 14px;
  line-height: 1.55;
}

.personal-plans-note {
  display: flex;
  padding: 17px;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #dfe4d5;
  border-radius: 17px;
  color: #3a3e32;
  background: #f0f7e6;
}

.personal-plans-note > .ph { font-size: 22px; }
.personal-plans-note > span { display: grid; gap: 4px; }
.personal-plans-note strong { font-size: 13px; }
.personal-plans-note small { color: #6f7566; font-size: 11px; line-height: 1.4; }

.personal-home-v2 .afterours-bottom-nav {
  position: fixed;
  z-index: 20;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: auto;
  max-width: 500px;
  height: 64px;
  margin: auto;
  padding: 6px 7px;
  border: 1px solid rgb(212 214 206 / 92%);
  border-radius: 20px;
  background: rgb(251 251 248 / 92%);
  box-shadow: 0 15px 40px rgb(22 25 17 / 14%);
  backdrop-filter: blur(18px) saturate(1.25);
}

.personal-home-v2 .afterours-bottom-nav a {
  display: flex;
  min-width: 0;
  padding: 5px 2px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  border-radius: 14px;
  color: #898b84;
}

.personal-home-v2 .afterours-bottom-nav a.active { color: var(--home-ink); background: #eef0e8; }
.personal-home-v2 .afterours-bottom-nav .ph { font-size: 20px; }
.personal-home-v2 .afterours-bottom-nav small { font-size: 9px; font-weight: 680; }

@media (min-width: 760px) {
  .personal-home-v2 { padding-inline: 32px; }
  .personal-home-feature { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); }
  .personal-home-feature-media { aspect-ratio: auto; min-height: 390px; }
  .personal-home-feature-body { align-content: center; padding: 32px; }
}

@media (max-width: 420px) {
  .personal-home-v2 { padding-inline: 14px; }
  .personal-home-v2 .afterours-greeting { display: none; }
  .personal-home-main { gap: 24px; }
  .personal-home-feature-body { padding: 17px; }
  .personal-home-feature h1 { font-size: 34px; }
}

/* Keep the V5 workspaces out of the legacy centered app frame. */
.app-shell:has(.nearby-discover-page),
.app-shell:has(.canon-admin-shell) {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body:has(.nearby-discover-page),
body:has(.canon-admin-shell) { background: #fbfaf6 !important; }

.canon-admin-shell :is(h1, h2, strong) { color: var(--canon-ink); }
.canon-activity-list button.active strong { color: var(--canon-blue); }

.landing-card {
  width: 100%;
  display: grid;
  gap: 28px;
  padding: clamp(24px, 5vw, 56px);
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 45%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--free) 10%, transparent), transparent 50%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.afterours-visitor-card {
  max-width: 1180px;
  border-radius: 28px;
}

.landing-hero-shell {
  display: grid;
  gap: 20px;
  align-items: stretch;
}

.landing-head {
  display: grid;
  gap: 12px;
  max-width: 640px;
}

.landing-head h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.landing-head h1::after {
  content: ".";
  color: var(--accent);
}

.landing-lead {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 540px;
}

.landing-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.landing-plan-preview {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 86%, var(--accent)), color-mix(in srgb, var(--surface) 92%, var(--free))),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.landing-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.landing-preview-top strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-preview-composer {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 9px;
  border: 1px dashed color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.landing-preview-composer span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 950;
}

.landing-preview-composer p {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.3;
}

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

.landing-preview-idea {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.landing-preview-idea span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.landing-preview-idea strong,
.landing-preview-idea small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-preview-idea strong {
  font-size: 0.95rem;
}

.landing-preview-idea small {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 850;
}

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

.landing-preview-footer span {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.landing-preview-footer strong,
.landing-preview-footer small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-preview-footer strong {
  font-size: 0.78rem;
}

.landing-preview-footer small {
  color: var(--ink-mute);
  font-size: 0.66rem;
  font-weight: 850;
}

.landing-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 880px) {
  .landing-hero-shell {
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  }

  .landing-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* Final cascade guard for the personal home. Legacy account styles remain
   available to the other account screens. */
.afterours-shell.personal-home-v2 {
  min-height: 100svh;
  padding: 0 20px calc(104px + env(safe-area-inset-bottom));
  gap: 0;
  color: var(--home-ink);
  background: var(--home-paper);
}

.personal-home-v2 > .afterours-topbar {
  position: relative;
  top: auto;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 0 16px;
  background: transparent;
  backdrop-filter: none;
}

.personal-home-v2 .afterours-wordmark {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: var(--home-ink);
  background: transparent;
  box-shadow: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.055em;
  text-transform: none;
}

.personal-home-v2 .afterours-avatar-link {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
}

.personal-home-v2 > .afterours-bottom-nav {
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 12px;
  width: auto;
  height: 64px;
  padding: 6px 7px;
  border-radius: 20px;
  background: rgb(251 251 248 / 92%);
}

.personal-home-v2 > .afterours-bottom-nav a {
  display: flex;
  min-height: 0;
  padding: 5px 2px;
  border-radius: 14px;
  color: #898b84;
  background: transparent;
}

.personal-home-v2 > .afterours-bottom-nav a.active {
  color: var(--home-ink);
  background: #eef0e8;
}

@media (max-width: 420px) {
  .afterours-shell.personal-home-v2 { padding-inline: 14px; }
}

/* V2 group decision flow: quiet surfaces, readable contrast, mobile-first controls. */
.group-themed-shell .plan-board-hero,
.group-themed-shell .explore-board-hero {
  display: grid;
  gap: 15px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--v2-rule);
  border-radius: 20px;
  color: var(--v2-ink);
  background: #fff;
  box-shadow: 0 8px 24px rgb(24 25 22 / 5%);
}

.group-themed-shell .plan-board-hero-copy,
.group-themed-shell .explore-board-hero-copy { display: grid; gap: 7px; }
.group-themed-shell .plan-board-hero-copy h2,
.group-themed-shell .explore-board-hero-copy h2 {
  margin: 0;
  color: var(--v2-ink);
  font: 520 clamp(30px, 9vw, 44px)/.98 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}
.group-themed-shell .plan-board-hero-copy p,
.group-themed-shell .explore-board-hero-copy p {
  margin: 0;
  color: var(--v2-muted);
  font-size: 12px;
  line-height: 1.5;
}
.group-themed-shell :is(.plan-board-stats, .explore-board-hero-stats) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.group-themed-shell :is(.plan-board-stats, .explore-board-hero-stats) > span {
  display: grid;
  min-width: 0;
  padding: 10px;
  gap: 3px;
  border: 1px solid var(--v2-rule);
  border-radius: 12px;
  color: var(--v2-ink);
  background: #f7f6f1;
}
.group-themed-shell :is(.plan-board-stats, .explore-board-hero-stats) strong {
  color: var(--v2-ink);
  font: 520 19px/1 Georgia, "Times New Roman", serif;
}
.group-themed-shell :is(.plan-board-stats, .explore-board-hero-stats) small {
  overflow: hidden;
  color: var(--v2-muted);
  font: 750 7px/1.2 var(--font-mono);
  letter-spacing: .08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.group-themed-shell :is(.plan-board-actions, .explore-board-command-strip) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.group-themed-shell :is(.plan-board-action, .explore-board-command) {
  display: grid;
  min-width: 0;
  min-height: 92px;
  padding: 12px;
  align-content: start;
  gap: 5px;
  border: 1px solid var(--v2-rule);
  border-radius: 15px;
  color: var(--v2-ink);
  background: #fbfaf6;
  box-shadow: none;
  text-align: left;
}
.group-themed-shell :is(.plan-board-action, .explore-board-command).primary {
  border-color: #cbd9ff;
  color: #163b9c;
  background: var(--v2-blue-soft);
}
.group-themed-shell :is(.plan-board-action, .explore-board-command) > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: var(--v2-blue);
  background: #edf2ff;
}
.group-themed-shell :is(.plan-board-action, .explore-board-command) strong {
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-themed-shell :is(.plan-board-action, .explore-board-command) small {
  overflow: visible;
  color: var(--v2-muted);
  font-size: 8.5px;
  line-height: 1.3;
  white-space: normal;
}

.group-themed-shell .explore-mode-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.group-themed-shell .explore-mode-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 78px;
  padding: 11px;
  align-content: start;
  gap: 4px;
  border: 1px solid var(--v2-rule);
  border-radius: 14px;
  color: var(--v2-ink);
  background: #fff;
  text-align: left;
}
.group-themed-shell .explore-mode-card.active {
  border-color: #cbd9ff;
  color: #163b9c;
  background: var(--v2-blue-soft);
}
.group-themed-shell .explore-mode-card::before,
.group-themed-shell .explore-mode-card::after { display: none; content: none; }
.group-themed-shell .explore-mode-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  color: var(--v2-blue);
  background: #edf2ff;
}
.group-themed-shell .explore-mode-copy { display: grid; gap: 2px; }
.group-themed-shell .explore-mode-copy strong { color: inherit; font-size: 11px; }
.group-themed-shell .explore-mode-copy small { color: var(--v2-muted); font-size: 8px; line-height: 1.25; }
.group-themed-shell .explore-mode-count {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  place-items: center;
  border-radius: 10px;
  color: var(--v2-ink);
  background: #f0efe9;
  font-size: 8px;
  font-weight: 800;
}
.group-themed-shell .explore-tool-drawer {
  overflow: hidden;
  border: 1px solid var(--v2-rule);
  border-radius: 14px;
  color: var(--v2-ink);
  background: #fff;
}
.group-themed-shell .explore-tool-drawer > summary {
  display: flex;
  min-height: 44px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--v2-ink);
}
.group-themed-shell .explore-tool-drawer > summary strong { color: var(--v2-muted); font-size: 9px; }
.group-themed-shell .explore-tool-body { display: grid; padding: 12px; gap: 10px; border-top: 1px solid var(--v2-rule); }

.group-themed-shell .matchup-stack { display: grid; gap: 24px; }
.group-themed-shell .schedule-board-shell { display: grid; gap: 10px; }
.group-themed-shell .month-board {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--v2-rule);
  border-radius: 18px;
  color: var(--v2-ink);
  background: #fff;
}
.group-themed-shell .month-board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.group-themed-shell .month-board-title { display: grid; gap: 3px; }
.group-themed-shell .month-board-title strong { color: var(--v2-ink); font: 520 17px/1.1 Georgia, "Times New Roman", serif; }
.group-themed-shell .month-board-title span { font-size: 8px; }
.group-themed-shell .month-board-controls { display: flex; gap: 4px; }
.group-themed-shell .month-nav-button {
  min-width: 32px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--v2-rule);
  border-radius: 11px;
  color: var(--v2-ink);
  background: #fff;
}
.group-themed-shell .month-nav-button.today { font-size: 9px; font-weight: 750; }
.group-themed-shell .month-board-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.group-themed-shell .month-weekday { padding-block: 3px; color: var(--v2-muted); font: 700 7px/1 var(--font-mono); text-align: center; }
.group-themed-shell .month-cell {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 49px;
  padding: 5px;
  align-content: start;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--v2-ink);
  background: #f8f7f2;
  text-align: left;
}
.group-themed-shell .month-cell.empty { background: transparent; }
.group-themed-shell .month-cell.is-past { opacity: .38; }
.group-themed-shell .month-cell.is-today { border-color: var(--v2-blue); background: var(--v2-blue-soft); }
.group-themed-shell .month-cell.has-matchup { background: #edf5ef; }
.group-themed-shell .month-cell-day { font-size: 8px; font-weight: 800; }
.group-themed-shell .month-cell-people { display: flex; flex-wrap: wrap; gap: 2px; }
.group-themed-shell .month-avatar { display: grid; width: 13px; height: 13px; place-items: center; border-radius: 50%; color: #fff; background: var(--avatar-color, #667); font-size: 5px; font-weight: 800; }
.group-themed-shell .month-cell-cues { position: absolute; right: 3px; bottom: 2px; font-size: 8px; }
.group-themed-shell .matchup-empty { padding: 18px; border: 1px dashed var(--v2-rule); border-radius: 14px; color: var(--v2-muted); background: #fbfaf6; font-size: 10px; line-height: 1.45; }
.group-themed-shell .plan-proposal-list { display: grid; gap: 8px; }
.group-themed-shell .plan-proposal-summary { border: 1px solid var(--v2-rule); border-radius: 15px; overflow: hidden; background: #fff; }
.group-themed-shell .plan-proposal-summary > button {
  display: grid;
  width: 100%;
  min-height: 108px;
  padding: 14px;
  align-content: center;
  gap: 4px;
  border: 0;
  color: var(--v2-ink);
  background: transparent;
  text-align: left;
}
.group-themed-shell .plan-proposal-summary-top { display: flex; justify-content: space-between; gap: 10px; }
.group-themed-shell .plan-proposal-summary-top small { color: #526b5b; font: 750 8px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.group-themed-shell .plan-proposal-summary-top em { color: var(--v2-blue); font-size: 9px; font-style: normal; font-weight: 750; }
.group-themed-shell .plan-proposal-summary > button > strong { color: var(--v2-ink); font: 520 19px/1.1 Georgia, "Times New Roman", serif; }
.group-themed-shell .plan-proposal-summary > button > span:not(.plan-proposal-summary-top),
.group-themed-shell .plan-proposal-summary > button > small { color: var(--v2-muted); font-size: 9px; }

.modal-sheet .planner-quick-ideas textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--v2-rule, var(--line));
  border-radius: 14px;
  color: var(--v2-ink, var(--ink));
  background: #fff;
}
.planner-saved-ideas-disclosure {
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--v2-rule, var(--line));
  border-radius: 16px;
  background: #fff;
}
.planner-saved-ideas-disclosure > summary {
  display: flex;
  min-height: 64px;
  padding: 13px 15px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--v2-ink, var(--ink));
}
.planner-saved-ideas-disclosure > summary > span:first-child { display: grid; gap: 3px; }
.planner-saved-ideas-disclosure > summary small { color: var(--v2-muted, var(--ink-soft)); font-size: 9px; }
.planner-saved-ideas-body { display: grid; padding: 14px; gap: 14px; border-top: 1px solid var(--v2-rule, var(--line)); }
.planner-advanced-disclosure > summary { color: var(--v2-blue, var(--accent)); }
.group-themed-shell .modal-sheet .planner-advanced-disclosure {
  overflow: hidden;
  border: 1px solid var(--v2-rule);
  border-radius: 14px;
  color: var(--v2-ink);
  background: #fff;
}
.group-themed-shell .modal-sheet .planner-advanced-disclosure > summary {
  min-height: 44px;
  padding: 0 13px;
  color: var(--v2-blue);
  background: #fff;
}
.group-themed-shell .modal-sheet .proposal-slot-meta { color: var(--v2-muted); }
.group-themed-shell .section-bar .button { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }

.group-themed-shell .modal-sheet {
  border-color: var(--v2-rule);
  color: var(--v2-ink);
  background: var(--v2-paper);
}
.group-themed-shell .modal-sheet :is(h2, h3, h4, strong, label) { color: var(--v2-ink); }
.group-themed-shell .modal-sheet :is(p, small, .subtle-copy) { color: var(--v2-muted); }
.group-themed-shell .modal-sheet :is(.planner-block, .proposal-composer-snapshot, .proposal-date-range-card, .proposal-custom-slot-card) {
  border-color: var(--v2-rule);
  color: var(--v2-ink);
  background: #fff;
  box-shadow: none;
}
.group-themed-shell .modal-sheet .proposal-composer-snapshot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.group-themed-shell .modal-sheet .proposal-composer-step {
  display: grid;
  min-width: 0;
  padding: 10px;
  gap: 3px;
  border: 1px solid var(--v2-rule);
  border-radius: 12px;
  color: var(--v2-ink);
  background: #f7f6f1;
}
.group-themed-shell .modal-sheet .proposal-composer-step :is(strong, span) { color: inherit; }
.group-themed-shell .modal-sheet .proposal-composer-step small { color: var(--v2-muted); }
.group-themed-shell .modal-sheet .proposal-quick-slots {
  padding: 0;
  border: 0;
  color: var(--v2-ink);
  background: transparent;
}
.group-themed-shell .modal-sheet :is(input, textarea, select) {
  border-color: var(--v2-rule);
  color: var(--v2-ink);
  background: #fff;
}
.group-themed-shell .modal-sheet :is(.proposal-slot-button, .proposal-quick-chip) {
  border-color: var(--v2-rule);
  color: var(--v2-ink);
  background: #fff;
}
.group-themed-shell .modal-sheet .proposal-slot-button.active {
  border-color: var(--v2-blue);
  color: #173d9e;
  background: var(--v2-blue-soft);
}
.group-themed-shell .modal-sheet .sheet-actions {
  position: sticky;
  bottom: calc(-28px - env(safe-area-inset-bottom));
  z-index: 2;
  margin: 2px -18px calc(-28px - env(safe-area-inset-bottom));
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--v2-rule);
  background: rgb(251 250 246 / 96%);
  backdrop-filter: blur(12px);
}
.group-themed-shell .modal-sheet .sheet-actions .primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.group-themed-shell .modal-sheet .sheet-actions .ghost { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }

.v2-explore-page .personal-place-discovery-card.no-media {
  padding: 13px;
  border: 1px solid var(--v2-rule);
  border-radius: 14px;
  background: #fff;
}
.v2-explore-page .personal-place-discovery-card.no-media .personal-place-card-copy { min-height: 68px; padding-top: 0; }
.v2-explore-page .personal-place-discovery-card.no-media .personal-place-card-copy small { color: var(--v2-blue); }

.v2-account-page details[open],
.v2-account-page details[open] > :not(summary) { color: var(--v2-ink); background-color: var(--v2-paper); }
.v2-account-page details[open] :is(input, textarea, select) {
  border-color: var(--v2-rule);
  color: var(--v2-ink);
  background: #fff;
}
.v2-account-page details[open] .button.primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.v2-account-page details[open] .button.secondary,
.v2-account-page details[open] .button.ghost { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }
.v2-you-page .account-login-method .button { border-color: var(--v2-rule); color: var(--v2-ink); background: #f4f0e7; }

@media (max-width: 420px) {
  .group-themed-shell .plan-board-hero,
  .group-themed-shell .explore-board-hero { padding: 17px; border-radius: 18px; }
  .group-themed-shell :is(.plan-board-stats, .explore-board-hero-stats) > span { padding: 8px; }
  .group-themed-shell .month-board { padding: 11px 8px; }
  .group-themed-shell .month-board-title span { display: none; }
  .group-themed-shell .month-cell { min-height: 45px; padding: 4px; }
}

/* V3 information architecture: one app nav, local group tabs, progressive tools. */
.group-themed-shell { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.group-themed-shell > .afterours-bottom-nav {
  position: fixed;
  z-index: 80;
  right: max(12px, calc((100vw - 720px) / 2 + 12px));
  bottom: calc(9px + env(safe-area-inset-bottom));
  left: max(12px, calc((100vw - 720px) / 2 + 12px));
  display: grid;
  width: auto;
  height: 64px;
  padding: 6px 7px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--v2-rule);
  border-radius: 20px;
  background: rgb(251 251 248 / 95%);
  box-shadow: 0 8px 28px rgb(20 20 18 / 10%);
  backdrop-filter: blur(16px);
}
.group-themed-shell > .afterours-bottom-nav :is(a, .afterours-nav-add) {
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 5px 2px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: 14px;
  color: #777972;
  background: transparent;
  text-decoration: none;
}
.group-themed-shell > .afterours-bottom-nav a.active { color: var(--v2-blue); background: var(--v2-blue-soft); }
.group-themed-shell > .afterours-bottom-nav .ph { font-size: 19px; }
.group-themed-shell > .afterours-bottom-nav small { color: inherit; font-size: 8.5px; font-weight: 700; }

.group-themed-shell .section-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  width: 100%;
  margin: 0;
  padding: 6px 0 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 0;
  border-bottom: 1px solid var(--v2-rule);
  background: rgb(251 250 246 / 96%);
  box-shadow: none;
  backdrop-filter: blur(14px);
}
.group-themed-shell .section-tabs .toggle-button {
  display: flex;
  min-width: 0;
  min-height: 44px;
  padding: 7px 2px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--v2-muted);
  background: transparent;
  font-size: 10px;
}
.group-themed-shell .section-tabs .toggle-button.active { border-color: var(--v2-blue); color: var(--v2-blue); background: transparent; }
.group-themed-shell .section-tabs .tab-icon { font-size: 15px; }
.group-themed-shell .tab-panel { padding-top: 20px; }

.group-tool-header {
  display: grid;
  padding: 4px 0 21px;
  gap: 8px;
  border-bottom: 1px solid var(--v2-rule);
  color: var(--v2-ink);
}
.group-tool-header h2 { max-width: 620px; margin: 0; color: var(--v2-ink); font: 520 clamp(29px, 8vw, 42px)/1 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.group-tool-header p { max-width: 560px; margin: 0; color: var(--v2-muted); font-size: 11px; line-height: 1.45; }
.group-tool-header > .button { width: fit-content; min-height: 40px; margin-top: 4px; padding-inline: 15px; border-radius: 13px; }
.group-tool-actions { display: flex; margin-top: 4px; gap: 8px; }
.group-tool-actions .button { min-height: 40px; border-radius: 13px; }
.group-tool-actions .primary,
.group-tool-header > .primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.group-tool-actions .ghost { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }

.group-primary-section { display: grid; padding: 20px 0; gap: 11px; border-bottom: 1px solid var(--v2-rule); }
.group-primary-section .section-bar > div { display: grid; gap: 2px; }
.group-primary-section .section-bar small { color: var(--v2-muted); font: 750 8px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.group-primary-section .section-bar h3 { margin: 0; color: var(--v2-ink); font: 520 21px/1.1 Georgia, "Times New Roman", serif; }
.group-quiet-empty { display: flex; min-height: 86px; padding: 14px; align-items: center; gap: 12px; border: 1px solid var(--v2-rule); border-radius: 15px; background: #fff; }
.group-quiet-empty > .ph { color: #6b8a76; font-size: 24px; }
.group-quiet-empty > span { display: grid; gap: 3px; }
.group-quiet-empty strong { color: var(--v2-ink); font-size: 12px; }
.group-quiet-empty small { color: var(--v2-muted); font-size: 9px; line-height: 1.35; }

.group-progressive-section {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--v2-rule);
  border-radius: 16px;
  color: var(--v2-ink);
  background: #fff;
}
.group-progressive-section > summary {
  display: flex;
  min-height: 68px;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--v2-ink);
  background: #fff;
}
.group-progressive-section > summary > span { display: flex; min-width: 0; align-items: center; gap: 11px; }
.group-progressive-section > summary > span > .ph { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; color: var(--v2-blue); background: var(--v2-blue-soft); font-size: 19px; }
.group-progressive-section > summary > span > span { display: grid; min-width: 0; gap: 3px; }
.group-progressive-section > summary strong { color: var(--v2-ink); font-size: 12px; }
.group-progressive-section > summary small { color: var(--v2-muted); font-size: 9px; }
.group-progressive-section[open] > summary > .ph { transform: rotate(180deg); }
.group-progressive-body { padding: 15px; border-top: 1px solid var(--v2-rule); color: var(--v2-ink); background: var(--v2-paper); }

.group-home-v3 { display: grid; gap: 0; }
.group-home-actions { display: grid; padding: 18px 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-bottom: 1px solid var(--v2-rule); }
.group-home-actions button { display: grid; min-width: 0; min-height: 84px; padding: 10px; align-content: center; justify-items: start; gap: 6px; border: 1px solid var(--v2-rule); border-radius: 14px; color: var(--v2-ink); background: #fff; text-align: left; }
.group-home-actions .ph { color: var(--v2-blue); font-size: 18px; }
.group-home-actions button > span { display: grid; min-width: 0; gap: 2px; }
.group-home-actions strong { color: var(--v2-ink); font-size: 11px; }
.group-home-actions small { overflow: hidden; color: var(--v2-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.group-home-v3 .hub-story-rail { padding-block: 17px; border-bottom: 1px solid var(--v2-rule); }
.group-home-v3 .media-strip-section,
.group-home-v3 .memory-wall-section,
.group-home-v3 .hub-section { padding: 19px 0; border-bottom: 1px solid var(--v2-rule); }
.group-activity-disclosure { margin-bottom: 18px; }

/* Personal Library is retrieval-first; discovery stays optional. */
.personal-library-command { display: grid; padding: 13px 0 17px; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; border-bottom: 1px solid var(--v2-rule); }
.personal-library-search { position: relative; display: flex; min-width: 0; min-height: 46px; align-items: center; border: 1px solid var(--v2-rule); border-radius: 15px; background: #fff; }
.personal-library-search > .ph { margin-left: 13px; color: var(--v2-muted); font-size: 18px; }
.personal-library-search input { width: 100%; min-width: 0; min-height: 44px; padding: 0 10px; border: 0; color: var(--v2-ink); background: transparent; }
.personal-library-search button { display: grid; width: 34px; height: 34px; margin-right: 5px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 11px; color: var(--v2-muted); background: #f3f2ed; }
.personal-library-command > .button { min-height: 46px; padding-inline: 14px; border-radius: 15px; border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); white-space: nowrap; }
.personal-library-primary { padding-top: 18px !important; }
.personal-library-list-v3 { gap: 0; border-top: 1px solid var(--v2-rule); }
.v2-explore-page .personal-library-item-v3 { position: relative; display: grid; min-height: 72px; padding: 13px 0; grid-template-columns: 42px minmax(0, 1fr) 34px; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid var(--v2-rule); border-radius: 0; background: transparent; box-shadow: none; }
.v2-explore-page .personal-library-item-v3 .personal-place-card-mark { border: 0; border-radius: 13px; color: var(--v2-blue); background: var(--v2-blue-soft); }
.v2-explore-page .personal-library-item-menu { grid-column: 3; grid-row: 1; align-self: center; }
.personal-library-item-menu > summary { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 11px; color: var(--v2-muted); background: transparent; }
.v2-explore-page .personal-library-item-menu[open] { grid-column: 1 / -1; grid-row: 2; display: grid; }
.personal-library-item-menu[open] > summary { position: absolute; top: 17px; right: 0; }
.personal-library-item-menu > div { display: grid; padding: 12px; gap: 10px; border: 1px solid var(--v2-rule); border-radius: 13px; background: #fff; }
.personal-library-item-menu .personal-place-card-actions { display: flex; margin: 0; gap: 7px; }
.personal-library-item-menu .personal-place-share-row { display: flex; align-items: center; gap: 6px; }
.personal-library-item-menu .personal-place-share-row em { min-width: 88px; color: var(--v2-muted); font-size: 8px; font-style: normal; }
.personal-library-media-row { display: grid; min-height: 78px; padding: 13px 0; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--v2-rule); color: var(--v2-ink); text-decoration: none; }
.personal-library-media-row > span:not(.personal-media-summary-strip) { display: grid; gap: 3px; }
.personal-library-media-row strong { color: var(--v2-ink); font-size: 12px; }
.personal-library-media-row small { color: var(--v2-muted); font-size: 9px; }
.personal-library-media-row.is-empty > .ph:first-child { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #945b76; background: #f6e9f0; font-size: 19px; }
.personal-discover-drawer { margin: 18px 0 0; overflow: hidden; border: 1px solid var(--v2-rule); border-radius: 16px; background: #fff; }
.personal-discover-drawer > summary { display: flex; min-height: 72px; padding: 13px 14px; align-items: center; justify-content: space-between; gap: 12px; color: var(--v2-ink); }
.personal-discover-drawer > summary > span { display: flex; min-width: 0; align-items: center; gap: 11px; }
.personal-discover-drawer > summary > span > .ph { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #5d755f; background: #eaf1e8; font-size: 19px; }
.personal-discover-drawer > summary > span > span { display: grid; gap: 3px; }
.personal-discover-drawer strong { color: var(--v2-ink); font-size: 12px; }
.personal-discover-drawer small { color: var(--v2-muted); font-size: 9px; }
.personal-discover-body { display: grid; padding: 14px; gap: 12px; border-top: 1px solid var(--v2-rule); background: var(--v2-paper); }
.personal-library-secondary-link { margin-top: 12px; border: 0; border-bottom: 1px solid var(--v2-rule); border-radius: 0; background: transparent; box-shadow: none; }

@media (max-width: 420px) {
  .group-themed-shell .section-tabs .toggle-button { gap: 3px; font-size: 9px; }
  .group-tool-actions { display: grid; grid-template-columns: 1fr; }
  .personal-library-command { grid-template-columns: minmax(0, 1fr); }
  .personal-library-command > .button { width: 100%; }
}

/* =========================================================================
   Afterours V2 final cascade — intentionally last.
   The legacy theme remains available to older surfaces, so these selectors
   keep the new personal, relationship, and permanent-group shells coherent.
   ========================================================================= */

.afterours-shell.v2-account-page,
.group-shell.group-themed-shell {
  color: var(--v2-ink);
  background: var(--v2-paper);
}

.v2-account-page :is(h1, h2, h3, strong, label),
.group-themed-shell :is(h1, h2, h3, strong, label) { color: var(--v2-ink); }
.v2-account-page :is(p, small, .subtle-copy),
.group-themed-shell :is(p, small, .subtle-copy) { color: var(--v2-muted); }

.v2-account-page :is(.panel, .account-person-card, .personal-places-browse-panel, .personal-places-library-panel),
.group-themed-shell :is(.tab-panel, .hub-feature-card, .hub-section, .hub-feed-section, .media-strip-section) {
  border-color: var(--v2-rule);
  color: var(--v2-ink);
  background: transparent;
  box-shadow: none;
}

.v2-circles-page .afterours-group-board-card {
  border: 0;
  border-bottom: 1px solid var(--v2-rule);
  border-radius: 0;
  color: var(--v2-ink);
  background: transparent;
  box-shadow: none;
}
.v2-circles-page .afterours-context-avatar { color: #486c5c; background: #e6eee8; }
.v2-circles-page .afterours-group-board-copy em { color: #4d4f4a; }
.v2-circles-page .afterours-group-board-actions button,
.v2-circles-page .afterours-groups-actions details { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; box-shadow: none; }

.v2-people-page .account-person-card {
  border: 0;
  border-bottom: 1px solid var(--v2-rule);
  border-radius: 0;
  color: var(--v2-ink);
  background: transparent;
  box-shadow: none;
}
.v2-people-page .account-person-main strong,
.v2-people-page .account-person-card > p { color: var(--v2-ink); }
.v2-people-page .account-person-main small { color: var(--v2-muted); }
.v2-people-page .account-person-shared-groups span { border: 0; color: #4e665a; background: #e8f0ea; }
.v2-people-page .account-person-actions .primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.v2-people-page .account-person-actions .ghost { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }

.v2-explore-page .personal-activity-browse {
  display: flex;
  grid-template-columns: none;
  gap: 8px;
  overflow-x: auto;
}
.v2-explore-page .personal-activity-browse button {
  min-width: 108px;
  min-height: 52px;
  padding: 9px 10px;
  flex: 0 0 auto;
  border: 1px solid var(--v2-rule);
  border-radius: 12px;
  color: var(--v2-ink);
  background: #fff;
  box-shadow: none;
}
.v2-explore-page .personal-activity-browse button::before { display: none; content: none; }
.v2-explore-page .personal-place-discovery-card { border: 0; color: var(--v2-ink); background: transparent; box-shadow: none; }
.v2-explore-page .personal-place-card-copy em { color: var(--v2-muted); }

.v2-you-page .account-login-method { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }
.v2-you-page .account-login-method :is(strong, span) { color: var(--v2-ink); }
.v2-you-page .account-settings-summary span { border-color: var(--v2-rule); color: var(--v2-ink); background: transparent; }

.group-themed-shell .next-hangout-strip,
.group-themed-shell .next-hangout-strip.celebration,
.group-themed-shell .next-hangout-strip.ready {
  border: 1px solid #d8e5dc;
  border-radius: 14px;
  color: var(--v2-ink);
  background: #f0f6f1;
  box-shadow: none;
}
.group-themed-shell .next-hangout-strip::before,
.group-themed-shell .next-hangout-strip::after { display: none; }
.group-themed-shell .next-hangout-strip :is(strong, p, small, .subtle-copy) { color: var(--v2-ink); }
.group-themed-shell .next-hangout-strip .button { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.group-themed-shell .hub-feature-card { border-bottom: 1px solid var(--v2-rule); border-radius: 0; }
.group-themed-shell .hub-feed > li,
.group-themed-shell .hub-feed button { color: var(--v2-ink); background: transparent; }

.group-themed-shell .mobile-tab-bar {
  right: max(10px, calc((100vw - 820px) / 2 + 10px));
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: max(10px, calc((100vw - 820px) / 2 + 10px));
  width: auto;
  transform: none;
  border: 1px solid var(--v2-rule);
  border-radius: 18px;
  background: rgb(255 255 252 / 96%);
  box-shadow: 0 8px 24px rgb(20 20 18 / 8%);
}
.group-themed-shell .mobile-tab-button { color: var(--v2-muted); background: transparent; }
.group-themed-shell .mobile-tab-button.active { color: var(--v2-blue); background: var(--v2-blue-soft); }

.personal-home-v4 :is(.v4-feature-main, .v4-memory-row, .v4-needs-row) { color: var(--v2-ink); }
.personal-home-v4 :is(.v4-feature-main strong, .v4-memory-row strong, .v4-needs-row strong) { color: var(--v2-ink); }
.personal-home-v4 :is(.v4-feature-main small, .v4-memory-row small, .v4-memory-row em, .v4-needs-row small) { color: var(--v2-muted); }
.personal-home-v4 .v4-feature-main em { color: #3d7658; }
.personal-home-v4 .v4-feature-main b { color: #565852; }

.v2-explore-page .personal-place-library-list { display: grid; gap: 10px; }
.v2-explore-page .personal-place-library-card {
  display: grid;
  padding: 12px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--v2-rule);
  border-radius: 14px;
  color: var(--v2-ink);
  background: #fff;
  box-shadow: none;
}
.v2-explore-page .personal-place-card-copy :is(strong, small, em) { color: var(--v2-ink); }
.v2-explore-page .personal-place-card-copy :is(small, em) { color: var(--v2-muted); }
.v2-explore-page .personal-place-card-mark { color: var(--v2-blue); background: var(--v2-blue-soft); }
.v2-explore-page .personal-place-card-actions .primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.v2-explore-page .personal-place-card-actions .ghost,
.v2-explore-page .personal-place-share-row .button { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }
.v2-explore-page .personal-place-share-row em { color: var(--v2-muted); }

.v2-people-page .v2-people-grid { display: block; }
.v2-people-page .account-people-panel { display: block; width: 100%; padding: 18px 0; }
.v2-people-page .account-people-panel .section-head { display: flex; margin-bottom: 12px; align-items: end; justify-content: space-between; }
.v2-people-page .account-people-panel .section-head .button { display: none; }
.v2-people-page .account-people-panel .section-head h2 { margin: 0; color: var(--v2-ink); font: 520 23px/1.05 Georgia, "Times New Roman", serif; }
.v2-people-page .account-person-card-grid { display: block; width: 100%; }
.v2-people-page .account-person-card { width: 100%; padding: 14px 0; }
.v2-people-page .account-person-card header { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; }
.v2-people-page .account-people-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.group-themed-shell .media-empty,
.group-themed-shell .media-strip-empty,
.group-themed-shell .hub-feed-empty { border-color: var(--v2-rule); color: var(--v2-muted); background: #fff; }
.group-themed-shell :is(.hub-feed-title, .hub-feed-verb, .hub-feed-meta) { color: var(--v2-ink); }
.group-themed-shell .hub-feed-meta { color: var(--v2-muted); }

.v2-account-page .afterours-greeting { display: none; }
.v2-explore-page .personal-place-add-drawer {
  border: 1px solid var(--v2-rule);
  border-radius: 14px;
  color: var(--v2-ink);
  background: #fff;
  box-shadow: none;
}
.v2-explore-page .personal-place-add-drawer > summary { color: var(--v2-ink); background: transparent; }

.group-themed-shell .hub-feature,
.group-themed-shell .hub-feature.hub-feature-proposals,
.group-themed-shell .hub-feature.vibing,
.group-themed-shell .hub-feature.empty {
  border: 1px solid var(--v2-rule);
  color: var(--v2-ink);
  background: #fff;
  box-shadow: none;
}
.group-themed-shell .hub-feature::before,
.group-themed-shell .hub-feature::after,
.group-themed-shell .hub-feature-decor { display: none; }
.group-themed-shell .hub-feature :is(.hub-feature-title, strong) { color: var(--v2-ink); text-shadow: none; }
.group-themed-shell .hub-feature :is(.hub-feature-sub, small) { color: var(--v2-muted); text-shadow: none; }
.group-themed-shell .hub-feature-kicker { color: var(--v2-memory); text-shadow: none; }
.group-themed-shell .hub-feature .button.primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.group-themed-shell .hub-feature .button.ghost { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }

/* Signed-out V2 entry — personal first, mobile first. */
body:has(.v2-entry-shell),
.app-shell:has(.v2-entry-shell) {
  min-height: 100svh;
  color-scheme: light;
  background: #fbfaf6;
}

#app:has(.v2-entry-shell) { width: 100%; max-width: none; padding: 0; }

.landing-shell.v2-entry-shell {
  --entry-ink: #171815;
  --entry-muted: #70726c;
  --entry-line: #dedfd8;
  --entry-blue: #3268e8;
  width: 100%;
  min-height: 100svh;
  padding: 0;
  align-items: flex-start;
  color: var(--entry-ink);
  background: #fbfaf6;
}

.v2-entry-card {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(34px + env(safe-area-inset-bottom));
}

.v2-entry-header { display: flex; padding-bottom: 24px; align-items: center; justify-content: space-between; }
.v2-entry-wordmark { color: var(--entry-ink); font-size: 22px; font-weight: 820; letter-spacing: -.06em; text-decoration: none; }
.v2-entry-header > span { color: var(--entry-muted); font-size: 9px; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }

.v2-entry-main { display: grid; gap: 24px; }
.v2-entry-intro { padding: 10px 0 22px; border-bottom: 1px solid var(--entry-line); }
.v2-entry-intro > small { color: var(--entry-blue); font-size: 9px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.v2-entry-intro h1 { max-width: 660px; margin: 8px 0 14px; color: var(--entry-ink); font: 520 clamp(38px, 11vw, 68px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.06em; }
.v2-entry-intro > p { max-width: 620px; margin: 0; color: var(--entry-muted); font-size: 13px; line-height: 1.55; }

.v2-entry-values { display: grid; margin-top: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.v2-entry-values > span { display: grid; min-width: 0; padding: 12px 10px; gap: 3px; border: 1px solid var(--entry-line); border-radius: 13px; background: #fff; }
.v2-entry-values .ph { margin-bottom: 5px; color: var(--entry-blue); font-size: 18px; }
.v2-entry-values strong { color: var(--entry-ink); font-size: 10px; }
.v2-entry-values small { color: var(--entry-muted); font-size: 8.5px; line-height: 1.3; }

.v2-entry-auth { padding: 20px; border: 1px solid var(--entry-line); border-radius: 20px; background: #fff; box-shadow: 0 14px 42px rgb(30 31 27 / 6%); }
.v2-entry-auth .landing-auth-panel { display: grid; gap: 13px; }
.v2-entry-auth .section-head { margin: 0; }
.v2-entry-auth .section-head h2 { margin: 0; color: var(--entry-ink); font: 520 26px/1 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.v2-entry-auth .subtle-copy { color: var(--entry-muted); font-size: 11px; line-height: 1.45; }
.v2-entry-auth .auth-mode-row { display: grid; padding: 3px; grid-template-columns: 1fr 1fr; border: 1px solid var(--entry-line); border-radius: 12px; background: #f3f3ee; }
.v2-entry-auth .auth-mode-row .button { min-height: 38px; border: 0; border-radius: 9px; color: var(--entry-muted); background: transparent; box-shadow: none; }
.v2-entry-auth .auth-mode-row .button.secondary { color: var(--entry-ink); background: #fff; box-shadow: 0 2px 8px rgb(26 27 23 / 7%); }
.v2-entry-auth .stack-form { display: grid; gap: 12px; }
.v2-entry-auth .field { display: grid; gap: 6px; }
.v2-entry-auth .field label { color: var(--entry-muted); font-size: 9px; font-weight: 740; letter-spacing: .06em; text-transform: uppercase; }
.v2-entry-auth .field input { min-height: 48px; padding: 0 13px; border: 1px solid var(--entry-line); border-radius: 13px; color: var(--entry-ink); background: #fff; font-size: 16px; }
.v2-entry-auth .button-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
.v2-entry-auth .button-row .button { min-height: 47px; border-radius: 13px; }
.v2-entry-auth .button.primary { border-color: var(--entry-blue); color: #fff; background: var(--entry-blue); }
.v2-entry-auth .button.secondary { border-color: var(--entry-line); color: var(--entry-ink); background: #fff; }
.v2-entry-privacy { display: flex; margin: 13px 0 0; align-items: center; gap: 6px; color: var(--entry-muted); font-size: 9px; }
.v2-entry-privacy .ph { color: var(--entry-blue); }

.v2-entry-secondary-actions { display: grid; margin-top: 20px; border-top: 1px solid var(--entry-line); }
.v2-entry-secondary-actions > details { border-bottom: 1px solid var(--entry-line); }
.v2-entry-secondary-actions summary { display: flex; min-height: 72px; padding: 12px 0; align-items: center; justify-content: space-between; gap: 12px; color: var(--entry-ink); cursor: pointer; list-style: none; }
.v2-entry-secondary-actions summary::-webkit-details-marker { display: none; }
.v2-entry-secondary-actions summary > span { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 2px 10px; }
.v2-entry-secondary-actions summary > span > .ph { display: grid; width: 32px; height: 32px; grid-row: span 2; place-items: center; border-radius: 10px; color: var(--entry-blue); background: #edf2ff; }
.v2-entry-secondary-actions summary strong { color: var(--entry-ink); font-size: 12px; }
.v2-entry-secondary-actions summary small { color: var(--entry-muted); font-size: 9px; }
.v2-entry-secondary-actions summary > .ph { color: var(--entry-muted); }
.v2-entry-secondary-actions details[open] summary > .ph { transform: rotate(45deg); }
.v2-entry-secondary-actions :is(.landing-create-panel, .landing-open-panel, .form-panel) { margin: 0 0 14px; padding: 16px; border: 1px solid var(--entry-line); border-radius: 15px; color: var(--entry-ink); background: #fff; box-shadow: none; }
.v2-entry-secondary-actions :is(h2, h3, strong, label) { color: var(--entry-ink); }
.v2-entry-secondary-actions :is(.subtle-copy, p, small) { color: var(--entry-muted); }

@media (min-width: 760px) {
  .v2-entry-card { padding-inline: 34px; }
  .v2-entry-main { grid-template-columns: minmax(0, 1.08fr) minmax(320px, .72fr); align-items: start; gap: 50px; }
  .v2-entry-intro { padding: 34px 0; border-bottom: 0; }
  .v2-entry-secondary-actions { max-width: 380px; margin-left: auto; }
}

@media (max-width: 420px) {
  .v2-entry-card { padding-inline: 16px; }
  .v2-entry-header { padding-bottom: 16px; }
  .v2-entry-intro { padding-top: 4px; padding-bottom: 18px; }
  .v2-entry-intro h1 { font-size: 38px; }
  .v2-entry-values { display: none; }
  .v2-entry-auth { padding: 17px; }
}

/* V2 cascade guard: keep the light product system above legacy theme rules. */
.personal-home-v4 .v4-context-strip button:not(.selected) small,
.personal-home-v4 .v4-context-strip a small,
.personal-home-v4 .v4-saved-rail > a strong { color: var(--v2-ink); }

.v2-account-page,
.v2-account-page :is(h1, h2, h3, strong) { color: var(--v2-ink); }
.v2-account-page > .afterours-bottom-nav small { color: inherit; }
.v2-account-page .v2-section-head h2,
.v2-account-page .section-head h2,
.v2-account-page .account-section-heading h2 { color: var(--v2-ink); }
.v2-account-page .v2-section-head span,
.v2-account-page .section-head .subtle-copy,
.v2-account-page .account-section-heading span { color: var(--v2-muted); }

.v2-circles-page .v2-people-rail strong,
.v2-circles-page .afterours-group-board-copy strong,
.v2-circles-page .afterours-groups-actions summary { color: var(--v2-ink); }
.v2-circles-page .v2-people-rail small,
.v2-circles-page .afterours-group-board-copy small,
.v2-circles-page .afterours-groups-actions summary small { color: var(--v2-muted); }

.v2-people-page .account-person-card header { grid-template-columns: 42px minmax(0, 1fr) auto; }
.v2-people-page .account-person-card header > em { width: auto; padding: 0; color: var(--v2-blue); background: transparent; }
.v2-people-page .account-person-main strong { color: var(--v2-ink); }
.v2-people-page .account-person-main small,
.v2-people-page .account-person-card > p { color: var(--v2-muted); }
.v2-people-page .account-person-shared-groups span { color: #4e665a; background: #e8f0ea; }
.v2-people-page .account-person-actions .primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.v2-people-page .account-person-actions .ghost { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }

.v2-explore-page .personal-activity-browse { display: flex; margin-right: -20px; padding: 13px 20px 13px 0; grid-template-columns: none; gap: 8px; overflow-x: auto; }
.v2-explore-page .personal-activity-browse button { display: flex; min-width: 108px; min-height: 52px; padding: 9px 10px; flex: 0 0 auto; flex-direction: column; justify-content: center; gap: 3px; border: 1px solid var(--v2-rule); border-radius: 12px; color: var(--v2-ink); background: #fff; }
.v2-explore-page .personal-activity-browse button::before { display: none; content: none; }
.v2-explore-page .personal-activity-browse button small { color: var(--v2-muted); }

.v2-you-page .account-settings-card { color: var(--v2-ink); background: transparent; }
.v2-you-page .account-settings-summary small,
.v2-you-page .account-login-method small,
.v2-you-page .account-login-method-note { color: var(--v2-muted); }
.v2-you-page .account-login-method-main { grid-template-columns: minmax(0, 1fr) auto auto; }
.v2-you-page .account-login-method em { width: auto; justify-self: start; padding: 4px 8px; color: #526159; background: #e7efe9; }
.v2-you-page .account-login-method:not(.is-enabled) em { color: var(--v2-muted); background: #efefe9; }

@media (max-width: 560px) {
  .v2-you-page .account-login-method-main { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-you-page .account-login-method-action { grid-column: 1 / -1; justify-content: flex-start; }
}

.group-themed-shell .group-afterours-pill,
.group-themed-shell .header-kicker .subtle-copy { color: var(--v2-muted); }
.group-themed-shell .next-hangout-strip,
.group-themed-shell .next-hangout-strip.celebration {
  border: 1px solid #d9e5dc;
  color: var(--v2-ink);
  background: #eef5f0;
  box-shadow: none;
}
.group-themed-shell .next-hangout-strip::before,
.group-themed-shell .next-hangout-strip::after { display: none; }
.group-themed-shell .next-hangout-strip :is(strong, .subtle-copy) { color: var(--v2-ink) !important; }
.group-themed-shell .next-hangout-strip .button { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.group-themed-shell .group-board-hero { color: var(--v2-ink); background: transparent; }
.group-themed-shell .group-board-hero :is(h2, p, small) { color: inherit; }
.group-themed-shell .hub-story-rail :is(strong, small),
.group-themed-shell .hub-member-label { color: var(--v2-ink); }
.group-themed-shell .hub-feature-card,
.group-themed-shell .hub-feature-card.is-active,
.group-themed-shell .hub-feature-card.is-upcoming {
  border: 1px solid var(--v2-rule);
  color: var(--v2-ink);
  background: #fff;
  box-shadow: none;
}
.group-themed-shell .hub-feature-card::before,
.group-themed-shell .hub-feature-card::after { display: none; }
.group-themed-shell .hub-feature-card :is(h2, h3, strong) { color: var(--v2-ink); text-shadow: none; }
.group-themed-shell .hub-feature-card :is(p, small, em, li) { color: var(--v2-muted); text-shadow: none; }
.group-themed-shell .hub-feature-card .button.primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.group-themed-shell .mobile-tab-bar {
  position: fixed;
  right: max(10px, calc((100vw - 820px) / 2 + 10px));
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: max(10px, calc((100vw - 820px) / 2 + 10px));
  width: auto;
  height: 61px;
  transform: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--v2-rule);
  border-radius: 18px;
  background: rgb(255 255 252 / 96%);
  box-shadow: 0 8px 24px rgb(20 20 18 / 8%);
}
.group-themed-shell .mobile-tab-button { color: var(--v2-muted); background: transparent; }
.group-themed-shell .mobile-tab-button.active { color: var(--v2-blue); background: var(--v2-blue-soft); }
.group-themed-shell .mobile-tab-button span { color: inherit; }

/* Afterours V2: personal atlas + flexible planning contexts. */
:root {
  --v2-paper: #fbfaf6;
  --v2-ink: #11110f;
  --v2-muted: #70716d;
  --v2-rule: #dfded7;
  --v2-blue: #2563eb;
  --v2-blue-soft: #edf3ff;
  --v2-memory: #cc6b47;
}

body:has(.personal-home-v4),
.app-shell:has(.personal-home-v4) {
  background: var(--v2-paper);
}

#app:has(.personal-home-v4) { padding: 0; }

.afterours-shell.personal-home-v4 {
  width: min(100%, 720px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 20px calc(92px + env(safe-area-inset-bottom));
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
  color: var(--v2-ink);
  background: var(--v2-paper);
}

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

.personal-home-v4 > .afterours-topbar {
  position: relative;
  top: auto;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: calc(17px + env(safe-area-inset-top)) 0 13px;
  background: transparent;
  backdrop-filter: none;
}

.personal-home-v4 .afterours-wordmark {
  display: flex;
  min-height: 0;
  padding: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--v2-ink);
  background: transparent;
  box-shadow: none;
  text-transform: none;
}

.personal-home-v4 .afterours-wordmark span {
  font-size: 25px;
  font-weight: 830;
  letter-spacing: -.065em;
}

.personal-home-v4 .afterours-wordmark small {
  color: var(--v2-muted);
  font-size: 11px;
  font-weight: 520;
  letter-spacing: .01em;
}

.personal-home-v4 .afterours-avatar-link {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--v2-rule);
  border-radius: 50%;
  color: var(--v2-ink);
  background: #f0f0eb;
  box-shadow: none;
  font-size: 10px;
}

.personal-home-v4 .home-pulse-main {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.personal-home-v4 .home-capture { margin: 0; padding: 0; }

.personal-home-v4 .home-capture-form {
  height: 52px;
  border: 1px solid #cfcec7;
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}

.personal-home-v4 .home-capture-form input {
  min-width: 0;
  padding: 0 4px;
  color: var(--v2-ink);
  font-size: 13px;
}

.personal-home-v4 .home-capture-form input::placeholder { color: #8a8b86; }
.personal-home-v4 .home-capture-link { width: 43px; color: #62645f; }
.personal-home-v4 .home-capture-submit {
  width: 40px;
  height: 40px;
  margin-right: 5px;
  border-radius: 50%;
  color: #fff;
  background: var(--v2-blue);
}

.personal-home-v4 .home-capture-context {
  justify-content: flex-start;
  gap: 0;
  padding: 7px 1px 0;
}

.personal-home-v4 .home-capture-context > button {
  min-height: 30px;
  padding: 4px 8px;
  color: var(--v2-muted);
  font-size: 10px;
}

.personal-home-v4 .home-capture-context > button:first-child { color: var(--v2-blue); }
.personal-home-v4 .home-capture-context > span { width: 1px; height: 18px; margin: 5px 1px; background: var(--v2-rule); }

.v4-context-strip {
  display: flex;
  margin: 10px -5px 0;
  padding: 0 5px 13px;
  gap: 13px;
  overflow-x: auto;
  border-bottom: 1px solid var(--v2-rule);
  scrollbar-width: none;
}

.v4-context-strip::-webkit-scrollbar { display: none; }

.v4-context-strip button,
.v4-context-strip a {
  display: flex;
  min-width: 54px;
  padding: 0;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 0;
  color: #545650;
  background: transparent;
  text-decoration: none;
}

.v4-context-strip button > span,
.v4-context-strip a > span {
  display: grid;
  width: 46px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--v2-rule);
  border-radius: 50%;
  color: #4a4b47;
  background: #efefe9;
  font-size: 11px;
  font-weight: 750;
}

.v4-context-strip button > span.has-image img { width: 100%; height: 100%; object-fit: cover; }
.v4-context-strip button.selected > span { border: 2px solid var(--v2-blue); box-shadow: 0 0 0 3px var(--v2-blue-soft); }
.v4-context-strip button.selected small { color: var(--v2-blue); font-weight: 760; }
.v4-context-strip small { width: 58px; overflow: hidden; font-size: 10px; line-height: 1.15; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.v4-context-strip button:not(.selected) small,
.v4-context-strip a small { color: #555752; }

.v4-section-heading {
  display: flex;
  margin-bottom: 10px;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.v4-section-heading h2 {
  margin: 0;
  color: var(--v2-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 520;
  letter-spacing: -.035em;
}

.v4-section-heading h2 small { color: var(--v2-muted); font: 500 12px/1.2 system-ui, sans-serif; letter-spacing: 0; }
.v4-section-heading h2 .ph { color: #e6a516; font-size: 17px; }
.v4-section-heading a { color: var(--v2-blue); font-size: 11px; font-weight: 680; text-decoration: none; white-space: nowrap; }

.v4-feature { padding: 15px 0 17px; border-bottom: 1px solid var(--v2-rule); }
.v4-feature-main { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 13px; color: inherit; text-decoration: none; }
.v4-feature-main > img { width: 100%; height: 124px; border-radius: 13px; object-fit: cover; }
.v4-feature-main > span { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.v4-feature-main strong { margin: 5px 0 4px; font-size: 18px; letter-spacing: -.025em; }
.v4-feature-main small { color: var(--v2-muted); font-size: 11px; line-height: 1.35; }
.v4-feature-main em { display: flex; margin-top: 9px; align-items: center; gap: 4px; color: #3d7658; font-size: 10px; font-style: normal; }
.v4-feature-main b { margin-top: 7px; color: #565852; font-size: 10px; font-weight: 520; line-height: 1.3; }
.v4-save-action { display: flex; margin: 10px 0 0 auto; padding: 4px 0; align-items: center; gap: 6px; border: 0; color: var(--v2-blue); background: transparent; font-size: 11px; font-weight: 690; }

.v4-saved { padding: 17px 0; border-bottom: 1px solid var(--v2-rule); }
.v4-saved-rail { display: flex; margin-right: -20px; padding-right: 20px; gap: 9px; overflow-x: auto; scrollbar-width: none; }
.v4-saved-rail::-webkit-scrollbar { display: none; }
.v4-saved-rail > a { display: flex; width: 105px; min-width: 105px; flex-direction: column; color: inherit; text-decoration: none; }
.v4-saved-rail img { width: 105px; height: 102px; border-radius: 11px; object-fit: cover; }
.v4-saved-rail strong { margin-top: 6px; overflow: hidden; font-size: 11px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.v4-saved-rail > a strong { color: var(--v2-ink); }
.v4-saved-rail small { display: flex; margin-top: 3px; align-items: center; gap: 3px; overflow: hidden; color: var(--v2-muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }

.v4-collection { padding: 17px 0; border-bottom: 1px solid var(--v2-rule); }
.v4-collection > div:last-child { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.v4-collection img,
.v4-collection > div:last-child a { width: 100%; height: 62px; border-radius: 9px; object-fit: cover; }
.v4-collection > div:last-child a { display: grid; place-items: center; border: 1px dashed #cac9c1; color: var(--v2-muted); text-decoration: none; }

.v4-memory { padding: 17px 0; border-bottom: 1px solid var(--v2-rule); }
.v4-memory-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 20px; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.v4-memory-row > img { width: 112px; height: 74px; border-radius: 10px; object-fit: cover; }
.v4-memory-row > span { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.v4-memory-row strong { font-size: 13px; }
.v4-memory-row small,
.v4-memory-row em { color: var(--v2-muted); font-size: 9.5px; font-style: normal; line-height: 1.25; }
.v4-memory-empty { display: flex; min-height: 64px; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.v4-memory-empty > .ph { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--v2-memory); background: #f8eee8; }
.v4-memory-empty span { display: flex; flex-direction: column; gap: 3px; }
.v4-memory-empty strong { font-size: 12px; }
.v4-memory-empty small { color: var(--v2-muted); font-size: 10px; line-height: 1.35; }

.v4-needs-row {
  display: grid;
  min-height: 72px;
  padding: 10px 0;
  grid-template-columns: 46px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.v4-needs-row > .ph:first-child { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: #4f514c; background: #efeee9; font-size: 18px; }
.v4-needs-row span { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.v4-needs-row strong { font-size: 12px; }
.v4-needs-row small { overflow: hidden; color: var(--v2-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.v4-context-intro { display: grid; padding: 17px 0; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 11px; align-items: center; border-bottom: 1px solid var(--v2-rule); }
.v4-context-intro > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; color: var(--v2-blue); background: var(--v2-blue-soft); font-size: 11px; font-weight: 760; }
.v4-context-intro h1 { margin: 1px 0; font-size: 22px; letter-spacing: -.04em; }
.v4-context-intro small,
.v4-context-intro p { margin: 0; color: var(--v2-muted); font-size: 10px; line-height: 1.3; }
.v4-context-intro > a { color: var(--v2-blue); font-size: 11px; font-weight: 700; text-decoration: none; }

.personal-home-v4 > .afterours-bottom-nav {
  right: max(10px, calc((100vw - 720px) / 2 + 10px));
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: max(10px, calc((100vw - 720px) / 2 + 10px));
  width: auto;
  height: 61px;
  padding: 5px 7px;
  border: 1px solid var(--v2-rule);
  border-radius: 18px;
  background: rgb(255 255 252 / 96%);
  box-shadow: 0 8px 24px rgb(20 20 18 / 8%);
}

.personal-home-v4 > .afterours-bottom-nav a,
.personal-home-v4 .afterours-nav-add { min-height: 0; color: #777972; background: transparent; }
.personal-home-v4 > .afterours-bottom-nav a.active { color: var(--v2-blue); background: transparent; }
.personal-home-v4 .afterours-nav-add { width: 52px; height: 52px; margin-top: -15px; border-radius: 50%; color: #fff; background: var(--v2-blue); box-shadow: 0 8px 20px rgb(37 99 235 / 24%); }
.personal-home-v4 .afterours-nav-add small { top: 55px; color: #5f615c; }

.home-context-sheet footer { position: sticky; bottom: 0; display: flex; margin: 8px -2px -8px; padding: 10px 2px 0; align-items: center; justify-content: space-between; border-top: 1px solid var(--v2-rule); background: #fff; }
.home-context-sheet footer span { color: var(--v2-muted); font-size: 11px; }
.home-context-sheet footer button { min-width: 76px; min-height: 38px; border: 0; border-radius: 12px; color: #fff; background: var(--v2-blue); font-weight: 720; }

@media (max-width: 420px) {
  .afterours-shell.personal-home-v4 { padding-inline: 18px; }
  .v4-saved-rail { margin-right: -18px; padding-right: 18px; }
  .v4-feature-main > img { height: 118px; }
}

/* Home v5 — an honest cross-context activity timeline. */
.home-timeline-header {
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--v2-rule);
}

.home-timeline-header h1 {
  margin: 0;
  color: var(--v2-ink);
  font: 520 clamp(34px, 10vw, 48px)/1 Georgia, "Times New Roman", serif;
  letter-spacing: -.055em;
}

.home-timeline-header p {
  margin: 7px 0 0;
  color: var(--v2-muted);
  font-size: 14px;
}

.personal-home-v4 :is(.home-needs, .home-upcoming, .home-timeline, .home-recent-memories) {
  padding: 18px 0;
  border-bottom: 1px solid var(--v2-rule);
}

.personal-home-v4 .home-pulse-heading { min-height: 24px; margin-bottom: 10px; }
.personal-home-v4 .home-pulse-heading h2 {
  color: var(--v2-ink);
  font: 520 23px/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
}

.personal-home-v4 .home-pulse-heading h2 > span {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font: 700 10px/1 system-ui, sans-serif;
}

.personal-home-v4 .home-pulse-heading > a {
  color: var(--v2-blue);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.personal-home-v4 .home-proposal {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--v2-rule);
  border-radius: 16px;
  background: #fff;
}

.personal-home-v4 .home-proposal-media {
  width: 76px;
  aspect-ratio: 1;
  border-radius: 12px;
  color: var(--v2-blue);
  background: var(--v2-blue-soft);
  text-decoration: none;
}

.personal-home-v4 .home-proposal-context > span { display: none; }
.personal-home-v4 .home-proposal-context { grid-template-columns: auto 1fr; gap: 6px; }
.personal-home-v4 .home-proposal-context strong { font-size: 11px; }
.personal-home-v4 .home-proposal-context em { justify-self: end; color: var(--v2-blue); }
.personal-home-v4 .home-proposal-copy h3 { font: 520 19px/1.05 Georgia, "Times New Roman", serif; }

.home-proposal-review {
  display: flex;
  min-height: 34px;
  margin-top: 4px;
  padding: 0 10px;
  align-items: center;
  justify-content: space-between;
  border-radius: 9px;
  color: #fff;
  background: var(--v2-blue);
  font-size: 13px;
  font-weight: 730;
  text-decoration: none;
}

.home-upcoming-card,
.home-timeline-row,
.home-memory-row {
  color: var(--v2-ink);
  text-decoration: none;
}

.home-upcoming-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  min-height: 78px;
  align-items: center;
  gap: 11px;
}

.home-event-date {
  display: grid;
  min-height: 58px;
  padding: 8px 4px;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 13px;
  color: var(--v2-blue);
  background: var(--v2-blue-soft);
  text-align: center;
}

.home-event-date strong { font: 520 15px/1 Georgia, "Times New Roman", serif; }
.home-event-date small { font-size: 11px; }
.home-event-copy { display: grid; min-width: 0; gap: 3px; }
.home-event-copy small { color: var(--v2-muted); font-size: 11px; }
.home-event-copy strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.home-event-copy em { color: var(--v2-muted); font-size: 12px; font-style: normal; }
.home-upcoming-card > .ph { color: var(--v2-muted); }

.home-timeline-list,
.home-memory-list { display: grid; }

.home-timeline-row {
  display: grid;
  min-height: 68px;
  padding: 10px 0;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border-top: 1px solid color-mix(in srgb, var(--v2-rule) 70%, transparent);
}

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

.home-timeline-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--v2-rule);
  border-radius: 50%;
  color: var(--v2-blue);
  background: var(--v2-blue-soft);
  font-size: 9px;
  font-weight: 780;
}

.home-timeline-avatar img { width: 100%; height: 100%; object-fit: cover; }
.home-timeline-copy { display: grid; min-width: 0; gap: 3px; }
.home-timeline-copy small { color: var(--v2-muted); font-size: 11px; }
.home-timeline-copy strong { color: var(--v2-ink); font-size: 14px; line-height: 1.3; }
.home-timeline-copy em { display: -webkit-box; overflow: hidden; color: var(--v2-muted); font-size: 12px; font-style: normal; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-timeline-row > time { padding-top: 2px; color: var(--v2-muted); font-size: 11px; }

.home-notification-row { grid-template-rows: auto auto; }
.home-timeline-actions {
  display: flex;
  grid-column: 2 / -1;
  gap: 14px;
}
.home-timeline-actions button { min-height: 32px; padding: 3px 0; border: 0; color: var(--v2-blue); background: transparent; font-size: 12px; font-weight: 720; }

.home-memory-row {
  display: grid;
  min-height: 72px;
  padding: 10px 0;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid color-mix(in srgb, var(--v2-rule) 70%, transparent);
}

.home-memory-row:first-child { border-top: 0; }
.home-memory-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--v2-memory); background: #f8eee8; font-size: 18px; }
.home-memory-row > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.home-memory-row small { color: var(--v2-muted); font-size: 11px; }
.home-memory-row strong { overflow: hidden; color: var(--v2-ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.home-memory-row em { color: var(--v2-muted); font-size: 11px; font-style: normal; }
.home-memory-row b { color: var(--v2-blue); font-size: 11px; font-weight: 700; white-space: nowrap; }

.personal-home-v4 .home-quiet-state { margin-top: 18px; }

.home-capture-shell { z-index: 120; }
.modal-sheet.home-capture-sheet {
  width: min(620px, calc(100% - 20px));
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--v2-paper);
}

.home-capture-sheet-head { display: flex; padding: 4px 0 18px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.home-capture-sheet-head small { color: var(--v2-muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.home-capture-sheet-head h1 { margin: 4px 0 0; color: var(--v2-ink); font: 520 30px/1 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.home-capture-sheet-head > button { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 1px solid var(--v2-rule); border-radius: 50%; color: var(--v2-ink); background: #fff; font-size: 18px; }

.personal-home-v4 .home-capture { display: grid; gap: 12px; }
.personal-home-v4 .home-capture > label { color: var(--v2-muted); font-size: 12px; font-weight: 720; }
.personal-home-v4 .home-capture > input { min-height: 52px; padding: 0 13px; border: 1px solid var(--v2-rule); border-radius: 14px; color: var(--v2-ink); background: #fff; font-size: 16px; }
.personal-home-v4 .home-capture > input:focus { border-color: var(--v2-blue); outline: 3px solid color-mix(in srgb, var(--v2-blue) 16%, transparent); }
.home-capture-destination { display: grid; min-height: 54px; padding: 8px 10px; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--v2-rule); border-radius: 14px; color: var(--v2-ink); background: #fff; text-align: left; }
.home-capture-destination > .ph:first-child { color: var(--v2-blue); font-size: 20px; }
.home-capture-destination > span { display: grid; gap: 2px; }
.home-capture-destination small { color: var(--v2-muted); font-size: 11px; }
.home-capture-destination strong { color: var(--v2-ink); font-size: 14px; }
.home-capture-destination > .ph:last-child { color: var(--v2-muted); }
.personal-home-v4 .home-capture > .home-capture-submit { width: 100%; height: auto; min-height: 48px; margin: 2px 0 0; border: 0; border-radius: 13px; color: #fff; background: var(--v2-blue); font-size: 15px; font-weight: 760; }

/* V2 account-wide shell */
body:has(.v2-account-page),
.app-shell:has(.v2-account-page) { background: var(--v2-paper); }
#app:has(.v2-account-page) { padding: 0; }

.afterours-shell.v2-account-page {
  width: min(100%, 760px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 20px calc(92px + env(safe-area-inset-bottom));
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
  color: var(--v2-ink);
  background: var(--v2-paper);
}

.v2-account-page > .afterours-topbar {
  position: relative;
  top: auto;
  width: 100%;
  margin: 0;
  padding: calc(17px + env(safe-area-inset-top)) 0 12px;
  background: transparent;
  backdrop-filter: none;
}

.v2-account-page .afterours-wordmark {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--v2-ink);
  background: transparent;
  box-shadow: none;
  font-size: 20px;
  font-weight: 820;
  letter-spacing: -.06em;
  text-transform: none;
}

.v2-account-page .afterours-avatar-link { display: grid; width: 35px; min-width: 35px; height: 35px; min-height: 35px; padding: 0; place-items: center; border: 1px solid var(--v2-rule); border-radius: 50%; color: var(--v2-ink); background: #efefe9; box-shadow: none; font-size: 10px; }
.v2-account-page :is(h1, h2, h3, strong) { color: var(--v2-ink); }
.v2-page-main { width: 100%; }
.v2-page-header { padding: 12px 0 19px; border-bottom: 1px solid var(--v2-rule); }
.v2-page-header > small { color: var(--v2-blue); font-size: 10px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.v2-page-header h1 { margin: 3px 0 5px; color: var(--v2-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 9vw, 48px); font-weight: 520; letter-spacing: -.055em; }
.v2-page-header p { max-width: 560px; margin: 0; color: var(--v2-muted); font-size: 13px; line-height: 1.45; }
.v2-page-header nav { display: flex; margin-top: 15px; gap: 20px; }
.v2-page-header nav a { padding-bottom: 5px; border-bottom: 2px solid transparent; color: var(--v2-muted); font-size: 11px; font-weight: 680; text-decoration: none; }
.v2-page-header nav a:first-child { border-color: var(--v2-blue); color: var(--v2-blue); }
.v2-page-header nav span { display: inline-grid; min-width: 18px; height: 18px; place-items: center; border-radius: 9px; color: var(--v2-blue); background: var(--v2-blue-soft); font-size: 8px; }

.v2-account-page > .afterours-bottom-nav {
  right: max(10px, calc((100vw - 760px) / 2 + 10px));
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: max(10px, calc((100vw - 760px) / 2 + 10px));
  width: auto;
  height: 61px;
  padding: 5px 7px;
  border: 1px solid var(--v2-rule);
  border-radius: 18px;
  background: rgb(255 255 252 / 96%);
  box-shadow: 0 8px 24px rgb(20 20 18 / 8%);
}

.v2-account-page > .afterours-bottom-nav a,
.v2-account-page > .afterours-bottom-nav .afterours-nav-add { min-height: 0; color: #777972; background: transparent; }
.v2-account-page > .afterours-bottom-nav a.active { color: var(--v2-blue); background: transparent; }
.v2-account-page > .afterours-bottom-nav small { color: inherit; }

.v2-section-head { display: flex; margin-bottom: 12px; align-items: flex-end; justify-content: space-between; gap: 12px; }
.v2-section-head h2 { margin: 0; font: 520 23px/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.v2-section-head div { display: flex; flex-direction: column; gap: 3px; }
.v2-section-head span { color: var(--v2-muted); font-size: 10px; }
.v2-section-head > a { color: var(--v2-blue); font-size: 11px; font-weight: 680; text-decoration: none; }

.v2-people-preview,
.v2-groups-section { padding: 18px 0; border-bottom: 1px solid var(--v2-rule); }
.v2-people-rail { display: flex; margin-right: -20px; padding-right: 20px; gap: 16px; overflow-x: auto; scrollbar-width: none; }
.v2-people-rail::-webkit-scrollbar { display: none; }
.v2-people-rail a { display: flex; width: 62px; min-width: 62px; flex-direction: column; align-items: center; color: inherit; text-align: center; text-decoration: none; }
.v2-people-rail a > span { display: grid; width: 49px; height: 49px; place-items: center; border-radius: 50%; color: var(--v2-blue); background: var(--v2-blue-soft); font-size: 11px; font-weight: 780; }
.v2-people-rail strong { width: 100%; margin-top: 6px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.v2-people-rail small { color: var(--v2-muted); font-size: 8.5px; }
.v2-empty-row { display: grid; min-height: 64px; grid-template-columns: 42px minmax(0, 1fr) 18px; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.v2-empty-row > .ph:first-child { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--v2-blue); background: var(--v2-blue-soft); }
.v2-empty-row span { display: flex; flex-direction: column; gap: 3px; }
.v2-empty-row strong { font-size: 12px; }
.v2-empty-row small { color: var(--v2-muted); font-size: 10px; line-height: 1.35; }

.v2-circles-page .afterours-group-board-list { display: block; }
.v2-circles-page .afterours-group-board-card {
  display: grid;
  padding: 13px 0;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid var(--v2-rule);
  border-radius: 0;
  color: var(--v2-ink);
  background: transparent;
  box-shadow: none;
}
.v2-circles-page .afterours-group-board-card:last-child { border-bottom: 0; }
.v2-circles-page .afterours-context-avatar { display: grid; width: 48px; height: 48px; place-items: center; border: 0; border-radius: 16px; color: #486c5c; background: #e6eee8; font-size: 11px; font-weight: 780; }
.v2-circles-page .afterours-group-board-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.v2-circles-page .afterours-group-board-copy strong { font-size: 14px; }
.v2-circles-page .afterours-group-board-copy small { color: var(--v2-muted); font-size: 9px; }
.v2-circles-page .afterours-group-board-copy em { overflow: hidden; color: #4d4f4a; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.v2-circles-page .afterours-group-board-actions { display: flex; align-items: center; gap: 7px; }
.v2-circles-page .afterours-group-board-actions small { color: var(--v2-memory); font-size: 8.5px; font-weight: 700; }
.v2-circles-page .afterours-group-board-actions button { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 1px solid var(--v2-rule); border-radius: 50%; color: var(--v2-ink); background: #fff; }
.v2-circles-page .afterours-groups-actions { display: grid; padding: 18px 0; grid-template-columns: 1fr 1fr; gap: 10px; }
.v2-circles-page .afterours-groups-actions details { padding: 0; border: 1px solid var(--v2-rule); border-radius: 14px; background: #fff; box-shadow: none; }
.v2-circles-page .afterours-groups-actions summary { min-height: 66px; padding: 12px; }
.v2-circles-page .afterours-groups-actions summary strong { font-size: 11px; }
.v2-circles-page .afterours-groups-actions summary small { color: var(--v2-muted); font-size: 9px; }
.v2-circles-page .afterours-groups-actions summary { color: var(--v2-ink); }

.v2-relationship-summary { display: grid; padding: 14px 0; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--v2-rule); }
.v2-relationship-summary span { display: flex; min-height: 44px; padding: 0 10px; flex-direction: column; justify-content: center; border-right: 1px solid var(--v2-rule); }
.v2-relationship-summary span:last-child { border-right: 0; }
.v2-relationship-summary strong { font: 520 19px/1 Georgia, "Times New Roman", serif; }
.v2-relationship-summary small { margin-top: 4px; color: var(--v2-muted); font-size: 8.5px; }
.v2-people-grid { display: block; }
.v2-people-page .panel { border: 0; border-bottom: 1px solid var(--v2-rule); border-radius: 0; background: transparent; box-shadow: none; }
.v2-people-page .account-person-card-grid { display: block; }
.v2-people-page .account-person-card { border: 0; border-bottom: 1px solid var(--v2-rule); border-radius: 0; background: transparent; box-shadow: none; }
.v2-people-page .account-person-meta { display: none; }
.v2-people-page .section-head h2 { color: var(--v2-ink); font: 520 23px/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.v2-people-page .section-head .subtle-copy { color: var(--v2-muted); }
.v2-people-page .account-person-card header { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.v2-people-page .account-person-avatar { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; color: #744e3f; background: #f5d9cb; }
.v2-people-page .account-person-main strong { color: var(--v2-ink); font-size: 13px; }
.v2-people-page .account-person-main small { color: var(--v2-muted); font-size: 9px; }
.v2-people-page .account-person-card header > em { padding: 0; border: 0; border-radius: 0; color: var(--v2-blue); background: transparent; font-size: 9px; font-style: normal; }
.v2-people-page .account-person-card > p { color: #4e504b; font-size: 10px; line-height: 1.4; }
.v2-people-page .account-person-shared-groups span { padding: 4px 7px; border: 0; border-radius: 9px; color: #4e665a; background: #e8f0ea; font-size: 8.5px; }
.v2-people-page .account-person-actions .button { min-height: 34px; border-radius: 11px; font-size: 10px; }
.v2-people-page .account-person-actions .primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.v2-people-page .account-person-actions .ghost { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }
.v2-people-page .account-people-quick-actions { grid-template-columns: 1fr 1fr; }
.v2-people-page .account-people-quick-actions > a,
.v2-people-page .account-people-add-inline { border: 1px solid var(--v2-rule); border-radius: 14px; color: var(--v2-ink); background: #fff; box-shadow: none; }
.v2-people-page .account-people-quick-actions .ph { color: var(--v2-blue); font-size: 18px; }

.v2-explore-page .personal-explore-command { position: sticky; top: 0; z-index: 5; margin: 0 -20px; padding: 13px 20px 10px; border-bottom: 1px solid var(--v2-rule); background: rgb(251 250 246 / 96%); backdrop-filter: blur(12px); }
.v2-explore-page .personal-place-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.v2-explore-page .personal-place-search input { min-height: 45px; border: 1px solid var(--v2-rule); border-radius: 15px; color: var(--v2-ink); background: #fff; }
.v2-explore-page .personal-place-search button { min-height: 45px; border: 0; border-radius: 15px; color: #fff; background: var(--v2-blue); }
.v2-explore-page .personal-place-category-tabs { margin-top: 9px; overflow-x: auto; grid-template-columns: repeat(4, max-content); scrollbar-width: none; }
.v2-explore-page .personal-place-category-tabs button { min-height: 34px; padding: 0 12px; border: 1px solid var(--v2-rule); border-radius: 17px; color: var(--v2-muted); background: #fff; }
.v2-explore-page .personal-place-category-tabs button.active { border-color: var(--v2-blue); color: var(--v2-blue); background: var(--v2-blue-soft); }
.v2-explore-page .personal-activity-browse { display: flex; margin-right: -20px; padding: 13px 20px 13px 0; gap: 8px; overflow-x: auto; border-bottom: 1px solid var(--v2-rule); scrollbar-width: none; }
.v2-explore-page .personal-activity-browse::-webkit-scrollbar { display: none; }
.v2-explore-page .personal-activity-browse button { display: flex; min-width: 108px; min-height: 52px; padding: 9px 10px; flex: 0 0 auto; flex-direction: column; justify-content: center; gap: 3px; border: 1px solid var(--v2-rule); border-radius: 12px; color: var(--v2-ink); background: #fff; box-shadow: none; text-align: left; }
.v2-explore-page .personal-activity-browse button::before { display: none !important; content: none !important; }
.v2-explore-page .personal-activity-browse button strong { color: var(--v2-ink); font-size: 11px; }
.v2-explore-page .personal-activity-browse button small { color: var(--v2-muted); font-size: 8.5px; }
.v2-explore-page .personal-places-page-grid { display: block; }
.v2-explore-page .personal-places-browse-panel,
.v2-explore-page .personal-places-library-panel { padding: 18px 0; border: 0; border-bottom: 1px solid var(--v2-rule); border-radius: 0; background: transparent; box-shadow: none; }
.v2-explore-page .personal-place-discovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
.v2-explore-page .personal-place-discovery-card { display: grid; min-width: 0; padding: 0; grid-template-columns: 1fr; gap: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.v2-explore-page .personal-place-card-media { width: 100%; height: 125px; border-radius: 12px; }
.v2-explore-page .personal-place-card-copy { padding-top: 7px; }
.v2-explore-page .personal-place-card-copy strong { font-size: 12px; }
.v2-explore-page .personal-place-card-copy em { color: var(--v2-muted); font-size: 9px; }
.v2-explore-page .personal-place-chip-row { display: none; }
.v2-explore-page .personal-place-card-actions { margin-top: 7px; }
.v2-explore-page .personal-place-card-actions button { min-height: 31px; border: 1px solid var(--v2-rule); border-radius: 10px; }

.v2-you-page .panel { border: 0; border-bottom: 1px solid var(--v2-rule); border-radius: 0; color: var(--v2-ink); background: transparent; box-shadow: none; }
.v2-you-page .account-settings-summary { gap: 0; }
.v2-you-page .account-settings-summary span { border: 0; border-right: 1px solid var(--v2-rule); border-radius: 0; background: transparent; }
.v2-you-page .account-login-method { border: 1px solid var(--v2-rule); border-radius: 14px; background: #fff; }
.v2-you-page .account-settings-actions { grid-template-columns: 1fr 1fr; }

@media (max-width: 420px) {
  .afterours-shell.v2-account-page { padding-inline: 18px; }
  .v2-people-rail { margin-right: -18px; padding-right: 18px; }
  .v2-explore-page .personal-explore-command { margin-inline: -18px; padding-inline: 18px; }
}

/* V2 permanent group spaces */
body:has(.group-themed-shell),
.app-shell:has(.group-themed-shell) { background: var(--v2-paper); }
#app:has(.group-themed-shell) { padding: 0; }

.group-shell.group-themed-shell {
  width: min(100%, 820px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 14px 18px calc(92px + env(safe-area-inset-bottom));
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
  color: var(--v2-ink);
  background: var(--v2-paper);
}

.group-themed-shell .header-panel {
  position: relative;
  top: auto;
  margin: 0;
  padding: calc(4px + env(safe-area-inset-top)) 0 14px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--v2-rule);
  border-radius: 0;
  color: var(--v2-ink);
  background: transparent;
  box-shadow: none;
}

.group-themed-shell .header-panel::before,
.group-themed-shell .header-panel::after { display: none; }
.group-themed-shell .header-banner { min-height: 62px; padding: 0; align-items: center; background: transparent; }
.group-themed-shell .group-emblem { width: 50px; min-width: 50px; height: 50px; border: 0; border-radius: 16px; background: #e6eee8; box-shadow: none; }
.group-themed-shell .group-emblem-glyph { color: #486c5c; font-size: 13px; font-weight: 800; }
.group-themed-shell .header-title-block { min-width: 0; }
.group-themed-shell .header-title-block h1 { margin: 2px 0 0; color: var(--v2-ink); font: 520 27px/1 Georgia, "Times New Roman", serif; letter-spacing: -.04em; text-shadow: none; }
.group-themed-shell .header-kicker { color: var(--v2-muted); }
.group-themed-shell .header-kicker .mono-tag { display: none; }
.group-themed-shell .group-afterours-pill { min-height: 0; padding: 0; border: 0; color: var(--v2-blue); background: transparent; box-shadow: none; font-size: 9px; font-weight: 760; text-transform: none; }
.group-themed-shell .group-vibe-row { display: none; }
.group-themed-shell .header-actions { gap: 5px; }
.group-themed-shell .header-icon-button { width: 35px; min-width: 35px; height: 35px; min-height: 35px; border: 1px solid var(--v2-rule); color: var(--v2-ink); background: #fff; box-shadow: none; }
.group-themed-shell .header-avatar-button { color: #fff; background: var(--v2-memory); }
.group-themed-shell .group-app-rail { display: none; }
.group-themed-shell .next-hangout-strip { margin: 12px 0 0; border: 1px solid #d8e5dc; border-radius: 14px; color: var(--v2-ink); background: #f0f6f1; box-shadow: none; }
.group-themed-shell .section-tabs { margin: 11px 0 0; padding: 0; border-bottom: 1px solid var(--v2-rule); border-radius: 0; background: transparent; box-shadow: none; }
.group-themed-shell .section-tabs .toggle-button { min-height: 42px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--v2-muted); background: transparent; }
.group-themed-shell .section-tabs .toggle-button.active { border-color: var(--v2-blue); color: var(--v2-blue); background: transparent; }
.group-themed-shell .tab-panel { margin: 0; padding: 0; border: 0; border-radius: 0; color: var(--v2-ink); background: transparent; box-shadow: none; }
.group-themed-shell .hub-shell { gap: 0; }
.group-themed-shell .group-board-hero {
  display: grid;
  margin: 0;
  padding: 20px 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--v2-rule);
  border-radius: 0;
  color: var(--v2-ink);
  background: transparent;
  box-shadow: none;
}
.group-themed-shell .group-board-hero::before,
.group-themed-shell .group-board-hero::after { display: none; }
.group-themed-shell .group-board-hero-copy { max-width: 500px; }
.group-themed-shell .hub-topbar-tag { padding: 0; border: 0; color: var(--v2-blue); background: transparent; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.group-themed-shell .group-board-hero h2 { margin: 5px 0 6px; color: var(--v2-ink); font: 520 clamp(25px, 7vw, 36px)/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.05em; }
.group-themed-shell .group-board-hero p { max-width: 460px; margin: 0; color: var(--v2-muted); font-size: 12px; line-height: 1.4; }
.group-themed-shell .group-board-hero-copy > small { display: block; margin-top: 9px; color: var(--v2-muted); font-size: 9px; }
.group-themed-shell .group-board-stats { display: none; }
.group-themed-shell .group-board-hero-actions { display: flex; width: auto; flex-direction: column; gap: 7px; }
.group-themed-shell .group-board-hero-actions .button { min-height: 38px; padding-inline: 13px; gap: 5px; border-radius: 12px; }
.group-themed-shell .group-board-hero-actions .primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.group-themed-shell .group-board-hero-actions .ghost { border: 1px solid var(--v2-rule); color: var(--v2-ink); background: #fff; }
.group-themed-shell .hub-story-rail,
.group-themed-shell .home-screen-nudge { margin-top: 14px; }
.group-themed-shell .hub-feature-card,
.group-themed-shell .hub-section,
.group-themed-shell .hub-feed-section,
.group-themed-shell .media-strip-section { margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--v2-rule); border-radius: 0; color: var(--v2-ink); background: transparent; box-shadow: none; }
.group-themed-shell .hub-section-head h3 { color: var(--v2-ink); font: 520 22px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.group-themed-shell .hub-section-head p { color: var(--v2-muted); }
.group-themed-shell .hub-feed { gap: 0; }
.group-themed-shell .hub-feed > li,
.group-themed-shell .hub-feed button { color: var(--v2-ink); background: transparent; }
.group-themed-shell .mobile-tab-bar { right: max(10px, calc((100vw - 820px) / 2 + 10px)); bottom: calc(8px + env(safe-area-inset-bottom)); left: max(10px, calc((100vw - 820px) / 2 + 10px)); width: auto; height: 61px; padding: 5px 8px; border: 1px solid var(--v2-rule); border-radius: 18px; background: rgb(255 255 252 / 96%); box-shadow: 0 8px 24px rgb(20 20 18 / 8%); }
.group-themed-shell .mobile-tab-button { min-height: 0; border: 0; border-radius: 12px; color: var(--v2-muted); background: transparent; }
.group-themed-shell .mobile-tab-button.active { color: var(--v2-blue); background: var(--v2-blue-soft); }
.group-themed-shell .mobile-tab-button .tab-icon { font-size: 19px; }

@media (max-width: 600px) {
  .group-shell.group-themed-shell { padding-inline: 16px; }
  .group-themed-shell .section-tabs { display: none; }
  .group-themed-shell .group-board-hero { grid-template-columns: 1fr; align-items: start; }
  .group-themed-shell .group-board-hero-actions { width: 100%; flex-direction: row; }
  .group-themed-shell .group-board-hero-actions .button { flex: 1; }
}

/* Account home: capture + meaningful social pulse. */
body:has(.personal-home-v3),
.app-shell:has(.personal-home-v3) {
  background: #fafaf7;
}

.app-shell:has(.personal-home-v3) {
  width: 100%;
  max-width: none;
  padding: 0;
}

#app:has(.personal-home-v3) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.afterours-shell.personal-home-v3 {
  --pulse-ink: #171815;
  --pulse-muted: #767871;
  --pulse-line: #e5e6df;
  --pulse-blue: #216ef4;
  --pulse-paper: #fafaf7;
  width: 100%;
  min-height: 100svh;
  padding: 0 18px calc(96px + env(safe-area-inset-bottom));
  gap: 0;
  color: var(--pulse-ink);
  color-scheme: light;
  background: var(--pulse-paper);
}

.personal-home-v3 > .afterours-topbar {
  position: relative;
  top: auto;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 0 12px;
  background: transparent;
  backdrop-filter: none;
}

.personal-home-v3 .afterours-wordmark {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: var(--pulse-ink);
  background: transparent;
  box-shadow: none;
  font-size: 22px;
  font-weight: 790;
  letter-spacing: -.055em;
  text-transform: none;
}

.personal-home-v3 .afterours-greeting { display: none; }

.personal-home-v3 .afterours-avatar-link {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid #e2e3dd;
  border-radius: 50%;
  color: var(--pulse-ink);
  background: #eff0eb;
  font-size: 11px;
}

.home-pulse-main {
  display: grid;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  gap: 18px;
}

.home-capture { display: grid; gap: 12px; }

.home-capture-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 50px;
  padding: 0 10px;
  align-items: center;
  gap: 6px;
  border: 1px solid #d9dad4;
  border-radius: 17px;
  background: #fff;
}

.home-capture-form input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 4px;
  border: 0;
  outline: 0;
  color: var(--pulse-ink);
  background: transparent;
  font-size: 14px;
}

.home-capture-form input::placeholder { color: #898b84; }

.home-capture-link,
.home-capture-submit {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #5e615a;
  background: transparent;
  font-size: 22px;
}

.home-capture-submit { color: var(--pulse-blue); font-size: 25px; }
.home-capture-submit:disabled { opacity: .45; }

.home-capture-context {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 13px;
}

.home-capture-context > span {
  width: 1px;
  height: 22px;
  background: var(--pulse-line);
}

.home-capture-context button {
  display: inline-flex;
  padding: 4px 0;
  align-items: center;
  gap: 7px;
  border: 0;
  color: #52544e;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.home-capture-context button:last-child { color: var(--pulse-blue); }
.home-capture-context .ph { font-size: 17px; }
.home-capture-context .ph-caret-down { font-size: 11px; }

.home-pulse-heading {
  display: flex;
  min-height: 29px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-pulse-heading h2 {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 8px;
  color: var(--pulse-ink);
  font-family: inherit;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -.045em;
}

.home-pulse-heading h2 > span {
  display: grid;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  place-items: center;
  border-radius: 50%;
  background: #ebede7;
  font-size: 12px;
  letter-spacing: 0;
}

.home-pulse-heading > a { color: #6d6f68; font-size: 18px; }
.home-needs,
.home-social-pulse { display: grid; gap: 10px; }

.home-proposal {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pulse-line);
}

.home-proposal-media {
  display: grid;
  width: 112px;
  aspect-ratio: .92;
  overflow: hidden;
  place-items: center;
  border-radius: 12px;
  color: #66706a;
  background: #e9ebe5;
  font-size: 30px;
}

.home-proposal-media img { width: 100%; height: 100%; object-fit: cover; }
.home-proposal-copy { display: grid; min-width: 0; gap: 5px; }

.home-proposal-context {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.home-proposal-context > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: #2766dc;
  background: #e5edff;
  font-size: 9px;
  font-weight: 780;
}

.home-proposal-context strong { overflow: hidden; color: var(--pulse-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.home-proposal-context em { color: #888a83; font-size: 10px; font-style: normal; }
.home-proposal-copy h3 { margin: 1px 0 0; color: var(--pulse-ink); font-family: inherit; font-size: 17px; font-weight: 760; letter-spacing: -.04em; line-height: 1.05; }
.home-proposal-copy p { display: flex; margin: 0; align-items: center; gap: 6px; color: #666861; font-size: 11px; }
.home-proposal-copy p .ph { font-size: 15px; }
.home-proposal-copy > small { color: #888a84; font-size: 10px; }

.home-proposal-actions {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 7px;
  margin-top: 3px;
}

.home-proposal-actions button {
  display: inline-flex;
  min-height: 33px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #d6d8d1;
  border-radius: 9px;
  color: #474944;
  background: #fff;
  font-size: 11px;
  font-weight: 720;
}

.home-proposal-actions button:first-child { border-color: var(--pulse-blue); color: #fff; background: var(--pulse-blue); }
.home-proposal-actions button:disabled { opacity: .5; }

.home-social-pulse { gap: 0; }
.home-social-pulse > .home-pulse-heading { margin-bottom: 2px; }

.home-social-item {
  display: grid;
  padding: 11px 0;
  gap: 8px;
  border-bottom: 1px solid var(--pulse-line);
}

.home-social-byline {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.home-social-byline > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #30332c;
  background: #e6e8e1;
  font-size: 9px;
  font-weight: 780;
}

.home-social-byline strong { color: var(--pulse-ink); font-size: 12px; }
.home-social-byline em { overflow: hidden; color: #7e8079; font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.home-social-byline time { color: #878982; font-size: 10px; }

.home-recommendation-main {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding-left: 40px;
}

.home-recommendation-main > img,
.home-social-media-fallback {
  width: 132px;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
}

.home-social-media-fallback { display: grid; place-items: center; color: #6b6e66; background: #e9ebe5; font-size: 24px; }
.home-recommendation-main > span:last-child { display: grid; min-width: 0; gap: 5px; }
.home-recommendation-main strong { overflow: hidden; color: var(--pulse-ink); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.home-recommendation-main small { display: -webkit-box; overflow: hidden; color: #72746d; font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.home-social-actions {
  display: flex;
  padding-left: 40px;
  align-items: center;
  gap: 20px;
}

.home-social-actions button,
.home-add-photos {
  display: inline-flex;
  min-height: 32px;
  padding: 0;
  align-items: center;
  gap: 7px;
  border: 0;
  color: var(--pulse-blue);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.home-social-actions .ph,
.home-add-photos .ph { font-size: 18px; }
.home-memory-item h3 { margin: -2px 0 0 40px; color: var(--pulse-ink); font-family: inherit; font-size: 19px; font-weight: 740; letter-spacing: -.035em; }
.home-memory-item { padding-block: 7px; gap: 5px; }

.home-memory-strip {
  display: block;
  height: 62px;
  margin-left: 40px;
  overflow: hidden;
  border-radius: 9px;
}

.home-memory-strip img { width: 100%; height: 100%; object-fit: cover; }
.home-add-photos { margin-left: 40px; }

.home-quiet-state {
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 72px;
  padding: 13px 0;
  align-items: center;
  gap: 11px;
  border-block: 1px solid var(--pulse-line);
}

.home-quiet-state > .ph { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #596254; background: #e9eee4; font-size: 18px; }
.home-quiet-state > span { display: grid; gap: 3px; }
.home-quiet-state strong { color: var(--pulse-ink); font-size: 12px; }
.home-quiet-state small { color: var(--pulse-muted); font-size: 10px; }
.home-quiet-state a { color: var(--pulse-blue); font-size: 11px; font-weight: 700; }

.home-list-summary {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  min-height: 54px;
  padding: 0 2px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--pulse-line);
  color: var(--pulse-ink);
}

.home-list-summary > .ph:first-child { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #d9dbd4; border-radius: 50%; color: #686a64; font-size: 17px; }
.home-list-summary strong { font-size: 13px; }
.home-list-summary span { color: #7c7e77; font-size: 11px; }
.home-list-summary > .ph:last-child { color: #777a73; }

.personal-home-v3 > .afterours-bottom-nav {
  right: 12px;
  bottom: 0;
  left: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: auto;
  max-width: 500px;
  height: calc(62px + env(safe-area-inset-bottom));
  padding: 5px 7px;
  border: 1px solid #e0e2db;
  border-radius: 18px 18px 0 0;
  background: rgb(255 255 252 / 94%);
  box-shadow: 0 10px 32px rgb(28 31 21 / 10%);
  backdrop-filter: blur(16px);
}

.personal-home-v3 > .afterours-bottom-nav a,
.personal-home-v3 .afterours-nav-add {
  display: flex;
  min-height: 0;
  padding: 5px 2px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  border: 0;
  border-radius: 14px;
  color: #878982;
  background: transparent;
}

.personal-home-v3 > .afterours-bottom-nav a.active { color: var(--pulse-ink); background: transparent; }
.personal-home-v3 > .afterours-bottom-nav .ph { font-size: 20px; }
.personal-home-v3 > .afterours-bottom-nav small { font-size: 9px; font-weight: 680; }
.personal-home-v3 > .afterours-bottom-nav a small { color: inherit; }

.personal-home-v3 .afterours-nav-add {
  position: relative;
  width: 58px;
  height: 58px;
  margin: -15px auto 0;
  border-radius: 50%;
  color: white;
  background: var(--pulse-blue);
  box-shadow: 0 8px 20px rgb(33 110 244 / 25%);
}

.personal-home-v3 .afterours-nav-add .ph { font-size: 28px; }
.personal-home-v3 .afterours-nav-add small { position: absolute; top: 60px; color: #6e706a; }

.home-context-backdrop {
  position: fixed;
  z-index: 59;
  inset: 0;
  background: rgb(21 22 19 / 28%);
}

.home-context-backdrop[hidden],
.home-context-sheet[hidden] { display: none !important; }

.home-context-sheet {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  max-width: 560px;
  max-height: min(76svh, 680px);
  margin: auto;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  gap: 12px;
  overflow-y: auto;
  border: 1px solid #dedfd9;
  border-radius: 24px 24px 0 0;
  color: var(--pulse-ink);
  background: #fff;
  box-shadow: 0 -20px 60px rgb(22 24 17 / 16%);
}

.home-context-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.home-context-sheet-head small { color: #81837c; font-size: 9px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.home-context-sheet-head h2 { margin: 4px 0 0; color: var(--pulse-ink); font-family: inherit; font-size: 25px; font-weight: 760; letter-spacing: -.045em; }
.home-context-sheet-head > button { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 1px solid #e0e1db; border-radius: 50%; color: #555851; background: #f8f8f5; }
.home-context-sheet > h3 { margin: 5px 0 -4px; color: #82847d; font-family: inherit; font-size: 10px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.home-context-options { display: grid; }

.home-context-options > button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 58px;
  padding: 8px 2px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid #eeeee9;
  color: var(--pulse-ink);
  background: transparent;
  text-align: left;
}

.home-context-options > button > .ph:first-child { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 50%; color: #4f5c4c; background: #edf0e9; font-size: 18px; }
.home-context-options > button.selected > .ph:first-child { color: #1c61db; background: #e9f0ff; }
.home-context-options > button > span { display: grid; gap: 3px; }
.home-context-options strong { color: var(--pulse-ink); font-size: 12px; }
.home-context-options small { color: #7d7f78; font-size: 10px; }
.home-context-options > button > .ph:last-child { color: var(--pulse-blue); }

@media (min-width: 760px) {
  .afterours-shell.personal-home-v3 { padding-inline: 32px; }
  .home-proposal { grid-template-columns: 180px minmax(0, 1fr); }
  .home-proposal-media { width: 180px; }
  .home-proposal-copy h3 { font-size: 29px; }
  .home-recommendation-main { grid-template-columns: 220px minmax(0, 1fr); }
  .home-recommendation-main > img,
  .home-social-media-fallback { width: 220px; height: 135px; }
  .home-memory-strip { height: 110px; }
}

@media (max-width: 370px) {
  .afterours-shell.personal-home-v3 { padding-inline: 13px; }
  .home-proposal { grid-template-columns: 96px minmax(0, 1fr); gap: 11px; }
  .home-proposal-media { width: 96px; }
  .home-proposal-copy h3 { font-size: 18px; }
  .home-recommendation-main { grid-template-columns: 112px minmax(0, 1fr); padding-left: 0; }
  .home-recommendation-main > img,
  .home-social-media-fallback { width: 112px; }
  .home-social-actions { padding-left: 0; gap: 13px; }
  .home-memory-item h3,
  .home-memory-strip,
  .home-add-photos { margin-left: 0; }
}

/* V5 Discover nearby */
body:has(.nearby-discover-page),
.app-shell:has(.nearby-discover-page) { background: #fbfaf6; }
.app-shell:has(.nearby-discover-page) { width: 100%; max-width: none; padding: 0; overflow-x: hidden; }
.nearby-discover-page {
  --nearby-ink: #171713;
  --nearby-muted: #73746e;
  --nearby-line: #deded7;
  --nearby-blue: #2f62e9;
  --nearby-blue-soft: #edf2ff;
  width: min(100%, 560px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 18px 108px;
  overflow-x: clip;
  color: var(--nearby-ink);
  background: #fbfaf6;
}
.nearby-discover-page > .afterours-topbar { padding: 22px 0 20px; }
.nearby-discover-page > main { width: 100%; min-width: 0; }
.nearby-discover-page > main > header h1 { margin: 18px 0 20px; color: var(--nearby-ink); font: 700 clamp(42px, 13vw, 60px)/.96 Georgia, "Times New Roman", serif; letter-spacing: -.055em; }
.nearby-search { display: grid; min-width: 0; min-height: 58px; padding: 0 10px 0 17px; grid-template-columns: auto minmax(0,1fr) 40px; align-items: center; gap: 10px; border: 1px solid #d6d7d1; border-radius: 20px; background: #fff; }
.nearby-search > .ph { color: #686a65; font-size: 24px; }
.nearby-search input { min-width: 0; min-height: 54px; padding: 0; border: 0; color: var(--nearby-ink); background: transparent; font-size: 15px; box-shadow: none; }
.nearby-search button { display: grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #fff; background: var(--nearby-blue); }
.nearby-constraints { display: flex; width: calc(100% + 18px); margin: 15px -18px 17px 0; padding-right: 18px; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.nearby-constraints::-webkit-scrollbar { display: none; }
.nearby-constraints > button,
.nearby-constraints > details > summary { display: flex; min-height: 44px; padding: 0 13px; flex: 0 0 auto; align-items: center; gap: 6px; border: 1px solid #d6d7d1; border-radius: 22px; color: #4f514c; background: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.nearby-constraints > button:nth-of-type(-n+2) { border-color: #8aa9ff; color: var(--nearby-blue); background: #f8faff; }
.nearby-context-menu,
.nearby-filter-menu { position: relative; flex: 0 0 auto; }
.nearby-context-menu[open] > div,
.nearby-filter-menu[open] > div { position: absolute; top: 50px; left: 0; z-index: 45; display: grid; width: 230px; max-height: 320px; padding: 8px; gap: 3px; overflow-y: auto; border: 1px solid var(--nearby-line); border-radius: 16px; background: #fff; box-shadow: 0 16px 42px rgb(23 23 19 / 15%); }
.nearby-filter-menu[open] > div { right: 0; left: auto; }
.nearby-context-menu[open] button { display: grid; min-height: 46px; padding: 6px 8px; grid-template-columns: 34px 1fr; align-items: center; gap: 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.nearby-context-menu[open] button > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #e8eee5; font-size: 10px; }
.nearby-filter-menu[open] strong { padding: 8px 8px 3px; color: #8a8b84; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.nearby-filter-menu[open] button { min-height: 39px; padding: 7px 9px; border: 0; border-radius: 9px; color: var(--nearby-ink); background: transparent; text-align: left; }
.nearby-filter-menu[open] button.active { color: var(--nearby-blue); background: var(--nearby-blue-soft); }
.nearby-map-wrap { position: relative; height: 232px; overflow: hidden; border-radius: 20px; background: #e9eee6; }
.nearby-map { width: 100%; height: 100%; min-height: 0; border: 0; border-radius: inherit; }
.nearby-map-wrap > span { position: absolute; z-index: 15; top: 12px; right: 12px; display: flex; min-height: 40px; padding: 0 13px; align-items: center; gap: 7px; border: 1px solid rgb(210 211 204 / 85%); border-radius: 20px; background: rgb(255 255 252 / 94%); box-shadow: 0 4px 14px rgb(20 22 18 / 8%); font-size: 12px; font-weight: 730; pointer-events: none; }
.nearby-map .syncra-leaflet-host { height: 100%; }
.nearby-map .syncra-custom-map-selected,
.nearby-map .leaflet-control-attribution,
.nearby-map .leaflet-control-zoom { display: none !important; }
.nearby-map .syncra-leaflet-pin { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; background: var(--nearby-blue); box-shadow: 0 4px 12px rgb(22 56 155 / 28%); }
.nearby-map .syncra-leaflet-pin strong { display: none; }
.nearby-map .syncra-leaflet-pin span { color: inherit; font-size: 11px; font-weight: 800; }
.nearby-matches { padding-top: 27px; }
.nearby-matches > header { display: flex; align-items: end; justify-content: space-between; }
.nearby-matches h2 { margin: 0; color: var(--nearby-ink); font: 700 28px/1 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.nearby-matches header span { display: block; margin-top: 5px; color: var(--nearby-muted); font-size: 11px; }
.nearby-matches > div { margin-top: 11px; border-top: 1px solid var(--nearby-line); }
.nearby-result { position: relative; display: grid; min-width: 0; grid-template-columns: minmax(0,1fr) 44px; align-items: center; border-bottom: 1px solid var(--nearby-line); }
.nearby-result-main { display: grid; min-width: 0; min-height: 126px; padding: 13px 0; grid-template-columns: 106px 24px minmax(0,1fr); align-items: center; gap: 9px; border: 0; color: inherit; background: transparent; text-align: left; }
.nearby-result-main > img,
.nearby-result-fallback { width: 106px; height: 98px; border-radius: 15px; object-fit: cover; }
.nearby-result-fallback { display: grid; place-items: center; color: #536458; background: #e7ede5; font-size: 25px; }
.nearby-pin { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: var(--nearby-blue); font-size: 10px; }
.nearby-result-main > span:last-child { display: grid; min-width: 0; gap: 4px; }
.nearby-result-main strong { overflow: hidden; color: var(--nearby-ink); font: 700 20px/1.05 Georgia, "Times New Roman", serif; text-overflow: ellipsis; white-space: nowrap; }
.nearby-result-main small { overflow: hidden; color: var(--nearby-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.nearby-result-main em { color: #4f514c; font-size: 11px; font-style: normal; }
.nearby-result-main span > i { display: flex; margin-top: 3px; align-items: center; gap: 5px; color: #63775e; font-size: 10px; font-style: normal; }
.nearby-save { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 0; color: #565852; background: transparent; font-size: 22px; }
.nearby-save.saved { color: var(--nearby-blue); }
.nearby-bottom-nav { right: 12px; bottom: calc(8px + env(safe-area-inset-bottom)); left: 12px; width: auto; height: 66px; padding: 6px 7px; border-radius: 20px; background: rgb(255 255 252 / 95%); }
.nearby-bottom-nav a { min-height: 0; color: #85877f; background: transparent; }
.nearby-bottom-nav a.active { color: var(--nearby-blue); background: transparent; }
.nearby-detail-backdrop { position: fixed; z-index: 69; inset: 0; background: rgb(20 21 18 / 34%); }
.nearby-detail-sheet { position: fixed; z-index: 70; right: 0; bottom: 0; left: 0; max-width: 560px; max-height: 82svh; margin: auto; overflow-y: auto; border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -18px 55px rgb(18 20 16 / 18%); }
.nearby-detail-sheet > header { position: relative; min-height: 120px; }
.nearby-detail-sheet > header img { width: 100%; height: 180px; object-fit: cover; }
.nearby-detail-sheet > header button { position: absolute; top: 13px; right: 13px; display: grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgb(255 255 252 / 94%); }
.nearby-detail-sheet > div { padding: 20px 18px calc(24px + env(safe-area-inset-bottom)); }
.nearby-detail-sheet > div > small { color: var(--nearby-muted); }
.nearby-detail-sheet h2 { margin: 4px 0 8px; color: var(--nearby-ink); font: 700 34px/1 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.nearby-detail-sheet p { color: var(--nearby-muted); font-size: 13px; line-height: 1.5; }
.nearby-detail-chips { display: flex; margin: 14px 0; flex-wrap: wrap; gap: 7px; }
.nearby-detail-chips span { padding: 7px 10px; border-radius: 14px; background: #edf1ea; font-size: 10px; }
.nearby-detail-sheet dl { margin: 0; border-top: 1px solid var(--nearby-line); }
.nearby-detail-sheet dl > div { display: grid; min-height: 52px; padding: 10px 0; grid-template-columns: 95px 1fr; border-bottom: 1px solid var(--nearby-line); }
.nearby-detail-sheet dt { color: var(--nearby-muted); font-size: 10px; }
.nearby-detail-sheet dd { margin: 0; font-size: 12px; }
.nearby-detail-sheet footer { display: grid; margin-top: 18px; grid-template-columns: 1fr 1fr; gap: 9px; }
.nearby-detail-sheet footer button { min-height: 48px; border: 1px solid var(--nearby-line); border-radius: 16px; color: var(--nearby-ink); background: #fff; }
.nearby-detail-sheet footer button.primary { border-color: var(--nearby-blue); color: #fff; background: var(--nearby-blue); }

/* V5 canon administration */
body:has(.canon-admin-shell), .app-shell:has(.canon-admin-shell) { background: #fbfaf6; }
.app-shell:has(.canon-admin-shell) { width: 100%; max-width: none; padding: 0; }
.canon-admin-shell { --canon-ink:#181814; --canon-muted:#74756f; --canon-line:#deded7; --canon-blue:#2f62e9; --canon-blue-soft:#edf2ff; --canon-sage:#617a5c; display: grid; min-height: 100svh; grid-template-columns: 196px minmax(0,1fr); color: var(--canon-ink); background:#fbfaf6; }
.canon-admin-nav { position: sticky; top: 0; display: flex; height: 100svh; padding: 24px 13px 18px; flex-direction: column; border-right:1px solid var(--canon-line); background:#faf9f5; }
.canon-admin-brand { padding: 0 8px 28px; color:var(--canon-ink); font-size:20px; font-weight:800; text-decoration:none; }
.canon-admin-nav nav { display:grid; gap:3px; }
.canon-admin-nav nav > small { padding:18px 9px 6px; color:#8b8c85; font-size:9px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.canon-admin-nav nav button,
.canon-admin-nav nav span { display:flex; min-height:42px; padding:0 10px; align-items:center; gap:10px; border:0; border-radius:9px; color:#555750; background:transparent; font-size:12px; text-align:left; }
.canon-admin-nav nav button.active { color:var(--canon-blue); background:var(--canon-blue-soft); font-weight:750; }
.canon-admin-nav nav .ph { width:18px; font-size:17px; }
.canon-admin-nav footer { display:grid; margin-top:auto; padding:12px 8px 0; grid-template-columns:34px 1fr; gap:2px 8px; align-items:center; border-top:1px solid var(--canon-line); }
.canon-admin-nav footer > span { display:grid; width:34px; height:34px; grid-row:1/3; place-items:center; border-radius:50%; background:#dfe8da; font-size:11px; }
.canon-admin-nav footer strong { font-size:11px; }
.canon-admin-nav footer small { color:var(--canon-muted); font-size:9px; }
.canon-admin-main { min-width:0; overflow:hidden; }
.canon-admin-top { display:grid; min-height:74px; padding:14px 22px; grid-template-columns:minmax(220px,1fr) minmax(280px,430px) auto; align-items:center; gap:18px; border-bottom:1px solid var(--canon-line); background:rgb(255 255 252 / 80%); }
.canon-admin-top h1 { margin:0; font:700 31px/1 Georgia,"Times New Roman",serif; letter-spacing:-.04em; }
.canon-admin-top form { display:grid; min-height:44px; padding:0 8px 0 13px; grid-template-columns:auto 1fr 32px; align-items:center; gap:8px; border:1px solid var(--canon-line); border-radius:11px; background:#fff; }
.canon-admin-top input { min-width:0; border:0; background:transparent; box-shadow:none; }
.canon-admin-top form button { display:grid; width:32px; height:32px; padding:0; place-items:center; border:0; border-radius:8px; color:#fff; background:var(--canon-blue); }
.canon-admin-top > a { display:flex; min-height:44px; padding:0 15px; align-items:center; border:1px solid #8faaff; border-radius:10px; color:var(--canon-blue); font-size:11px; font-weight:720; text-decoration:none; }
.canon-model-layout { display:grid; height:calc(100svh - 74px); grid-template-columns:220px 330px minmax(520px,1fr); }
.canon-admin-browser,.canon-linked-places { min-width:0; overflow-y:auto; border-right:1px solid var(--canon-line); }
.canon-admin-browser > header,.canon-linked-places > header { position:sticky; z-index:3; top:0; display:flex; min-height:61px; padding:14px 16px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--canon-line); background:#fbfaf6; }
.canon-admin-browser h2,.canon-linked-places h2 { margin:0; font:700 16px/1.15 Georgia,"Times New Roman",serif; }
.canon-admin-browser header button { display:grid; width:32px; height:32px; padding:0; place-items:center; border:1px solid var(--canon-line); border-radius:50%; background:#fff; }
.canon-activity-list { padding:7px 9px; }
.canon-activity-list button { display:grid; width:100%; min-height:52px; padding:7px 9px; grid-template-columns:25px 1fr auto; align-items:center; gap:8px; border:0; border-radius:8px; color:#454741; background:transparent; text-align:left; }
.canon-activity-list button.active { color:var(--canon-blue); background:var(--canon-blue-soft); }
.canon-activity-list button strong { font-size:12px; }
.canon-activity-list button small { color:var(--canon-muted); font-size:9px; }
.canon-linked-places > header div { min-width:0; }
.canon-linked-places > header h2 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.canon-linked-places > header span { color:var(--canon-muted); font-size:9px; }
.canon-linked-places > header button,.canon-place-catalog > header button { min-height:36px; padding:0 10px; border:0; color:var(--canon-blue); background:transparent; font-size:10px; font-weight:720; }
.canon-linked-places > div { padding:0 14px; }
.canon-linked-places article { border-bottom:1px solid var(--canon-line); }
.canon-linked-places article > button { display:grid; width:100%; min-height:115px; padding:12px 0; grid-template-columns:92px minmax(0,1fr); gap:10px; border:0; color:inherit; background:transparent; text-align:left; }
.canon-linked-places article img,.canon-linked-places article button > span:first-child { width:92px; height:88px; border-radius:10px; object-fit:cover; }
.canon-linked-places article button > span:first-child { display:grid; place-items:center; background:#e8ede5; }
.canon-linked-places article b { display:grid; min-width:0; align-content:start; gap:4px; }
.canon-linked-places article strong { overflow:hidden; font:700 15px/1.05 Georgia,"Times New Roman",serif; text-overflow:ellipsis; white-space:nowrap; }
.canon-linked-places article small { color:var(--canon-muted); font-size:9px; }
.canon-linked-places article em { grid-column:2; margin-top:-29px; color:#668059; font-size:9px; font-style:normal; text-align:right; }
.canon-status { display:inline-flex; width:max-content; align-items:center; gap:4px; color:var(--canon-sage); font-size:8.5px; font-weight:650; }
.canon-status.review { color:#c27820; }
.canon-manage-links { margin:14px; border-top:1px solid var(--canon-line); }
.canon-manage-links summary { padding:13px 0; color:var(--canon-blue); font-size:10px; font-weight:700; }
.canon-manage-links > div { display:grid; max-height:260px; overflow-y:auto; }
.canon-manage-links button { display:flex; min-height:38px; padding:6px 2px; align-items:center; gap:7px; border:0; border-bottom:1px solid #ededE8; background:transparent; font-size:10px; text-align:left; }
.canon-inspector { min-width:0; overflow-y:auto; background:#fff; }
.canon-inspector-head { position:sticky; z-index:8; top:0; display:flex; min-height:86px; padding:14px 20px; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--canon-line); background:rgb(255 255 252 / 96%); backdrop-filter:blur(12px); }
.canon-inspector-head small { color:var(--canon-muted); font-size:9px; }
.canon-inspector-head h1 { margin:4px 0 0; font:700 30px/1 Georgia,"Times New Roman",serif; letter-spacing:-.04em; }
.canon-inspector-head > div:last-child { display:flex; gap:8px; }
.canon-inspector-head a,.canon-inspector-head button,.canon-place-inspector header button { display:flex; min-height:42px; padding:0 14px; align-items:center; gap:6px; border:1px solid #91aaff; border-radius:9px; color:var(--canon-blue); background:#fff; font-size:10px; font-weight:730; text-decoration:none; }
.canon-inspector-head button.primary,.canon-place-inspector header button.primary { border-color:var(--canon-blue); color:#fff; background:var(--canon-blue); }
.canon-inspector-body { padding:18px 20px 32px; }
.canon-inspector-alerts { float:right; width:220px; margin:0 0 15px 18px; border:1px solid var(--canon-line); border-radius:12px; }
.canon-inspector-alerts button { display:grid; width:100%; min-height:65px; padding:10px; grid-template-columns:20px 1fr 14px; align-items:start; gap:7px; border:0; border-bottom:1px solid var(--canon-line); color:#c66c25; background:transparent; text-align:left; }
.canon-inspector-alerts button:last-child { border-bottom:0; }
.canon-inspector-alerts button span { display:grid; gap:3px; }
.canon-inspector-alerts strong { font-size:10px; }
.canon-inspector-alerts small { color:var(--canon-muted); font-size:8.5px; line-height:1.35; }
.canon-inspector form { min-width:0; }
.canon-inspector label,.canon-place-inspector label { display:grid; min-width:0; gap:5px; color:#62645d; font-size:9px; }
.canon-inspector input,.canon-inspector textarea,.canon-inspector select,.canon-place-inspector input,.canon-place-inspector textarea,.canon-place-inspector select { width:100%; min-width:0; min-height:40px; padding:9px 10px; border:1px solid var(--canon-line); border-radius:8px; color:var(--canon-ink); background:#fff; font-size:11px; }
.canon-lead-field { max-width:calc(100% - 238px); }
.canon-lead-field small { color:#999a94; text-align:right; }
.canon-field-grid { display:grid; margin-top:14px; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.canon-inspector details,.canon-place-inspector details { clear:both; margin-top:16px; border-top:1px solid var(--canon-line); }
.canon-inspector details > summary,.canon-place-inspector details > summary { display:flex; min-height:48px; padding:10px 0; align-items:center; justify-content:space-between; color:var(--canon-ink); }
.canon-inspector summary span { display:grid; gap:3px; }
.canon-inspector summary strong,.canon-place-inspector summary { font:700 16px/1 Georgia,"Times New Roman",serif; }
.canon-inspector summary small { color:var(--canon-muted); font:500 9px/1.2 system-ui,sans-serif; }
.canon-inspector details > p,.canon-place-inspector details > p { margin:0 0 12px; color:var(--canon-muted); font-size:10px; line-height:1.45; }
.canon-behavior-preview { display:grid; margin-top:12px; grid-template-columns:repeat(3,minmax(0,1fr)); border-block:1px solid var(--canon-line); }
.canon-behavior-preview span { display:grid; min-height:65px; padding:10px; gap:5px; border-right:1px solid var(--canon-line); color:#5c5e57; font-size:9px; }
.canon-behavior-preview span:last-child { border-right:0; }
.canon-dimension-chips { display:flex; margin-bottom:10px; flex-wrap:wrap; gap:6px; }
.canon-dimension-chips span { padding:6px 8px; border-radius:7px; color:#51634c; background:#ebf0e7; font-size:9px; text-transform:capitalize; }
.canon-empty { display:grid; min-height:230px; place-items:center; align-content:center; gap:7px; color:var(--canon-muted); text-align:center; }
.canon-empty .ph { font-size:28px; }
.canon-empty small { max-width:220px; font-size:10px; line-height:1.4; }
.canon-admin-loading { display:grid; height:calc(100svh - 74px); place-items:center; color:var(--canon-muted); }
.canon-place-catalog { padding:22px; }
.canon-place-catalog > header { display:flex; margin-bottom:18px; align-items:end; justify-content:space-between; }
.canon-place-catalog > header h1 { margin:0; font:700 31px/1 Georgia,"Times New Roman",serif; }
.canon-place-catalog > header p { margin:5px 0 0; color:var(--canon-muted); font-size:11px; }
.canon-place-layout { display:grid; height:calc(100svh - 145px); grid-template-columns:340px minmax(520px,1fr); border-top:1px solid var(--canon-line); }
.canon-place-list { overflow-y:auto; border-right:1px solid var(--canon-line); }
.canon-place-list > button { display:grid; width:100%; min-height:86px; padding:10px 11px; grid-template-columns:64px 1fr auto; align-items:center; gap:10px; border:0; border-bottom:1px solid var(--canon-line); color:inherit; background:transparent; text-align:left; }
.canon-place-list > button.active { background:var(--canon-blue-soft); box-shadow:inset 3px 0 var(--canon-blue); }
.canon-place-list img,.canon-place-list > button > span { width:64px; height:62px; border-radius:9px; object-fit:cover; }
.canon-place-list > button > span { display:grid; place-items:center; background:#e8ede5; }
.canon-place-list b { display:grid; min-width:0; gap:3px; }
.canon-place-list strong { overflow:hidden; font:700 14px/1.05 Georgia,"Times New Roman",serif; text-overflow:ellipsis; white-space:nowrap; }
.canon-place-list small,.canon-place-list em { color:var(--canon-muted); font-size:9px; font-style:normal; }
.canon-place-inspector { padding:0 20px 30px; overflow-y:auto; }
.canon-place-inspector > header { position:sticky; z-index:4; top:0; display:flex; min-height:76px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--canon-line); background:rgb(255 255 252 / 96%); }
.canon-place-inspector header small { color:var(--canon-muted); font-size:9px; }
.canon-place-inspector h2 { margin:3px 0 0; font:700 27px/1 Georgia,"Times New Roman",serif; }
.canon-review-readiness { display:grid; grid-template-columns:repeat(3,1fr); border-block:1px solid var(--canon-line); }
.canon-review-readiness span { display:grid; min-height:60px; padding:10px; gap:4px; border-right:1px solid var(--canon-line); color:var(--canon-muted); font-size:9px; }

@media (max-width: 980px) {
  .canon-admin-shell { grid-template-columns:72px minmax(0,1fr); }
  .canon-admin-brand { overflow:hidden; font-size:0; }
  .canon-admin-brand::first-letter { font-size:20px; }
  .canon-admin-nav nav button,.canon-admin-nav nav span { justify-content:center; overflow:hidden; font-size:0; }
  .canon-admin-nav nav .ph { width:auto; font-size:20px; }
  .canon-admin-nav nav > small,.canon-admin-nav footer strong,.canon-admin-nav footer small { display:none; }
  .canon-model-layout { grid-template-columns:170px 270px minmax(470px,1fr); overflow-x:auto; }
  .canon-admin-top { grid-template-columns:1fr minmax(220px,330px); }
  .canon-admin-top > a { display:none; }
}

@media (max-width: 420px) {
  .nearby-discover-page { padding-inline:16px; }
  .nearby-result-main { grid-template-columns:92px 22px minmax(0,1fr); gap:7px; }
  .nearby-result-main > img,.nearby-result-fallback { width:92px; height:90px; }
  .nearby-result-main strong { font-size:18px; }
}

body:has(.personal-home-v2),
.app-shell:has(.personal-home-v2) {
  background: var(--home-paper, #f7f7f3);
}

.app-shell:has(.personal-home-v2) {
  width: 100%;
  max-width: none;
  padding: 0;
}

.personal-home-v2 .personal-home-time strong,
.personal-home-v2 .personal-home-empty-row strong,
.personal-home-v2 .personal-home-section-heading h2,
.personal-home-v2 .personal-home-momentum-copy strong,
.personal-home-v2 .personal-home-collection-copy > strong {
  color: var(--home-ink);
}

/* Selected image direction: lighter, flatter, and idea-led. */
.personal-home-v2 {
  --home-accent: #1677ff;
}

.personal-home-v2 > .afterours-topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 5px 12px;
}

.personal-home-v2 > .afterours-topbar .afterours-wordmark {
  grid-column: 1;
  grid-row: 1;
}

.personal-home-v2 > .afterours-topbar .afterours-topbar-actions {
  display: contents;
}

.personal-home-v2 > .afterours-topbar .afterours-greeting {
  display: block;
  grid-column: 1;
  grid-row: 2;
  max-width: none;
  color: var(--home-ink);
  font-size: clamp(22px, 7vw, 31px);
  font-weight: 710;
  letter-spacing: -.045em;
}

.personal-home-v2 > .afterours-topbar .afterours-avatar-link {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

.personal-home-search .ph:first-child {
  width: auto;
  height: auto;
  color: var(--home-ink);
  background: transparent;
  font-size: 17px;
}

.personal-home-search .ph:last-child {
  color: var(--home-accent);
  font-size: 20px;
}

.personal-home-feature {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.personal-home-feature-media {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}

.personal-home-feature-media > span {
  display: grid;
  right: 16px;
  gap: 2px;
  color: white;
  text-transform: none;
}

.personal-home-feature-media > span small {
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.personal-home-feature-media > span strong {
  font-size: 24px;
  font-weight: 740;
  letter-spacing: -.04em;
}

.personal-home-feature-media > span em {
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.personal-home-feature-body {
  padding: 12px 0 0;
  gap: 12px;
}

.personal-home-feature-body > div:first-child {
  display: none;
}

.personal-home-time {
  padding: 11px 0;
}

.personal-home-feature-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.personal-home-primary {
  min-height: 43px;
  border-color: var(--home-accent);
  border-radius: 8px;
  background: var(--home-accent);
  box-shadow: none;
}

.personal-home-primary .ph { color: white; }

.personal-home-choose {
  display: grid;
  min-height: 32px;
  place-items: center;
  color: #1263c6;
  font-size: 11px;
  font-weight: 680;
}

.personal-home-v2 > .afterours-bottom-nav a.active {
  color: var(--home-accent);
  background: #edf5ff;
}

.admin-page {
  align-items: stretch;
  justify-content: stretch;
}

.admin-card {
  max-width: 1440px;
  margin: 0 auto;
  gap: 18px;
  padding: clamp(18px, 3vw, 34px);
  background: var(--surface);
  border-radius: var(--r-lg);
}

.admin-card .landing-head h1 {
  font-size: clamp(2rem, 3.6vw, 3.2rem);
}

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

.admin-stat {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
  display: grid;
  gap: 5px;
}

.admin-stat span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-stat strong {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.admin-stat.needs-work {
  border-color: color-mix(in srgb, var(--busy) 45%, var(--line));
  background: color-mix(in srgb, var(--busy) 8%, var(--surface));
}

.admin-panel {
  box-shadow: none;
}

.admin-panel-wide {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.admin-page .saved-group-card {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.admin-page .saved-group-card:hover {
  transform: none;
}

.admin-controls {
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
  align-items: end;
}

.admin-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.admin-panel-wide .admin-table {
  max-height: 680px;
  overflow: auto;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

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

.admin-row-main,
.admin-inline-field {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.admin-inline-field span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-inline-field select {
  width: 100%;
}

.admin-row-actions {
  justify-content: flex-end;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-sidebar,
.admin-detail-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-entity-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.admin-picker {
  display: grid;
  gap: 6px;
}

.admin-picker span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-picker select {
  width: 100%;
}

.admin-entity-card {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.admin-entity-card:hover,
.admin-entity-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.admin-entity-card span,
.admin-entity-card strong,
.admin-entity-card small {
  min-width: 0;
}

.admin-entity-card small {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.admin-detail-panel {
  display: grid;
  gap: 16px;
}

.admin-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.admin-detail-head h2 {
  margin-top: 4px;
}

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

.admin-place-form .grid-2,
.memory-edit-form .grid-2,
.modal-sheet .stack-form > .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-detail-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.admin-detail-metric.needs-work {
  border-color: color-mix(in srgb, var(--busy) 45%, var(--line));
  background: color-mix(in srgb, var(--busy) 8%, var(--surface));
}

.admin-detail-metric span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-detail-metric strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.admin-detail-section {
  display: grid;
  gap: 10px;
}

.admin-detail-section h3 {
  font-size: 1rem;
}

.admin-table.compact {
  border-radius: var(--r-sm);
}

.admin-row.compact-row,
.admin-row.member-row {
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
}

.admin-row.member-row {
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 0.75fr) auto;
}

.admin-chip-list,
.admin-activity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.admin-chip.is-live {
  border-color: color-mix(in srgb, var(--free) 45%, var(--line));
  background: var(--free-soft);
  color: var(--ink);
}

button.admin-chip {
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-activity-item {
  min-width: min(240px, 100%);
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.admin-storage-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.admin-storage-list code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.admin-storage-list span {
  color: var(--ink-soft);
}

.admin-room-editor-page {
  min-height: 100vh;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(16, 16, 20, 0.96), rgba(22, 19, 24, 0.98)),
    var(--ink);
  color: #f7f2e8;
}

body:has(.admin-room-editor-page) #app {
  max-width: none;
  padding: 0;
}

.admin-room-editor-login {
  width: min(520px, 100%);
  margin: 10vh auto 0;
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.06);
}

.admin-room-editor-topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  width: min(100%, 1900px);
  margin: 0 auto 12px;
}

.admin-room-editor-topbar h1 {
  margin-top: 4px;
  color: #fffaf0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 2.45vw, 3rem);
  line-height: 0.94;
}

.admin-room-editor-topbar p {
  color: rgba(247, 242, 232, 0.68);
}

.admin-room-save-status {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(64, 206, 168, 0.24);
  border-radius: 999px;
  background: rgba(64, 206, 168, 0.08);
  color: rgba(247, 242, 232, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-room-editor-shell {
  width: min(100%, 1900px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.admin-room-editor-panel,
.admin-room-editor-canvas {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.admin-room-editor-panel {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 94px);
  overflow: auto;
  padding: 8px;
  align-content: start;
}

.admin-room-panel-tabs {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  background: rgba(15, 14, 18, 0.92);
  backdrop-filter: blur(12px);
}

.admin-room-panel-tabs button {
  display: grid;
  place-items: center;
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(247, 242, 232, 0.68);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.admin-room-panel-tabs .is-active {
  color: #111015;
  background: #fff7e8;
}

.admin-room-panel-tabs button:not(.is-active):hover {
  color: #fffaf0;
  background: rgba(255, 255, 255, 0.08);
}

.admin-room-control-section {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.18);
}

.admin-room-control-section.is-primary-tool {
  border-color: rgba(64, 206, 168, 0.34);
  background:
    linear-gradient(135deg, rgba(64, 206, 168, 0.12), rgba(255, 211, 90, 0.05)),
    rgba(0, 0, 0, 0.20);
}

.admin-room-control-section h3 {
  color: #fffaf0;
  font-size: 0.88rem;
}

.admin-room-control-section h4 {
  margin: 0;
  color: rgba(255, 250, 240, 0.9);
  font-size: 0.78rem;
}

.admin-room-inspector-section {
  gap: 10px;
}

.admin-room-property-group {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-room-actor-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.admin-room-actor-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 5px 8px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 250, 240, 0.78);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
}

.admin-room-actor-chip.is-selected {
  border-color: rgba(64, 206, 168, 0.8);
  background: rgba(64, 206, 168, 0.14);
  color: #fffaf0;
}

.admin-room-actor-chip-avatar {
  width: 32px;
  height: 34px;
  background-image: var(--actor-sprite);
  background-size: 800% 900%;
  background-position: 0 0;
  transform: scaleX(var(--actor-facing, 1));
  image-rendering: pixelated;
}

.admin-room-select {
  display: grid;
  gap: 5px;
}

.admin-room-select span {
  color: rgba(247, 242, 232, 0.72);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-room-point-grid,
.admin-room-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.admin-room-point-card,
.admin-room-block-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06);
}

.admin-room-point-card strong,
.admin-room-slider span,
.admin-room-number span {
  color: rgba(247, 242, 232, 0.72);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-room-number,
.admin-room-slider {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.admin-room-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: center;
}

.admin-room-number input,
.admin-room-block-head input,
.admin-room-slider-number,
.admin-room-select select {
  width: 100%;
  min-width: 0;
  min-height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: #fffaf0;
  padding: 0 9px;
}

.admin-room-slider strong {
  color: #fffaf0;
  font-size: 0.74rem;
}

.admin-room-slider input[type="range"] {
  width: 100%;
  accent-color: #40cea8;
  height: 18px;
}

.admin-room-block-list {
  display: grid;
  gap: 10px;
}

.admin-room-block-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-room-editor-canvas {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.admin-room-preview-frame {
  position: relative;
  display: grid;
  place-items: center;
  overflow: auto;
  height: clamp(560px, calc(100vh - 190px), 840px);
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  background: #111015;
  perspective: 1200px;
  perspective-origin: 50% 42%;
  cursor: grab;
  outline: none;
  touch-action: none;
}

.admin-room-preview-frame:active {
  cursor: grabbing;
}

.admin-room-preview-frame:has(.admin-room-three-stage) {
  overflow: hidden;
  cursor: default;
}

.admin-room-preview-frame:has(.admin-room-three-stage):active {
  cursor: default;
}

.admin-room-workbench {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
}

.admin-room-three-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  overflow: hidden;
  outline: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    #0c0b10;
}

.admin-room-three-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.admin-room-three-canvas:active {
  cursor: grabbing;
}

.admin-room-three-toolbar {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 28px);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(14, 13, 18, 0.76);
  color: rgba(247, 242, 232, 0.76);
  font-size: 0.74rem;
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.admin-room-live-preview {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 5;
  width: clamp(250px, 30%, 360px);
  max-height: calc(100% - 28px);
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, auto);
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(14, 13, 18, 0.82);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  overflow: auto;
  pointer-events: none;
}

.admin-room-live-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: rgba(247, 242, 232, 0.72);
  font-size: 0.72rem;
}

.admin-room-live-preview-head strong {
  color: #fffaf0;
  font-size: 0.82rem;
}

.admin-room-live-preview .admin-room-front-stage {
  width: 100%;
  min-width: 0;
  border-radius: 8px;
}

.admin-room-three-toolbar strong {
  color: #fffaf0;
  font-size: 0.78rem;
}

.admin-room-three-toolbar span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.admin-room-orbit {
  --room-editor-zoom: 1.15;
  --room-editor-pan-x: 0px;
  --room-editor-pan-y: 0px;
  --room-editor-rotate-x: 0deg;
  --room-editor-rotate-y: 0deg;
  display: grid;
  place-items: center;
  transform:
    translate3d(var(--room-editor-pan-x), var(--room-editor-pan-y), 0)
    rotateY(var(--room-editor-rotate-y))
    rotateX(var(--room-editor-rotate-x))
    scale(var(--room-editor-zoom));
  transform-style: preserve-3d;
  transform-origin: center center;
}

.admin-room-layer-stage {
  position: relative;
  width: clamp(920px, 72vw, 1120px);
  height: clamp(540px, 56vh, 680px);
  min-width: 920px;
  min-height: 540px;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.admin-room-layer-world {
  position: relative;
  width: 920px;
  height: 520px;
  transform-style: preserve-3d;
}

.admin-room-world-floor,
.admin-room-world-wall,
.admin-room-world-reference,
.admin-room-world-actor,
.admin-room-world-zone {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
}

.admin-room-world-reference {
  width: 920px;
  aspect-ratio: 1672 / 941;
  transform: translate(-50%, -50%) translateZ(-220px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(rgba(8, 10, 14, 0.06), rgba(8, 10, 14, 0.06)),
    var(--room-bg) center / cover no-repeat;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.30);
  opacity: 0.28;
}

.admin-room-world-reference span {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--room-horizon-y);
  height: 2px;
  transform: translateY(-1px);
  background: rgba(93, 236, 215, 0.92);
  box-shadow: 0 0 0 1px rgba(15, 18, 23, 0.44), 0 0 18px rgba(93, 236, 215, 0.40);
}

.admin-room-world-reference-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 920px;
  aspect-ratio: 1672 / 941;
  transform: translate(-50%, -50%) translateZ(-210px);
  opacity: 0;
  pointer-events: none;
}

.admin-room-world-reference-overlay .admin-room-editor-overlay {
  inset: 0;
}

.admin-room-orbit.is-reference-view .admin-room-world-reference-overlay {
  opacity: 1;
}

.admin-room-orbit.is-reference-view .admin-room-world-floor,
.admin-room-orbit.is-reference-view .admin-room-world-wall,
.admin-room-orbit.is-reference-view .admin-room-world-actor {
  opacity: 0;
}

.admin-room-world-floor {
  width: 920px;
  height: 520px;
  transform: translate(-50%, -50%) rotateX(72deg);
  transform-origin: center center;
  border: 1px solid rgba(64, 206, 168, 0.95);
  background: rgba(64, 206, 168, 0.10);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  overflow: visible;
}

.admin-room-world-floor-texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(64, 206, 168, 0.14), rgba(64, 206, 168, 0.14)),
    var(--room-bg);
  background-position: var(--floor-bg-x) var(--floor-bg-y);
  background-size: var(--floor-bg-size) auto;
  background-repeat: no-repeat;
  clip-path: var(--floor-clip);
  opacity: 0.52;
  transform: translateZ(-1px);
  pointer-events: none;
}

.admin-room-world-plane-label {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 30;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(10, 9, 13, 0.68);
  color: rgba(247, 242, 232, 0.82);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: rotateX(-72deg);
  transform-origin: left top;
}

.admin-room-front-stage {
  position: relative;
  width: min(100%, 980px);
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #100f14;
}

.admin-room-front-stage .syncra-room-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.admin-room-static-stage {
  --frame-w: clamp(70px, 13%, 110px);
  --frame-h: calc(var(--frame-w) * 1.083333);
}

.admin-room-front-actor {
  position: absolute;
  width: 0;
  height: 0;
  display: block;
  transform: none;
  transform-origin: 0 0;
  pointer-events: none;
}

.admin-room-front-actor .syncra-room-sprite-shell {
  position: absolute;
  left: 0;
  bottom: 0;
  transform:
    translate(calc(-50% + var(--actor-anchor-x, 0px)), var(--actor-anchor-y, 0px))
    scale(var(--actor-scale));
  transform-origin: 50% 100%;
}

.admin-room-front-actor:not(.is-running) .syncra-room-sprite-idle {
  background-position-y: calc(var(--actor-editor-frame, 0) * -100%);
}

.admin-room-front-actor .syncra-room-name {
  position: absolute;
  left: 0;
  top: 5px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.admin-room-front-actor.is-selected .syncra-room-sprite-shell {
  filter:
    drop-shadow(0 0 0 rgba(255, 244, 168, 0))
    drop-shadow(0 0 10px rgba(255, 226, 105, 0.74));
}

.admin-room-front-actor.is-selected::before,
.admin-room-front-actor.is-live-testing::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  width: calc(var(--frame-w) * 0.34);
  min-width: 16px;
  aspect-ratio: 1 / 0.38;
  border: 2px solid rgba(255, 235, 126, 0.92);
  border-radius: 999px;
  transform: translate(-50%, 50%);
  box-shadow: 0 0 14px rgba(255, 215, 90, 0.52);
  pointer-events: none;
}

.admin-room-front-actor.is-live-testing::before {
  border-color: rgba(97, 236, 215, 0.96);
  box-shadow: 0 0 14px rgba(97, 236, 215, 0.58);
}

.admin-room-hand-anchor,
.admin-room-bubble-anchor {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 4;
  pointer-events: none;
}

.admin-room-hand-anchor {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ffd35a;
  box-shadow: 0 0 0 2px rgba(16, 14, 18, 0.72);
  transform: translate(calc(-50% + var(--actor-anchor-x, 0px) + var(--actor-hand-x, 0px)), calc(var(--actor-anchor-y, 0px) - var(--actor-hand-y, 80px)));
}

.admin-room-bubble-anchor {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.92);
  color: #17151b;
  font-size: 0.62rem;
  font-weight: 900;
  transform: translate(calc(-50% + var(--actor-anchor-x, 0px) + var(--actor-bubble-x, 0px)), calc(var(--actor-anchor-y, 0px) - var(--frame-h) - 18px - var(--actor-bubble-y, 0px)));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.admin-room-front-actor.is-running .syncra-room-sprite-idle {
  opacity: 0;
}

.admin-room-front-actor.is-running .syncra-room-sprite-run {
  opacity: 1;
}

.admin-room-test-actor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-room-live-preview .admin-room-static-stage {
  --frame-w: clamp(52px, 30%, 86px);
}

.admin-room-map-stage {
  width: min(100%, 920px);
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 20, 22, 0.82);
}

.admin-room-map-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: rgba(247, 242, 232, 0.84);
  font-size: 0.78rem;
}

.admin-room-map-head strong {
  color: #fffaf0;
  font-size: 0.95rem;
}

.admin-room-map-svg {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(64, 206, 168, 0.58);
  background: rgba(64, 206, 168, 0.08);
}

.admin-room-map-floor {
  fill: rgba(64, 206, 168, 0.08);
}

.admin-room-map-grid line {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 0.18;
  vector-effect: non-scaling-stroke;
}

.admin-room-map-zone {
  vector-effect: non-scaling-stroke;
}

.admin-room-map-zone.is-block {
  fill: rgba(255, 95, 95, 0.26);
  stroke: rgba(255, 128, 128, 0.94);
  stroke-width: 0.38;
}

.admin-room-map-zone.is-occluder {
  fill: rgba(255, 208, 86, 0.24);
  stroke: rgba(255, 220, 128, 0.94);
  stroke-width: 0.38;
}

.admin-room-map-actor circle {
  fill: rgba(255, 244, 168, 0.92);
  stroke: rgba(20, 15, 5, 0.82);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.admin-room-map-actor text {
  fill: #fffaf0;
  stroke: rgba(10, 9, 13, 0.82);
  stroke-width: 0.22;
  paint-order: stroke;
  font-size: 3px;
  text-anchor: middle;
  dominant-baseline: auto;
  pointer-events: none;
}

.admin-room-world-wall {
  width: 920px;
  height: 320px;
  top: calc(50% - 218px);
  transform: translate(-50%, -50%) translateZ(-170px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(111, 143, 186, 0.08), rgba(111, 143, 186, 0.02));
  overflow: hidden;
}

.admin-room-world-wall-texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(48, 72, 118, 0.12), rgba(48, 72, 118, 0.12)),
    var(--room-bg);
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.54;
  pointer-events: none;
}

.admin-room-world-foreground {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 920px;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
  transform: translate(-50%, -50%) translateZ(-196px);
  opacity: 0.42;
  pointer-events: none;
  mix-blend-mode: normal;
}

.admin-room-world-foreground.chair-foreground {
  z-index: 12;
}

.admin-room-world-foreground.bed-foreground {
  z-index: 14;
}

.admin-room-world-grid-line {
  position: absolute;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.24);
}

.admin-room-world-grid-line.vertical {
  left: calc(50% + var(--grid-x));
  top: 0;
  width: 1px;
  height: 100%;
}

.admin-room-world-grid-line.horizontal {
  left: 0;
  top: calc(50% + var(--grid-z));
  width: 100%;
  height: 1px;
}

.admin-room-world-zone {
  position: absolute;
  left: calc(50% + var(--zone-x));
  top: calc(50% + var(--zone-z));
  width: var(--zone-w);
  height: var(--zone-d);
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 128, 128, 0.92);
  background: rgba(255, 95, 95, 0.24);
}

.admin-room-world-zone.is-occluder {
  border-color: rgba(255, 220, 128, 0.92);
  background: rgba(255, 208, 86, 0.22);
  box-shadow: 0 0 0 1px rgba(40, 27, 6, 0.28) inset;
}

.admin-room-world-zone.is-occluder::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--zone-h);
  transform: rotateX(-72deg);
  transform-origin: bottom center;
  border: 1px solid rgba(255, 220, 128, 0.72);
  background: linear-gradient(180deg, rgba(255, 220, 128, 0.30), rgba(255, 220, 128, 0.08));
}

.admin-room-world-zone span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotateX(-72deg);
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(10, 9, 13, 0.72);
  color: rgba(247, 242, 232, 0.86);
  font-size: 0.68rem;
  white-space: nowrap;
}

.admin-room-world-cutout-card {
  position: absolute;
  left: calc(50% + var(--cutout-x));
  top: calc(50% + var(--cutout-z));
  width: var(--cutout-w);
  height: var(--cutout-h);
  transform: translate(-50%, -100%) rotateX(-72deg);
  transform-origin: center bottom;
  display: grid;
  place-items: end center;
  pointer-events: none;
  z-index: var(--cutout-depth);
}

.admin-room-world-cutout-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0.82;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.26));
}

.admin-room-world-cutout-card > span {
  position: absolute;
  left: 50%;
  bottom: -19px;
  transform: translateX(-50%);
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(10, 9, 13, 0.72);
  color: rgba(247, 242, 232, 0.88);
  font-size: 0.66rem;
  white-space: nowrap;
}

.admin-room-world-actor {
  position: absolute;
  left: calc(50% + var(--actor-x));
  top: calc(50% + var(--actor-z));
  width: var(--actor-w);
  height: var(--actor-h);
  transform: translate(-50%, -100%) rotateX(-72deg);
  transform-origin: center bottom;
  display: grid;
  place-items: end center;
  pointer-events: none;
  z-index: var(--actor-depth);
}

.admin-room-world-sprite {
  width: 100%;
  height: 100%;
  transform: scaleX(var(--actor-facing));
  transform-origin: center bottom;
  background-image: var(--actor-sprite);
  background-size: 800% 900%;
  background-position: 0 0;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 9px rgba(0, 0, 0, 0.32));
}

.admin-room-world-actor > span:last-child {
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(10, 9, 13, 0.72);
  color: rgba(247, 242, 232, 0.9);
  font-size: 0.68rem;
  white-space: nowrap;
}

.admin-room-device-frame {
  --admin-room-frame-width: 358px;
  position: relative;
  width: var(--admin-room-frame-width);
  aspect-ratio: 1672 / 941;
  flex: 0 0 auto;
}

.admin-room-device-frame .syncra-room-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.admin-room-editor-overlay {
  position: absolute;
  inset: 0;
  z-index: 70;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.admin-room-floor-plane {
  fill: rgba(64, 206, 168, 0.10);
  stroke: rgba(64, 206, 168, 0.95);
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}

.admin-room-vanishing-line {
  stroke: rgba(131, 174, 255, 0.82);
  stroke-width: 0.36;
  stroke-dasharray: 5 3;
  vector-effect: non-scaling-stroke;
}

.admin-room-wall-seam-line {
  stroke: rgba(255, 245, 160, 0.70);
  stroke-width: 0.34;
  stroke-dasharray: 2 2;
  vector-effect: non-scaling-stroke;
}

.admin-room-vanishing-point {
  fill: rgba(131, 174, 255, 0.95);
  stroke: rgba(11, 10, 16, 0.82);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.admin-room-grid-line {
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 0.22;
  stroke-dasharray: 2 2;
  vector-effect: non-scaling-stroke;
}

.admin-room-block-zone {
  fill: rgba(255, 95, 95, 0.28);
  stroke: rgba(255, 128, 128, 0.96);
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
}

.admin-room-occluder-zone {
  fill: rgba(255, 208, 86, 0.24);
  stroke: rgba(255, 220, 128, 0.96);
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
}

.admin-room-actor-point {
  fill: #fff4a8;
  stroke: rgba(35, 28, 14, 0.78);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.admin-room-editor-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 84;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(10, 9, 13, 0.72);
  color: rgba(247, 242, 232, 0.84);
  font-size: 0.74rem;
  backdrop-filter: blur(10px);
}

.admin-room-editor-page .syncra-room-debug-panel {
  display: none;
}

.admin-room-editor-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-room-editor-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.admin-room-editor-legend .floor {
  background: #40cea8;
}

.admin-room-editor-legend .block {
  background: #ff7777;
}

.admin-room-editor-legend .occluder {
  background: #ffd056;
}

.admin-room-editor-legend .actor {
  background: #fff4a8;
}

.admin-room-app-reference {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.20);
}

.admin-room-app-reference summary {
  cursor: pointer;
  color: rgba(247, 242, 232, 0.78);
  font-weight: 700;
}

.admin-room-app-reference .admin-room-device-frame {
  margin-top: 10px;
}

.admin-room-editor-readout {
  max-height: 260px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.28);
}

.admin-room-editor-readout summary {
  cursor: pointer;
  color: rgba(247, 242, 232, 0.78);
  font-weight: 700;
}

.admin-room-editor-readout code {
  display: block;
  margin-top: 10px;
  white-space: pre-wrap;
  color: rgba(247, 242, 232, 0.82);
  font-size: 0.74rem;
}

@media (max-width: 820px) {
  .admin-stat-grid,
  .admin-controls,
  .admin-row,
  .admin-workspace,
  .admin-detail-grid,
  .admin-place-form .grid-2,
  .memory-edit-form .grid-2,
  .modal-sheet .stack-form > .grid-2,
  .admin-row.member-row {
    grid-template-columns: 1fr;
  }

  .admin-row-actions {
    justify-content: flex-start;
  }

  .admin-detail-head {
    display: grid;
  }

  .admin-entity-list {
    max-height: 360px;
  }

  .admin-room-editor-topbar,
  .admin-room-editor-shell {
    grid-template-columns: 1fr;
    display: grid;
  }

  .admin-room-editor-panel {
    max-height: none;
  }

  .admin-room-preview-frame {
    height: 56vh;
  }

  .admin-room-three-stage {
    min-height: 500px;
  }

  .admin-room-workbench {
    overflow: hidden;
  }

  .admin-room-live-preview {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    max-height: 42%;
  }

  .admin-room-layer-stage {
    min-width: 720px;
    width: 720px;
    min-height: 500px;
    height: 500px;
  }

  .admin-room-device-frame {
    width: min(100%, 358px);
  }
}

.landing-side-panel {
  display: grid;
  gap: 18px;
  background: var(--surface-2);
}

.landing-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.landing-account-panel,
.landing-auth-panel {
  display: grid;
  gap: 14px;
}

.dashboard-shell {
  display: grid;
  gap: 16px;
  min-height: calc(100vh - 80px);
  align-content: start;
}

.dashboard-header {
  display: grid;
  gap: 14px;
  padding-top: clamp(4px, 2vw, 16px);
}

.dashboard-title {
  display: grid;
  gap: 8px;
}

.dashboard-title h1 {
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1;
}

.dashboard-title .landing-lead {
  max-width: 420px;
}

.dashboard-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: var(--shadow-xs);
}

.dashboard-account span {
  padding-left: 8px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.dashboard-groups-panel {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 4vw, 26px);
}

.dashboard-section-head {
  align-items: center;
}

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

.account-social-home {
  gap: 14px;
}

.account-social-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 2px;
}

.account-social-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-social-title h1 {
  font-size: clamp(1.9rem, 7vw, 3rem);
  line-height: 1;
}

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

.account-avatar-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: var(--shadow-xs);
}

.account-home-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: var(--shadow-xs);
}

.account-home-nav a {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: var(--r-full);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.account-home-nav a:first-child,
.account-home-nav a:hover {
  background: var(--ink);
  color: var(--bg);
}

.account-command-panel {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 4vw, 24px);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 11%, var(--surface)), color-mix(in srgb, var(--free) 7%, var(--surface))),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.account-command-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.account-command-copy h2 {
  font-size: clamp(1.35rem, 5vw, 2rem);
  line-height: 1.05;
}

.account-command-copy p {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 700;
}

.account-command-actions {
  display: grid;
  gap: 9px;
}

.account-command-action {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-width: 0;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

.account-command-action:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  transform: translateY(-1px);
}

.account-command-action.is-primary {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.account-command-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 950;
}

.account-command-action strong,
.account-command-action small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-command-action small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.account-command-action:focus-visible,
.account-home-nav a:focus-visible,
.account-plan-group button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.account-group-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}

.account-group-rail::-webkit-scrollbar {
  display: none;
}

.account-group-bubble {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 74px;
  max-width: 92px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.account-group-bubble > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-group-bubble-avatar,
.account-memory-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--r-full);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 70%, white), color-mix(in srgb, var(--free) 58%, var(--surface)));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  box-shadow: var(--shadow-xs);
}

.account-group-bubble-avatar {
  width: 62px;
  height: 62px;
  border: 3px solid color-mix(in srgb, var(--surface) 88%, var(--accent));
}

.account-group-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-group-empty {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.account-group-empty > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  list-style: none;
  cursor: pointer;
  font-weight: 900;
}

.account-group-empty > summary::-webkit-details-marker {
  display: none;
}

.account-group-empty-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.account-group-empty-panels {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.account-memory-composer {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.account-memory-avatar {
  width: 44px;
  height: 44px;
}

.account-memory-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-memory-copy strong {
  font-size: 1rem;
}

.account-memory-copy span {
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 750;
}

.account-memory-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.account-plan-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.account-plan-list {
  display: grid;
  gap: 9px;
}

.account-plan-group {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.account-plan-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 70%, white), color-mix(in srgb, var(--free) 58%, var(--surface)));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 850;
}

.account-plan-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-plan-copy strong,
.account-plan-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-plan-copy small {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.account-plan-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.account-plan-actions .button {
  min-width: 0;
}

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

.account-library-tile {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.account-library-tile:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  transform: translateY(-1px);
}

.account-library-tile strong,
.account-library-tile small {
  display: block;
}

.account-library-tile strong {
  font-size: 1rem;
}

.account-library-tile small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 850;
}

.account-library-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 900;
}

.account-home-grid {
  display: grid;
  gap: 12px;
}

.account-activity-panel,
.account-places-panel,
.account-settings-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  box-shadow: var(--shadow-xs);
}

.account-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.account-section-heading h2 {
  font-size: 1.15rem;
}

.account-section-heading span {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.account-activity-list,
.account-place-list {
  display: grid;
  gap: 9px;
}

.account-activity-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.account-activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: var(--r-full);
  background: var(--accent);
}

.account-activity-item.is-media .account-activity-dot {
  background: var(--busy);
}

.account-activity-item.is-place .account-activity-dot {
  background: var(--free);
}

.account-activity-item.is-group .account-activity-dot {
  background: var(--maybe);
}

.account-activity-item span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-activity-item strong,
.account-activity-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-activity-item small {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 750;
  line-height: 1.3;
}

.account-activity-item em {
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.account-place-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr) auto;
  gap: 8px;
}

.account-place-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.account-place-chip span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-place-chip strong,
.account-place-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-place-chip small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 850;
}

.personal-places-page-grid {
  display: grid;
  gap: 14px;
}

.personal-explore-hero .afterours-hero-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.personal-explore-command {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  padding: 12px;
  gap: 10px;
}

.personal-places-browse-panel,
.personal-places-library-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.personal-places-library-panel {
  position: sticky;
  top: 76px;
}

.personal-place-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.personal-place-category-tabs::-webkit-scrollbar {
  display: none;
}

.personal-place-category-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.personal-place-category-tabs button span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--ink);
  font-size: 0.78rem;
}

.personal-place-category-tabs button.active {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  background: var(--ink);
  color: var(--bg);
}

.personal-place-category-tabs button.active span {
  background: color-mix(in srgb, var(--bg) 22%, transparent);
  color: var(--bg);
}

.personal-place-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.personal-place-search input {
  min-height: 48px;
  border-radius: 17px;
  font-weight: 850;
}

.personal-place-search .button {
  min-height: 48px;
  border-radius: 17px;
}

.personal-places-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.personal-places-add-form input,
.personal-places-add-form .button {
  min-height: 42px;
}

.personal-place-add-drawer {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.personal-place-add-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 13px;
  list-style: none;
  cursor: pointer;
  font-weight: 950;
}

.personal-place-add-drawer > summary::-webkit-details-marker {
  display: none;
}

.personal-place-add-drawer .personal-places-add-form {
  padding: 0 12px 12px;
}

.personal-activity-browse {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.personal-activity-browse::-webkit-scrollbar {
  display: none;
}

.personal-activity-browse button {
  display: grid;
  gap: 5px;
  min-height: 92px;
  min-width: 132px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  text-align: left;
}

.personal-activity-browse button::before {
  content: "＋";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 950;
}

.personal-activity-browse strong,
.personal-activity-browse small,
.personal-place-card-copy strong,
.personal-place-card-copy small,
.personal-place-card-copy em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.personal-activity-browse small,
.personal-place-card-copy small,
.personal-place-card-copy em {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.personal-place-discovery-grid,
.personal-place-library-list {
  display: grid;
  gap: 10px;
}

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

.personal-place-discovery-card,
.personal-place-library-card,
.personal-explore-watch-link {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: inherit;
  text-decoration: none;
}

.personal-place-discovery-card {
  align-content: start;
  overflow: hidden;
  padding: 10px;
}

.personal-place-discovery-card.is-saved {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.personal-place-library-card {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  padding: 12px;
}

.personal-place-card-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 14%, var(--surface-2)), var(--surface));
  color: var(--accent);
  font-size: 2rem;
  font-weight: 950;
}

.personal-place-card-media.is-fallback {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.32), transparent 30%),
    linear-gradient(135deg, var(--place-tone-a, #f27c5f), var(--place-tone-b, #355d4f));
  color: #fff;
}

.personal-place-card-media.is-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.28)),
    radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.22), transparent 22%);
  pointer-events: none;
}

.personal-place-card-media.tone-food {
  --place-tone-a: #e86f4a;
  --place-tone-b: #344f43;
}

.personal-place-card-media.tone-outdoor {
  --place-tone-a: #6fa36f;
  --place-tone-b: #2f5f73;
}

.personal-place-card-media.tone-activity {
  --place-tone-a: #6c7af2;
  --place-tone-b: #30344f;
}

.personal-place-card-media.tone-event {
  --place-tone-a: #c16d93;
  --place-tone-b: #3f466e;
}

.personal-place-card-media.tone-place {
  --place-tone-a: #d49c58;
  --place-tone-b: #3d5a63;
}

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

.personal-place-card-media > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--surface);
}

.personal-place-card-media .personal-place-card-fallback {
  z-index: 1;
  align-content: center;
  width: min(86%, 150px);
  height: auto;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(12, 13, 18, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  text-align: center;
  backdrop-filter: blur(8px);
}

.personal-place-card-media .personal-place-card-fallback b,
.personal-place-card-media .personal-place-card-fallback small {
  display: block;
}

.personal-place-card-media .personal-place-card-fallback b {
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1;
}

.personal-place-card-media .personal-place-card-fallback small {
  margin-top: 7px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.personal-place-discovery-card .personal-place-card-copy {
  min-height: 74px;
}

.personal-place-card-copy strong {
  font-size: 1rem;
  line-height: 1.14;
}

.personal-place-card-copy small {
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.personal-place-card-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 950;
}

.personal-place-card-copy {
  min-width: 0;
}

.personal-place-chip-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.personal-place-chip-row small {
  max-width: 100%;
  overflow: hidden;
  padding: 5px 7px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-place-card-actions,
.personal-place-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-start;
}

.personal-place-card-actions {
  grid-column: 1 / -1;
}

.personal-place-card-actions .button {
  flex: 1 1 94px;
  justify-content: center;
}

.personal-place-share-row {
  grid-column: 1 / -1;
  justify-content: flex-start;
  align-items: center;
}

.personal-place-share-row em {
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.personal-explore-watch-link {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  padding: 12px;
}

.personal-explore-watch-link > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 950;
}

.personal-explore-watch-link strong,
.personal-explore-watch-link small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.personal-explore-watch-link strong {
  white-space: nowrap;
}

.personal-explore-watch-link small {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.personal-explore-empty {
  min-height: 168px;
  align-content: center;
}

.account-friends-grid,
.account-friend-suggestion-list {
  display: grid;
  gap: 14px;
}

.account-people-hero .afterours-hero-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-people-quick-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-people-quick-actions > a,
.account-people-add-inline {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: inherit;
  text-decoration: none;
}

.account-people-quick-actions > a,
.account-people-add-inline > summary {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 12px;
}

.account-people-add-inline > summary {
  cursor: pointer;
  list-style: none;
}

.account-people-add-inline > summary::-webkit-details-marker,
.account-people-add-empty > summary::-webkit-details-marker {
  display: none;
}

.account-people-quick-actions span[aria-hidden="true"] {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 950;
}

.account-people-quick-actions strong {
  font-size: 0.9rem;
  font-weight: 950;
}

.account-people-quick-actions small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.account-relationship-form {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.account-people-panel,
.account-friend-suggestions-panel {
  align-content: start;
}

.account-person-card-grid {
  display: grid;
  gap: 10px;
}

.account-person-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
}

.account-person-card header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.account-person-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: linear-gradient(145deg, var(--ink), color-mix(in srgb, var(--accent) 68%, var(--ink)));
  color: var(--bg);
  font-weight: 950;
}

.account-person-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-person-main strong,
.account-person-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-person-main small,
.account-person-card p,
.account-person-card > .subtle-copy {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
}

.account-person-card header em {
  align-self: start;
  padding: 6px 9px;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
}

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

.account-person-meta span {
  display: grid;
  gap: 1px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.account-person-meta strong {
  font-family: var(--font-display);
  line-height: 1;
}

.account-person-meta small {
  overflow: hidden;
  color: var(--ink-mute);
  font-size: 0.64rem;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.account-person-shared-groups,
.account-person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.account-person-shared-groups span {
  max-width: 100%;
  overflow: hidden;
  padding: 6px 8px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent-deep);
  font-size: 0.7rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-person-actions .button {
  flex: 1 1 110px;
  justify-content: center;
}

.account-friend-suggestion-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.account-friend-suggestion-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-friend-suggestion-card strong,
.account-friend-suggestion-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-friend-suggestion-card small {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.account-people-empty,
.account-people-add-empty {
  display: grid;
  gap: 10px;
}

.account-settings-grid {
  display: grid;
  gap: 10px;
}

.account-settings-page {
  align-items: stretch;
}

.account-settings-actions {
  display: grid;
  gap: 12px;
}

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

.account-settings-summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.account-settings-summary strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.account-settings-summary small {
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-login-methods {
  display: grid;
  gap: 8px;
}

.account-login-method {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.account-login-method.is-enabled {
  border-color: color-mix(in srgb, var(--free) 34%, var(--line));
}

.account-login-method-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.account-login-method-main > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-login-method small {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.3;
}

.account-login-method em {
  padding: 5px 8px;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.account-login-method.is-enabled em {
  background: color-mix(in srgb, var(--free) 18%, var(--surface));
  color: var(--ink);
}

.account-login-method-action {
  display: flex;
  justify-content: flex-end;
}

.account-login-method-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
}

.account-password-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding-top: 2px;
}

.account-password-form .field {
  min-width: 0;
}

.account-settings-row {
  display: grid;
  gap: 12px;
  align-items: center;
}

.account-settings-row p {
  margin: 4px 0 0;
}

.account-settings-details {
  box-shadow: var(--shadow-xs);
}

/* =========================================================================
   Afterours reset shell
   ========================================================================= */

.afterours-shell {
  padding-bottom: calc(var(--dock-height) + var(--safe-bottom) + 20px);
}

.afterours-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 0 2px;
  padding: 8px 0 10px;
  background: linear-gradient(to bottom, var(--bg) 76%, transparent);
  backdrop-filter: blur(16px);
}

.afterours-wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.afterours-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.afterours-greeting {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 850;
}

.afterours-avatar-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  max-width: 118px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afterours-bottom-nav {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  max-width: 560px;
  margin: 0 auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.afterours-bottom-nav a {
  display: grid;
  gap: 2px;
  place-items: center;
  min-width: 0;
  min-height: 50px;
  border-radius: 18px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 900;
}

.afterours-bottom-nav a.active {
  background: var(--ink);
  color: var(--bg);
}

.afterours-bottom-nav a > span {
  font-size: 1rem;
  line-height: 1;
}

.afterours-bottom-nav a small {
  font-size: 0.66rem;
  font-weight: 950;
}

.afterours-hero,
.afterours-page-hero {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 5vw, 28px);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 28px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 11%, var(--surface)), color-mix(in srgb, var(--free) 7%, var(--surface))),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.afterours-page-hero {
  background: var(--surface);
}

.afterours-hero-copy {
  display: grid;
  gap: 8px;
}

.afterours-hero h1,
.afterours-page-hero h1 {
  max-width: 680px;
  font-size: clamp(2.1rem, 11vw, 4.6rem);
  line-height: 0.96;
}

.afterours-hero p,
.afterours-page-hero p {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  font-weight: 760;
}

.afterours-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.afterours-hero-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.afterours-hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
}

.afterours-hero-stats small {
  overflow: hidden;
  color: var(--ink-mute);
  font-size: 0.64rem;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.afterours-hero-actions,
.afterours-compose-actions,
.afterours-group-board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.afterours-section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.afterours-section-label strong {
  font-size: 0.92rem;
  font-weight: 950;
}

.afterours-section-label a,
.afterours-section-label span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.afterours-context-strip,
.afterours-feed-section,
.afterours-task-board {
  display: grid;
  gap: 10px;
}

.afterours-context-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.afterours-context-track::-webkit-scrollbar {
  display: none;
}

.afterours-context-pill,
.afterours-context-empty {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 42px minmax(110px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 188px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.afterours-context-empty {
  min-width: 260px;
}

.afterours-context-avatar,
.afterours-context-empty > span:first-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--free) 72%, var(--surface)));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
}

.afterours-context-avatar.is-person {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
}

.afterours-context-pill span:last-child,
.afterours-context-empty strong {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.afterours-context-pill strong,
.afterours-context-pill small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afterours-context-pill small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 850;
}

.afterours-compose-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.afterours-compose-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.afterours-compose-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 950;
}

.afterours-compose-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.afterours-compose-copy strong,
.afterours-compose-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.afterours-compose-copy small {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.afterours-compose-actions a {
  flex: 1 1 90px;
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  text-decoration: none;
}

.afterours-idea-feed,
.afterours-group-board-list,
.afterours-planning-grid,
.afterours-task-list,
.afterours-groups-actions {
  display: grid;
  gap: 10px;
}

.afterours-idea-card,
.afterours-group-board-card,
.afterours-planning-tile,
.afterours-task-card,
.afterours-empty-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.afterours-idea-card {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
}

.afterours-idea-glyph,
.afterours-planning-tile > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 950;
}

.afterours-idea-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.afterours-idea-copy small,
.afterours-idea-copy em {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afterours-idea-copy strong {
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afterours-idea-card > .button,
.afterours-idea-card > a.button {
  grid-column: auto;
  min-width: 58px;
}

.afterours-planning-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.afterours-planning-tile {
  color: inherit;
  min-height: 150px;
  text-decoration: none;
}

.afterours-planning-tile small,
.afterours-task-card small,
.afterours-empty-card span {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.afterours-task-card {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
}

.afterours-task-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 950;
}

.afterours-task-card > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.afterours-task-card strong,
.afterours-task-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afterours-task-card strong {
  font-size: 0.98rem;
}

.afterours-task-card > .button,
.afterours-task-card > a.button {
  grid-column: 1 / -1;
}

.afterours-group-board-card {
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
}

.afterours-group-board-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.afterours-group-board-copy strong,
.afterours-group-board-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afterours-group-board-copy small {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 850;
}

.afterours-group-board-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.afterours-group-board-stats span {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.afterours-group-board-stats small {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 850;
}

.afterours-group-board-actions {
  grid-column: 1 / -1;
}

@media (min-width: 780px) {
  .afterours-hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
    align-items: end;
  }

  .afterours-hero-actions {
    grid-column: 1 / -1;
  }

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

  .afterours-task-card > .button,
  .afterours-task-card > a.button {
    grid-column: auto;
  }

  .afterours-group-board-card {
    grid-template-columns: 48px minmax(0, 1fr) minmax(180px, 0.38fr) auto;
  }

  .afterours-group-board-stats,
  .afterours-group-board-actions {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .afterours-shell {
    padding-bottom: calc(var(--dock-height) + var(--safe-bottom) + 34px);
  }

  .afterours-greeting {
    display: none;
  }

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

  .afterours-planning-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .afterours-task-card small {
    display: -webkit-box;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .account-people-hero .afterours-hero-stats,
  .account-people-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-people-quick-actions > a,
  .account-people-add-inline > summary {
    min-height: 104px;
  }

  .account-person-card header,
  .account-friend-suggestion-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .account-person-card header em,
  .account-friend-suggestion-card .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .account-person-avatar {
    width: 40px;
    height: 40px;
  }

  .afterours-bottom-nav a small {
    font-size: 0.62rem;
  }
}

.personal-place-form .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.personal-place-card {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.personal-media-panel {
  overflow: hidden;
}

.personal-media-home-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: inherit;
  text-decoration: none;
}

.personal-media-home-link:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  transform: translateY(-1px);
}

.personal-media-home-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.personal-media-home-copy strong,
.personal-media-home-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-media-home-copy strong {
  font-size: 0.95rem;
}

.personal-media-home-copy small {
  color: var(--ink-mute);
  font-size: 0.78rem;
  font-weight: 800;
}

.personal-media-home-arrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.personal-media-summary-strip {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.personal-media-mini-poster {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 2 / 3;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-weight: 900;
}

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

.personal-media-page {
  align-items: stretch;
}

.personal-media-afterours-hero .afterours-hero-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.personal-media-page-header {
  display: grid;
  gap: 16px;
}

.personal-media-page-nav {
  align-self: start;
}

.personal-media-hero-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.personal-media-hero-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.personal-media-hero-copy strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.personal-media-hero-copy span {
  color: var(--ink-soft);
  font-weight: 700;
}

.personal-media-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.personal-media-hero-metrics span {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.personal-media-hero-metrics strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.personal-media-hero-metrics small {
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.personal-media-page-grid {
  display: grid;
  gap: 12px;
}

.personal-media-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.personal-media-quick-actions a,
.personal-media-command-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: inherit;
  text-decoration: none;
}

.personal-media-quick-actions a {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 12px;
}

.personal-media-quick-actions span[aria-hidden="true"] {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 950;
}

.personal-media-quick-actions strong {
  font-size: 0.9rem;
  font-weight: 950;
}

.personal-media-quick-actions small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.personal-media-command-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
}

.personal-media-backfill-panel,
.personal-media-library-panel {
  align-self: start;
}

.personal-media-backfill-entry {
  display: grid;
  gap: 12px;
}

.personal-media-backfill-open {
  width: 100%;
  justify-content: center;
}

.personal-media-backfill-panel.is-standalone {
  max-width: 760px;
  width: 100%;
  justify-self: center;
}

.personal-media-search {
  display: grid;
  gap: 7px;
}

.personal-media-search label {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.personal-media-poster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.personal-media-poster-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: 260px;
  border-radius: var(--r-md);
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.personal-media-poster-stage {
  position: relative;
}

.personal-media-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--ink) 12%, var(--surface-2)), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.personal-media-poster-seen-button {
  cursor: pointer;
}

.personal-media-poster-seen-button:hover:not(:disabled),
.personal-media-poster-seen-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  transform: translateY(-1px);
}

.personal-media-poster-seen-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.personal-media-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.personal-media-poster > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
}

.personal-media-poster-card.is-watched .personal-media-poster::after {
  content: "Seen";
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 7px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 900;
}

.personal-media-poster-card.is-watched {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}

.personal-media-poster-card.is-want .personal-media-poster::after,
.personal-media-poster-card.is-skipped .personal-media-poster::after {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 7px;
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 900;
}

.personal-media-poster-card.is-want .personal-media-poster::after {
  content: "Want";
  background: color-mix(in srgb, var(--free) 78%, var(--surface));
  color: var(--ink);
}

.personal-media-poster-card.is-want {
  border-color: color-mix(in srgb, var(--free) 34%, var(--line));
}

.personal-media-poster-card.is-skipped {
  opacity: 0.72;
  border-color: color-mix(in srgb, var(--ink-mute) 34%, var(--line));
}

.personal-media-poster-card.is-skipped .personal-media-poster::after {
  content: "Skipped";
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  color: var(--bg);
}

.personal-media-more-panel {
  position: absolute;
  inset: 6px;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--line-strong) 82%, transparent);
  box-shadow: var(--shadow-md);
}

.personal-media-more-panel button {
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
}

.personal-media-more-panel button:first-child {
  background: color-mix(in srgb, var(--free) 18%, var(--surface));
}

.personal-media-more-panel button:last-child {
  color: var(--ink-soft);
}

.personal-media-more-panel button.active {
  background: var(--ink);
  color: var(--bg);
}

.personal-media-result-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.personal-media-result-copy strong,
.personal-media-result-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-media-result-copy strong {
  font-size: 0.82rem;
  line-height: 1.15;
}

.personal-media-result-copy small {
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-weight: 700;
}

.personal-media-result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.personal-media-result-actions button {
  min-height: 26px;
  padding: 3px 6px 5px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 120ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.personal-media-result-actions .personal-media-result-action-more {
  color: var(--ink-mute);
  line-height: 1;
}

.personal-media-poster-card.is-watched .personal-media-result-actions {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.personal-media-poster-card.is-want .personal-media-result-actions {
  border-color: color-mix(in srgb, var(--free) 32%, var(--line));
  background: color-mix(in srgb, var(--free) 12%, var(--surface));
}

.personal-media-poster-card.is-skipped .personal-media-result-actions {
  background: color-mix(in srgb, var(--ink) 6%, var(--surface-2));
}

.personal-media-poster-card.is-watched .personal-media-result-action-more,
.personal-media-poster-card.is-want .personal-media-result-action-more {
  color: var(--ink);
}

.personal-media-result-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.personal-media-result-actions button.active {
  background: var(--ink);
  color: var(--bg);
}

.personal-media-result-actions button:disabled {
  cursor: default;
  opacity: 0.72;
}

.personal-media-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.personal-media-chip-row button {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.personal-media-source-note {
  margin: 0;
  color: var(--ink-mute);
  font-size: 0.74rem;
  line-height: 1.35;
}

.personal-media-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.personal-media-tabs button {
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.personal-media-tabs button.active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--ink);
}

.personal-media-tabs span {
  color: var(--ink-mute);
}

.personal-media-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.personal-media-gallery-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.personal-media-gallery-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: var(--shadow-xs);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
}

.personal-media-gallery-poster > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

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

.personal-media-gallery-card.is-watched .personal-media-gallery-poster::after {
  content: "Seen";
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 3px 6px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--ink) 84%, transparent);
  color: var(--bg);
  font-size: 0.62rem;
  font-weight: 900;
}

.personal-media-gallery-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.personal-media-gallery-copy strong,
.personal-media-gallery-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-media-gallery-copy strong {
  font-size: 0.78rem;
  line-height: 1.15;
}

.personal-media-gallery-copy small {
  color: var(--ink-mute);
  font-size: 0.68rem;
  font-weight: 800;
}

.personal-media-gallery-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.personal-media-gallery-actions button,
.personal-media-gallery-share button {
  min-height: 28px;
  padding: 5px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.personal-media-gallery-share {
  display: grid;
  gap: 5px;
}

.personal-media-gallery-share button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-media-show-more {
  width: 100%;
  justify-content: center;
}

.personal-media-library {
  display: grid;
  gap: 9px;
}

.personal-media-library-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.personal-media-library-poster {
  position: relative;
  width: 44px;
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 900;
}

.personal-media-library-poster > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

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

.personal-media-library-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.personal-media-library-copy strong,
.personal-media-library-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-media-library-copy small {
  color: var(--ink-mute);
  font-size: 0.76rem;
  font-weight: 700;
}

.personal-media-library-actions,
.personal-media-library-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.personal-media-library-groups {
  grid-column: 2 / -1;
}

.dashboard-empty-state {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
}

.dashboard-secondary {
  display: grid;
  gap: 12px;
}

.dashboard-invite-panel,
.dashboard-create-panel,
.dashboard-settings-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  box-shadow: var(--shadow-xs);
}

.dashboard-invite-panel > summary,
.dashboard-create-panel > summary,
.dashboard-settings-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
  cursor: pointer;
}

.dashboard-invite-panel > summary::-webkit-details-marker,
.dashboard-create-panel > summary::-webkit-details-marker,
.dashboard-settings-panel > summary::-webkit-details-marker {
  display: none;
}

.dashboard-invite-panel > summary span:first-child,
.dashboard-create-panel > summary span:first-child,
.dashboard-settings-panel > summary span:first-child {
  display: grid;
  gap: 3px;
}

.dashboard-invite-panel > summary strong,
.dashboard-create-panel > summary strong,
.dashboard-settings-panel > summary strong {
  font-size: 1rem;
}

.dashboard-invite-panel > summary small,
.dashboard-create-panel > summary small,
.dashboard-settings-panel > summary small {
  color: var(--ink-soft);
}

.dashboard-summary-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 800;
}

.dashboard-invite-panel[open] .dashboard-summary-icon,
.dashboard-create-panel[open] .dashboard-summary-icon,
.dashboard-settings-panel[open] .dashboard-summary-icon {
  transform: rotate(45deg);
}

.dashboard-settings-body {
  display: grid;
  gap: 12px;
  align-items: center;
  padding-top: 2px;
}

.embedded-create-form {
  padding-top: 2px;
}

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

.saved-group-card {
  text-align: left;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.saved-group-card:hover {
  border-color: var(--ink-faint);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.saved-group-card.prominent {
  min-height: 88px;
  padding: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.saved-group-media {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, white), color-mix(in srgb, var(--free) 70%, var(--accent)));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.saved-group-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saved-group-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.saved-group-main strong,
.saved-group-main .subtle-copy,
.saved-group-main .saved-group-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-group-cta {
  justify-self: end;
  padding: 8px 12px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 800;
}

.saved-group-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

@media (min-width: 780px) {
  .dashboard-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .personal-media-page-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .dashboard-account {
    min-width: 220px;
  }

  .personal-media-hero-panel {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
    align-items: center;
  }

  .personal-media-page-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    align-items: start;
  }

  .dashboard-secondary {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
    align-items: start;
  }

  .account-command-panel {
    grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1fr);
    align-items: center;
  }

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

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

  .account-plan-group {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .account-plan-actions {
    grid-column: auto;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .account-home-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    align-items: start;
  }

  .personal-places-page-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    align-items: start;
  }

  .account-friends-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: start;
  }

  .account-settings-grid {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: start;
  }

  .account-settings-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .account-settings-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-settings-body {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .personal-media-poster-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .personal-media-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .afterours-visitor-card {
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
  }

  .landing-head {
    gap: 10px;
  }

  .landing-head h1 {
    font-size: clamp(2.15rem, 11vw, 2.65rem);
  }

  .landing-primary-actions .button {
    flex: 1 1 150px;
    justify-content: center;
  }

  .landing-plan-preview {
    padding: 12px;
    border-radius: 20px;
  }

  .landing-preview-footer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-preview-footer span {
    padding: 8px;
  }

  .landing-preview-idea:nth-child(n + 3) {
    display: none;
  }

  .account-social-home {
    gap: 12px;
  }

  .account-social-header {
    align-items: flex-start;
    padding-top: 2px;
  }

  .account-social-title h1 {
    font-size: 2rem;
  }

  .account-social-actions {
    gap: 6px;
  }

  .account-avatar-button {
    max-width: 112px;
  }

  .account-avatar-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-home-nav {
    gap: 4px;
    border-radius: var(--r-lg);
  }

  .account-home-nav a {
    min-height: 38px;
    border-radius: 14px;
  }

  .account-command-panel {
    gap: 14px;
  }

  .account-command-action {
    min-height: 58px;
    border-radius: 14px;
  }

  .account-command-copy p {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .account-plan-panel {
    padding: 14px;
  }

  .account-library-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-library-tile {
    min-height: 104px;
  }

  .account-place-composer {
    grid-template-columns: minmax(0, 1fr);
  }

  .personal-place-search,
  .personal-places-add-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .personal-place-category-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }

  .personal-place-category-tabs button {
    justify-content: center;
    min-width: 0;
    padding: 0 10px;
  }

  .personal-activity-browse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }

  .personal-activity-browse button {
    min-width: 0;
    min-height: 88px;
  }

  .personal-place-discovery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .personal-place-discovery-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .personal-place-library-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .personal-place-card-actions {
    justify-content: flex-start;
  }

  .account-login-method-main,
  .account-password-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-login-method-action {
    justify-content: flex-start;
  }

  .account-memory-composer {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 12px;
  }

  .account-memory-avatar {
    width: 40px;
    height: 40px;
  }

  .account-memory-actions {
    grid-column: 1 / -1;
  }

  .dashboard-groups-panel {
    border-radius: var(--r-lg);
  }

  .personal-media-page {
    gap: 14px;
  }

  .personal-media-afterours-hero .afterours-hero-stats,
  .personal-media-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .personal-media-quick-actions a {
    min-height: 104px;
  }

  .personal-media-page .landing-lead {
    font-size: 0.96rem;
  }

  .dashboard-section-head {
    align-items: flex-start;
  }

  .dashboard-section-head .button {
    padding-inline: 12px;
  }

  .saved-group-card.prominent {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .personal-media-hero-panel {
    padding: 14px;
  }

  .personal-media-poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .personal-media-poster-card {
    gap: 6px;
    padding: 6px;
  }

  .personal-media-result-copy strong {
    font-size: 0.72rem;
  }

  .personal-media-result-copy small,
  .personal-media-result-actions button {
    font-size: 0.62rem;
  }

  .personal-media-result-actions {
    width: 100%;
  }

  .personal-media-result-actions button {
    min-height: 26px;
    padding: 3px 6px 5px;
  }

  .personal-media-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .personal-media-gallery-copy strong {
    font-size: 0.72rem;
  }

  .personal-media-gallery-copy small,
  .personal-media-gallery-actions button {
    font-size: 0.62rem;
  }

  .personal-media-gallery-actions {
    gap: 4px;
  }

  .personal-media-gallery-share {
    display: none;
  }

  .personal-media-home-link {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .personal-media-home-link .personal-media-summary-strip {
    display: none;
  }

  .personal-media-library-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .personal-media-library-actions,
  .personal-media-library-groups {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .saved-group-cta {
    grid-column: 1 / -1;
    text-align: center;
    width: 100%;
  }
}

/* =========================================================================
   Group page shell
   ========================================================================= */

.group-shell {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
}

.group-themed-shell {
  --group-color-a: var(--accent);
  --group-color-b: color-mix(in srgb, var(--accent) 50%, var(--free));
  --group-color-c: color-mix(in srgb, var(--accent) 60%, #ffb86b);
  --group-accent: var(--accent);
  --group-accent-strong: var(--accent-deep);
  --group-accent-soft: var(--accent-soft);
}

/* Header */
.header-panel {
  position: relative;
  padding: clamp(20px, 4vw, 32px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--group-color-a) 24%, transparent), transparent 42%),
    radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--group-color-b) 18%, transparent), transparent 44%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, var(--group-color-a)), color-mix(in srgb, var(--surface) 86%, var(--group-color-b))),
    var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.header-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--bg-grain) 1px, transparent 0);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.7;
  mix-blend-mode: multiply;
}

.header-panel-compact {
  padding: 12px 14px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

.header-panel.has-group-banner {
  background:
    linear-gradient(rgba(10, 14, 24, 0.26), rgba(10, 14, 24, 0.26)),
    linear-gradient(100deg,
      color-mix(in srgb, var(--surface) 92%, transparent),
      color-mix(in srgb, var(--surface) 72%, transparent) 48%,
      color-mix(in srgb, var(--surface) 48%, transparent)),
    var(--group-banner-image);
  background-size: cover;
  background-position: center;
}

.header-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "emblem actions"
    "title title";
  align-items: center;
  column-gap: 16px;
  row-gap: 16px;
}

.header-panel-compact .header-banner {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "emblem title actions";
  column-gap: 10px;
  row-gap: 0;
}

@media (min-width: 720px) {
  .header-banner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "emblem title actions";
    align-items: center;
  }
}

@media (max-width: 719px) {
  .header-banner {
    align-items: center;
  }

  .header-panel:not(.header-panel-compact) .header-title-block {
    max-width: none;
  }

  .header-panel-compact .header-banner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "emblem title actions";
    align-items: center;
  }
}

.group-emblem {
  grid-area: emblem;
  position: relative;
  width: clamp(70px, 16vw, 92px);
  height: clamp(70px, 16vw, 92px);
  border-radius: 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 28% 22%, color-mix(in srgb, var(--group-color-a) 92%, white 14%), transparent 60%),
    radial-gradient(circle at 78% 78%, color-mix(in srgb, var(--group-color-c) 82%, black 8%), transparent 65%),
    linear-gradient(140deg, var(--group-color-a), var(--group-color-b) 55%, var(--group-color-c));
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 40%, transparent),
    inset 0 -10px 28px color-mix(in srgb, black 18%, transparent),
    0 8px 24px color-mix(in srgb, var(--group-accent-strong) 30%, transparent);
  overflow: hidden;
}

.header-panel-compact .group-emblem {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 32%, transparent),
    inset 0 -8px 18px color-mix(in srgb, black 14%, transparent);
}

.group-emblem::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, white 25%, transparent) 1px, transparent 0);
  background-size: 8px 8px;
  opacity: 0.35;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.group-emblem-glyph {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.55rem, 4.4vw, 2.4rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 1px 0 color-mix(in srgb, white 50%, transparent);
  line-height: 1;
}

.header-panel-compact .group-emblem-glyph {
  font-size: 1rem;
}

.group-emblem-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-title-block {
  grid-area: title;
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 760px;
}

.header-panel-compact .header-title-block {
  gap: 0;
}

.header-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--ink-soft);
}

.group-afterours-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.header-panel-compact .header-kicker {
  display: none;
}

.header-title-block h1 {
  font-size: clamp(2rem, 6vw, 3.05rem);
  letter-spacing: -0.028em;
  line-height: 0.96;
  word-break: break-word;
}

.header-panel-compact .header-title-block h1 {
  font-size: clamp(1.12rem, 4vw, 1.45rem);
  line-height: 1.05;
}

.header-actions {
  grid-area: actions;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-self: end;
  align-self: start;
  position: relative;
  z-index: 2;
}

.header-panel-compact .header-actions {
  justify-self: end;
}

.header-panel-compact .header-actions .button {
  min-height: 36px;
  padding: 8px 12px;
}

.header-icon-button {
  width: 40px;
  height: 40px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
}

.header-avatar-button {
  padding: 0;
  overflow: hidden;
  background: var(--group-accent, var(--accent));
  color: #fff;
  border-color: color-mix(in srgb, white 20%, transparent);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-avatar-content {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--member-color, var(--group-accent, var(--accent)));
  color: #fff;
  overflow: hidden;
}

.participant-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.participant-avatar-fallback {
  line-height: 1;
}

@media (min-width: 720px) {
  .header-actions {
    justify-self: end;
    align-self: start;
  }
}

.group-meta-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.group-meta-line span[aria-hidden="true"] {
  color: var(--ink-faint);
}

/* Vibe pills */
.group-vibe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.group-vibe-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  backdrop-filter: blur(8px);
}

.group-vibe-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--group-accent);
}

/* Next hangout strip */
.next-hangout-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.next-hangout-strip.celebration {
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 18%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.next-hangout-strip.ready {
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--free) 14%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, var(--free) 22%, var(--line));
}

.next-hangout-copy {
  display: grid;
  gap: 4px;
}

.next-hangout-copy strong {
  font-size: 1.12rem;
  font-family: var(--font-display);
  font-weight: 500;
}

.group-app-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  scrollbar-width: none;
}

.group-app-rail::-webkit-scrollbar {
  display: none;
}

.group-app-rail-current,
.group-app-rail a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-xs);
  color: var(--ink-soft);
  text-decoration: none;
}

.group-app-rail-current {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: var(--ink);
  color: var(--bg);
}

.group-app-rail a:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  color: var(--ink);
}

.group-app-rail span[aria-hidden="true"] {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  color: inherit;
  font-size: 0.74rem;
  font-weight: 950;
}

.group-app-rail strong,
.group-app-rail small {
  max-width: 122px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-app-rail strong {
  font-size: 0.78rem;
  font-weight: 950;
}

.group-app-rail small {
  color: currentColor;
  font-size: 0.66rem;
  font-weight: 850;
  opacity: 0.62;
}

/* Section nav (desktop) */
.section-tabs {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  width: fit-content;
}

.section-tabs .toggle-button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
}

.section-tabs .toggle-button.active {
  background: var(--ink);
  color: var(--bg);
}

@media (min-width: 720px) {
  .section-tabs {
    display: inline-flex;
  }
}

/* Mobile dock */
.mobile-tab-bar {
  position: fixed;
  left: 50%;
  bottom: var(--safe-bottom);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: stretch;
  gap: 4px;
  padding: 6px;
  border-radius: var(--r-full);
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  max-width: calc(100% - 24px);
}

.mobile-tab-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 64px;
  padding: 8px 14px;
  border-radius: var(--r-full);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 160ms ease, color 160ms ease;
}

.mobile-tab-button .tab-icon {
  font-size: 1.05rem;
}

.mobile-tab-button.active {
  background: var(--ink);
  color: var(--bg);
}

@media (min-width: 900px) {
  .mobile-tab-bar {
    display: none;
  }
}

/* =========================================================================
   Hub — Social
   ========================================================================= */

.hub-shell {
  display: grid;
  gap: clamp(20px, 3.5vw, 32px);
}

.hub-shell.social {
  gap: clamp(18px, 3vw, 28px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hub-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hub-topbar h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

.hub-topbar-social {
  align-items: flex-end;
}

.hub-topbar-copy {
  display: grid;
  gap: 4px;
}

.hub-topbar-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.hub-topbar-actions {
  display: inline-flex;
  gap: 8px;
}

.group-board-hero {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 5vw, 38px);
  border-radius: var(--r-xl);
  border: 1px solid color-mix(in srgb, var(--group-accent, var(--accent)) 26%, var(--line));
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--group-accent, var(--accent)) 22%, transparent), transparent 48%),
    radial-gradient(circle at 100% 90%, color-mix(in srgb, var(--free) 14%, transparent), transparent 44%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, #1a1714), var(--surface));
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.group-board-hero-copy {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.group-board-hero-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 4rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.group-board-hero-copy p {
  margin: 0;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 2.6vw, 1.12rem);
  line-height: 1.45;
}

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

.group-board-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--bg) 48%, transparent);
}

.group-board-stats strong {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5vw, 2.3rem);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.group-board-stats small {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.group-board-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.group-board-hero-actions .button {
  flex: 1 1 132px;
}

.plan-board-hero {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 5vw, 32px);
  border-radius: var(--r-xl);
  border: 1px solid color-mix(in srgb, var(--group-accent, var(--accent)) 24%, var(--line));
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--group-accent, var(--accent)) 18%, transparent), transparent 50%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 90%, #171412), var(--surface));
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.plan-board-hero-copy {
  display: grid;
  gap: 9px;
  max-width: 760px;
}

.plan-board-hero-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 4rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.plan-board-hero-copy p {
  margin: 0;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: clamp(0.96rem, 2.5vw, 1.08rem);
  line-height: 1.42;
}

.plan-board-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.plan-board-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 11px 12px;
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--bg) 46%, transparent);
}

.plan-board-stats strong {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.5vw, 2.1rem);
  font-weight: 500;
  line-height: 1;
}

.plan-board-stats small {
  overflow: hidden;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-board-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.plan-board-action {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.plan-board-action.primary {
  border-color: color-mix(in srgb, var(--group-accent, var(--accent)) 38%, var(--line));
  background: color-mix(in srgb, var(--group-accent, var(--accent)) 13%, var(--surface));
}

.plan-board-action > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 950;
}

.plan-board-action.primary > span {
  background: var(--group-accent, var(--accent));
  color: var(--on-accent);
}

.plan-board-action strong,
.plan-board-action small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-board-action strong {
  font-size: 0.9rem;
  font-weight: 950;
  white-space: nowrap;
}

.plan-board-action small {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
}

@media (min-width: 820px) {
  .group-board-hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    align-items: end;
  }

  .group-board-hero-actions {
    grid-column: 1 / -1;
  }

  .plan-board-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.85fr);
    align-items: end;
  }

  .plan-board-actions {
    grid-column: 1 / -1;
  }
}

/* ---------- Story rail ---------- */

.hub-story-rail {
  margin: 0 calc(var(--gutter) * -0.5);
  padding: 4px calc(var(--gutter) * 0.5);
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.hub-story-rail::-webkit-scrollbar {
  display: none;
}

.hub-story-track {
  display: inline-flex;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 2px 8px;
}

.hub-story-item {
  display: inline-grid;
  gap: 8px;
  justify-items: center;
  background: transparent;
  border: 0;
  text-align: center;
  scroll-snap-align: start;
  cursor: pointer;
  padding: 0;
  min-width: 64px;
}

.hub-story-avatar-frame {
  position: relative;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.hub-story-avatar-frame::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: var(--r-full);
  padding: 3px;
  background: conic-gradient(from 220deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--free)), var(--accent));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 200ms ease;
}

.hub-story-avatar-frame.ring-on::before {
  opacity: 1;
}

.hub-story-avatar-frame.ring-off::before {
  opacity: 0.3;
  background: linear-gradient(135deg, var(--line-strong), var(--line));
}

.hub-story-avatar {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--member-color, var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.hub-story-avatar.add {
  background: var(--surface-2);
  color: var(--ink-soft);
  border: 2px dashed var(--line-strong);
  font-weight: 500;
  font-size: 1.4rem;
}

.hub-story-avatar.add::before {
  display: none;
}

.hub-story-initials {
  position: relative;
}

.hub-story-badge {
  position: absolute;
  z-index: 3;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  box-shadow: var(--shadow-xs);
  pointer-events: none;
}

.hub-story-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-story-item.is-me .hub-story-name {
  color: var(--accent-deep);
}

/* ---------- Feature card (the big hero) ---------- */

.hub-feature {
  position: relative;
  padding: clamp(22px, 4vw, 36px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 720px) {
  .hub-feature {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
}

.hub-feature.locked {
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, #ffae6b 24%, transparent), transparent 50%),
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.hub-feature.vibing {
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--free) 18%, transparent), transparent 55%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%),
    var(--surface);
  border-color: color-mix(in srgb, var(--free) 24%, var(--line));
}

.hub-feature.empty {
  background:
    linear-gradient(140deg, var(--surface-2), var(--surface));
}

.hub-feature.hub-feature-proposals {
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 52%),
    radial-gradient(circle at 100% 85%, color-mix(in srgb, #7c6cf0 12%, transparent), transparent 48%),
    var(--surface);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.hub-proposals-teaser-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.hub-proposal-teaser {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hub-proposal-teaser:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}

.hub-proposal-teaser:active {
  background: var(--surface-2);
}

.hub-proposal-teaser-emoji {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 1.05rem;
  line-height: 1;
}

.hub-proposal-teaser-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.hub-proposal-teaser-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--ink);
  line-height: 1.25;
}

.hub-proposal-teaser-meta {
  font-size: 0.74rem;
  color: var(--ink-mute);
  line-height: 1.2;
}

.hub-proposal-teaser-go {
  flex: 0 0 auto;
  font-size: 1.15rem;
  color: var(--accent-deep);
  opacity: 0.75;
  line-height: 1;
}

.hub-feature-actions-split {
  justify-content: space-between;
  width: 100%;
}

.hub-feature-decor {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1.5px 1.5px, var(--bg-grain) 1px, transparent 0);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: multiply;
}

.hub-feature-stamp {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.hub-feature-stamp-day {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.hub-feature-stamp strong {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--bg);
}

.hub-feature-body {
  position: relative;
  display: grid;
  gap: 10px;
}

.hub-feature-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 500;
}

.hub-feature-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--ink);
  margin: 0;
}

.hub-feature-sub {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.hub-feature-crew {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding-left: 6px;
}

.hub-feature-crew-avatar,
.hub-feature-crew-extra {
  width: 30px;
  height: 30px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: -6px;
  border: 2px solid var(--surface);
  background: var(--member-color, var(--accent));
  color: #fff;
  letter-spacing: -0.02em;
  overflow: hidden;
}

.hub-feature-crew-extra {
  background: var(--ink);
  color: var(--bg);
}

.hub-feature-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* ---------- Pulse strip ---------- */

.hub-pulse {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 720px) {
  .hub-pulse {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hub-pulse-tile {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.hub-pulse-tile::before {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  right: -20px;
  top: -20px;
  border-radius: var(--r-full);
  opacity: 0.18;
  pointer-events: none;
}

.hub-pulse-tile.pulse-set::before {
  background: var(--free);
}

.hub-pulse-tile.pulse-vibe::before {
  background: var(--accent);
}

.hub-pulse-tile.pulse-ideas::before {
  background: #6259d3;
}

.hub-pulse-tile.pulse-memory::before {
  background: var(--maybe);
}

.hub-pulse-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  position: relative;
}

.hub-pulse-value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  position: relative;
}

.hub-pulse-caption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  position: relative;
}

/* ---------- Activity feed ---------- */

.hub-feed-section {
  display: grid;
  gap: 14px;
}

.hub-feed-section,
.hub-personal-digest,
.hub-scrapbook-section,
.memory-search-section,
.hub-section {
  padding: clamp(14px, 3vw, 18px);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  border: 1px solid var(--line);
}

.hub-shell.social > .hub-feed-section:first-of-type {
  margin-top: 0;
}

.hub-personal-digest {
  display: grid;
  gap: 12px;
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface) 66%, transparent);
}

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

.hub-personal-card {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  background: color-mix(in srgb, var(--surface) 88%, var(--accent-soft));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.hub-personal-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 800;
}

.hub-personal-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hub-personal-copy strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

.hub-personal-copy small {
  font-family: var(--font-mono);
  color: var(--ink-mute);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.hub-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.hub-feed-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.hub-feed-item-shell {
  display: block;
}

.hub-feed-item-button {
  appearance: none;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hub-feed-item-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hub-feed-item:hover {
  background: var(--surface-2);
  border-color: var(--ink-faint);
}

.hub-feed-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--member-color, var(--accent)), color-mix(in srgb, var(--member-color, var(--accent)) 60%, #000));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.hub-feed-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hub-feed-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-size: 0.95rem;
  line-height: 1.35;
}

.hub-feed-line strong {
  font-weight: 600;
  color: var(--ink);
}

.hub-feed-verb {
  color: var(--ink-soft);
}

.hub-feed-title {
  color: var(--ink);
  font-weight: 600;
  font-family: var(--font-display);
  font-style: normal;
  letter-spacing: -0.005em;
  word-break: break-word;
}

.hub-feed-meta {
  font-size: 0.8rem;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.hub-feed-side {
  display: inline-grid;
  gap: 4px;
  justify-items: center;
}

.hub-feed-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.05rem;
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 0;
}

button.hub-feed-thumb {
  appearance: none;
  cursor: pointer;
  transition: transform 120ms ease, border-color 160ms ease;
}

button.hub-feed-thumb:hover {
  transform: translateY(-1px);
  border-color: var(--ink-faint);
}

.hub-feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-feed-thumb.thumb-idea {
  background: color-mix(in srgb, #6259d3 14%, var(--surface-2));
  color: #4d44b8;
  border-color: color-mix(in srgb, #6259d3 28%, var(--line));
}

.hub-feed-thumb.thumb-pick {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.hub-feed-thumb.thumb-proposal {
  background: var(--maybe-soft);
  color: var(--maybe);
  border-color: color-mix(in srgb, var(--maybe) 30%, var(--line));
}

.hub-feed-thumb.thumb-activity {
  background: color-mix(in srgb, var(--accent) 13%, var(--surface-2));
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.hub-feed-thumb.thumb-place {
  background: color-mix(in srgb, var(--free) 13%, var(--surface-2));
  color: var(--free);
  border-color: color-mix(in srgb, var(--free) 28%, var(--line));
}

.hub-feed-thumb.thumb-media-title {
  background: color-mix(in srgb, var(--maybe) 14%, var(--surface-2));
  color: var(--maybe);
  border-color: color-mix(in srgb, var(--maybe) 30%, var(--line));
}

.hub-feed-thumb.thumb-participant {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.hub-feed-thumb[class*="thumb-hangout"] {
  background: var(--free-soft);
  color: var(--free);
  border-color: color-mix(in srgb, var(--free) 30%, var(--line));
}

.hub-feed-thumb.thumb-photo,
.hub-feed-thumb.thumb-photo-tag,
.hub-feed-thumb.thumb-photo-tag-me {
  background: var(--surface-2);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.hub-feed-thumb.thumb-photo-tag-me {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hub-feed-thumb.thumb-hangout-cancelled {
  background: var(--busy-soft);
  color: var(--busy);
  border-color: color-mix(in srgb, var(--busy) 30%, var(--line));
}

.hub-feed-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

.hub-feed-empty {
  position: relative;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  display: grid;
  gap: 6px;
  text-align: center;
  overflow: hidden;
}

.hub-feed-empty strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
}

.hub-feed-empty-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  top: -60px;
  right: -60px;
  pointer-events: none;
}

/* ---------- Mini-app shelf (horizontal scroll) ---------- */

.hub-shelf-section {
  display: grid;
  gap: 14px;
}

.hub-shelf {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hub-shelf::-webkit-scrollbar {
  display: none;
}

.hub-shelf-card {
  position: relative;
  flex: 0 0 240px;
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  scroll-snap-align: start;
  overflow: hidden;
  min-height: 180px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hub-shelf-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hub-shelf-card h4 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
}

.hub-shelf-card p {
  position: relative;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hub-shelf-tag {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  width: fit-content;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.55);
}

.hub-shelf-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hub-shelf-card.mini-vhs {
  background: linear-gradient(140deg, #ffd1ba, #ff7a59 70%, #c8401f);
  color: #fff;
}

.hub-shelf-card.mini-vhs h4,
.hub-shelf-card.mini-vhs p {
  color: #fff;
}

.hub-shelf-card.mini-vhs p {
  color: rgba(255, 255, 255, 0.8);
}

.hub-shelf-card.mini-vhs .hub-shelf-decor {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 2px,
      transparent 2px,
      transparent 6px
    ),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.3), transparent 50%);
}

.hub-shelf-card.mini-faceoff {
  background: linear-gradient(140deg, #4ade80, #2f8a5b 70%, #0f5236);
  color: #fff;
}

.hub-shelf-card.mini-faceoff h4,
.hub-shelf-card.mini-faceoff p {
  color: #fff;
}

.hub-shelf-card.mini-faceoff p {
  color: rgba(255, 255, 255, 0.85);
}

.hub-shelf-card.mini-faceoff .hub-shelf-decor {
  background:
    radial-gradient(circle at 20% 100%, rgba(255, 255, 255, 0.25), transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(0, 0, 0, 0.15), transparent 50%);
}

.hub-shelf-card.mini-draft {
  background: linear-gradient(140deg, #f4d792, #b87800 70%, #5a3a00);
  color: #fff;
}

.hub-shelf-card.mini-draft h4,
.hub-shelf-card.mini-draft p {
  color: #fff;
}

.hub-shelf-card.mini-draft p {
  color: rgba(255, 255, 255, 0.85);
}

.hub-shelf-card.mini-draft .hub-shelf-decor {
  background:
    radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.3), transparent 50%);
}

.hub-shelf-card.mini-mix {
  background: linear-gradient(140deg, #b6a3ff, #6259d3 70%, #2b2374);
  color: #fff;
}

.hub-shelf-card.mini-mix h4,
.hub-shelf-card.mini-mix p {
  color: #fff;
}

.hub-shelf-card.mini-mix p {
  color: rgba(255, 255, 255, 0.85);
}

.hub-shelf-card.mini-mix .hub-shelf-decor {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.28), transparent 50%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 8px, transparent 8px 18px);
}

/* ---------- Scrapbook (polaroid) ---------- */

.hub-scrapbook-section {
  display: grid;
  gap: 14px;
}

.scrapbook-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
  padding: 8px 4px;
}

@media (min-width: 720px) {
  .scrapbook-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1100px) {
  .scrapbook-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.scrapbook-tile {
  display: grid;
  gap: 6px;
  padding: 10px 10px 14px;
  background: #fffef8;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease;
}

.scrapbook-tile:hover {
  transform: rotate(0deg) translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.scrapbook-photo {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--photo-accent, var(--accent)) 80%, #fff), color-mix(in srgb, var(--photo-accent, var(--accent)) 30%, #000) 90%);
  display: grid;
  align-items: center;
  justify-items: center;
  position: relative;
  overflow: hidden;
}

.scrapbook-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.12) 1px, transparent 0);
  background-size: 4px 4px;
  pointer-events: none;
}

.scrapbook-photo-glyph {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 3rem);
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  letter-spacing: -0.04em;
}

.scrapbook-caption {
  display: grid;
  gap: 2px;
  padding: 4px 6px 0;
}

.scrapbook-caption strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: #14130f;
  letter-spacing: -0.005em;
}

.scrapbook-caption span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(20, 19, 15, 0.55);
}

@media (prefers-color-scheme: dark) {
  .scrapbook-tile {
    background: #f0e9d8;
    border-color: rgba(0, 0, 0, 0.2);
  }

  .scrapbook-caption strong {
    color: #14130f;
  }

  .scrapbook-caption span {
    color: rgba(20, 19, 15, 0.55);
  }
}

.group-settings-trigger {
  font-size: 0.95rem;
}

/* Hero */
.hub-hero-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .hub-hero-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: stretch;
  }
}

.hub-hero-card {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 50%),
    linear-gradient(145deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hub-hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.hub-hero-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hub-hero-card p {
  color: var(--ink-soft);
  max-width: 440px;
}

.hub-hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.hub-stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}

.hub-stat-card {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.hub-stat-card strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hub-stat-card span {
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 600;
}

.hub-stat-card small {
  font-size: 0.72rem;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Action cards */
.hub-action-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .hub-action-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hub-action-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: transform 120ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.hub-action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink-faint);
}

.hub-action-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
}

.hub-action-card p {
  font-size: 0.9rem;
}

.hub-action-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* Hub sections */
.hub-section {
  display: grid;
  gap: 14px;
}

.hub-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.hub-section-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.hub-section-head p {
  font-size: 0.88rem;
}

/* Crew */
.hub-crew-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.hub-member-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
}

.hub-member-card strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
}

.hub-member-card span {
  font-size: 0.8rem;
  color: var(--ink-mute);
}

.hub-member-card small {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.7rem;
  color: var(--ink-mute);
}

.hub-member-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--member-color, var(--accent)), color-mix(in srgb, var(--member-color, var(--accent)) 60%, #000));
  font-size: 1rem;
  letter-spacing: -0.02em;
}

/* Mini apps */
.hub-mini-apps {
  position: relative;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--r-xl);
  border: 1px dashed color-mix(in srgb, var(--accent) 26%, var(--line-strong));
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%),
    var(--surface-2);
}

.mini-app-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .mini-app-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mini-app-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.mini-app-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -40%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

.mini-app-card span {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.mini-app-card h3 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
}

.mini-app-card p {
  position: relative;
  font-size: 0.88rem;
}

.hub-empty-memory {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.home-screen-nudge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--group-color-a) 18%, var(--surface)),
      color-mix(in srgb, var(--group-color-b) 14%, var(--surface-2)));
  border: 1px solid color-mix(in srgb, var(--group-accent) 24%, var(--line));
}

.home-screen-nudge-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 26% 24%, color-mix(in srgb, var(--group-color-a) 88%, white 8%), transparent 62%),
    linear-gradient(140deg, var(--group-color-a), var(--group-color-b) 58%, var(--group-color-c));
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 650;
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 35%, transparent);
}

img.home-screen-nudge-icon {
  display: block;
  object-fit: cover;
}

.home-screen-nudge-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.home-screen-nudge-copy strong {
  font-size: 0.92rem;
}

.home-screen-nudge-copy span {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.home-screen-nudge-close {
  width: 34px;
  height: 34px;
}

/* =========================================================================
   Name pills (member chips)
   ========================================================================= */

.name-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.past-attendance-field {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.85rem;
}

.past-attendance-field legend {
  padding: 0 0.35rem;
  color: var(--ink-mute);
  font-size: 0.78rem;
  font-weight: 800;
}

.past-attendance-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 0.45rem;
}

.past-attendance-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.past-attendance-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.past-attendance-option .member-dot {
  width: 34px;
  height: 34px;
}

.past-attendance-option span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.past-attendance-option strong,
.past-attendance-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.past-attendance-option strong {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.05;
}

.past-attendance-option small {
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 800;
}

.past-attendance-option:hover,
.past-attendance-option:has(input:checked),
.past-attendance-option.is-selected {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent) 11%, var(--surface-2));
}

.past-attendance-option:has(input:checked)::after,
.past-attendance-option.is-selected::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface-2);
}

.past-share-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: pointer;
}

.past-share-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.past-share-option span {
  display: grid;
  gap: 2px;
}

.past-share-option strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.past-share-option small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.35;
}

.past-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.past-date-row > .field {
  min-width: 0;
}

.past-date-row .planner-field-tight {
  min-width: 0;
}

.past-date-row .time-input,
.past-date-row input[type="date"] {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.past-time-toggle {
  min-height: 44px;
  white-space: nowrap;
}

.past-idea-search-field {
  gap: 8px;
}

.past-chip-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.past-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.past-suggestion-chip-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.past-suggestion-chip-row::-webkit-scrollbar {
  display: none;
}

.past-suggestion-chip {
  appearance: none;
  flex: 0 0 auto;
  max-width: 180px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.past-suggestion-chip:hover,
.past-suggestion-chip.is-selected {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--ink);
}

.past-suggestion-chip span {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface);
  font-size: 0.68rem;
  overflow: hidden;
}

.past-suggestion-chip span img,
.past-search-result > span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.past-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  max-width: 100%;
  padding: 5px 7px 5px 9px;
  border-radius: var(--r-full);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.past-chip > span {
  width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  overflow: hidden;
}

.past-chip > span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.past-chip small {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.past-chip button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink-mute);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1;
}

.past-selected-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 8px 6px 12px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  color: var(--ink);
  font-weight: 800;
}

.past-selected-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.past-selected-pill button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink-mute);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
}

.past-selected-movie {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
}

.past-selected-movie > span:first-of-type {
  width: 34px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.past-selected-movie > span:first-of-type img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.past-selected-movie > span:nth-of-type(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.past-selected-movie strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 0.92rem;
}

.past-selected-movie small {
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-weight: 800;
}

.past-selected-movie button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--ink-mute);
  font: inherit;
  font-weight: 900;
  line-height: 1;
}

.past-search-results {
  display: grid;
  gap: 6px;
}

.past-search-result {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
  font: inherit;
}

.past-search-result:hover,
.past-search-result.is-selected {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.past-search-result > span {
  min-width: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 850;
  overflow: hidden;
}

.past-movie-search-result {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 58px;
}

.past-movie-search-result > span {
  width: 34px;
  height: 46px;
  border-radius: 6px;
}

.past-movie-search-result > span:nth-child(2) {
  width: auto;
  height: auto;
  min-width: 0;
  display: grid;
  gap: 3px;
  justify-content: stretch;
  background: transparent;
  border: 0;
  overflow: hidden;
}

.past-search-result strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.past-search-result small {
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-weight: 800;
}

@media (max-width: 480px) {
  .past-date-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .past-time-toggle {
    width: 100%;
  }

  .past-chip-input-row {
    grid-template-columns: 1fr;
  }

  .past-search-result {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .past-movie-search-result {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .past-search-result small {
    grid-column: 2;
  }
}

.name-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink);
  font-weight: 500;
}

.name-pill::before {
  content: none;
}

.name-pill.available::before {
  background: var(--free);
}

.name-pill.maybe::before {
  background: var(--maybe);
}

.name-pill.unavailable::before {
  background: var(--busy);
}

.name-pill.liked {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}

.member-meta {
  font-size: 0.72rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.member-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* =========================================================================
   Modal sheet (profile, planner, idea detail, group settings)
   ========================================================================= */

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 720px) {
  .modal-shell {
    align-items: center;
    padding: 32px;
  }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 10, 0.5);
  backdrop-filter: blur(6px);
  border: 0;
  cursor: pointer;
}

.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  display: grid;
  gap: 18px;
  overflow-y: auto;
  padding: 22px clamp(18px, 3vw, 28px) calc(28px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: sheet-in 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 720px) {
  .modal-sheet {
    border-radius: var(--r-xl);
    max-height: 88vh;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.sheet-header.idea-sheet-header {
  align-items: center;
  justify-content: flex-end;
}

.sheet-head-copy {
  display: grid;
  gap: 4px;
  flex: 1;
}

.sheet-head-copy h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.sheet-secondary {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-settings-section {
  display: grid;
  gap: 12px;
}

.group-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-home-area-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.group-home-area-card strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
}

.group-home-area-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.group-home-area-picker {
  display: grid;
  gap: 10px;
}

/* Profile / Me card */
.me-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.me-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Host tools */
.host-tools {
  display: grid;
  gap: 12px;
}

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

.host-reset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.host-reset-meta {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

/* =========================================================================

   Group welcome / invite
   ========================================================================= */

.group-welcome-shell,
.invite-shell {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
}

.invite-hero-panel {
  position: relative;
  display: grid;
  gap: 22px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--free) 14%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.invite-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.invite-badge-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.invite-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--bg);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.invite-badge-soft {
  background: var(--surface-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.invite-hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invite-action-button {
  font-size: 0.82rem;
}

.invite-hero-copy {
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.invite-hero-copy h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.025em;
}

.invite-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.invite-hero-lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 600px;
}

.invite-board-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.invite-board-snapshot span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--group-accent, var(--accent)) 18%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: var(--shadow-xs);
}

.invite-board-snapshot strong,
.invite-board-snapshot small,
.invite-board-snapshot em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-board-snapshot strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
}

.invite-board-snapshot small {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.invite-board-snapshot em {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.invite-crew-block {
  display: grid;
  gap: 10px;
}

.invite-members-bar h2 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.invite-members-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}

.invite-member-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.invite-member-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--line);
}

.invite-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--member-color, var(--accent)), color-mix(in srgb, var(--member-color, var(--accent)) 65%, #000));
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
}

.invite-member-copy {
  display: grid;
  gap: 0;
  font-size: 0.82rem;
}

.invite-entry-panel {
  display: grid;
  gap: 16px;
}

.invite-entry-head {
  display: grid;
  gap: 6px;
}

.invite-section-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.invite-entry-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.invite-join-stack {
  display: grid;
  gap: 12px;
}

.invite-lane-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--line);
  width: fit-content;
}

.invite-lane-switcher .invite-lane-button {
  border: 0;
  background: transparent;
  padding: 8px 16px;
}

.invite-lane-switcher .invite-lane-button.active {
  background: var(--ink);
  color: var(--bg);
}

.invite-form-shell {
  display: grid;
  gap: 14px;
}

.invite-form-meta strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
}

.invite-form-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.invite-form-actions {
  margin-top: 4px;
}

.invite-mode-row {
  margin-bottom: 4px;
}

/* =========================================================================
   Misc utilities
   ========================================================================= */

.idea-pick-list .idea-pick-pill,
.idea-pick-list-item .idea-pick-pill {
  margin-left: auto;
}

.idea-detail-section .button-row {
  margin-top: 4px;
}


.section-tabs button {
  white-space: nowrap;
}

.idea-summary-line + .idea-summary-line {
  margin-top: 2px;
}

/* =========================================================================
   Scrollbar polish (optional)
   ========================================================================= */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-full);
}

/* =========================================================================
   Small responsive tweaks
   ========================================================================= */

@media (max-width: 480px) {
  h1 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

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

  .plan-board-action {
    min-height: 96px;
  }

  .panel,
  .header-panel,
  .invite-hero-panel,
  .hub-hero-card,
  .modal-sheet {
    padding: 18px;
  }

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

  .next-hangout-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Print + reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================================
   Dark-mode surface hooks
   ========================================================================= */

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 14% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
      radial-gradient(circle at 110% 0%, color-mix(in srgb, var(--free) 10%, transparent), transparent 55%),
      var(--bg);
  }

  .button.ghost:hover:not(:disabled) {
    --btn-bg: color-mix(in srgb, var(--ink) 7%, transparent);
  }

  .day-scrubber-thumb {
    border-color: var(--ink);
    background: var(--surface);
  }

  .saved-group-card,
  .hub-action-card,
  .hub-stat-card,
  .matchup-card,
  .pick-card,
  .hangout-card,
  .proposal-card,
  .idea-card,
  .modal-sheet,
  .panel {
    background: var(--surface);
  }

  .saved-group-card.prominent {
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface));
  }

  .invite-hero-panel,
  .header-panel,
  .hub-hero-card,
  .hub-mini-apps,
  .landing-card {
    background:
      radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%),
      radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--free) 12%, transparent), transparent 60%),
      var(--surface);
  }
}

/* Personal home cascade guard. */
.afterours-shell.personal-home-v2 {
  min-height: 100svh;
  padding: 0 20px calc(104px + env(safe-area-inset-bottom));
  gap: 0;
  color: var(--home-ink);
  background: var(--home-paper);
}

.personal-home-v2 > .afterours-topbar {
  position: relative;
  top: auto;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 0 16px;
  background: transparent;
  backdrop-filter: none;
}

.personal-home-v2 .afterours-wordmark {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: var(--home-ink);
  background: transparent;
  box-shadow: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.055em;
  text-transform: none;
}

.personal-home-v2 .afterours-avatar-link {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
}

.personal-home-v2 > .afterours-bottom-nav {
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 12px;
  width: auto;
  height: 64px;
  padding: 6px 7px;
  border-radius: 20px;
  background: rgb(251 251 248 / 92%);
}

.personal-home-v2 > .afterours-bottom-nav a {
  display: flex;
  min-height: 0;
  padding: 5px 2px;
  border-radius: 14px;
  color: #898b84;
  background: transparent;
}

.personal-home-v2 > .afterours-bottom-nav a.active {
  color: var(--home-ink);
  background: #eef0e8;
}

@media (max-width: 420px) {
  .afterours-shell.personal-home-v2 { padding-inline: 14px; }
}

/* V3 true final cascade guard. */
.group-themed-shell .section-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  width: 100%;
  margin: 0;
  padding: 6px 0 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 0;
  border-bottom: 1px solid var(--v2-rule);
  border-radius: 0;
  background: rgb(251 250 246 / 96%);
  box-shadow: none;
  backdrop-filter: blur(14px);
}
.group-themed-shell .section-tabs .toggle-button {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--v2-muted);
  background: transparent;
}
.group-themed-shell .section-tabs .toggle-button.active {
  border-color: var(--v2-blue);
  color: var(--v2-blue);
  background: transparent;
}

.group-themed-shell .group-plan-v3 .pick-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--v2-rule);
  border-radius: 16px;
  color: var(--v2-ink);
  background: #fff;
  box-shadow: none;
}
.group-themed-shell .group-plan-v3 .pick-card strong { color: var(--v2-ink); }
.group-themed-shell .group-plan-v3 .pick-card .subtle-copy { color: var(--v2-muted); }
.group-themed-shell .group-plan-v3 .pick-card .pick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.group-themed-shell .group-plan-v3 .pick-card .pick-actions > span { margin-right: auto; }

.group-themed-shell .explore-visual-head,
.group-themed-shell .ideas-library-section,
.group-themed-shell .explore-board-layout,
.group-themed-shell .explore-board-panel {
  color: var(--v2-ink);
  background: transparent;
}
.group-themed-shell .explore-visual-head,
.group-themed-shell .ideas-library-section {
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--v2-rule);
  border-radius: 0;
  box-shadow: none;
}
.group-themed-shell .ideas-board-header,
.group-themed-shell .explore-board-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.group-themed-shell .ideas-title-block h2,
.group-themed-shell .explore-board-panel-head h3 {
  margin: 0;
  color: var(--v2-ink);
}
.group-themed-shell .ideas-count-line,
.group-themed-shell .explore-board-panel-head span { color: var(--v2-muted); }
.group-themed-shell .explore-board-layout { display: grid; gap: 18px; }
.group-themed-shell .explore-board-panel { display: grid; gap: 10px; }
.group-themed-shell .idea-empty-state.explore-empty-state {
  padding: 16px;
  border: 1px dashed var(--v2-rule);
  border-radius: 14px;
  color: var(--v2-muted);
  background: #fbfaf6;
}
.group-themed-shell .explore-board-movie-strip { display: grid; gap: 8px; }
.group-themed-shell .explore-movie-card {
  display: flex;
  width: 100%;
  padding: 10px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--v2-rule);
  border-radius: 14px;
  color: var(--v2-ink);
  background: #fff;
  text-align: left;
}
.group-themed-shell .explore-movie-card img,
.group-themed-shell .explore-movie-card > .explore-movie-poster-fallback {
  width: 42px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
  background: #eef0e8;
}
.group-themed-shell .explore-movie-card-copy { display: grid; min-width: 0; gap: 3px; }
.group-themed-shell .explore-movie-card-copy strong { color: var(--v2-ink); }
.group-themed-shell .explore-movie-card-copy small,
.group-themed-shell .explore-movie-card-copy > span { color: var(--v2-muted); }
.group-themed-shell .explore-tool-drawer {
  margin-top: 12px;
  border: 1px solid var(--v2-rule);
  border-radius: 14px;
  color: var(--v2-ink);
  background: #fff;
}
.group-themed-shell .explore-tool-drawer > summary {
  display: flex;
  min-height: 44px;
  padding: 10px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--v2-ink);
}
.group-themed-shell .explore-tool-drawer > summary > strong { color: var(--v2-muted); }
.group-themed-shell .explore-board-panel .button.ghost {
  border-color: var(--v2-rule);
  color: var(--v2-ink);
  background: #fff;
}

@media (max-width: 720px) {
  .personal-library-command { grid-template-columns: minmax(0, 1fr); }
  .personal-library-command > .button { width: 100%; }
}

/* Afterours V4 Library — unified saved things, memories, discovery, and contexts. */
.library-v4-page {
  --library-paper: #fbfaf6;
  --library-ink: #171815;
  --library-muted: #777973;
  --library-line: #dfdfd8;
  --library-blue: #2f62e9;
  --library-blue-soft: #eef2ff;
  min-height: 100svh;
  padding: 0 20px calc(104px + env(safe-area-inset-bottom));
  color: var(--library-ink);
  background: var(--library-paper);
}
.library-v4-page > .afterours-topbar {
  position: relative;
  top: auto;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 0 15px;
  background: transparent;
  backdrop-filter: none;
}
.library-v4-page > .afterours-topbar .afterours-wordmark {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: var(--library-ink);
  background: transparent;
  box-shadow: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.055em;
  text-transform: none;
}
.library-v4-page > .afterours-topbar .afterours-avatar-link {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  color: #2f4137;
  background: #e8ede7;
  font-size: 11px;
}
.library-v4-page .v2-page-main {
  display: grid;
  width: min(100%, 720px);
  margin: 0 auto;
  gap: 0;
}
.library-v4-header { padding: 17px 0 20px; }
.library-v4-header h1 {
  margin: 0;
  color: var(--library-ink);
  font: 700 clamp(40px, 8vw, 52px)/.94 Georgia, "Times New Roman", serif;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.library-v4-header p {
  max-width: 540px;
  margin: 10px 0 0;
  color: var(--library-muted);
  font-size: 14px;
  line-height: 1.45;
}
.library-v4-search {
  display: flex;
  min-width: 0;
  min-height: 56px;
  padding: 0 10px 0 16px;
  align-items: center;
  gap: 10px;
  border: 1px solid #d9d9d2;
  border-radius: 18px;
  background: #fff;
}
.library-v4-search > .ph { flex: 0 0 auto; color: #72746f; font-size: 21px; }
.library-v4-search input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 0;
  border: 0;
  color: var(--library-ink);
  background: transparent;
  font-size: 14px;
}
.library-v4-search input::placeholder { color: #92938f; opacity: 1; }
.library-v4-search button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #696b66;
  background: #f0f0ec;
}
.library-v4-tabs {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #d9d9d2;
  border-radius: 15px;
  background: #fff;
}
.library-v4-tabs button {
  display: flex;
  min-width: 0;
  min-height: 50px;
  padding: 8px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 0;
  color: #666862;
  background: transparent;
  font-size: 12px;
  font-weight: 720;
}
.library-v4-tabs button + button { border-left: 1px solid #ecece7; }
.library-v4-tabs button.active { color: var(--library-blue); background: var(--library-blue-soft); }
.library-v4-tabs .ph { font-size: 18px; }
.library-context-rail {
  display: flex;
  margin: 14px 0 0;
  padding: 6px;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  border: 1px solid #deded7;
  border-radius: 16px;
  background: #fff;
  scrollbar-width: none;
}
.library-context-rail::-webkit-scrollbar { display: none; }
.library-context-rail button,
.library-context-rail a {
  display: flex;
  min-width: max-content;
  min-height: 44px;
  padding: 5px 11px 5px 6px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  color: #4f514d;
  background: transparent;
  text-decoration: none;
}
.library-context-rail button.selected { color: var(--library-ink); background: #f0f3fb; }
.library-context-rail button > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #254332;
  background: #dfe9df;
  font-size: 10px;
  font-weight: 800;
}
.library-context-rail button:nth-child(2) > span { color: #713726; background: #f7d8cd; }
.library-context-rail button:nth-child(n + 3) > span { color: #fff; background: var(--library-blue); }
.library-context-rail button img { width: 100%; height: 100%; object-fit: cover; }
.library-context-rail strong { color: inherit; font-size: 11px; white-space: nowrap; }
.library-context-rail a { margin-left: auto; padding-inline: 10px; color: var(--library-blue); }
.library-context-rail a .ph { font-size: 17px; }
.library-section-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.library-section-head > div { min-width: 0; }
.library-section-head h2 { margin: 0; color: var(--library-ink); font: 700 25px/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.library-section-head small { display: block; margin-bottom: 3px; color: var(--library-muted); font-size: 9px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.library-section-head > button {
  min-height: 40px;
  padding: 6px;
  border: 0;
  color: var(--library-blue);
  background: transparent;
  font-size: 12px;
  font-weight: 720;
}
.library-recommendations { padding: 28px 0 23px; border-bottom: 1px solid var(--library-line); }
.library-recommendations > div:last-child { display: grid; margin-top: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.library-recommendations > div:last-child > button {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: #e8ece7;
  text-align: left;
}
.library-recommendations > div:last-child > button > span { position: relative; display: grid; min-height: 148px; padding: 12px; align-content: end; overflow: hidden; }
.library-recommendations img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.72); }
.library-recommendations button > span > .ph { position: absolute; top: 14px; left: 14px; color: #506458; font-size: 28px; }
.library-recommendations strong,
.library-recommendations small { position: relative; z-index: 1; color: inherit; }
.library-recommendations strong { font-size: 15px; }
.library-recommendations small { margin-top: 3px; font-size: 10px; }
.unified-library-section { padding: 25px 0 0; }
.library-type-filter { position: relative; }
.library-type-filter > summary {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--library-line);
  border-radius: 50%;
  color: #555753;
  background: #fff;
}
.library-type-filter[open] > div {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 25;
  display: grid;
  width: 180px;
  padding: 7px;
  gap: 2px;
  border: 1px solid var(--library-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(20 22 18 / 12%);
}
.library-type-filter button { min-height: 40px; padding: 8px 10px; border: 0; border-radius: 9px; color: var(--library-ink); background: transparent; text-align: left; }
.library-type-filter button.active { color: var(--library-blue); background: var(--library-blue-soft); }
.unified-library-list { margin-top: 9px; border-top: 1px solid var(--library-line); }
.unified-library-row {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 68px;
  padding: 12px 38px 12px 0;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--library-line);
  color: var(--library-ink);
  background: transparent;
  text-decoration: none;
}
.library-row-media {
  display: grid;
  width: 50px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: var(--library-blue);
  background: #edf1fb;
  font-size: 22px;
}
.library-row-media.has-image { background: #ecece6; }
.library-row-media img { width: 100%; height: 100%; object-fit: cover; }
.library-row-copy { display: grid; min-width: 0; gap: 2px; }
.library-row-copy strong { overflow: hidden; color: var(--library-ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.library-row-copy small { overflow: hidden; color: var(--library-muted); font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.library-row-copy em { display: flex; margin-top: 2px; align-items: center; gap: 4px; overflow: hidden; color: var(--library-blue); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.library-row-context { display: flex; max-width: 105px; align-items: center; gap: 6px; color: #5c5e59; }
.library-row-context b { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #264334; background: #e2ebe3; font-size: 9px; }
.library-row-context.group b { color: #fff; background: var(--library-blue); }
.library-row-context small { overflow: hidden; color: inherit; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.library-row-go { position: absolute; right: 7px; color: #a0a29d; font-size: 15px; }
.library-row-menu { position: absolute; right: 2px; z-index: 2; }
.library-row-menu > summary { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #737570; }
.library-row-menu[open] > div { position: absolute; top: 38px; right: 0; z-index: 20; width: 180px; padding: 10px; border: 1px solid var(--library-line); border-radius: 13px; background: #fff; box-shadow: 0 12px 32px rgb(20 22 18 / 12%); }
.library-all-memories { display: flex; min-height: 50px; margin: 0 auto; padding: 8px 16px; align-items: center; gap: 7px; border: 0; color: var(--library-blue); background: transparent; font-size: 12px; font-weight: 720; }
.library-add-cta {
  display: flex;
  min-height: 52px;
  margin: 18px 0 4px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 17px;
  color: #fff;
  background: var(--library-blue);
  box-shadow: 0 9px 22px rgb(47 98 233 / 18%);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}
.library-add-cta .ph { font-size: 19px; }
.library-v4-empty { display: grid; min-height: 180px; padding: 30px 18px; place-items: center; align-content: center; gap: 7px; color: var(--library-muted); text-align: center; }
.library-v4-empty > .ph { color: #9a9c96; font-size: 30px; }
.library-v4-empty strong { color: var(--library-ink); font-size: 14px; }
.library-v4-empty small { max-width: 300px; color: var(--library-muted); font-size: 11px; line-height: 1.45; }
.library-discover-v4 { padding: 27px 0 0; }
.library-discover-v4 .personal-discover-body { margin-top: 13px; padding: 0; border: 0; background: transparent; }
.library-discover-v4 .personal-place-discovery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.library-v4-page > .afterours-bottom-nav {
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 12px;
  width: auto;
  height: 64px;
  padding: 6px 7px;
  border-radius: 20px;
  background: rgb(251 251 248 / 94%);
}
.library-v4-page > .afterours-bottom-nav a { display: flex; min-height: 0; padding: 5px 2px; border-radius: 14px; color: #898b84; background: transparent; }
.library-v4-page > .afterours-bottom-nav a.active { color: var(--library-blue); background: var(--library-blue-soft); }

@media (max-width: 420px) {
  .library-v4-page { padding-inline: 16px; }
  .library-v4-header h1 { font-size: 44px; }
  .library-v4-header p { font-size: 13px; }
  .library-context-rail button,
  .library-context-rail a { padding-right: 9px; }
  .library-row-context small { display: none; }
  .library-row-context { max-width: 32px; }
  .library-v4-tabs button { gap: 5px; font-size: 11px; }
  .library-recommendations > div:last-child > button > span { min-height: 136px; }
}

/* Afterours V14 Library — a quiet, connected catalog. */
.library-v4-page {
  --library-paper: #fbfaf7;
  --library-ink: #131410;
  --library-muted: #70716c;
  --library-line: #deded7;
  --library-blue: #315fe9;
  --library-blue-soft: #edf1ff;
  padding: 0 16px calc(106px + env(safe-area-inset-bottom));
}
.library-catalog-topbar {
  display: flex;
  width: min(100%, 720px);
  min-height: 82px;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
  align-items: center;
  justify-content: space-between;
}
.library-catalog-wordmark {
  color: var(--library-ink);
  font-size: 20px;
  font-weight: 820;
  letter-spacing: -.055em;
  text-decoration: none;
}
.library-catalog-topbar button {
  min-height: 44px;
  padding: 8px 0 8px 16px;
  border: 0;
  color: var(--library-blue);
  background: transparent;
  font-size: 14px;
  font-weight: 590;
}
.library-v4-page .v2-page-main { width: min(100%, 720px); }
.library-v4-header { padding: 22px 0 21px; }
.library-v4-header h1 { font-size: clamp(44px, 12vw, 54px); line-height: .9; }
.library-v4-search {
  min-height: 58px;
  padding-inline: 17px 10px;
  border-color: #d4d4ce;
  border-radius: 17px;
  box-shadow: 0 1px 0 rgb(25 25 20 / 2%);
}
.library-v4-search input { min-height: 56px; font-size: 15px; }
.library-v4-search > .ph { font-size: 23px; }
.library-v4-tabs {
  display: flex;
  margin-top: 12px;
  overflow-x: auto;
  border-color: #d5d5cf;
  border-radius: 14px;
  scrollbar-width: none;
}
.library-v4-tabs::-webkit-scrollbar { display: none; }
.library-v4-tabs button {
  min-width: max-content;
  min-height: 52px;
  padding: 10px 8px;
  flex: 1 0 auto;
  font-size: 11px;
  font-weight: 670;
  white-space: nowrap;
}
.library-v4-tabs button.active { color: var(--library-blue); background: linear-gradient(90deg, #edf1ff, #f5f6ff); }
.library-catalog-controls {
  display: flex;
  margin-top: 12px;
  align-items: center;
  gap: 8px;
  overflow: visible;
}
.library-catalog-controls > details { position: relative; min-width: 0; flex: 1 1 auto; }
.library-catalog-controls > details > summary {
  display: flex;
  min-width: 0;
  min-height: 46px;
  padding: 8px 11px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid #d9d9d2;
  border-radius: 14px;
  color: #666762;
  background: #fff;
  font-size: 11px;
  font-weight: 670;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-catalog-controls > details > summary .ph:first-child { color: #73746f; font-size: 17px; }
.library-catalog-controls > details > summary .ph:last-child { margin-left: auto; font-size: 12px; }
.library-control-menu {
  position: absolute;
  top: 51px;
  left: 0;
  z-index: 30;
  display: grid;
  width: max(172px, 100%);
  padding: 6px;
  gap: 2px;
  border: 1px solid var(--library-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 16px 38px rgb(19 20 16 / 14%);
}
.library-catalog-controls details:last-child .library-control-menu { right: 0; left: auto; }
.library-control-menu button {
  min-height: 41px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--library-ink);
  background: transparent;
  font-size: 12px;
  text-align: left;
}
.library-control-menu button.active { color: var(--library-blue); background: var(--library-blue-soft); }
.unified-library-section,
.library-memory-index { padding: 28px 0 0; }
.library-catalog-heading,
.library-memory-index > header {
  display: flex;
  min-height: 36px;
  align-items: baseline;
  gap: 10px;
}
.library-catalog-heading h2,
.library-memory-index > header h2 {
  margin: 0;
  font: 700 26px/1 Georgia, "Times New Roman", serif;
  letter-spacing: -.04em;
}
.library-catalog-heading > span:not(.library-place-toggle),
.library-memory-index > header > span { color: var(--library-muted); font-size: 12px; }
.library-memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.library-memory-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e0e0da;
  border-radius: 18px;
  color: var(--library-ink);
  background: #fff;
  text-decoration: none;
  box-shadow: 0 2px 10px rgb(25 27 21 / 4%);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.library-memory-card:active { transform: scale(.985); }
.library-memory-card.is-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(132px, .65fr);
}
.library-memory-grid.is-sparse { grid-template-columns: 1fr; }
.library-memory-grid.is-sparse .library-memory-card:not(.is-featured) {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
}
.library-memory-grid.is-sparse .library-memory-card:not(.is-featured) .library-memory-visual {
  min-height: 150px;
}
.library-memory-grid.is-sparse .library-memory-card:not(.is-featured) .library-memory-card-copy {
  align-content: center;
}
.library-memory-visual {
  position: relative;
  display: block;
  min-height: 136px;
  overflow: hidden;
  background: #e9ebe5;
}
.library-memory-card.is-featured .library-memory-visual { min-height: 210px; }
.library-memory-visual > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}
.library-memory-visual > em {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: inline-flex;
  min-height: 28px;
  padding: 0 9px;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  color: #fff;
  background: rgb(16 17 14 / 68%);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}
.library-memory-fallback {
  display: flex;
  min-height: inherit;
  padding: 18px;
  align-items: flex-start;
  justify-content: space-between;
  color: #6f776c;
  background:
    radial-gradient(circle at 90% 10%, rgb(255 255 255 / 68%), transparent 45%),
    linear-gradient(145deg, #e5ebe3, #f3eee4);
}
.library-memory-fallback b {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 62%);
  font-size: 13px;
}
.library-memory-fallback > i { align-self: flex-end; font-size: 27px; opacity: .7; }
.library-memory-card-copy {
  display: grid;
  gap: 5px;
  padding: 13px;
}
.library-memory-card.is-featured .library-memory-card-copy {
  align-content: center;
  padding: 18px;
}
.library-memory-card-copy small {
  color: var(--library-muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .015em;
}
.library-memory-card-copy strong {
  overflow-wrap: anywhere;
  font: 700 18px/1.05 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
}
.library-memory-card.is-featured .library-memory-card-copy strong { font-size: clamp(21px, 5vw, 28px); }
.library-memory-card-copy > span {
  color: #666762;
  font-size: 11px;
  line-height: 1.35;
}
.library-memory-card-copy .library-memory-people {
  display: flex;
  align-items: center;
  gap: 5px;
}
@media (max-width: 430px) {
  .library-memory-card.is-featured {
    display: block;
  }
  .library-memory-card.is-featured .library-memory-visual { min-height: 220px; }
  .library-memory-card.is-featured .library-memory-card-copy { padding: 15px; }
}
.library-place-toggle {
  display: flex;
  margin-left: auto;
  padding: 2px;
  border: 1px solid var(--library-line);
  border-radius: 10px;
  background: #fff;
}
.library-place-toggle button {
  display: grid;
  width: 34px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--library-muted);
  background: transparent;
}
.library-place-toggle button.active { color: var(--library-blue); background: var(--library-blue-soft); }
.unified-library-list { margin-top: 8px; }
button.unified-library-row,
.unified-library-row {
  width: 100%;
  min-height: 110px;
  padding: 12px 38px 12px 0;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--library-line);
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.unified-library-row.media { grid-template-columns: 64px minmax(0, 1fr); }
.library-row-media { width: 84px; height: 84px; border-radius: 12px; }
.library-row-media.media { width: 64px; height: 88px; }
.library-row-media img { object-position: center; }
.library-row-copy { gap: 3px; }
.library-row-copy strong { font-size: 16px; line-height: 1.15; }
.library-row-copy small { font-size: 12px; line-height: 1.35; }
.library-row-copy em { margin-top: 4px; font-size: 11px; line-height: 1.25; }
.library-row-go { right: 4px; font-size: 19px; }
.library-v4-empty { min-height: 250px; }
.library-v4-empty a,
.library-v4-empty button {
  min-height: 42px;
  margin-top: 8px;
  padding: 9px 15px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--library-blue);
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
}
.library-v4-page .nearby-map-wrap { margin-top: 10px; }
.library-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgb(15 16 13 / 42%);
  backdrop-filter: blur(3px);
}
.library-item-detail {
  position: fixed;
  right: max(10px, calc((100vw - 720px) / 2));
  bottom: 10px;
  left: max(10px, calc((100vw - 720px) / 2));
  z-index: 101;
  max-height: min(90svh, 820px);
  overflow: auto;
  border: 1px solid #dadad3;
  border-radius: 25px;
  background: var(--library-paper);
  box-shadow: 0 24px 80px rgb(12 13 10 / 26%);
}
.library-item-detail > header { position: relative; height: clamp(170px, 44vw, 280px); overflow: hidden; background: #eaede7; }
.library-item-detail > header > img { width: 100%; height: 100%; object-fit: cover; }
.library-item-detail > header > span { display: grid; height: 100%; place-items: center; color: var(--library-blue); font-size: 54px; }
.library-item-detail > header > button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 43px;
  height: 43px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(30 31 26 / 12%);
  border-radius: 50%;
  color: var(--library-ink);
  background: rgb(251 250 247 / 92%);
  font-size: 19px;
}
.library-detail-body { padding: 21px 18px calc(20px + env(safe-area-inset-bottom)); }
.library-detail-body > small { color: var(--library-blue); font-size: 10px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.library-detail-body > h2 { margin: 6px 0 0; font: 700 34px/.98 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.library-detail-body > p { margin: 10px 0 0; color: var(--library-muted); font-size: 13px; line-height: 1.5; }
.library-detail-meta { font-size: 12px !important; }
.library-detail-actions { display: flex; margin-top: 18px; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.library-detail-actions > button,
.library-detail-actions > a,
.library-detail-actions .personal-place-card-actions > button {
  display: flex;
  min-width: max-content;
  min-height: 44px;
  padding: 9px 13px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--library-line);
  border-radius: 13px;
  color: var(--library-ink);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.library-detail-actions > button.active,
.library-detail-actions .personal-place-card-actions > button.primary { border-color: var(--library-blue); color: var(--library-blue); background: var(--library-blue-soft); }
.library-detail-actions .personal-place-card-actions { display: contents; }
.library-detail-body > section { margin-top: 25px; }
.library-detail-body > section h3 { margin: 0 0 9px; font: 700 22px/1 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.library-detail-contexts { display: flex; gap: 8px; overflow-x: auto; }
.library-detail-contexts a { display: flex; min-width: max-content; min-height: 44px; padding: 6px 11px 6px 6px; align-items: center; gap: 8px; border: 1px solid var(--library-line); border-radius: 14px; color: var(--library-ink); background: #fff; font-size: 11px; text-decoration: none; }
.library-detail-contexts b { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; color: #fff; background: var(--library-blue); font-size: 9px; }
.library-detail-memories { border-top: 1px solid var(--library-line); }
.library-detail-memories > a { display: grid; min-height: 67px; padding: 9px 0; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--library-line); color: var(--library-ink); text-decoration: none; }
.library-detail-memories img,
.library-detail-memories > a > span:first-child { display: grid; width: 50px; height: 50px; place-items: center; object-fit: cover; border-radius: 10px; color: var(--library-blue); background: #edf1fb; }
.library-detail-memories > a > span:nth-child(2) { display: grid; gap: 3px; }
.library-detail-memories strong { font-size: 12px; }
.library-detail-memories small { color: var(--library-muted); font-size: 10px; }
.library-detail-empty { margin: 0; padding: 14px 0; color: var(--library-muted); font-size: 12px; border-top: 1px solid var(--library-line); }

@media (min-width: 640px) {
  .library-v4-page { padding-inline: 24px; }
  .library-item-detail { bottom: 20px; }
}

@media (max-width: 370px) {
  .library-v4-tabs button { padding-inline: 16px; }
  .library-catalog-controls > details > summary { padding-inline: 8px; gap: 5px; }
}

/* Keep compact group rows intact after the legacy board-card rules above. */
.v2-circles-page .afterours-group-board-actions {
  grid-column: auto;
  justify-content: flex-end;
}

.v2-circles-page .afterours-group-board-actions small {
  max-width: 76px;
  text-align: right;
}

.v2-circles-page .afterours-group-board-actions button { flex: 0 0 auto; }

@media (max-width: 370px) {
  .v2-circles-page .afterours-group-board-card {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .v2-circles-page .afterours-context-avatar { width: 44px; height: 44px; }
  .v2-circles-page .afterours-group-board-actions small { display: none; }
}

/* V5 product-system guard: authenticated surfaces share one light foundation. */
body:has(.afterours-shell),
body:has(.group-themed-shell) { background: #fbfaf6 !important; }

.app-shell:has(.afterours-shell),
.app-shell:has(.group-themed-shell) { background: #fbfaf6; }

.afterours-shell,
.group-themed-shell {
  --bg: #fbfaf6;
  --surface: #fff;
  --surface-2: #f1f2ed;
  --ink: #171713;
  --ink-soft: #555750;
  --ink-mute: #777973;
  --line: #deded7;
  --accent: #2f62e9;
  --accent-soft: #edf2ff;
  --shadow-xs: 0 5px 18px rgb(25 26 21 / 6%);
}

.media-v5-page {
  min-height: 100svh;
  padding: 0 20px calc(104px + env(safe-area-inset-bottom));
  color: var(--v2-ink);
  background: var(--v2-paper);
}

.media-v5-page > .afterours-topbar,
.nearby-discover-page > .afterours-topbar {
  position: relative;
  top: auto;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 0 15px;
  background: transparent;
  backdrop-filter: none;
}

.media-v5-page > .afterours-topbar .afterours-wordmark,
.nearby-discover-page > .afterours-topbar .afterours-wordmark {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: var(--v2-ink, var(--nearby-ink));
  background: transparent;
  box-shadow: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.055em;
  text-transform: none;
}

.media-v5-page > .afterours-topbar .afterours-avatar-link,
.nearby-discover-page > .afterours-topbar .afterours-avatar-link {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid #dfe1da;
  border-radius: 50%;
  color: #2f4137;
  background: #e8ede7;
  box-shadow: none;
  font-size: 11px;
}

.media-v5-page > .afterours-page-hero {
  margin: 4px 0 20px;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--v2-rule);
  border-radius: 0;
  color: var(--v2-ink);
  background: transparent;
  box-shadow: none;
}

.media-v5-page .afterours-hero-copy .mono-tag { color: var(--v2-blue); background: var(--v2-blue-soft); }
.media-v5-page .afterours-hero-copy h1 { color: var(--v2-ink); }
.media-v5-page .afterours-hero-copy p { color: var(--v2-muted); }
.media-v5-page .afterours-hero-stats span { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }
.media-v5-page .afterours-hero-stats small { color: var(--v2-muted); }
.media-v5-page .afterours-hero-actions .primary { border-color: var(--v2-blue); color: #fff; background: var(--v2-blue); }
.media-v5-page .afterours-hero-actions .ghost { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }
.media-v5-page .personal-media-quick-actions a,
.media-v5-page .personal-media-command-card { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; box-shadow: none; }
.media-v5-page .personal-media-quick-actions span[aria-hidden="true"] { color: var(--v2-blue); background: var(--v2-blue-soft); }
.media-v5-page .personal-media-quick-actions small,
.media-v5-page .personal-media-source-note { color: var(--v2-muted); }
.media-v5-page .personal-media-tabs button { border-color: var(--v2-rule); color: var(--v2-muted); background: #f3f3ee; }
.media-v5-page .personal-media-tabs button.active { border-color: #9eb4f5; color: var(--v2-blue); background: var(--v2-blue-soft); }
.media-v5-page .personal-media-gallery-copy strong { color: var(--v2-ink); }
.media-v5-page .personal-media-gallery-copy small { color: var(--v2-muted); }
.media-v5-page .personal-media-gallery-actions button,
.media-v5-page .personal-media-gallery-share button { border-color: var(--v2-rule); color: var(--v2-ink); background: #fff; }
.personal-plans-v5 .afterours-greeting { display: none; }
.personal-plans-v5 .personal-plans-header h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.nearby-discover-page > .nearby-bottom-nav a.active {
  color: var(--nearby-blue) !important;
  background: var(--nearby-blue-soft) !important;
}

body:has(.modal-sheet) .afterours-bottom-nav,
body:has(.modal-sheet) .mobile-tab-bar {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 420px) {
  .media-v5-page { padding-inline: 16px; }
  .media-v5-page > .afterours-page-hero h1 { font-size: 42px; line-height: .96; }
}

/* V5 layouts intentionally bypass the legacy centered shell and dark heading rules. */
.app-shell:has(.nearby-discover-page),
.app-shell:has(.canon-admin-shell) {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body:has(.nearby-discover-page),
body:has(.canon-admin-shell) { background: #fbfaf6 !important; }

.nearby-detail-sheet > div > small { color: var(--nearby-muted); }
.nearby-detail-sheet h2 { color: var(--nearby-ink); }
.canon-admin-shell :is(h1, h2, strong) { color: var(--canon-ink); }
.canon-activity-list button.active strong { color: var(--canon-blue); }
