:root {
  color-scheme: light;
  --ink: #101820;
  --ink-soft: #36434a;
  --paper: #ffffff;
  --panel: #ffffff;
  --line: #dfe5df;
  --muted: #687579;
  --teal: #129c8a;
  --teal-dark: #087869;
  --coral: #ff6b5f;
  --lime: #d9f85c;
  --violet: #7662d9;
  --brand-blue: #03e1ff;
  --brand-violet: #9945ff;
  --brand-indigo: #5d5fef;
  --brand-green: #14f195;
  --danger: #c83f45;
  --shadow: 0 18px 55px rgba(16, 24, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(3, 225, 255, 0.08), transparent 310px),
    linear-gradient(135deg, rgba(153, 69, 255, 0.05), transparent 420px),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(3, 225, 255, 0.42);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 64px;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 22px;
  border-bottom: 1px solid rgba(223, 229, 223, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.topnav button,
.ghost-button,
.text-button {
  border: 0;
  background: transparent;
  color: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  text-align: left;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(93, 95, 239, 0.18);
  background: #fff;
  color: var(--brand-violet);
  box-shadow:
    0 10px 26px rgba(93, 95, 239, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-logo-loop {
  fill: none;
  stroke: var(--brand-violet);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-logo circle {
  fill: var(--brand-blue);
}

.brand-logo circle:nth-of-type(2) {
  fill: var(--brand-indigo);
}

.brand-logo circle:nth-of-type(3) {
  fill: var(--brand-violet);
}

.brand-logo .brand-logo-spark {
  fill: var(--brand-green);
}

.brand strong,
.brand small,
.account-chip span {
  display: block;
}

.brand small,
.account-chip span {
  color: var(--muted);
  font-size: 0.78rem;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.topnav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(223, 229, 223, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-soft);
  font-weight: 850;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.topnav button:hover,
.topnav button.is-active {
  border-color: rgba(18, 156, 138, 0.28);
  background: #fff;
  color: var(--teal-dark);
}

.topnav svg {
  width: 17px;
  height: 17px;
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.view {
  animation: fadeIn 0.16s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 20px;
}

.hero-copy {
  display: grid;
  align-content: center;
  min-height: 420px;
  padding: 30px 0;
}

.eyebrow,
.label {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p:not(.eyebrow),
.choice-card p,
.info-panel p,
.upload-panel p,
.empty-feed p,
.event-card p {
  color: var(--ink-soft);
  line-height: 1.58;
}

.hero-media {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 12px;
  min-height: 420px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(16, 24, 32, 0.08);
}

.hero-media img:last-child {
  align-self: end;
  height: 72%;
}

.choice-grid,
.split-layout,
.login-layout,
.creator-layout,
.join-layout,
.event-shell,
.button-row,
.button-grid,
.two-fields,
.event-list,
.feed-list {
  display: grid;
  gap: 16px;
}

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

.split-layout {
  grid-template-columns: minmax(300px, 0.85fr) minmax(340px, 1.15fr);
  align-items: start;
}

.login-layout {
  width: min(520px, 100%);
  margin: 36px auto 0;
}

.creator-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  margin-bottom: 16px;
}

.join-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(280px, 0.55fr);
  align-items: start;
}

.event-shell {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  align-items: start;
}

.event-hero-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 212px);
  align-items: start;
  gap: 20px;
}

.event-summary {
  min-width: 0;
}

.event-summary h2 {
  margin: 4px 0 10px;
  font-size: 2.35rem;
}

.event-hero-pills {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.event-invite {
  display: grid;
  justify-items: end;
  justify-self: end;
  gap: 10px;
  width: min(100%, 212px);
}

.event-sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 90px;
}

.panel,
.choice-card,
.post-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.panel,
.choice-card {
  padding: 20px;
}

.legal-view {
  display: grid;
  justify-items: center;
}

.legal-page {
  width: min(880px, 100%);
  padding: 28px;
}

.legal-page h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.legal-updated {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-page section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.legal-page section:first-of-type {
  margin-top: 8px;
}

.legal-page h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.legal-page p,
.legal-page li {
  color: var(--ink-soft);
  line-height: 1.64;
}

.legal-page p {
  margin-bottom: 0;
}

.legal-page ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

#pricingView .legal-page {
  width: min(1180px, 100%);
}

.pricing-plan-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 28px 0 30px;
}

.pricing-plan-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.86);
  color: #07111f;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  text-align: center;
}

.pricing-plan-card:hover {
  transform: translateY(-1px);
}

.pricing-plan-card.is-selected {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-violet), var(--brand-green));
  color: #fff;
  box-shadow: 0 18px 44px rgba(93, 95, 239, 0.24);
}

.pricing-plan-card span {
  font-size: 1.08rem;
  font-weight: 900;
}

.pricing-plan-card strong {
  margin-top: 4px;
  font-size: 1.7rem;
  line-height: 1.1;
}

.pricing-plan-card small {
  margin-top: 6px;
  color: currentColor;
  opacity: 0.78;
  font-weight: 760;
}

.pricing-plan-card em {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #5b21b6;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.pricing-comparison-card {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding-top: 28px;
}

.pricing-comparison-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.pricing-comparison-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.pricing-comparison-head p,
.pricing-note {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.pricing-comparison-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.pricing-table {
  display: grid;
  min-width: 780px;
}

.pricing-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.24fr) repeat(2, minmax(190px, 0.88fr));
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.pricing-row:first-child {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.pricing-feature,
.pricing-value {
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 14px 18px;
}

.pricing-feature {
  gap: 12px;
  color: #172033;
  font-weight: 760;
}

.pricing-feature svg {
  width: 20px;
  height: 20px;
  color: #87909a;
  flex: 0 0 auto;
}

.pricing-value {
  justify-content: center;
  color: #172033;
  font-weight: 780;
  text-align: center;
}

.pricing-value svg {
  width: 24px;
  height: 24px;
  color: #087869;
  stroke-width: 3;
}

.pricing-row-head .pricing-feature,
.pricing-row-head .pricing-value {
  min-height: 64px;
  color: #07111f;
  font-weight: 920;
}

.pricing-value.is-active {
  background: rgba(153, 69, 255, 0.1);
}

.pricing-row-head .pricing-value.is-active {
  border-radius: 8px 8px 0 0;
  background: rgba(153, 69, 255, 0.14);
}

.pricing-note {
  padding: 14px 16px;
  border: 1px solid rgba(3, 225, 255, 0.2);
  border-radius: 8px;
  background: rgba(3, 225, 255, 0.06);
}

@media (max-width: 760px) {
  .pricing-plan-switcher {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 22px 0 24px;
  }

  .pricing-plan-card {
    min-height: 104px;
  }

  .pricing-comparison-card {
    padding-top: 18px;
  }

  .pricing-comparison-head {
    align-items: start;
  }

  .pricing-table {
    min-width: 720px;
  }

  .pricing-row {
    grid-template-columns: minmax(260px, 1.15fr) repeat(2, minmax(170px, 0.9fr));
  }

  .pricing-feature,
  .pricing-value {
    min-height: 68px;
    padding: 12px 14px;
  }
}

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

.faq-list details {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.faq-list summary {
  cursor: pointer;
  padding: 15px 16px;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.25;
}

.faq-list details[open] summary {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.faq-list details p {
  margin: 0;
  padding: 14px 16px 16px;
}

.choice-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.choice-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: rgba(18, 156, 138, 0.12);
  color: var(--teal-dark);
}

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

.panel-heading,
.feed-header,
.post-head,
.event-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-heading h2,
.feed-header h2,
.choice-card h2,
.post-head h3 {
  margin: 0;
  letter-spacing: 0;
}

.compact {
  margin-bottom: 10px;
}

.auth-copy {
  margin: 0 0 16px;
  color: var(--ink-soft);
  line-height: 1.58;
}

.create-intro {
  display: grid;
  gap: 12px;
}

.create-intro p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.create-event-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.stack-form {
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(18, 156, 138, 0.18);
}

.segmented,
.plan-picker {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.plan-picker {
  grid-template-columns: 1fr 1fr;
}

.segmented legend,
.plan-picker legend {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-weight: 900;
}

.segmented label,
.plan-picker label {
  position: relative;
}

.segmented input,
.plan-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.segmented span,
.plan-picker span {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.plan-picker small,
.segmented strong {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.segmented input:checked + span,
.plan-picker input:checked + span {
  border-color: var(--teal);
  background: rgba(18, 156, 138, 0.11);
  color: var(--teal-dark);
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 900;
}

a.primary-button,
a.secondary-button,
a.ghost-button {
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.secondary-button {
  border: 1px solid rgba(18, 156, 138, 0.26);
  background: rgba(18, 156, 138, 0.12);
  color: var(--teal-dark);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.text-button {
  width: fit-content;
  padding: 2px 0;
  color: var(--teal-dark);
  font-weight: 900;
}

button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.status-pill,
.event-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 107, 95, 0.12);
  color: #a5322b;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.status-pill.is-ready,
.event-pill.is-ready,
.event-pill.is-premium {
  background: rgba(18, 156, 138, 0.12);
  color: var(--teal-dark);
}

.home-account {
  margin-top: 16px;
}

.event-list {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.event-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.event-card h3 {
  margin: 0 0 6px;
}

.event-card p {
  margin: 0 0 12px;
}

.event-card-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.event-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.event-card-actions .secondary-button,
.event-card-actions .ghost-button {
  min-height: 42px;
}

.event-delete-button {
  border: 1px solid rgba(143, 51, 43, 0.22);
  color: #8f332b;
}

.event-delete-button:hover,
.event-delete-button:focus-visible {
  background: rgba(143, 51, 43, 0.08);
}

.event-pill.is-role {
  background: rgba(118, 98, 217, 0.12);
  color: #5140a8;
}

.event-pill.is-access {
  background: rgba(16, 24, 32, 0.08);
  color: var(--ink);
  text-transform: capitalize;
}

.event-pill.is-free {
  background: rgba(16, 24, 32, 0.08);
  color: var(--ink-soft);
}

.event-pill.is-pending {
  background: rgba(255, 184, 77, 0.18);
  color: #93610e;
}

.scan-box {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px dashed rgba(18, 156, 138, 0.45);
  border-radius: 8px;
  background: rgba(18, 156, 138, 0.06);
}

.scan-box h3,
.manual-code-heading h3 {
  margin: 0;
}

.scan-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guest-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.guest-access-panel {
  display: grid;
  gap: 14px;
  border-color: rgba(18, 156, 138, 0.22);
  background:
    linear-gradient(135deg, rgba(20, 241, 149, 0.12), rgba(3, 225, 255, 0.08)),
    #fff;
}

.guest-access-panel .panel-heading {
  margin-bottom: 0;
}

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

.guest-access-panel h2 {
  line-height: 1.08;
}

.guest-access-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.qr-scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 24, 32, 0.78);
}

.qr-scan-panel {
  display: grid;
  width: min(100%, 520px);
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.qr-scan-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.qr-scan-head h3,
.qr-scan-panel p {
  margin: 0;
}

.qr-video-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #101820;
}

.qr-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-scan-frame {
  position: absolute;
  inset: 16%;
  border: 3px solid #d9f85c;
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(16, 24, 32, 0.24);
}

.qr-scan-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.manual-code-heading {
  display: grid;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.event-meta {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
}

.event-meta strong {
  color: var(--ink);
}

.qr-stage {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px dashed rgba(18, 156, 138, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(217, 248, 92, 0.18), transparent),
    #fff;
  text-align: center;
}

#qrCanvas {
  width: min(260px, 100%);
  height: auto;
  border-radius: 8px;
  background: #fff;
}

#qrLinkLabel {
  max-width: 100%;
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.event-invite .qr-stage {
  width: 100%;
  padding: 10px;
  gap: 6px;
}

.event-invite #qrCanvas {
  width: min(146px, 100%);
}

.event-invite #qrLinkLabel {
  display: none;
}

.qr-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.qr-actions .icon-button {
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-color: rgba(18, 156, 138, 0.24);
  background: rgba(18, 156, 138, 0.1);
  color: var(--teal-dark);
}

.payment-panel,
.upload-panel {
  display: grid;
  gap: 12px;
}

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

.payment-panel small {
  color: var(--muted);
  line-height: 1.45;
}

.usage-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ece8;
}

.usage-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--lime));
  transition: width 0.2s ease;
}

.feed-header {
  align-items: center;
  margin-bottom: 16px;
}

.feed-tools,
.feed-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-toggle {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feed-toggle .icon-button {
  min-width: 40px;
  border-color: transparent;
}

.feed-toggle .icon-button.is-active {
  border-color: rgba(18, 156, 138, 0.26);
  background: rgba(18, 156, 138, 0.12);
  color: var(--teal-dark);
}

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

.feed-list.is-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.photo-tile,
.post-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #eef2ee;
  color: inherit;
  text-align: left;
}

.photo-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
}

.photo-tile img,
.post-image-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-tile-meta {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 22px 8px 8px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
  background: linear-gradient(180deg, transparent, rgba(16, 24, 32, 0.68));
}

.photo-tile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.photo-tile-meta svg {
  width: 15px;
  height: 15px;
}

.post-card {
  overflow: hidden;
}

.post-head,
.post-actions,
.comments,
.comment-form {
  padding: 12px 14px;
}

.post-head {
  align-items: center;
}

.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-weight: 900;
  text-transform: uppercase;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-author small,
.post-time,
.comment small {
  color: var(--muted);
}

.post-image {
  width: 100%;
  max-height: 780px;
  object-fit: cover;
  background: #eef2ee;
}

.post-image-button .post-image {
  height: auto;
}

.post-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.icon-button {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.icon-button.is-liked {
  border-color: rgba(255, 107, 95, 0.35);
  background: rgba(255, 107, 95, 0.12);
  color: #a5322b;
}

.comment-count {
  min-height: 38px;
  padding: 0 4px;
}

.moderation-action {
  color: #8f332b;
}

.comment-count + .moderation-action {
  margin-left: auto;
}

.moderation-action svg {
  width: 16px;
  height: 16px;
}

.comments {
  display: grid;
  gap: 8px;
}

.comment {
  padding: 9px 10px;
  border-radius: 8px;
  background: #f6f7f2;
}

.comment-head,
.mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-head {
  justify-content: space-between;
}

.comment-head span:first-child {
  min-width: 0;
}

.comment-actions,
.mini-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.comment-actions .icon-button,
.mini-actions .icon-button {
  min-width: 34px;
  min-height: 34px;
  padding: 0 8px;
}

.danger-button {
  border-color: rgba(143, 51, 43, 0.24);
  background: rgba(143, 51, 43, 0.08);
  color: #8f332b;
}

.comment p {
  margin: 3px 0 0;
  color: var(--ink-soft);
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.comment-form input {
  min-height: 40px;
}

.access-panel,
.moderation-panel {
  gap: 12px;
}

.access-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.access-toggle .is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.pending-list,
.hidden-post-list {
  display: grid;
  gap: 8px;
}

.mini-row {
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-row > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mini-row small {
  color: var(--muted);
}

.mini-row img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: #eef2ee;
}

.empty-feed {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.site-footer {
  border-top: 1px solid rgba(223, 229, 223, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), #fff);
}

.footer-inner {
  display: grid;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 22px;
  gap: 26px;
}

.footer-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  max-width: 420px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 6px;
}

.footer-brand p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.55;
}

.footer-brand p {
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.footer-links section {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.84rem;
  letter-spacing: 0;
}

.footer-links a,
.footer-links button,
.footer-links span {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--teal-dark);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

body.modal-open {
  overflow: hidden;
}

.post-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.post-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 32, 0.68);
  backdrop-filter: blur(8px);
}

.post-modal-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1040px, 100%);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.post-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 12px;
  border-bottom: 1px solid var(--line);
}

.post-modal-top .post-head {
  flex: 1;
}

.post-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  min-height: 0;
  overflow: hidden;
}

.post-modal-image-frame {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  background: var(--ink);
}

.post-modal-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 118px);
  object-fit: contain;
}

.post-modal-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100% - 36px));
  padding: 13px 15px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.upload-activity {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 39;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  width: min(390px, calc(100% - 36px));
  padding: 14px;
  border: 1px solid rgba(3, 225, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 20px 58px rgba(7, 17, 31, 0.2);
  color: #07111f;
  backdrop-filter: blur(16px) saturate(140%);
}

.upload-activity.hidden {
  display: none;
}

.upload-activity-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(3, 225, 255, 0.16), rgba(153, 69, 255, 0.18));
  color: #5d5fef;
}

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

.upload-activity-content,
.upload-activity-heading {
  min-width: 0;
}

.upload-activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-activity-heading strong,
.upload-activity-heading span {
  font-size: 0.88rem;
  line-height: 1.2;
}

.upload-activity-heading span {
  flex: 0 0 auto;
  color: #087f7a;
  font-weight: 850;
}

.upload-activity-track {
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.09);
}

.upload-activity-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-violet), var(--brand-green));
  transition: width 0.18s ease;
}

.upload-activity p,
.upload-activity small {
  display: block;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-activity small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.upload-activity.is-complete .upload-activity-icon {
  background: rgba(20, 241, 149, 0.15);
  color: #087f7a;
}

.upload-activity.is-error .upload-activity-icon {
  background: rgba(220, 38, 38, 0.1);
  color: #b42318;
}

.upload-activity.is-complete small,
.upload-activity.is-error small {
  display: none;
}

@media (max-width: 960px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topnav {
    order: 3;
    width: 100%;
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .topnav button {
    flex: 1;
  }

  .hero,
  .split-layout,
  .login-layout,
  .creator-layout,
  .join-layout,
  .event-shell,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-media {
    min-height: auto;
  }

  .hero-media {
    grid-template-columns: 1fr 1fr;
    min-height: 260px;
  }

  .event-sidebar {
    position: static;
  }

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

  .post-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, min(54vh, 520px)) auto;
    overflow: auto;
  }

  .post-modal-image-frame {
    height: min(54vh, 520px);
  }

  .post-modal-image {
    width: auto;
    height: auto;
    max-height: min(54vh, 520px);
  }

  .post-modal-content {
    overflow: visible;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 18px, 560px);
    padding-top: 18px;
  }

  .event-hero-card {
    grid-template-columns: 1fr;
  }

  .event-invite {
    justify-items: start;
    justify-self: start;
  }

  .qr-actions {
    justify-content: flex-start;
  }

  .topbar {
    padding: 11px;
  }

  .brand {
    flex: 1;
  }

  .account-chip {
    width: 100%;
    justify-content: space-between;
  }

  .topnav {
    gap: 8px;
  }

  .topnav button {
    min-height: 40px;
    padding: 0 10px;
    font-size: 0.86rem;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .event-summary h2 {
    font-size: 1.9rem;
  }

  .feed-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .feed-tools {
    width: 100%;
    justify-content: space-between;
  }

  .feed-toggle .icon-button {
    min-width: 42px;
  }

  .post-modal {
    padding: 8px;
  }

  .post-modal-dialog {
    max-height: calc(100vh - 16px);
  }

  .post-modal-top {
    padding-right: 8px;
  }

  .post-modal-image {
    height: auto;
    max-height: min(48vh, 460px);
  }

  .hero-media,
  .segmented,
  .plan-picker,
  .two-fields,
  .button-row,
  .button-grid,
  .comment-form {
    grid-template-columns: 1fr;
  }

  .panel,
  .choice-card {
    padding: 15px;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    padding: 26px 0 18px;
  }
}

/* Premium mobile-first redesign layer */
:root {
  --ink: #07111f;
  --ink-soft: #334155;
  --paper: #fbfcff;
  --panel: rgba(255, 255, 255, 0.92);
  --line: rgba(15, 23, 42, 0.1);
  --muted: #64748b;
  --teal: #18c7b8;
  --teal-dark: #087f7a;
  --coral: #f97362;
  --lime: #14f195;
  --violet: #9945ff;
  --brand-blue: #03e1ff;
  --brand-violet: #9945ff;
  --brand-indigo: #5d5fef;
  --brand-green: #14f195;
  --danger: #dc3545;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-tint: #f3f7ff;
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 34px rgba(15, 23, 42, 0.08);
  --ring: 0 0 0 4px rgba(3, 225, 255, 0.16);
}

body {
  min-height: 100vh;
  background:
    linear-gradient(160deg, rgba(3, 225, 255, 0.1) 0%, transparent 28%),
    linear-gradient(24deg, transparent 0%, rgba(153, 69, 255, 0.08) 46%, transparent 73%),
    linear-gradient(180deg, #fff 0%, #f8fbff 58%, #ffffff 100%);
  color: var(--ink);
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0 0 auto;
  z-index: -1;
  height: 420px;
  background:
    linear-gradient(100deg, rgba(20, 241, 149, 0.12), rgba(3, 225, 255, 0.1) 38%, rgba(153, 69, 255, 0.11) 68%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0), #fbfcff 88%);
  content: "";
  pointer-events: none;
}

main {
  width: min(1200px, calc(100% - 36px));
  padding: 34px 0 88px;
}

.topbar {
  top: 12px;
  width: min(1200px, calc(100% - 28px));
  margin: 12px auto 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    0 20px 60px rgba(15, 23, 42, 0.09),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(24px) saturate(150%);
}

.brand {
  min-width: 190px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(153, 69, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(3, 225, 255, 0.75), rgba(153, 69, 255, 0.7), rgba(20, 241, 149, 0.55)) border-box;
  box-shadow:
    0 12px 30px rgba(93, 95, 239, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.brand strong {
  font-size: 1.04rem;
  line-height: 1.05;
}

.brand small,
.account-chip span {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.76rem;
}

.topnav {
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.topnav button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  box-shadow: none;
  font-size: 0.92rem;
  font-weight: 860;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.topnav button:hover,
.topnav button.is-active {
  background: #fff;
  color: #17182f;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.mobile-nav {
  display: none;
}

.mobile-nav button {
  border: 0;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 860;
  line-height: 1.05;
}

.account-chip {
  min-width: 232px;
  justify-content: flex-end;
}

.hero {
  position: relative;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 34px;
  align-items: center;
  margin: 4px 0 24px;
  padding: 18px 0 8px;
}

.hero-copy {
  min-height: 520px;
  padding: 30px 0;
}

.eyebrow,
.label {
  color: #087f7a;
  font-size: 0.74rem;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: 4.9rem;
  font-weight: 930;
  line-height: 0.94;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 650px;
  color: #334155;
  font-size: 1.13rem;
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-cta {
  min-height: 52px;
  padding: 0 20px;
}

.hero-media {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.56fr);
  min-height: 520px;
  gap: 14px;
}

.hero-photo {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: #eef3ff;
  box-shadow: var(--shadow);
}

.hero-photo-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 18%, rgba(36, 210, 255, 0.45), transparent 26%),
    radial-gradient(circle at 74% 28%, rgba(158, 79, 255, 0.42), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(226, 255, 246, 0.76) 42%, rgba(241, 231, 255, 0.86));
}

.hero-photo-art::before {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hero-photo-art::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: 20%;
  width: 42%;
  aspect-ratio: 1;
  border: 10px solid rgba(5, 13, 27, 0.88);
  border-radius: 8px;
  box-shadow:
    -52px -34px 0 -32px rgba(5, 13, 27, 0.88),
    -18px 42px 0 -30px rgba(5, 13, 27, 0.88),
    34px -48px 0 -30px rgba(5, 13, 27, 0.88);
}

.hero-art-orbit,
.hero-art-tile,
.hero-art-thread,
.hero-art-dot {
  position: absolute;
  display: block;
}

.hero-art-orbit {
  border: 2px solid rgba(5, 13, 27, 0.16);
  border-radius: 999px;
}

.hero-art-orbit-a {
  left: 12%;
  top: 16%;
  width: 48%;
  aspect-ratio: 1.45;
  transform: rotate(-11deg);
}

.hero-art-orbit-b {
  right: 14%;
  top: 38%;
  width: 42%;
  aspect-ratio: 1.6;
  transform: rotate(17deg);
}

.hero-art-tile {
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.hero-art-tile-a {
  left: 14%;
  bottom: 20%;
  width: 28%;
  aspect-ratio: 1;
}

.hero-art-tile-b {
  left: 28%;
  top: 24%;
  width: 22%;
  aspect-ratio: 0.82;
}

.hero-art-tile-c {
  right: 16%;
  top: 18%;
  width: 24%;
  aspect-ratio: 1.18;
}

.hero-photo-art-side {
  background:
    radial-gradient(circle at 74% 20%, rgba(153, 78, 255, 0.45), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(220, 255, 251, 0.76), rgba(244, 236, 255, 0.92));
}

.hero-art-thread {
  left: 16%;
  top: 20%;
  width: 66%;
  height: 50%;
  border-radius: 8px;
  background:
    linear-gradient(rgba(5, 13, 27, 0.82), rgba(5, 13, 27, 0.82)) 18px 28px / 58% 8px no-repeat,
    linear-gradient(rgba(5, 13, 27, 0.34), rgba(5, 13, 27, 0.34)) 18px 54px / 78% 7px no-repeat,
    rgba(255, 255, 255, 0.64);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.hero-art-dot {
  width: 13px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0bdcc8;
  box-shadow: 0 0 0 8px rgba(11, 220, 200, 0.12);
}

.hero-art-dot-a {
  left: 20%;
  bottom: 24%;
}

.hero-art-dot-b {
  right: 26%;
  bottom: 30%;
  background: #9b5cff;
  box-shadow: 0 0 0 8px rgba(155, 92, 255, 0.13);
}

.hero-art-dot-c {
  right: 14%;
  top: 18%;
  background: #22c6f3;
  box-shadow: 0 0 0 8px rgba(34, 198, 243, 0.13);
}

.hero-photo img,
.hero-media img {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  transform: scale(1.01);
}

.hero-photo-main {
  min-height: 520px;
}

.hero-photo-side {
  align-self: end;
  height: 68%;
}

.hero-photo figcaption {
  position: absolute;
  inset: auto 14px 14px;
  display: grid;
  gap: 3px;
  max-width: calc(100% - 28px);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.58);
  color: white;
  backdrop-filter: blur(16px);
}

.hero-photo figcaption span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 760;
}

.hero-photo figcaption strong {
  font-size: 1rem;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
}

.home-stat-card {
  position: relative;
  display: grid;
  gap: var(--space-2);
  min-height: 132px;
  padding: clamp(18px, 2.4vw, 28px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px) saturate(145%);
}

.home-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-violet), var(--brand-green));
}

.home-stat-card strong {
  color: #07111f;
  font-size: clamp(2.3rem, 5.2vw, 4.3rem);
  font-weight: 940;
  line-height: 0.95;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.home-stat-card span {
  color: #475569;
  font-size: 0.94rem;
  font-weight: 900;
}

.choice-grid {
  gap: 14px;
}

.panel,
.choice-card,
.post-card,
.event-card,
.legal-page {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: var(--panel);
  box-shadow:
    0 20px 58px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.86) inset;
  backdrop-filter: blur(20px) saturate(145%);
}

.panel,
.choice-card {
  padding: 22px;
}

.choice-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
}

.choice-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-violet), var(--brand-green));
  content: "";
}

.choice-icon {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(3, 225, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(3, 225, 255, 0.13), rgba(153, 69, 255, 0.1));
  color: #4c2fe6;
}

.choice-card h2,
.panel-heading h2,
.feed-header h2 {
  color: #0f172a;
  font-weight: 910;
}

.choice-card p,
.info-panel p,
.upload-panel p,
.empty-feed p,
.event-card p,
.auth-copy,
.create-intro p,
.guest-note,
.scan-box p,
.payment-panel p,
.payment-panel small {
  color: #475569;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  border-radius: 999px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.primary-button {
  border: 0;
  background:
    linear-gradient(135deg, rgba(3, 225, 255, 0.95), rgba(153, 69, 255, 0.92) 56%, rgba(20, 241, 149, 0.86)),
    #17182f;
  color: #fff;
  box-shadow:
    0 15px 34px rgba(93, 95, 239, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.36) inset;
}

.secondary-button {
  border: 1px solid rgba(3, 225, 255, 0.26);
  background: rgba(255, 255, 255, 0.78);
  color: #087f7a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ghost-button,
.icon-button {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
}

.text-button {
  color: #087f7a;
}

input {
  min-height: 50px;
  border: 1px solid rgba(15, 23, 42, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

input:focus {
  border-color: rgba(3, 225, 255, 0.78);
  outline: 0;
  box-shadow: var(--ring);
}

.segmented span,
.plan-picker span {
  border-color: rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.segmented input:checked + span,
.plan-picker input:checked + span {
  border-color: rgba(3, 225, 255, 0.38);
  background: linear-gradient(135deg, rgba(3, 225, 255, 0.12), rgba(20, 241, 149, 0.1));
  color: #075f62;
  box-shadow: 0 10px 24px rgba(3, 225, 255, 0.1);
}

.status-pill,
.event-pill {
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(248, 250, 252, 0.9);
  color: #475569;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.event-pill.is-role {
  border-color: rgba(153, 69, 255, 0.16);
  background: rgba(153, 69, 255, 0.1);
  color: #5b21b6;
}

.event-pill.is-access {
  border-color: rgba(3, 225, 255, 0.18);
  background: rgba(3, 225, 255, 0.1);
  color: #03696d;
}

.event-pill.is-free {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.8);
}

.status-pill.is-ready,
.event-pill.is-ready,
.event-pill.is-premium {
  border-color: rgba(20, 241, 149, 0.22);
  background: rgba(20, 241, 149, 0.12);
  color: #047857;
}

.event-pill.is-pending,
.status-pill.is-pending {
  border-color: rgba(249, 115, 98, 0.2);
  background: rgba(249, 115, 98, 0.1);
  color: #a33b2d;
}

.login-layout,
.creator-layout,
.join-layout {
  margin-top: 18px;
}

.auth-panel,
.create-panel,
.join-layout > .panel {
  position: relative;
  overflow: hidden;
}

.auth-panel::before,
.create-panel::before,
.join-layout > .panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-violet), var(--brand-green));
  content: "";
}

.scan-box,
.qr-stage {
  border-color: rgba(3, 225, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(20, 241, 149, 0.13), rgba(3, 225, 255, 0.08) 44%, rgba(153, 69, 255, 0.08)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.event-shell {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.event-hero-card {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 240px);
  padding: 26px;
}

.event-hero-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-violet), var(--brand-green));
  content: "";
}

.event-summary h2 {
  margin: 2px 0 12px;
  color: #07111f;
  font-size: 2.7rem;
  font-weight: 930;
  line-height: 1;
  letter-spacing: 0;
}

.event-meta {
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 8px 10px;
}

.event-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  width: fit-content;
  padding: 0 10px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  font-size: 0.92rem;
}

.event-meta strong {
  color: #17182f;
}

.event-invite {
  width: min(100%, 240px);
}

.event-invite .qr-stage {
  padding: 12px;
}

.event-invite #qrCanvas {
  width: min(156px, 100%);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.qr-stage strong {
  color: #0f172a;
  font-size: 1.06rem;
}

.qr-actions {
  justify-content: center;
}

.qr-actions .icon-button {
  width: 48px;
  height: 48px;
  border-color: rgba(3, 225, 255, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: #087f7a;
}

.event-sidebar {
  gap: 14px;
}

.upload-panel {
  background:
    linear-gradient(140deg, rgba(20, 241, 149, 0.08), rgba(3, 225, 255, 0.07)),
    rgba(255, 255, 255, 0.9);
}

.usage-bar {
  height: 12px;
  background: rgba(15, 23, 42, 0.08);
}

.usage-bar span {
  background: linear-gradient(90deg, var(--brand-green), var(--brand-blue), var(--brand-violet));
}

.feed-column {
  min-width: 0;
}

.feed-header {
  position: sticky;
  top: 86px;
  z-index: 9;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(18px) saturate(150%);
}

.feed-toggle {
  border-color: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.82);
}

.feed-toggle .icon-button {
  border-radius: 999px;
}

.feed-toggle .icon-button.is-active {
  border-color: transparent;
  background: #07111f;
  color: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
}

.feed-list {
  gap: 18px;
}

.feed-list.is-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.photo-tile {
  border-radius: 8px;
  background: #eaf0fb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  isolation: isolate;
}

.photo-tile::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(7, 17, 31, 0.72));
  content: "";
  opacity: 0;
  transition: opacity 0.18s ease;
}

.photo-tile-meta {
  z-index: 1;
  padding: 26px 8px 10px;
  background: transparent;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.post-card {
  overflow: hidden;
  background: #fff;
}

.post-head {
  padding: 14px;
}

.post-image {
  max-height: 820px;
  background: #eaf0fb;
}

.post-actions {
  padding: 12px 14px;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.avatar {
  background:
    linear-gradient(135deg, rgba(3, 225, 255, 0.95), rgba(153, 69, 255, 0.9)),
    #07111f;
  color: white;
  box-shadow: 0 10px 24px rgba(93, 95, 239, 0.22);
}

.icon-button.is-liked {
  border-color: rgba(249, 115, 98, 0.22);
  background: rgba(249, 115, 98, 0.1);
  color: #d54437;
}

.comments {
  padding: 12px 14px;
}

.comment {
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #f8fafc;
}

.comment-form {
  padding: 12px 14px 14px;
  border-top-color: rgba(15, 23, 42, 0.08);
}

.comment-form input {
  min-height: 44px;
}

.empty-feed {
  min-height: 240px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  border-color: rgba(3, 225, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(20, 241, 149, 0.08), rgba(3, 225, 255, 0.08), rgba(153, 69, 255, 0.06)),
    rgba(255, 255, 255, 0.78);
}

.mini-row {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.site-footer {
  margin-top: 22px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.72), #ffffff),
    #fff;
}

.footer-inner {
  width: min(1200px, calc(100% - 36px));
  padding: 42px 0 28px;
}

.footer-links section {
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.post-modal-backdrop {
  background: rgba(7, 17, 31, 0.72);
  backdrop-filter: blur(18px);
}

.post-modal-dialog {
  width: min(1120px, 100%);
  border-radius: 8px;
  box-shadow: 0 30px 92px rgba(7, 17, 31, 0.28);
}

.post-modal-image-frame {
  background:
    linear-gradient(135deg, rgba(3, 225, 255, 0.12), rgba(153, 69, 255, 0.12)),
    #07111f;
}

.post-modal-content {
  background: #fff;
}

.toast {
  border-radius: 8px;
  background: #07111f;
  box-shadow: 0 20px 58px rgba(7, 17, 31, 0.22);
}

@media (hover: hover) and (pointer: fine) {
  .primary-button:hover,
  .secondary-button:hover,
  .ghost-button:hover,
  .icon-button:hover,
  .choice-card:hover,
  .event-card:hover {
    transform: translateY(-2px);
  }

  .photo-tile:hover::after,
  .photo-tile:hover .photo-tile-meta {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 960px) {
  main {
    width: min(100% - 24px, 720px);
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
  }

  .topbar {
    top: 8px;
    flex-wrap: nowrap;
    width: calc(100% - 18px);
    margin-top: 8px;
    padding: 8px;
    backdrop-filter: none;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand small,
  .account-chip span {
    display: none;
  }

  .account-chip {
    width: auto;
    min-width: 0;
  }

  .account-chip .ghost-button {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    gap: 0;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    line-height: 1;
    overflow: hidden;
  }

  .account-chip .ghost-button svg {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 20px;
    height: 20px;
    margin: 0;
    transform: translate(-50%, -50%);
  }

  .topnav {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 30;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    padding: 7px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 20px 70px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(22px) saturate(150%);
  }

  .mobile-nav button {
    display: grid;
    flex: 1;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 5px 4px;
    font-size: 0.72rem;
    line-height: 1.05;
  }

  .mobile-nav button.is-active {
    border-radius: 7px;
    background: #fff;
    color: #17182f;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
  }

  .mobile-nav svg {
    width: 19px;
    height: 19px;
    margin: 0 auto;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 10px;
  }

  .hero-copy {
    min-height: auto;
    padding: 20px 0 0;
  }

  .hero h1 {
    max-width: 560px;
    font-size: 3.45rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 1.02rem;
  }

  .hero-media {
    grid-template-columns: 1fr 0.58fr;
    min-height: 340px;
  }

  .hero-photo-main {
    min-height: 340px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .event-shell,
  .choice-grid,
  .join-layout {
    grid-template-columns: 1fr;
  }

  .event-sidebar {
    position: static;
  }

  .feed-header {
    top: 72px;
  }

  .footer-inner {
    width: min(100% - 24px, 720px);
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 18px, 560px);
    padding-top: 18px;
  }

  .hero h1 {
    font-size: 2.85rem;
    line-height: 0.98;
  }

  .hero-media {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-photo-main,
  .hero-photo-side {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .hero-photo-side {
    display: none;
  }

  .hero-actions,
  .button-row,
  .button-grid,
  .two-fields,
  .segmented,
  .plan-picker,
  .comment-form {
    grid-template-columns: 1fr;
  }

  .panel,
  .choice-card {
    padding: 17px;
  }

  .choice-card {
    min-height: auto;
  }

  .event-hero-card {
    grid-template-columns: 1fr;
    padding: 19px;
  }

  .event-summary h2 {
    font-size: 2.05rem;
  }

  .event-meta {
    grid-template-columns: 1fr;
  }

  .event-meta span {
    width: 100%;
    justify-content: center;
  }

  .event-invite {
    justify-self: stretch;
    justify-items: center;
    width: 100%;
  }

  .event-invite .qr-stage {
    width: min(100%, 240px);
  }

  .event-invite #qrCanvas {
    width: min(150px, 100%);
  }

  .event-invite .qr-stage {
    padding: 10px;
    gap: 6px;
  }

  .qr-actions .icon-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .feed-header {
    position: static;
    align-items: stretch;
    gap: 12px;
    padding: 10px;
  }

  .feed-tools {
    width: 100%;
    justify-content: space-between;
  }

  .feed-toggle {
    flex: 1;
  }

  .feed-toggle .icon-button {
    flex: 1;
    min-width: 0;
  }

  .feed-list.is-grid {
    gap: 5px;
  }

  .photo-tile {
    border-radius: 5px;
    box-shadow: none;
  }

  .photo-tile::after,
  .photo-tile-meta {
    opacity: 1;
    transform: none;
  }

  .photo-tile-meta {
    gap: 8px;
    padding-bottom: 7px;
    font-size: 0.76rem;
  }

  .post-head,
  .post-actions,
  .comments,
  .comment-form {
    padding-right: 12px;
    padding-left: 12px;
  }

  .post-modal {
    padding: 7px;
  }

  .post-modal-dialog {
    max-height: calc(100vh - 14px);
  }

  .post-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, min(48vh, 460px)) minmax(0, 1fr);
  }

  .post-modal-image-frame {
    height: min(48vh, 460px);
  }

  .post-modal-image {
    max-height: min(48vh, 460px);
  }

  .post-modal-content {
    overflow: auto;
  }

  .footer-links {
    gap: 12px;
  }

  .footer-links section {
    padding: 14px;
  }
}

/* Compact event invite refinement */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.event-hero-card {
  grid-template-columns: minmax(0, 1fr) minmax(128px, 160px);
}

.event-invite {
  width: min(100%, 160px);
  align-content: start;
}

.event-invite .qr-stage {
  width: 100%;
  padding: 9px;
  gap: 0;
}

.qr-zoom-button {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  place-items: center;
}

.qr-zoom-button:hover {
  transform: none;
}

.event-invite #qrCanvas {
  width: min(116px, 100%);
}

.event-invite #qrCodeLabel,
.event-invite #qrLinkLabel {
  display: none;
}

.event-invite .qr-actions {
  justify-content: center;
  gap: 8px;
}

.event-invite .qr-actions .icon-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 18px;
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 31, 0.72);
  backdrop-filter: blur(18px);
}

.qr-modal-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(420px, 100%);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 92px rgba(7, 17, 31, 0.28);
}

.qr-modal-top {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.qr-modal-top strong {
  display: block;
  color: var(--ink);
  font-size: 1.3rem;
}

#qrModalCanvas {
  width: min(320px, 100%);
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.qr-modal-dialog p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.guest-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 62;
  display: grid;
  place-items: center;
  padding: 18px;
}

.guest-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 31, 0.7);
  backdrop-filter: blur(18px);
}

.guest-confirm-dialog {
  position: relative;
  display: grid;
  width: min(430px, 100%);
  gap: 14px;
  padding: clamp(20px, 5vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 92px rgba(7, 17, 31, 0.3);
}

.guest-confirm-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(18, 156, 138, 0.22);
  border-radius: 999px;
  background: rgba(18, 156, 138, 0.1);
  color: var(--teal-dark);
}

.guest-confirm-icon svg {
  width: 26px;
  height: 26px;
}

.guest-confirm-dialog h2 {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 8vw, 2.1rem);
  line-height: 1.02;
}

.guest-confirm-dialog p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.guest-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guest-confirm-actions.single-action {
  grid-template-columns: 1fr;
}

.turnstile-dialog {
  justify-items: center;
  text-align: center;
}

.turnstile-widget {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 72px;
}

.turnstile-widget > div {
  max-width: 100%;
}

.turnstile-status {
  min-height: 1.4em;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .event-hero-card {
    grid-template-columns: minmax(0, 1fr) 116px;
    align-items: start;
    gap: 12px;
  }

  .event-summary h2 {
    font-size: 1.85rem;
  }

  .event-hero-pills {
    justify-content: flex-start;
  }

  .event-meta {
    gap: 7px;
  }

  .event-meta span {
    justify-content: flex-start;
    min-height: 31px;
    padding: 0 9px;
    font-size: 0.82rem;
    text-align: left;
  }

  .event-invite {
    justify-self: end;
    justify-items: center;
    width: 116px;
  }

  .event-invite .qr-stage {
    width: 116px;
    padding: 7px;
  }

  .event-invite #qrCanvas {
    width: 94px;
  }

  .event-invite .qr-actions {
    gap: 7px;
  }

  .event-invite .qr-actions .icon-button {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .qr-modal {
    padding: 12px;
  }

  .qr-modal-dialog {
    padding: 16px;
  }
}

/* Usability polish: tighter copy, calmer rhythm, sturdier controls */
:root {
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
}

main {
  padding-top: clamp(18px, 3vw, 34px);
}

.view {
  scroll-margin-top: 112px;
}

.panel,
.choice-card {
  padding: clamp(18px, 2.2vw, 26px);
}

.panel-heading,
.feed-header,
.event-card-head,
.post-head {
  gap: var(--space-3);
}

.panel-heading {
  align-items: center;
  margin-bottom: var(--space-4);
}

.panel-heading > div,
.feed-header > div,
.event-summary {
  min-width: 0;
}

.panel-heading h2,
.feed-header h2,
.choice-card h2,
.post-head h3,
.payment-panel h2,
.upload-panel h2,
.access-panel h2,
.moderation-panel h2 {
  line-height: 1.08;
}

.label,
.eyebrow {
  margin-bottom: var(--space-1);
}

.hero {
  margin-bottom: var(--space-5);
}

.hero-copy {
  align-content: center;
  gap: var(--space-4);
}

.hero h1 {
  margin-bottom: 0;
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
}

.hero-actions {
  margin-top: 0;
}

.choice-grid {
  gap: var(--space-4);
}

.choice-card {
  grid-template-rows: auto auto 1fr auto;
  gap: var(--space-3);
  min-height: 226px;
}

.choice-card p,
.auth-copy,
.create-intro p,
.scan-box p,
.guest-note,
.info-panel p,
.payment-panel p,
.upload-panel p,
.moderation-panel p,
.access-panel p,
.empty-feed p {
  max-width: 62ch;
  margin: 0;
  line-height: 1.5;
}

.choice-card .primary-button,
.choice-card .secondary-button {
  justify-self: start;
  margin-top: var(--space-2);
}

.auth-panel,
.create-panel,
.join-layout > .panel,
.info-panel,
.upload-panel,
.payment-panel,
.access-panel,
.moderation-panel {
  display: grid;
  gap: var(--space-4);
}

.auth-panel .panel-heading,
.create-panel .panel-heading,
.join-layout .panel-heading {
  margin-bottom: 0;
}

.auth-copy {
  margin-bottom: 0;
}

.stack-form {
  gap: var(--space-4);
}

.button-row,
.button-grid {
  gap: var(--space-3);
  align-items: center;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  min-height: 46px;
  padding: 0 16px;
  gap: 9px;
  line-height: 1;
  white-space: nowrap;
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.icon-button svg,
.text-button svg,
.topnav svg,
.mobile-nav svg {
  display: block;
  flex: 0 0 auto;
}

.icon-button {
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  line-height: 1;
}

.create-intro {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
}

.create-event-form {
  margin-top: 0;
  padding-top: var(--space-5);
}

.segmented,
.plan-picker {
  gap: var(--space-3);
}

.segmented span,
.plan-picker span {
  min-height: 76px;
  padding: 13px 14px;
}

.plan-picker small,
.segmented strong,
.guest-note,
.payment-panel small,
.pending-list small,
.hidden-post-list small {
  line-height: 1.38;
}

.scan-box {
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding: clamp(16px, 2vw, 20px);
}

.manual-code-heading {
  gap: var(--space-1);
  padding-top: var(--space-5);
}

.event-shell {
  gap: var(--space-5);
}

.event-hero-card {
  gap: clamp(16px, 3vw, 34px);
}

.event-summary h2 {
  margin: var(--space-1) 0 var(--space-3);
}

.event-hero-pills {
  justify-content: flex-start;
  margin-bottom: var(--space-3);
}

.event-meta {
  gap: var(--space-2);
}

.event-meta span,
.event-pill,
.status-pill {
  line-height: 1.15;
  text-align: center;
}

.event-sidebar {
  gap: var(--space-4);
}

.access-toggle {
  gap: var(--space-2);
}

.pending-list,
.hidden-post-list {
  gap: var(--space-2);
}

.pending-list > strong,
.hidden-post-list > strong {
  font-size: 0.92rem;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.mini-actions {
  display: flex;
  gap: var(--space-2);
}

.payment-panel .button-grid {
  margin-top: var(--space-1);
}

.upload-panel .button-grid {
  margin-top: var(--space-1);
}

.feed-header {
  gap: var(--space-4);
}

.feed-tools {
  gap: var(--space-2);
}

.feed-toggle {
  gap: 4px;
}

.feed-toggle .icon-button {
  min-width: 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
}

.post-actions {
  flex-wrap: wrap;
  gap: var(--space-2);
}

.post-actions .icon-button {
  width: auto;
  min-width: 52px;
  padding: 0 13px;
}

.comment-count,
.moderation-action {
  min-height: 40px;
  padding: 0 4px;
}

.comment {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
}

.comment-head {
  gap: var(--space-3);
}

.comment-actions {
  gap: var(--space-1);
}

.comment-actions .icon-button,
.mini-actions .icon-button {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

.comment-form {
  gap: var(--space-2);
}

.comment-form input {
  min-width: 0;
}

.empty-feed {
  gap: var(--space-2);
}

.site-footer {
  margin-top: var(--space-6);
}

@media (max-width: 960px) {
  .hero-copy {
    gap: var(--space-3);
  }

  .choice-card {
    min-height: 0;
  }

  .create-intro {
    grid-template-columns: 1fr;
  }

  .create-intro .primary-button {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 22px, 560px);
  }

  .topbar {
    width: calc(100% - 22px);
  }

  .brand strong {
    font-size: 1rem;
  }

  .hero {
    gap: var(--space-4);
    margin-bottom: var(--space-4);
  }

  .hero-copy {
    padding-top: var(--space-2);
  }

  .hero h1 {
    font-size: clamp(2.45rem, 14vw, 3.05rem);
  }

  .hero p:not(.eyebrow) {
    font-size: 0.98rem;
    line-height: 1.52;
  }

  .choice-grid,
  .join-layout,
  .event-shell {
    gap: var(--space-4);
  }

  .panel,
  .choice-card {
    padding: 18px;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .status-pill {
    margin-top: 2px;
  }

  .button-row,
  .button-grid,
  .comment-form {
    gap: var(--space-2);
  }

  .auth-panel {
    gap: var(--space-3);
  }

  .auth-panel .stack-form {
    gap: 12px;
  }

  .auth-panel label {
    gap: 6px;
  }

  .auth-panel input {
    min-height: 48px;
  }

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

  .auth-panel .button-row .primary-button,
  .auth-panel .button-row .secondary-button {
    min-width: 0;
    padding: 0 10px;
    font-size: 0.92rem;
  }

  .guest-access-panel {
    gap: 12px;
    margin-top: 12px;
    padding-top: 14px;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
    min-height: 48px;
  }

  .text-button {
    justify-self: start;
  }

  .event-hero-card {
    gap: var(--space-3);
  }

  .event-summary h2 {
    margin-bottom: var(--space-2);
  }

  .event-hero-pills {
    gap: 6px;
    margin-bottom: var(--space-2);
  }

  .feed-header {
    gap: var(--space-3);
  }

  .feed-tools {
    gap: var(--space-2);
  }

  .feed-tools .ghost-button {
    width: auto;
    min-width: 92px;
  }

  body.event-view-active .feed-column {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  body.event-view-active .empty-feed {
    min-height: 150px;
    align-content: start;
    justify-items: start;
    gap: 6px;
    padding: 16px 18px 92px;
    text-align: left;
  }

  body.event-view-active .empty-feed h3,
  body.event-view-active .empty-feed p {
    margin: 0;
  }

  body.event-view-active .empty-feed h3 {
    font-size: 1.02rem;
    line-height: 1.1;
  }

  .post-actions {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .comment-form .secondary-button {
    width: 100%;
  }

  .footer-inner {
    padding-top: 32px;
  }
}

/* Branch: video upload and compact event tools */
.event-organizer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 var(--space-3);
}

.event-organizer-tools.hidden {
  display: none;
}

.event-organizer-tools .icon-button {
  position: relative;
  border-color: rgba(18, 156, 138, 0.2);
  background: rgba(18, 156, 138, 0.08);
  color: var(--teal-dark);
}

.event-organizer-tools .icon-button.is-active {
  border-color: rgba(23, 24, 47, 0.26);
  background: var(--ink);
  color: #fff;
}

.tool-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--brand-green);
  color: #101820;
  font-size: 0.68rem;
  font-weight: 950;
}

.media-dock {
  grid-column: 2;
  grid-row: 2;
  justify-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: clamp(14px, 2vw, 18px);
  border: 1px solid rgba(18, 156, 138, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

.media-dock h2,
.media-dock p {
  margin: 0;
}

.media-dock-copy {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.media-actions {
  grid-template-columns: repeat(3, minmax(96px, auto));
}

.event-sidebar {
  grid-column: 1;
  grid-row: 2 / span 2;
}

.guest-save-panel {
  display: grid;
  gap: var(--space-3);
  border-color: rgba(93, 95, 239, 0.18);
  background:
    linear-gradient(135deg, rgba(3, 225, 255, 0.08), rgba(153, 69, 255, 0.08)),
    rgba(255, 255, 255, 0.95);
}

.guest-save-panel.hidden {
  display: none;
}

.guest-save-panel h2,
.guest-save-panel p,
.guest-save-panel small {
  margin: 0;
}

.guest-save-panel h2 {
  color: #07111f;
  font-size: 1.18rem;
  line-height: 1.08;
}

.guest-save-panel p,
.guest-save-panel small {
  color: var(--muted);
}

.guest-save-panel .compact-form {
  gap: var(--space-3);
}

.guest-save-panel .primary-button,
.guest-save-panel .secondary-button {
  width: 100%;
}

.feed-column {
  grid-column: 2;
  grid-row: 3;
}

@media (min-width: 961px) {
  .event-shell.is-sidebar-empty .event-sidebar {
    display: none;
  }

  .event-shell.is-sidebar-empty .media-dock,
  .event-shell.is-sidebar-empty .feed-column {
    grid-column: 1 / -1;
  }
}

.post-media {
  display: block;
  width: 100%;
  height: 100%;
  background: #101820;
}

.post-video-preview,
.post-video-placeholder {
  position: relative;
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 28% 22%, rgba(3, 225, 255, 0.48), transparent 34%),
    radial-gradient(circle at 78% 70%, rgba(153, 69, 255, 0.44), transparent 38%),
    linear-gradient(135deg, #07111f, #101820 52%, #07111f);
}

.post-video-preview::after,
.post-video-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 17, 31, 0.02), rgba(7, 17, 31, 0.24)),
    linear-gradient(135deg, transparent 0 46%, rgba(255, 255, 255, 0.08) 46% 54%, transparent 54%);
}

.post-video-thumb {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #101820;
}

.video-placeholder-orb {
  position: relative;
  z-index: 2;
  display: grid;
  width: clamp(46px, 9vw, 68px);
  height: clamp(46px, 9vw, 68px);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 52px rgba(3, 225, 255, 0.2);
  backdrop-filter: blur(12px);
}

.video-placeholder-orb svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  fill: currentColor;
}

.video-placeholder-text {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.48);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.photo-tile .post-video-preview,
.photo-tile .post-video-placeholder {
  min-height: 0;
}

.photo-tile .post-media,
.post-image-button .post-media {
  object-fit: cover;
}

.post-image-button .post-video-card {
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: 780px;
}

.post-video-card,
.post-video-tile {
  pointer-events: none;
}

.post-modal-image-frame .post-video-modal {
  width: 100%;
  height: auto;
  max-width: 100%;
  min-height: min(46vh, 360px);
  max-height: calc(100vh - 118px);
  object-fit: contain;
  background: #101820;
}

.post-modal-image-frame .post-video-modal.is-unavailable {
  opacity: 0.22;
}

.video-start-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: clamp(68px, 13vw, 94px);
  height: clamp(68px, 13vw, 94px);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 22px 64px rgba(7, 17, 31, 0.32);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.video-start-button svg {
  width: 38px;
  height: 38px;
  margin-left: 4px;
  fill: currentColor;
}

.video-playback-fallback {
  position: absolute;
  inset: 18px;
  z-index: 3;
  display: grid;
  max-width: 360px;
  margin: auto;
  padding: 22px;
  place-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 22px 64px rgba(7, 17, 31, 0.28);
}

.video-playback-fallback > svg {
  width: 38px;
  height: 38px;
  color: var(--teal-dark);
}

.video-playback-fallback p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mini-video-thumb {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: #101820;
  color: #fff;
}

.mini-video-thumb svg {
  width: 19px;
  height: 19px;
}

@media (max-width: 960px) {
  .home-stats {
    grid-template-columns: 1fr;
  }

  .event-sidebar,
  .media-dock,
  .feed-column {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  body.event-view-active main {
    padding-bottom: calc(136px + env(safe-area-inset-bottom));
  }

  .event-shell {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  body.event-view-active .mobile-nav {
    bottom: calc(8px + env(safe-area-inset-bottom));
    padding: 5px;
    gap: 5px;
    border-radius: 8px;
  }

  body.event-view-active .mobile-nav button {
    min-height: 42px;
    padding: 3px 2px;
    font-size: 0.66rem;
    line-height: 1.05;
  }

  body.event-view-active .mobile-nav svg {
    width: 17px;
    height: 17px;
  }

  .media-dock {
    position: fixed;
    right: 18px;
    bottom: calc(66px + env(safe-area-inset-bottom));
    left: 18px;
    z-index: 31;
    grid-template-columns: 1fr;
    width: auto;
    gap: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .media-dock-copy {
    display: none;
  }

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

  .media-actions .primary-button,
  .media-actions .secondary-button {
    width: 100%;
    min-height: 44px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    background: rgba(7, 17, 31, 0.76);
    color: #fff;
    box-shadow: 0 12px 28px rgba(7, 17, 31, 0.22);
    font-size: 0.78rem;
    backdrop-filter: blur(16px) saturate(150%);
  }

  .media-actions .primary-button {
    border-color: rgba(255, 255, 255, 0.42);
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-violet), var(--brand-green));
    color: #fff;
  }

.media-actions .secondary-button:hover,
.media-actions .secondary-button:focus-visible {
    background: rgba(7, 17, 31, 0.86);
    color: #fff;
  }

  .upload-activity {
    right: 12px;
    bottom: calc(124px + env(safe-area-inset-bottom));
    width: calc(100% - 24px);
  }
}

/* Scroll performance: keep the visual language, reduce repaint work on long feeds. */
.topbar,
.mobile-nav,
.media-dock,
.feed-header {
  transform: translateZ(0);
}

.post-card,
.photo-tile,
.event-card {
  contain: layout paint;
}

.post-media,
.post-image,
.photo-tile .post-media,
.post-image-button .post-media {
  transform: translateZ(0);
}

@supports (content-visibility: auto) {
  .feed-list > .post-card,
  .feed-list > .photo-tile,
  .event-list > .event-card {
    content-visibility: auto;
    contain-intrinsic-size: 360px 420px;
  }

  .feed-list.is-grid > .photo-tile {
    contain-intrinsic-size: 160px 160px;
  }
}

@media (max-width: 960px) {
  body::before {
    position: absolute;
  }

  .mobile-nav,
  .feed-header,
  .panel,
  .choice-card,
  .post-card,
  .event-card,
  .legal-page,
  .media-actions .primary-button,
  .media-actions .secondary-button {
    backdrop-filter: none;
  }

  .mobile-nav {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  }

  .feed-header {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  }

  .post-card,
  .event-card,
  .panel,
  .choice-card {
    box-shadow:
      0 10px 28px rgba(15, 23, 42, 0.06),
      0 1px 0 rgba(255, 255, 255, 0.86) inset;
  }

  .media-actions .primary-button,
  .media-actions .secondary-button {
    box-shadow: 0 8px 18px rgba(7, 17, 31, 0.16);
  }
}

/* Desktop create page: keep the intro panel aligned with the account history panel. */
#createView .creator-layout,
#createView .create-panel {
  width: 100%;
}

#createView .creator-layout {
  grid-template-columns: minmax(0, 1fr);
}

/* Home photography: real event moments replace the decorative hero artwork. */
.hero-picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-media .hero-picture img {
  display: block;
  width: 100%;
  height: 100%;
  align-self: stretch;
  object-fit: cover;
}

.hero-photo-main .hero-picture img {
  object-position: 50% 46%;
}

.hero-photo-side .hero-picture img {
  object-position: 50% 42%;
}

.hero-photo::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 54%, rgba(7, 17, 31, 0.18));
  content: "";
}

.hero-photo figcaption {
  z-index: 2;
}

@media (max-width: 640px) {
  .hero-media {
    position: relative;
    display: block;
    min-height: 0;
    padding: 0 42px 30px 0;
  }

  .hero-photo-main {
    width: 100%;
    aspect-ratio: 4 / 5;
  }

  .hero-photo-side {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    width: 38%;
    height: auto;
    aspect-ratio: 3 / 4;
    border: 5px solid rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
  }

  .hero-photo-side figcaption {
    display: none;
  }

  .hero-photo-main figcaption {
    right: 56px;
  }
}
