: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;
  margin-bottom: 18px;
}

.mylo-top-logo {
  width: 175px;
  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%);
  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;
}

.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-coords-mode {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.partner-app-coords-mode legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.partner-app-coords-mode label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.partner-app-coords-mode input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 50%;
  flex: 0 0 auto;
}

.partner-coord-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.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: 2px 0;
}

.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;
}

#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-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,
.dashboard-mobile-nav-scrim {
  display: none;
}

@media (min-width: 981px) {
  .dashboard-mobile-nav-toggle,
  .dashboard-mobile-nav-scrim {
    display: none !important;
  }

  .dashboard-subnav {
    display: flex !important;
  }
}

.dashboard-partner-logo {
  width: 60px;
  height: 60px;
  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 {
  min-width: 0;
  text-align: right;
}

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

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.dashboard-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

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

.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);
}

#user-menu-email {
  display: inline-block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.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: 12px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  --workspace-height: 620px;
  height: var(--workspace-height);
  max-height: min(760px, calc(100vh - 320px));
  min-height: 260px;
  overflow: visible;
}

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

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

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

#services-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: flex;
  flex-direction: column;
  gap: 18px;
  padding: 14px 10px;
  width: 72px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(20, 20, 22, 0.92);
  box-shadow: var(--shadow);
  min-height: 0;
  overflow: visible;
  position: relative;
  z-index: 8;
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.dashboard-subnav-group {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.dashboard-subnav-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  justify-items: center;
}

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

.dashboard-subnav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 14px;
  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;
}

.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: 6px;
  justify-items: center;
}

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

.dashboard-town-children {
  display: none;
  gap: 6px;
  justify-items: end;
}

.dashboard-town-group.expanded .dashboard-town-children,
.dashboard-town-group:hover .dashboard-town-children,
.dashboard-town-group:focus-within .dashboard-town-children {
  display: grid;
}

.dashboard-town-child {
  width: 46px;
  min-width: 46px;
  min-height: 46px;
  margin-left: 8px;
  opacity: 0.94;
}

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

.dashboard-subnav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  transform: translateY(-50%) translateX(-4px);
  min-width: max-content;
  max-width: 260px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(255, 124, 0, 0.08), transparent 45%),
    rgba(20, 20, 22, 0.97);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 20;
}

.dashboard-subnav-item:hover::after,
.dashboard-subnav-item:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.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: nowrap;
}

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

.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-account {
  display: flex;
}

.dashboard-subnav .user-menu {
  display: none;
}

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

.dashboard-subnav .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;
}

.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;
}

.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: min(860px, 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,
.town-menu-row-order {
  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 12px auto;
  z-index: 5;
  display: grid;
  gap: 10px;
  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);
  max-width: calc(100% - 24px);
}

.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 auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.town-menu-row-handle {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.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-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;
}

.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;
}

.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-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 h3 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

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

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

.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-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;
}

.hidden {
  display: none;
}

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

footer {
  margin-top: auto;
}

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

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

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

  .dashboard-header-brand {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

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

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

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

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

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

  .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-subnav {
    display: none;
    position: fixed;
    top: 96px;
    left: 12px;
    width: min(320px, calc(100vw - 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);
    gap: 14px;
    overflow: auto;
    z-index: 80;
  }

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

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

  .dashboard-subnav-label,
  .dashboard-subnav #user-menu-email {
    display: block;
  }

  .dashboard-subnav-item {
    width: 100%;
    min-height: 52px;
    padding: 12px;
    gap: 12px;
    border-radius: 12px;
    justify-content: flex-start;
  }

  .dashboard-town-group,
  .dashboard-town-children {
    width: 100%;
    justify-items: stretch;
  }

  .dashboard-town-child {
    margin-left: 14px;
    width: calc(100% - 14px);
    min-width: 0;
    min-height: 48px;
  }

  .dashboard-subnav-text {
    display: grid;
    opacity: 1;
    pointer-events: auto;
  }

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

  .dashboard-subnav-title {
    font-size: 13px;
  }

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

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

  .dashboard-subnav .user-menu {
    display: block;
    width: 100%;
  }

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

  .dashboard-subnav-label,
  .dashboard-subnav #user-menu-email {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

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

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

  .post-list {
    overflow: visible;
  }

  .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: column;
    align-items: flex-start;
  }

  .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;
  }

  #user-menu-email {
    max-width: 170px;
  }

}
