:root {
  --partner-vv-top: 0px;
}

.partner-wrap {
  max-width: 1160px;
  min-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
}

.partner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(1080px, 100%);
  margin: 0 auto 14px;
  padding: 4px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mylo-top-logo {
  width: 148px;
  height: auto;
  display: block;
}

.hero {
  display: grid;
  gap: 18px;
  margin-bottom: 14px;
  flex: 0 0 auto;
  min-height: 0;
}

.partner-main-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.state-block {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

#state-login:not(.hidden) {
  display: flex;
  justify-content: center;
  padding-top: clamp(2px, 1.2vw, 10px);
}

#state-not-partner:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: clamp(2px, 1.2vw, 10px);
}

.auth-card {
  width: min(440px, 100%);
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
}

.auth-card h2 {
  margin-bottom: 6px;
}

.auth-card .desc {
  font-size: 14px;
}

.not-partner-card {
  width: min(760px, 100%);
  margin-inline: auto;
}

.billing-shell {
  width: min(1080px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
}

.billing-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}


.billing-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-nav-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.billing-nav-link {
  text-decoration: none;
}

.billing-card-heading {
  display: grid;
  gap: 4px;
}

.billing-reference-copy {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.billing-reference-copy a {
  color: var(--text);
  font-weight: 700;
}

.billing-secondary-link {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.billing-cycle-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.billing-cycle-btn.active {
  border-color: rgba(112, 203, 255, 0.65);
  background: rgba(148, 220, 255, 0.14);
}

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

.billing-plan-card {
  display: grid;
  gap: 16px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  padding: 20px;
}

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

.billing-plan-copy {
  display: grid;
  gap: 6px;
}

.billing-plan-card h3 {
  margin: 0;
}

.billing-plan-price-block {
  min-width: 108px;
  text-align: right;
}

.billing-plan-price {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

.billing-plan-price-cycle {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.billing-plan-tagline {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

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

.billing-plan-feature {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.billing-plan-feature-label {
  font-size: 13px;
  color: var(--muted);
}

.billing-plan-feature-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.billing-plan-btn {
  width: auto;
  min-width: 160px;
}

.subscription-levels-shell {
  width: min(1120px, 100%);
}

.subscription-levels-card {
  gap: 20px;
}

.subscription-levels-toggle {
  display: grid;
  gap: 8px;
}

.subscription-levels-cycle-toggle {
  width: fit-content;
  margin-bottom: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.subscription-levels-cycle-toggle .billing-cycle-btn {
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 12px 18px;
}

.subscription-levels-cycle-toggle .billing-cycle-btn.active {
  border-color: transparent;
  background: var(--accent);
  color: #1f1305;
}

.subscription-levels-card .billing-plan-card {
  align-content: start;
}

.subscription-levels-card .billing-plan-card h3 {
  color: var(--accent);
}

.billing-inline-status {
  margin-bottom: 14px;
}

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

.billing-summary-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.billing-summary-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.billing-plan-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.billing-info-trigger {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: help;
}

.billing-info-trigger svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.billing-plan-value {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}

.billing-plan-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: min(280px, calc(100vw - 48px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20, 20, 22, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 8;
}

.billing-plan-info:hover .billing-plan-popover,
.billing-plan-info:focus-within .billing-plan-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.billing-plan-popover-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.billing-plan-popover-grid {
  display: grid;
  gap: 8px;
}

.billing-plan-popover-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.84);
}

.billing-plan-popover-row strong {
  color: var(--text);
  text-align: right;
}

.billing-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.billing-banner {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(148, 220, 255, 0.08);
  padding: 12px 14px;
}

.billing-banner a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.billing-note {
  margin: -4px 0 16px;
  color: var(--muted);
}

.billing-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.billing-card > .billing-section:last-of-type {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.billing-section h3 {
  margin: 0;
}

.billing-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.billing-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.billing-table th,
.billing-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.billing-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.billing-table tbody tr:last-child td {
  border-bottom: none;
}

.billing-table a {
  color: var(--accent);
}

.billing-link-disabled {
  color: var(--muted);
}

.partner-app-card {
  width: min(760px, 100%);
  margin: 14px auto 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow);
  padding: 14px;
}

#not-partner-error {
  width: min(760px, 100%);
  margin-inline: auto;
}

.partner-app-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--accent);
}

.partner-app-head {
  display: block;
}

.partner-app-head .desc {
  display: block;
  margin-top: 0;
  font-size: 14px;
}

.partner-app-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 10px;
}

.partner-app-step-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.partner-app-step-chip.active {
  color: #082a40;
  border-color: rgba(112, 203, 255, 0.65);
  background: rgba(148, 220, 255, 0.9);
}

.partner-app-step {
  display: grid;
  gap: 10px;
}

.partner-app-step label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

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

.partner-app-grid-3 {
  grid-template-columns: 1.2fr 0.7fr 0.9fr;
}

.partner-app-inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.partner-referral-help {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.partner-referral-help .hint {
  margin: 0 0 8px;
}

.partner-app-check {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.partner-app-check-authorization {
  margin-top: 14px;
  margin-bottom: -2px;
}

.partner-app-check input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin-top: 2px;
  padding: 0;
  flex: 0 0 auto;
}

.partner-app-check span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.45;
}

.partner-app-legal-block {
  margin-top: -2px;
  margin-left: 30px;
}

.partner-app-legal-note {
  margin: 0;
}

.partner-app-reference-block {
  margin-top: 24px;
}

.partner-app-legal-reference {
  margin: 0 0 2px;
  font-weight: 600;
  color: var(--muted);
}

.partner-app-legal-link-row {
  margin: 0;
}

.partner-app-legal-link-row a {
  color: #6ec8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.partner-app-legal-block .partner-app-legal-note {
  margin: 0;
}

.partner-app-reference-block .partner-app-legal-reference {
  margin: 0 0 2px;
}

.partner-app-reference-block .partner-app-legal-link-row {
  margin: 0;
  padding-left: 16px;
}

.partner-app-location-field .field-hint {
  margin: 0;
}

.partner-app-review {
  display: grid;
  gap: 12px;
}

.partner-app-review-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 6px;
}

.partner-app-review-group h4 {
  margin: 0;
  font-size: 14px;
  color: var(--accent);
}

.partner-app-review-row {
  font-size: 13px;
  color: var(--text);
}

.partner-app-review-row b {
  color: var(--muted);
}

.dashboard-list-divider {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0;
  padding: 6px 0;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
}

.dashboard-list-divider::before,
.dashboard-list-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.dashboard-list-divider-label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.partner-app-nav {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Pins the exit action (Cancel / Sign Out) to the far left of the nav row
   while Back/Next stay grouped at the right - so "the left button always
   gets you out" is a consistent mental model across every /apply/* step. */
.partner-app-nav-exit {
  margin-right: auto;
}

#not-partner-success {
  color: #9ce2ae;
}

#not-partner-status-line {
  color: var(--text);
}

#not-partner-application-lock {
  margin-top: 8px;
}

.state-block.hidden {
  display: none;
}

h2 {
  margin: 0 0 8px;
  line-height: 1.15;
  font-size: 28px;
  color: var(--accent);
}

.desc {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn {
  min-width: 170px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-row .btn.hidden {
  display: none;
}

.email-form {
  margin-top: 10px;
}

.email-form .field {
  margin-bottom: 10px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.text-link-btn {
  min-width: 0;
  margin: -2px 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.text-link-btn:hover {
  text-decoration: underline;
}

.password-requirements {
  display: grid;
  gap: 4px;
  margin: -2px 0 12px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.password-requirements li.met {
  color: #9ce2ae;
}

.auth-inline-cta {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}

.auth-inline-cta .btn {
  min-width: 0;
}

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

.create-auth-card {
  width: min(520px, 100%);
}

.create-auth-step {
  margin-top: 10px;
}

.create-auth-step-hint {
  margin: 0 0 10px;
}

#create-referral-form {
  margin-top: 10px;
}

.create-consent-block {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.create-consent-intro {
  margin: 0;
}

.create-consent-links {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.create-consent-links a {
  color: #6ec8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 13px;
}

.create-consent-check {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.create-consent-check input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;
}

.create-consent-check span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.45;
}

.create-post-option-hint {
  margin-top: 4px;
  margin-left: 24px;
}

#create-account-form {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.create-auth-footer {
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

#create-account-status.error {
  color: #ff9e9e;
}

.auth-divider {
  position: relative;
  margin: 10px 0 10px;
  display: flex;
  justify-content: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--line);
  transform: translateY(-50%);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: rgba(26, 26, 27, 0.95);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-provider-stack {
  display: grid;
  gap: 8px;
}

.auth-provider-btn {
  display: inline-flex;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

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

.auth-provider-btn:focus-visible {
  outline: 2px solid rgba(255, 124, 0, 0.75);
  outline-offset: 1px;
}

.auth-provider-btn img {
  width: 65%;
  max-width: 208px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.form-actions.left {
  justify-content: flex-start;
}

.login-form-actions {
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.login-form-actions .login-create-btn {
  margin-left: auto;
  min-width: 0;
}

.status-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: #ff9e9e;
}

.status.error.hidden {
  display: none;
}

.dashboard-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.dashboard-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dashboard-header-brand {
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
}

.dashboard-header-brand .dashboard-partner-logo {
  align-self: center;
}

.dashboard-mobile-nav-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  margin-right: auto;
}

.dashboard-mobile-nav-scrim {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 74;
  border: 0;
  background: rgba(6, 7, 10, 0.46);
}

.dashboard-mobile-nav-scrim.hidden {
  display: none;
}

.dashboard-partner-logo {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  align-self: flex-start;
}

.dashboard-brand-text {
  display: none;
}

.dashboard-brand-text h2 {
  margin: 0;
  min-width: 0;
}

.dashboard-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 2px 2px 0;
}

.dashboard-follower-pill {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.dashboard-follower-pill.hidden {
  display: none;
}

.dashboard-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 0;
  justify-self: end;
}

.dashboard-chrome {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

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

.icon-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.icon-btn:disabled:hover {
  transform: none;
  filter: none;
}

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

.icon-btn .refresh-icon {
  fill: none;
}

.icon-btn .refresh-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn.is-busy svg {
  animation: partner-spin 0.85s linear infinite;
}

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

.user-menu {
  display: block;
}

.user-menu-card {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.partner-nav-email {
  display: inline-block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.user-menu-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-menu-business-name,
.partner-nav-business {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-signout {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 9px 10px;
  cursor: pointer;
  font-size: 14px;
}

.user-menu-signout:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.new-post-btn {
  min-width: 0;
  width: auto;
  flex: 0 0 auto;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 14px;
  white-space: nowrap;
}

.dashboard-workspace {
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(1080px, 100%);
  margin-inline: auto;
  gap: 12px;
  align-items: stretch;
  min-height: 260px;
  overflow: visible;
  position: relative;
}

.dashboard-workspace-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.partner-route-view {
  display: contents;
}

.partner-route-view.hidden {
  display: none !important;
}

.partner-route-panel {
  grid-column: 1 / -1;
  /* Settings/Billing/Subscribe should size to their own content, not stretch
     to fill the dashboard grid row (grid items stretch by default). The
     content viewport (.hero) is what scrolls when a render is taller than
     the screen; a short render (e.g. Follower Link) should just hug its
     content instead of ballooning to fill the available height. */
  align-self: start;
  min-width: 0;
  min-height: 0;
}

.partner-route-panel.hidden {
  display: none !important;
}

.dashboard-chrome {
  width: min(1080px, 100%);
  margin-inline: auto;
}

.dashboard-workspace-mode {
  display: contents;
}

.dashboard-workspace-mode.hidden {
  display: none;
}

#services-workspace:not(.hidden),
#calendar-workspace:not(.hidden) {
  display: block;
  grid-column: 1 / -1;
  align-self: stretch;
  height: 100%;
  min-height: 0;
}

#state-dashboard {
  min-height: 0;
}

.dashboard-subnav {
  display: none;
  flex-direction: column;
  gap: 14px;
  position: absolute;
  top: 0;
  left: 0;
  width: min(340px, calc(100% - 24px));
  max-height: calc(100vh - 116px);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(255, 124, 0, 0.12), transparent 45%),
    rgba(20, 20, 22, 0.97);
  box-shadow: var(--shadow);
  min-height: 0;
  overflow: auto;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.dashboard-subnav-group {
  display: grid;
  gap: 8px;
  width: 100%;
  justify-items: stretch;
}

.dashboard-subnav-footer {
  margin-top: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  width: 100%;
  justify-items: stretch;
}

.dashboard-subnav-label {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 1;
  white-space: nowrap;
  pointer-events: auto;
}

.dashboard-subnav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.dashboard-subnav-item {
  color: var(--text);
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
  position: relative;
}

a.dashboard-subnav-item {
  text-decoration: none;
}

.dashboard-subnav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-subnav-item.active {
  background: rgba(255, 124, 0, 0.12);
  border-color: rgba(255, 124, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 124, 0, 0.12);
}

.dashboard-town-group {
  display: grid;
  gap: 8px;
  width: 100%;
  justify-items: stretch;
}

.dashboard-subnav-section {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dashboard-town-group.hidden {
  display: none;
}

.dashboard-town-children {
  display: grid;
  gap: 6px;
  width: 100%;
  justify-items: stretch;
}

.dashboard-subnav-item:focus-visible {
  outline: 2px solid rgba(255, 124, 0, 0.75);
  outline-offset: 2px;
}

.dashboard-subnav-item::after {
  display: none;
}

.dashboard-subnav-title {
  font-size: 14px;
  font-weight: 800;
  color: inherit;
  white-space: nowrap;
}

.dashboard-subnav-copy {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  white-space: normal;
}

.dashboard-subnav-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  pointer-events: auto;
}

.dashboard-subnav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  color: inherit;
}

.dashboard-subnav-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.dashboard-subnav.mobile-open {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dashboard-subnav-account {
  display: none;
}

.dashboard-subnav .partner-identity-slot {
  display: block;
  width: 100%;
}

.dashboard-account-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.partner-identity-slot .user-menu-card {
  max-width: none;
}

.dashboard-subnav-flyout-action.secondary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  justify-content: flex-start;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}

.dashboard-subnav-flyout-action.secondary:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.dashboard-posts-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

.dashboard-list-column {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.dashboard-list-meta {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  margin: 0;
  text-align: left;
  white-space: nowrap;
}

#posts-list.post-list {
  flex: 1 1 auto;
  list-style: none;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.post-list {
  flex: 1 1 auto;
  list-style: none;
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 12px;
  align-content: start;
  height: auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

#posts-list .post-item {
  flex: 0 0 auto;
}

#posts-list .post-select {
  min-height: 164px;
  display: flex;
  align-items: stretch;
}

#posts-list .post-row {
  width: 100%;
  min-height: 140px;
}

#posts-list .post-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

#posts-list .post-grid {
  margin-top: auto;
}

.post-item {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.post-item.post-empty {
  padding: 18px 14px;
}

.post-item.selected .post-select {
  background: rgba(255, 124, 0, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 124, 0, 0.28);
}

.post-select {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 12px;
  cursor: pointer;
  touch-action: pan-y;
}

.post-select:hover {
  background: rgba(255, 255, 255, 0.05);
}

.post-select:focus-visible {
  outline: 2px solid rgba(255, 124, 0, 0.75);
  outline-offset: -2px;
}

.post-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: start;
}

.post-hero {
  width: 140px;
  height: 92px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

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

.post-hero.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.post-content {
  min-width: 0;
}

.post-item h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  overflow-wrap: anywhere;
}

.post-title-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 8px;
  min-width: 0;
}

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

.post-title-status {
  margin-left: auto;
  flex: 0 0 auto;
}

.post-chips,
.post-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-tags {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.post-chips {
  margin: 0 0 8px;
}

.post-detail-chips {
  margin: 0;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.meta-chip-neutral {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.meta-chip-status {
  font-weight: 800;
}

.meta-chip-status-active {
  color: #123f1f;
  border-color: rgba(78, 225, 137, 0.65);
  background: rgba(115, 234, 165, 0.92);
}

.meta-chip-status-paused {
  color: #4a2600;
  border-color: rgba(255, 165, 71, 0.65);
  background: rgba(255, 191, 123, 0.92);
}

.meta-chip-status-pending {
  color: #082a40;
  border-color: rgba(112, 203, 255, 0.65);
  background: rgba(148, 220, 255, 0.9);
}

.meta-chip-status-removed {
  color: #4f1111;
  border-color: rgba(255, 126, 126, 0.7);
  background: rgba(255, 159, 159, 0.9);
}

.meta-chip-status-expired,
.meta-chip-status-complete,
.meta-chip-status-draft,
.meta-chip-status-default {
  color: #d8d8db;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.11);
}

.meta-chip-type-priority {
  color: #5d2200;
  border-color: rgba(217, 134, 53, 0.5);
  background: rgba(252, 232, 216, 0.96);
}

.meta-chip-type-notice {
  color: #d8d8db;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

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

.post-field {
  margin: 0;
  font-size: 12px;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-field b {
  color: var(--muted);
  font-weight: 700;
}

.post-field.post-field-key b {
  color: var(--accent);
}

.post-detail-panel {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.post-detail-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.post-detail-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
}

.post-action-menu {
  position: relative;
  margin-left: auto;
}

.post-action-button svg {
  width: 18px;
  height: 18px;
}

.post-action-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #171719;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 35;
}

.post-action-list.hidden {
  display: none;
}

.post-action-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 9px 10px;
  cursor: pointer;
  font-size: 14px;
}

.post-action-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.post-action-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: transparent;
}

.post-action-item.danger {
  color: #ffb2b2;
}

.post-detail-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

#alert-detail-panel .post-detail-head {
  align-items: flex-start;
}

#alert-detail-title {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

.detail-close-btn {
  display: none;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
}

.post-detail-content {
  flex: 1 1 auto;
  overflow: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.post-detail-content > * {
  flex: 0 0 auto;
  min-width: 0;
}

.post-detail-hero {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.post-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-detail-hero.is-clickable img,
.post-detail-carousel-image {
  cursor: zoom-in;
}

.post-detail-carousel {
  position: relative;
}

.post-detail-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-detail-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.44);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.post-detail-carousel-btn.prev {
  left: 8px;
}

.post-detail-carousel-btn.next {
  right: 8px;
}

.post-detail-carousel-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.post-detail-carousel-btn:hover {
  filter: brightness(1.12);
}

.post-detail-carousel-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 46px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.post-detail-hero.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

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

.post-detail-field {
  margin: 0;
  font-size: 12px;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-detail-field b {
  color: var(--muted);
  font-weight: 700;
}

.post-detail-field.post-detail-field-key b {
  color: var(--accent);
}

.post-detail-section h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--accent);
}

.post-detail-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.post-detail-empty {
  margin: 0;
  color: var(--muted);
}

.alert-row {
  display: grid;
  gap: 10px;
}

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

.alert-copy {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}

.alert-list-item {
  min-height: 96px;
}

.alert-card-select {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-height: 108px;
  height: 108px;
  padding: 14px;
}

.alert-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.alert-card-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.alert-card-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.alert-card-meta {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.alert-card-excerpt {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.town-services-builder {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  height: 100%;
  min-height: 0;
}

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

.town-services-head h3,
.town-menu-form h4 {
  margin: 0;
  color: var(--accent);
}

.town-services-head p,
.town-menu-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.town-services-actions,
.town-menu-form-actions,
.town-menu-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.town-services-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.town-services-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.town-menu-form {
  position: absolute;
  inset: 12px;
  z-index: 5;
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(34, 34, 36, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.town-services-portal {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.town-services-portal .form-group {
  display: grid;
  gap: 5px;
}

.town-menu-form.hidden {
  display: none;
}

.town-menu-form .form-group {
  display: grid;
  gap: 5px;
}

.field-hint,
.field-error {
  margin: 0;
  font-size: 12px;
}

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

.field-error {
  color: #f87171;
}

.town-menu-empty {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  margin: 12px;
}

.town-menu-empty.hidden {
  display: none;
}

.town-menu-list {
  display: grid;
  align-content: start;
  gap: 8px;
  list-style: none;
  padding: 12px;
  margin: 0;
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.town-menu-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.town-menu-row.is-dragging {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.town-menu-row-handle {
  cursor: grab;
  color: var(--muted);
  touch-action: none;
}

.town-menu-row-handle:active,
.town-menu-row-handle.is-dragging {
  cursor: grabbing;
}

.town-menu-row-handle svg {
  fill: currentColor;
}

.town-menu-row-main {
  min-width: 0;
}

.town-menu-row-label {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.town-menu-row-url {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.town-menu-row .icon-btn {
  width: 34px;
  height: 34px;
}

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

.town-menu-action-menu {
  margin-left: 0;
}

.town-menu-action-list {
  width: 144px;
  min-width: 144px;
  max-width: calc(100vw - 16px);
}

.town-menu-action-list .post-action-item {
  white-space: nowrap;
}

.town-menu-action-list.floating-menu {
  position: fixed;
  z-index: 90;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.town-services-builder.form-open .town-menu-list,
.town-services-builder.form-open .town-menu-empty {
  filter: blur(2px);
  opacity: 0.28;
  pointer-events: none;
  user-select: none;
}

.calendar-feeds-section {
  height: 100%;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  overflow: auto;
  overscroll-behavior: contain;
}

.calendar-feed-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.calendar-feed-form h4 {
  margin: 0;
}

.calendar-feeds-section .town-menu-empty {
  margin: 12px 0 0;
}

.calendar-feed-list {
  height: auto;
  overflow: visible;
  padding: 12px 0 0;
}

.calendar-feed-row {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) auto;
}

.calendar-feed-row .town-menu-row-main {
  grid-column: 1;
}

.calendar-feed-row-actions-mobile {
  display: none;
}

.calendar-feed-row .town-menu-row-actions {
  grid-column: 2;
  display: flex;
  justify-content: flex-end;
}

.calendar-feed-health {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.calendar-feed-health-primary,
.calendar-feed-health-secondary {
  display: inline;
}

.calendar-feed-health-primary {
  font-weight: 700;
}

.calendar-feed-health-secondary::before {
  content: " \2022  ";
  font-weight: 400;
}

.calendar-feed-health-secondary {
  font-weight: 700;
}

.calendar-feed-health.error {
  color: #ff9e9e;
}

.calendar-feed-remove {
  white-space: nowrap;
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .calendar-feed-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-feed-row .town-menu-row-actions {
    display: none;
  }

  .calendar-feed-row-actions-mobile {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
  }

  .calendar-feed-health-primary,
  .calendar-feed-health-secondary {
    display: block;
  }

  .calendar-feed-health-secondary::before {
    content: "";
  }

  .calendar-feed-health-secondary {
    margin-top: 2px;
  }

  .calendar-feed-row .town-menu-row-url {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 2px;
  }
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  padding: 12px;
}

.image-lightbox.hidden {
  display: none;
}

.image-lightbox-stage {
  position: relative;
  width: min(96vw, 1400px);
  height: min(92vh, 920px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

.image-lightbox-close {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px) + var(--partner-vv-top));
  right: calc(8px + env(safe-area-inset-right, 0px));
  z-index: 3;
}

.image-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}

.image-lightbox-nav svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.image-lightbox-nav.prev {
  left: 8px;
}

.image-lightbox-nav.next {
  right: 8px;
}

.image-lightbox-nav:hover {
  filter: brightness(1.12);
}

.image-lightbox-nav:disabled {
  opacity: 0.45;
  cursor: default;
}

.image-lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  min-width: 54px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.analytics-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.62);
  padding: 14px;
}

.inactive-modal {
  z-index: 84;
}

.verify-modal-card {
  max-width: 520px;
}

#verify-modal-copy {
  margin: 0 0 10px;
}

#verify-modal-form {
  margin-top: 0;
}

#verify-modal-code {
  letter-spacing: 0.18em;
  font-weight: 700;
}

#verify-modal-status {
  margin-top: 8px;
}

#verify-modal-status.error {
  color: #ff9e9e;
}

#verify-modal-browser-link-row {
  margin: 8px 0 0;
}

#verify-modal-browser-link-row a {
  color: #6ec8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.analytics-modal.hidden {
  display: none;
}

.checkout-modal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 36px 48px;
  min-width: 200px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #171719;
  box-shadow: var(--shadow);
}

.checkout-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #6ec8ff;
  border-radius: 50%;
  animation: partner-spin 0.85s linear infinite;
}

.checkout-modal-msg {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  text-align: center;
}

.checkout-modal-title {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  text-align: center;
}

.checkout-modal-actions {
  display: flex;
  justify-content: center;
}

.dashboard-billing-modal-card {
  max-width: 460px;
}

.analytics-modal-card {
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #171719;
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.analytics-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.analytics-modal-head h3 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

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

.analytics-slice {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.analytics-slice h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--accent);
}

.analytics-date-range {
  margin: -4px 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.analytics-metric {
  margin: 4px 0;
  font-size: 13px;
  color: var(--text);
}

.analytics-metric b {
  color: var(--muted);
}

.create-post-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.62);
  padding: 14px;
}

.create-post-modal.hidden {
  display: none;
}

.create-post-card {
  width: min(860px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #171719;
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.create-post-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.create-post-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.create-post-head h3 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

.create-post-form {
  display: grid;
  gap: 10px;
}

.create-post-status {
  margin: 0;
}

#create-post-templates-modal {
  z-index: 91;
}

.create-post-templates-card {
  width: min(640px, 100%);
}

.create-post-templates-copy {
  margin: 4px 0 0;
}

.create-post-templates {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.create-post-templates-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}

.create-post-template-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.create-post-template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
}

.create-post-template-row.empty {
  background: none;
  border-style: dashed;
}

.create-post-template-row-load {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.create-post-template-row-load:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.create-post-template-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.create-post-template-type {
  color: var(--muted);
  font-size: 12px;
}

.create-post-template-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.create-post-template-actions .btn {
  min-width: 0;
  padding: 6px 10px;
  font-size: 13px;
}

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

.create-post-time-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.create-post-date-stack {
  display: grid;
  gap: 10px;
}

.create-post-location-field {
  margin-top: 4px;
}

.create-post-location-cards {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.create-post-location-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.create-post-location-card.active {
  border-color: rgba(255, 124, 0, 0.5);
  background: rgba(255, 124, 0, 0.08);
}

.create-post-location-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.create-post-location-card-title {
  font-weight: 700;
}

.create-post-location-card-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.create-post-location-use-btn {
  min-width: 0;
  padding: 6px 12px;
}

.create-post-location-card--tappable {
  display: block;
  width: 100%;
  appearance: none;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.create-post-location-card--tappable:hover,
.create-post-location-card--tappable:focus-visible {
  border-color: rgba(255, 124, 0, 0.4);
}

.create-post-location-summary {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.create-post-location-summary-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.map-adjust-modal {
  /* Higher than .create-post-modal (82) so the dialog opened by
     openPinAdjustDialog() renders above it when nested inside post
     creation, not behind it. */
  z-index: 90;
}

#template-confirm-modal {
  /* .analytics-modal's own z-index (80) is lower than .create-post-modal's
     (82) — fine for a modal opened independently, but this one always opens
     nested inside an already-open Create Post modal and must render above
     it, same reasoning as .map-adjust-modal. */
  z-index: 91;
}

.map-adjust-dialog-canvas {
  /* Sizing/border/overflow come from .map-pin-picker, added by
     createPinMap() onto this same element - keep this rule to spacing only
     so the two classes don't fight over box styling. */
  margin: 10px 0;
}

.create-post-claim-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.create-post-generate-btn {
  min-width: 0;
  white-space: nowrap;
}

.create-post-field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.create-post-image-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-post-file-input {
  display: none;
}

.create-post-image-list {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.create-post-image-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.create-post-image-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.create-post-image-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

.create-post-image-meta span {
  color: var(--muted);
}

.create-post-image-remove {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.create-post-image-remove:hover {
  color: var(--accent);
}

.create-post-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
}

.create-post-image-item.error .create-post-image-overlay {
  background: rgba(153, 36, 24, 0.8);
}

.create-post-offer.hidden {
  display: none;
}

.create-post-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.status-line.error {
  color: #ff9e9e;
}

.settings-location-map-col .status-line {
  font-weight: 700;
}

.hidden {
  display: none;
}

footer a {
  color: var(--text);
  text-decoration: underline;
}

footer {
  width: min(1080px, 100%);
  margin-inline: auto;
  margin-top: auto;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.social-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.field-row .field {
  margin-bottom: 0;
}

.settings-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0 22px;
}

.settings-logo-preview {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.settings-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-logo-placeholder {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 0 6px;
}

.settings-logo-controls {
  display: grid;
  gap: 6px;
}

/* Neutralizes the default single-card chrome so Business Details can render
   as independent cards instead of one card split by a rule. Overflow is
   left to .billing-card's own overflow-y: auto — this used to force
   overflow: visible too, which let tall content (e.g. the stacked Contact/
   Identity/Location cards) spill past the dashboard shell into the footer
   instead of scrolling inside its own card. */
.settings-card--split {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.settings-two-col {
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.settings-col {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
}

.settings-identity-col,
.settings-contact-col {
  flex: 1 1 0;
  min-width: 280px;
}

/* Location sits as a third, full-width card below the Contact/Identity
   row — same gap as the two-col row above it. */
.settings-location-col {
  margin-top: 24px;
}

@media (max-width: 720px) {
  .settings-two-col {
    flex-direction: column;
  }
}

.settings-follow-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.settings-follow-head h2 {
  margin: 0;
}

.settings-follow-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.settings-follow-panel,
.settings-follow-section {
  display: grid;
  gap: 8px;
  align-content: start;
}

.settings-follow-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.settings-follow-panel .desc {
  margin-bottom: 2px;
}

.settings-follow-link-section {
  max-width: 100%;
}

.settings-follow-link-row {
  display: grid;
  gap: 10px;
  width: 100%;
}

.settings-follow-link-row input {
  width: 100%;
  min-width: 0;
  max-width: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 250, 250, 0.92);
  font-weight: 600;
}

.settings-follow-link-row input[readonly] {
  cursor: text;
}

.settings-follow-copy-btn {
  justify-self: start;
  width: auto;
  min-width: 0;
  padding-inline: 18px;
}

@media (max-width: 900px) {
  .settings-follow-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settings-follow-customize {
  display: flex;
  align-items: stretch;
  gap: 18px;
  min-width: 0;
}

/* No inner padding, same as .settings-logo-preview, so the QR graphic
   fills the box edge-to-edge. Sized to sit next to the swatch/format/
   download stack as a permanent preview, not a tiny click-to-expand
   teaser — there's no modal left to expand into. */
.settings-follow-qr {
  width: 140px;
  height: 140px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background-color, not the shorthand — see the same note on
     .settings-qr-swatch; this one isn't broken today only because it
     happens to sit earlier in the file than the checkerboard rules. */
  background-color: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.settings-follow-qr img {
  width: 100%;
  height: 100%;
}

.settings-follow-qr-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-height: 140px;
}

.settings-follow-qr-download {
  margin-top: auto;
  width: auto;
  min-width: 0;
  padding-inline: 18px;
}

/* Shared by "Download QR Code" and "Upload New Logo" so both render as
   the same lightweight icon+text link, whichever tag each happens to be
   (<a> for download, <label> for the file-picker trigger). */
.settings-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.settings-action-link:hover {
  text-decoration: underline;
}

/* "Transparent" indicator checkerboard, used wherever a transparent-
   background QR preset is shown (the preview, its swatch) — otherwise a
   transparent PNG just reads as "blank". Two tones rather than one: a
   light checker for black modules, a dark checker for white modules (see
   checkerboardClassFor in partner-view-settings.js) — one fixed tone can't
   give both foreground colors enough contrast to stay visible. */
.settings-follow-qr--checkerboard-light {
  background-image: repeating-conic-gradient(#ddd 0% 25%, #fff 0% 50%);
  background-size: 12px 12px;
}

.settings-follow-qr--checkerboard-dark {
  background-image: repeating-conic-gradient(#3a3a3a 0% 25%, #111 0% 50%);
  background-size: 12px 12px;
}

.settings-follow-qr-swatches {
  display: flex;
  gap: 6px;
}

.settings-qr-swatch {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  /* background-color, not the background shorthand — the shorthand resets
     background-image to none as a side effect, which was silently erasing
     the checkerboard-light/dark classes' own background-image regardless of
     which one got applied (this rule comes later in the cascade). */
  background-color: #fff;
  overflow: hidden;
  cursor: pointer;
}

.settings-qr-swatch img {
  width: 100%;
  height: 100%;
  display: block;
}

.settings-qr-swatch.is-selected {
  border-color: var(--accent);
}

.settings-follow-qr-format {
  display: flex;
  gap: 6px;
}

.settings-qr-format-btn {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.settings-qr-format-btn.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.settings-loc-hint {
  margin: 6px 0 10px;
}

.settings-loc-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
}

.settings-loc-source-card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.settings-loc-source-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
}

.settings-loc-source-card.is-selected {
  border-color: rgba(255, 124, 0, 0.72);
  background: rgba(255, 124, 0, 0.08);
}

.settings-loc-source-title {
  font-size: 15px;
  font-weight: 700;
}

.settings-loc-source-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-loc-map-btn {
  width: auto;
  min-width: 0;
  padding-inline: 18px;
}

.settings-coord-detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}

.settings-coord-summary {
  display: grid;
  gap: 8px;
}

.settings-coord-summary-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-loc-map-btn-inline {
  margin-left: auto;
}

.settings-coord-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.settings-coord-summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-coord-summary-copy,
.settings-coord-summary-address {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.settings-coord-readout {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .settings-loc-source-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.map-pin-picker {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.map-pin-picker-canvas {
  position: absolute;
  inset: 0;
}

.map-pin-picker-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  width: 32px;
  height: 32px;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.map-pin-picker-pin svg {
  width: 100%;
  height: 100%;
  fill: #e0432b;
}

/* Desktop only: pin the header and footer to the top/bottom of the browser
   window and make .hero the single scrolling content viewport in between,
   instead of letting the whole page (header included) scroll. Scoped out of
   the mobile breakpoint below on purpose — mobile already lets the whole
   page scroll naturally and that works well as-is. */
@media (min-width: 981px) {
  body {
    height: 100dvh;
    overflow: hidden;
  }

  .partner-wrap {
    height: calc(100dvh - 44px);
    min-height: 0;
  }

  .partner-header {
    flex: 0 0 auto;
  }

  .partner-wrap > footer {
    flex: 0 0 auto;
  }

  .hero {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    overflow-y: auto;
  }

  #state-dashboard:not(.hidden) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .dashboard-chrome {
    flex: 0 0 auto;
  }

  .dashboard-workspace {
    flex: 1 1 auto;
  }
}

@media (max-width: 980px) {
  .dashboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-brand-row {
    align-items: center;
  }

  .dashboard-header-brand {
    margin-left: auto;
  }

  .dashboard-header-brand .dashboard-brand-text {
    text-align: left;
  }

  .dashboard-actions {
    grid-template-columns: auto 1fr auto;
    row-gap: 10px;
  }

  .dashboard-follower-pill {
    grid-column: 3;
    justify-self: end;
  }

  .dashboard-actions-right {
    grid-column: 3;
    justify-self: end;
  }

  .new-post-btn {
    width: auto;
    flex: 0 0 auto;
  }

  .dashboard-workspace {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .dashboard-workspace-content {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .dashboard-account-main {
    gap: 12px;
  }

  .dashboard-subnav .user-menu-card {
    max-width: none;
  }

  .dashboard-subnav-label,
  .dashboard-subnav .partner-nav-email {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .dashboard-posts-card {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .billing-plan-grid,
  .billing-summary-grid,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .billing-card-head {
    flex-direction: column;
  }

  #posts-list.post-list,
  .post-list {
    overflow: visible;
  }

  #posts-list .post-select {
    min-height: 0;
    display: block;
  }

  #posts-list .post-row {
    min-height: 0;
  }

  #posts-list .post-content {
    min-height: 0;
  }

  .post-detail-panel {
    display: none;
  }

  .post-detail-panel.mobile-open {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background:
      radial-gradient(1200px 600px at 50% -10%, rgba(255, 124, 0, 0.18), transparent 60%),
      radial-gradient(900px 500px at 10% 30%, rgba(255, 255, 255, 0.06), transparent 55%),
      var(--bg);
    padding: 0;
  }

  .post-detail-panel.mobile-open .post-detail-card {
    position: static;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-bottom: 0;
    box-shadow: none;
    background: linear-gradient(180deg, var(--card), rgba(255, 255, 255, 0.03));
  }

  .post-detail-panel.mobile-open .post-detail-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "title title"
      "back menu";
    align-items: center;
    row-gap: 8px;
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .post-detail-panel.mobile-open .detail-close-btn {
    grid-area: back;
    justify-self: start;
  }

  .post-detail-panel.mobile-open .post-detail-head h3 {
    grid-area: title;
    text-align: center;
    font-size: 16px;
  }

  .post-detail-panel.mobile-open .post-action-menu {
    margin-left: 0;
    grid-area: menu;
    justify-self: end;
  }

  .post-detail-panel.mobile-open .post-detail-content {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .detail-close-btn {
    display: inline-flex;
  }

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

  .create-post-modal {
    padding: 0;
    background:
      radial-gradient(1200px 600px at 50% -10%, rgba(255, 124, 0, 0.18), transparent 60%),
      radial-gradient(900px 500px at 10% 30%, rgba(255, 255, 255, 0.06), transparent 55%),
      var(--bg);
  }

  .create-post-card {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-bottom: 0;
    box-shadow: none;
    background: linear-gradient(180deg, var(--card), rgba(255, 255, 255, 0.03));
    padding-top: calc(14px + env(safe-area-inset-top));
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  body.partner-modal-open {
    overflow: hidden;
  }

  .btn {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .partner-header {
    flex-direction: row;
    align-items: center;
  }

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

  .post-hero {
    width: 116px;
    height: 76px;
  }

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

  .post-detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .partner-app-grid,
  .partner-app-grid-3 {
    grid-template-columns: 1fr;
  }

  .partner-app-nav .btn {
    width: 100%;
  }

  .create-post-time-location-grid {
    grid-template-columns: 1fr;
  }

  .create-post-claim-row {
    grid-template-columns: 1fr;
  }

  .create-post-generate-btn {
    width: 100%;
  }

  .create-post-image-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .create-post-image-controls .btn {
    width: 100%;
  }

  .create-post-actions {
    flex-direction: column-reverse;
  }

  .create-post-actions .btn {
    width: 100%;
  }

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

@media (max-width: 560px) {
  .partner-wrap {
    min-height: calc(100vh - 28px);
  }

  h2 {
    font-size: 24px;
  }

  .desc {
    font-size: 15px;
  }


}
