:root {
  --background: #F7F4F0;
  --foreground: #2D2A26;
  --primary: #6B7C6A;
  --secondary: #C4A484;
  --pie-sand: #EAE6E1;
  --pie-sand-dark: #E6DDD4;
  --pie-sand-light: #F2EDE7;
  --pie-sand-deep: #DDD4C7;
  --pie-grey: #D8D6D2;
  --pie-olive: #7A8C79;
  --pie-sage-light: #8B9A8A;
  --pie-sage-deep: #6B7C6A;
  --pie-gold: #C2A878;
  --pie-terracotta: #C4A484;
  --pie-cream-warm: #F7F4F0;
  --pie-cream-beige: #F0EDE8;
  --destructive: #E63946;
  --font-scale-cap: 1.4;
  --space-none: 0;
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-xxl: 24px;
  --space-xxxl: 32px;
  --space-huge: 48px;
  --radius-none: 0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  --shadow-minimal: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 3px 6px rgba(0, 0, 0, 0.12);
  --shadow-elegant: 0 6px 10px rgba(0, 0, 0, 0.16);
  --shadow-medium: 0 8px 12px rgba(0, 0, 0, 0.20);
  --shadow-strong: 0 10px 14px rgba(0, 0, 0, 0.24);
  --brand-primary: #6B7C6A;
  --brand-primary-dark: #5A6B59;
  --brand-primary-light: #8B9A8A;
  --app-bg: #F7F4F0;
  --surface: #FDFBF8;
  --surface-alt: #F0EDE8;
  --border: #E6DDD4;
  --border-strong: #DDD4C7;
  --text: #2D2A26;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --white: #FFFFFF;
  --success: #6B7C6A;
  --warning: #F59E0B;
  --danger: #E63946;
  --info: #3B82F6;
  --terracotta: #C4A484;
  --gold: #C2A878;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--app-bg);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--app-bg);
  color: var(--text);
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

a {
  color: var(--brand-primary);
  font-weight: 700;
  text-decoration: none;
}

.app-viewport {
  min-height: 100vh;
  background: var(--app-bg);
  display: flex;
  justify-content: center;
}

.phone-shell {
  width: min(100vw, 520px);
  min-height: 100vh;
  background: var(--app-bg);
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  border-left: 1px solid rgba(221, 212, 199, 0.7);
  border-right: 1px solid rgba(221, 212, 199, 0.7);
}

.topbar {
  min-height: 52px;
  background: var(--app-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left,
.topbar-actions,
.row {
  display: flex;
  align-items: center;
}

.topbar-left {
  flex: 0 0 auto;
}

.topbar-spacer {
  flex: 1;
}

.topbar-signin {
  margin-left: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.desktop-nav {
  display: none;
}

.desktop-nav-item {
  min-width: 0;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.desktop-nav-item:hover {
  color: var(--brand-primary);
  background: rgba(107, 124, 106, 0.10);
}

.desktop-nav-item.active {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.desktop-nav-item.active svg {
  color: var(--brand-primary);
}

.logo {
  border: 0;
  background: transparent;
  color: var(--brand-primary);
  font-size: 18px;
  line-height: 25px;
  font-weight: 800;
  padding: 4px;
  cursor: pointer;
}

.search-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}

.search-box {
  min-height: 32px;
  background: var(--surface-alt);
  border: 1px solid transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.search-history,
.search-suggestions,
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(45, 42, 38, 0.12);
  z-index: 80;
  overflow: hidden;
}

.search-history {
  left: 0;
  right: 0;
}

.search-history-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

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

.search-history .search-history-term {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-history .search-history-remove {
  flex: 0 0 auto;
  margin-right: 6px;
}

.search-suggestions {
  left: 0;
  right: 0;
  max-height: 300px;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  overflow-y: auto;
  padding: 4px 0;
}

.search-history button,
.search-suggestion-row,
.user-menu button {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 11px 12px;
  cursor: pointer;
  color: var(--text);
}

.search-history button:hover,
.search-suggestion-row:hover,
.user-menu button:hover {
  background: var(--surface-alt);
}

.search-suggestion-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--surface-alt);
}

.search-suggestion-type {
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--surface-alt);
  padding: 4px 8px;
  color: var(--text);
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
}

.search-suggestion-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.search-suggestion-main strong {
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
  font-weight: 600;
}

.search-suggestion-main small,
.search-suggestion-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.search-suggestion-loading {
  display: flex;
  justify-content: center;
  padding: 12px;
}

.search-suggestion-loading .spinner {
  color: var(--text);
}

.search-suggestion-empty {
  padding: 12px;
  font-weight: 700;
}

.search-history-head {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-history-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-history-head button {
  width: auto;
  padding: 0;
  color: var(--warning);
  font-size: 12px;
  font-weight: 800;
}

.user-menu {
  width: 280px;
  min-width: 280px;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75;
  border: 0;
  background: rgba(0, 0, 0, 0.25);
  cursor: default;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  min-width: 0;
}

.user-menu-header .avatar {
  border-width: 1.5px;
}

.user-menu-header .avatar-fallback {
  background: var(--border-strong);
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
  font-weight: 700;
}

.user-menu-header div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-menu-header strong,
.user-menu-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.user-menu button {
  display: flex;
  align-items: center;
  padding: 8px 4px;
  gap: 8px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 21px;
  font-weight: 600;
}

.user-menu button.danger {
  color: var(--danger);
}

.avatar-button,
.avatar-link {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.main-scroll {
  overflow-y: auto;
  min-height: 0;
  scroll-behavior: smooth;
}

.main-scroll-public {
  padding-bottom: 0;
}

.screen {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.center-screen {
  min-height: 52vh;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.flex-1 {
  flex: 1;
}

.success-copy {
  max-width: 420px;
}

.screen.flush {
  padding: 0;
  gap: 0;
}

.screen-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen-title,
.page-header h1 {
  font-size: 24px;
  line-height: 31px;
  margin: 0;
  font-weight: 800;
}

.screen-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  margin: -8px 0 4px;
}

.screen-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.page-header {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
}

.page-header p,
p {
  margin: 0;
  font-size: 15px;
  line-height: 23px;
  color: var(--muted);
}

.greeting {
  padding-top: 20px;
  padding-bottom: 4px;
  font-size: 24px;
  line-height: 31px;
  font-weight: 800;
}

.section,
.stack,
.form-stack,
.button-stack,
.activity-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack.tight {
  gap: 2px;
}

.feed-footer {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.section-header h2,
.form-section-card h2 {
  font-size: 18px;
  line-height: 25px;
  margin: 0;
}

.marketplace-screen {
  gap: 16px;
}

.marketplace-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 12px;
}

.marketplace-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marketplace-subtitle {
  max-width: 620px;
}

.marketplace-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.marketplace-stat-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 4px 9px;
  font-size: 12px;
  line-height: 17px;
  font-weight: 800;
}

.marketplace-search {
  min-height: 40px;
  border-radius: 10px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted);
}

.marketplace-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.marketplace-category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 2px;
  scrollbar-width: none;
}

.marketplace-category-row::-webkit-scrollbar {
  display: none;
}

.marketplace-category-chip {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
  line-height: 17px;
  font-weight: 800;
  cursor: pointer;
}

.marketplace-category-chip.selected {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--white);
}

.marketplace-featured-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marketplace-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.marketplace-section-head h2 {
  margin: 0;
  font-size: 15px;
  line-height: 21px;
  font-weight: 800;
}

.marketplace-section-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  font-weight: 800;
}

.marketplace-featured-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.marketplace-featured-row::-webkit-scrollbar {
  display: none;
}

.marketplace-featured-card {
  width: 148px;
  flex: 0 0 148px;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.marketplace-featured-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-alt);
  display: block;
}

.product-image.marketplace-featured-image {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  flex: 1 1 auto;
}

.marketplace-featured-name {
  color: var(--text);
  font-size: 12px;
  line-height: 17px;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.marketplace-featured-price {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  font-weight: 800;
}

.marketplace-product-card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
}

.marketplace-product-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 14px rgba(45, 42, 38, 0.08);
}

.marketplace-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1.35;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
}

.product-image.marketplace-card-image {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  flex: 1 1 auto;
}

.marketplace-card-badges {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.marketplace-card-category-badge {
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(45, 42, 38, 0.72);
  color: var(--white);
  padding: 4px 8px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 800;
}

.marketplace-quest-badge {
  border-radius: 999px;
  background: var(--warning);
  color: var(--white);
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
}

.marketplace-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 4px 4px;
}

.marketplace-card-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.marketplace-card-name {
  min-width: 0;
  flex: 1;
  color: var(--text);
  font-size: 17px;
  line-height: 23px;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.marketplace-card-price-row {
  display: flex;
}

.marketplace-card-price {
  color: var(--text);
  font-size: 15px;
  line-height: 21px;
  font-weight: 800;
}

.marketplace-card-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.marketplace-creator-count {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  font-weight: 800;
}

.marketplace-inline-quest {
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.10);
  color: var(--warning);
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 17px;
  font-weight: 800;
}

.marketplace-avatar-stack {
  display: flex;
  align-items: center;
  min-width: 28px;
  flex: 0 0 auto;
}

.marketplace-avatar-frame {
  width: 26px;
  height: 26px;
  overflow: hidden;
  border: 2px solid var(--surface);
  border-radius: 13px;
  background: var(--surface-alt);
  display: inline-flex;
}

.marketplace-avatar-frame .avatar {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 50%;
}

.marketplace-inline-quest .marketplace-avatar-frame {
  border-color: #fbecd0;
}

.marketplace-feed-footer {
  min-height: 36px;
}

.marketplace-listing-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marketplace-listing-selector h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 22px;
  font-weight: 900;
}

.marketplace-listing-row {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.marketplace-listing-row.selected {
  border-color: var(--brand-primary);
  background: rgba(107, 124, 106, 0.10);
}

.marketplace-listing-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.marketplace-listing-copy strong {
  font-size: 14px;
  line-height: 20px;
  font-weight: 900;
}

.marketplace-listing-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.marketplace-listing-copy .marketplace-listing-quest {
  color: var(--warning);
  font-weight: 900;
}

.controls-band {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

.bottom-nav {
  background: var(--app-bg);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  position: sticky;
  bottom: 0;
  z-index: 40;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.bottom-nav-item {
  min-width: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
  font-weight: 600;
  cursor: pointer;
}

.bottom-nav-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
}

.bottom-nav-item.active {
  color: var(--brand-primary);
}

.bottom-nav-item.active .bottom-nav-icon {
  background: rgba(107, 124, 106, 0.12);
  border-color: var(--border);
}

.card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--app-bg);
  color: var(--text);
}

.card-padding-none {
  padding: var(--space-none);
}

.card-padding-xxs {
  padding: var(--space-xxs);
}

.card-padding-xs {
  padding: var(--space-xs);
}

.card-padding-sm {
  padding: var(--space-sm);
}

.card-padding-md {
  padding: var(--space-md);
}

.card-padding-lg {
  padding: var(--space-lg);
}

.card-padding-xl {
  padding: var(--space-xl);
}

.card-padding-xxl {
  padding: var(--space-xxl);
}

.card-padding-xxxl {
  padding: var(--space-xxxl);
}

.card-padding-huge {
  padding: var(--space-huge);
}

.card-elevation-minimal {
  box-shadow: var(--shadow-minimal);
}

.card-elevation-soft {
  box-shadow: var(--shadow-soft);
}

.card-elevation-elegant {
  box-shadow: var(--shadow-elegant);
}

.card-elevation-medium {
  box-shadow: var(--shadow-medium);
}

.card-elevation-strong {
  box-shadow: var(--shadow-strong);
}

.card-button {
  appearance: none;
  text-align: left;
  cursor: pointer;
}

.card-button:active {
  opacity: 0.85;
}

.card-button:hover {
  border-color: var(--border-strong);
}

.btn {
  min-width: 0;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 16px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

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

.btn-loading {
  pointer-events: none;
}

.btn-spinner {
  border-color: currentColor;
  border-top-color: transparent;
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn-sm {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 14px;
  line-height: 18px;
}

.btn-lg {
  min-height: 52px;
  border-radius: 14px;
  padding: 8px 20px;
  font-size: 16px;
  line-height: 21px;
}

.btn-icon,
.btn-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--brand-primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-link {
  min-height: 0;
  padding-inline: 0;
  background: transparent;
  color: var(--brand-primary);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-danger {
  background: rgba(230, 57, 70, 0.1);
  color: var(--danger);
  border-color: rgba(230, 57, 70, 0.25);
}

.btn-destructive {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.icon-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
}

.icon-btn-sm {
  width: 32px;
  height: 32px;
}

.icon-btn-md {
  width: 40px;
  height: 40px;
}

.icon-btn-lg {
  width: 48px;
  height: 48px;
}

.icon-btn-surface {
  background: var(--surface);
  border-color: var(--border);
}

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

.icon-btn-active,
.icon-btn:hover {
  color: var(--brand-primary);
  background: rgba(107, 124, 106, 0.12);
  border-color: var(--border);
}

.icon-btn-danger {
  color: var(--danger);
}

.icon-btn-danger:hover {
  color: var(--danger);
  background: rgba(230, 57, 70, 0.1);
}

.follow-icon-btn {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid var(--brand-primary);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--brand-primary);
  background: var(--surface);
}

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

.follow-icon-btn-active {
  color: var(--white);
  background: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
}

.follow-icon-badge {
  position: absolute;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: var(--brand-primary-dark);
  border: 2px solid var(--surface);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-alt);
  white-space: nowrap;
}

.badge-sm {
  min-height: 22px;
  padding: 2px 8px;
}

.badge-md {
  min-height: 28px;
  padding: 4px 12px;
}

.badge-with-icon {
  gap: 5px;
}

.badge-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.badge-success {
  color: var(--success);
  background: rgba(107, 124, 106, 0.12);
}

.badge-secondary {
  color: var(--text);
  background: var(--surface-alt);
}

.badge-outline {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.badge-warning {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.12);
}

.badge-danger {
  color: var(--danger);
  background: rgba(230, 57, 70, 0.12);
}

.badge-destructive,
.badge-error {
  color: var(--danger);
  background: rgba(230, 57, 70, 0.12);
}

.badge-info {
  color: var(--info);
  background: rgba(59, 130, 246, 0.12);
}

.segmented {
  display: flex;
  gap: 8px;
}

.segmented button,
.top-tabs button {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-height: 40px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.segmented button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.segmented button.selected,
.top-tabs button.active {
  background: var(--brand-primary);
  color: var(--white);
  border-color: var(--brand-primary);
}

.segmented button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.segmented-helper {
  font-size: 10px;
  line-height: 12px;
  font-weight: 700;
  color: var(--muted);
}

.segmented button.selected .segmented-helper {
  color: rgba(255, 255, 255, 0.78);
}

.sub-tabs {
  margin-top: 2px;
}

.top-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border-bottom: 0;
}

.top-tabs button {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
}

.top-tabs button.active {
  color: var(--white);
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.avatar {
  display: inline-grid;
  place-items: center;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--muted);
  font-weight: 800;
  flex: 0 0 auto;
}

.avatar-xs {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  font-size: 10px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  font-size: 12px;
}

.avatar-md {
  width: 48px;
  height: 48px;
  border-radius: 24px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 32px;
}

.avatar-xl {
  width: 76px;
  height: 76px;
  border-radius: 38px;
  font-size: 22px;
}

.product-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.product-image.wide {
  width: 100%;
  height: 145px;
}

.product-form-preview {
  width: 96px;
  height: 96px;
  align-self: center;
}

.product-price-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.cashback-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.cashback-card-pill {
  border: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
}

button.cashback-card-pill {
  cursor: pointer;
}

.cashback-card-pill-success {
  background: var(--brand-primary);
  color: var(--white);
}

.cashback-card-pill-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.quest-bonus-card {
  margin-top: 12px;
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.08);
  cursor: pointer;
}

.quest-bonus-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--warning);
}

.quest-bonus-card-head strong {
  flex: 1;
  color: var(--text);
  font-size: 15px;
  line-height: 23px;
  font-weight: 800;
}

.quest-bonus-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}

.quest-bonus-card span {
  display: inline-block;
  margin-top: 8px;
  color: var(--warning);
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.storefront-list-hero {
  gap: 4px;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.quest-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-trigger {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 12px;
  text-align: left;
}

.filter-trigger-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 21px;
  font-weight: 600;
}

.filter-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.filter-scroll-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 16px;
}

.input-with-icon {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.input-with-icon .input {
  min-height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
}

.option-chip-grid,
.option-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-chip {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  cursor: pointer;
}

.option-chip-selected,
.option-chip.selected {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: var(--white);
  font-weight: 600;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.modal-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 4px;
}

.quest-proof-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-proof-preview-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.quest-proof-preview {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--app-bg);
}

.quest-proof-preview-wrap .icon-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--surface);
  border-color: var(--border);
  color: var(--danger);
}

.screenshot-upload-modal .file-control {
  justify-content: flex-start;
  border-radius: 10px;
  background: var(--app-bg);
  padding: 12px 16px;
  font-weight: 600;
}

.hero-product-image {
  width: 100%;
  height: 320px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.product-detail-content {
  padding-bottom: 18px;
}

.product-description-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 24px;
}

.product-description-card p {
  margin: 0;
  color: var(--muted);
  line-height: 22px;
}

.product-detail-bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--app-bg);
  border-top: 1px solid var(--border);
}

.verify-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.center-text {
  text-align: center;
}

.metric-card,
.activity-card,
.quest-card,
.influencer-card,
.product-card,
.profile-head,
.auth-card,
.connect-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.metric-head span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.budget-helper {
  color: var(--warning);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.cashback-budget-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cashback-budget-copy {
  flex: 1;
  min-width: 0;
}

.cashback-budget-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.cashback-budget-history {
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  cursor: pointer;
}

.cashback-budget-history svg {
  color: var(--muted);
}

.cashback-earned-card {
  gap: 8px;
}

.cashback-pending {
  margin-top: 2px;
  font-size: 12px;
  line-height: 17px;
}

.metric-amount {
  font-size: 20px;
  line-height: 28px;
  font-weight: 800;
}

.topup-history-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.topup-balance-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topup-balance-label {
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

.topup-balance-value {
  color: var(--text);
  font-size: 17px;
  line-height: 24px;
  font-weight: 800;
}

.topup-quick-row {
  display: flex;
  gap: 8px;
}

.topup-quick-chip {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 8px;
  font-size: 14px;
  line-height: 21px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.topup-quick-chip-active {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: var(--white);
}

.topup-quick-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.topup-status-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  background: var(--surface-alt);
  padding: 12px;
}

.topup-status-banner .spinner {
  color: var(--brand-primary);
}

.topup-pending-banner {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.topup-success-banner {
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
  font-weight: 700;
}

.topup-status-banner span:last-child {
  flex: 1;
}

.topup-history-hint {
  align-items: flex-start;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.topup-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topup-history-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topup-history-item-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topup-history-amount {
  color: var(--text);
  font-size: 17px;
  line-height: 24px;
  font-weight: 800;
}

.topup-history-timestamp {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.topup-history-in-flight {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 17px;
}

.topup-history-order {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  color: var(--faint);
  font-family: Courier, monospace;
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topup-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
}

.topup-history-empty strong {
  color: var(--text);
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
}

.topup-history-empty p {
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.withdraw-success-screen {
  gap: 12px;
}

.withdraw-success-title {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 28px;
  font-weight: 800;
  text-align: center;
}

.withdraw-success-body {
  max-width: 420px;
  color: var(--muted);
  font-size: 15px;
  line-height: 23px;
  text-align: center;
}

.withdraw-done-button {
  min-width: 160px;
  margin-top: 12px;
}

.withdraw-balance-row,
.withdraw-connected-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.withdraw-balance-label {
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

.withdraw-balance-value {
  color: var(--text);
  font-size: 17px;
  line-height: 24px;
  font-weight: 800;
}

.withdraw-connected-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.withdraw-connected-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

.withdraw-connected-email {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 23px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.withdraw-change-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand-primary);
  padding: 0;
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
  cursor: pointer;
}

.withdraw-change-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.withdraw-connect-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.withdraw-connect-intro {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.withdraw-connect-intro span {
  flex: 1;
}

.withdraw-form-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 17px;
}

.withdraw-footer-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.withdraw-footer-button {
  flex: 1 1 0;
}

.topup-footer-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.topup-footer-button {
  flex: 1 1 0;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-banner .loader {
  justify-content: flex-start;
  padding: 0;
}

.status-banner-success {
  color: var(--success);
  border-color: rgba(107, 124, 106, 0.24);
  background: rgba(107, 124, 106, 0.1);
}

.status-banner-action {
  width: 100%;
  appearance: none;
  cursor: pointer;
  text-align: left;
}

.status-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-banner-title {
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.status-banner-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

.topup-order-code {
  display: block;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 7px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--brand-primary);
}

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

.compact {
  font-size: 12px;
  line-height: 17px;
}

.line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.self-start {
  align-self: flex-start;
}

.danger-zone-deactivate .btn-icon {
  color: var(--danger);
}

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

.gap-sm {
  gap: 8px;
}

.card-actions {
  flex: 0 0 auto;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.category-chip {
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.influencer-card-main,
.profile-row,
.activity-head,
.influencer-row,
.history-card,
.eligible-detail-card,
.influencer-row-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.influencer-card {
  margin-bottom: 12px;
  background: var(--app-bg);
}

.influencer-card-main {
  align-items: flex-start;
}

.influencer-card-body,
.activity-title {
  flex: 1;
  min-width: 0;
}

.influencer-card .row.between.start.gap-sm {
  margin-bottom: 8px;
}

.influencer-card .row.between.start.gap-sm > div:first-child {
  flex: 1;
  min-width: 0;
}

.influencer-card h3,
.product-card h3,
.quest-card h3,
.activity-block h4 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 22px;
}

.influencer-card h3 {
  line-height: 24px;
  font-weight: 700;
}

.influencer-card .line-clamp {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.influencer-card .chip-row {
  margin-bottom: 12px;
}

.sortable-quest-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sortable-quest-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: var(--surface-alt);
  padding: 8px 12px;
  position: relative;
  z-index: 1;
}

.sortable-quest-drag-handle {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: var(--border);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.sortable-quest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sortable-quest-actions .icon-btn-danger,
.compact-product-actions .icon-btn-danger {
  border-color: rgba(230, 57, 70, 0.2);
  background: rgba(230, 57, 70, 0.05);
}

.split-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 2px;
}

.split-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.split-stats span + span {
  border-left: 1px solid var(--border);
}

.split-stats strong {
  color: var(--text);
  font-size: 15px;
  line-height: 23px;
  font-weight: 700;
}

.cashback-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  color: var(--warning);
  background: rgba(245, 158, 11, 0.16);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.cashback-pill.big {
  font-size: 14px;
  padding: 8px 11px;
}

.task-list,
.requirements-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.task-row,
.requirement-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.quest-task-done span {
  color: var(--muted);
  text-decoration: line-through;
}

.quest-single-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--app-bg);
  padding: 12px;
}

.quest-single-product-card .product-image.quest-single-product-image {
  width: 80px;
  height: 80px;
  border-radius: 10px;
}

.quest-single-product-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.quest-single-product-name {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-single-product-price {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.requirement-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.requirement-done strong {
  color: var(--muted);
  text-decoration: line-through;
}

.requirement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
}

.ig-handle-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  padding: 10px;
}

.helper-text {
  margin-top: -4px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.eligible-products {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}

.eligible-product {
  width: var(--eligible-product-size, 110px);
  flex: 0 0 var(--eligible-product-size, 110px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
  color: var(--text);
}

.eligible-product:disabled {
  cursor: default;
}

.eligible-product .product-image {
  width: 100%;
  height: var(--eligible-product-size, 110px);
  border-radius: 10px;
  background: var(--surface);
}

.eligible-product span:not(.badge) {
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

.eligible-product-price {
  color: var(--text);
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
}

.quest-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  gap: 10px;
}

.quest-meta .progress {
  width: 120px;
  height: 6px;
  background: var(--border);
}

.quest-meta .progress span {
  height: 6px;
}

.state-strip {
  margin: -16px -16px 12px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--white);
  font-size: 12px;
  line-height: 17px;
  font-weight: 800;
  letter-spacing: 0.4px;
  border-radius: 13px 13px 0 0;
}

.state-in-progress {
  background: var(--warning);
}

.state-completed {
  background: var(--success);
}

.state-expired {
  background: var(--muted);
}

.quest-card {
  background: var(--surface);
}

.quest-completed {
  background: rgba(107, 124, 106, 0.12);
  border-color: var(--brand-primary);
}

.quest-expired {
  opacity: 0.84;
}

.activity-title {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-title span {
  color: var(--muted);
  font-size: 12px;
}

.activity-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-separator {
  height: 1px;
  background: var(--border);
  margin-top: 8px;
}

.activity-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.activity-icon-wrap {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.activity-product-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.activity-product-image-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.activity-product-image-button .product-image.activity-product-image {
  width: 92px;
  height: 92px;
  border-radius: 10px;
}

.activity-product-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.activity-block h4 {
  font-size: 14px;
  line-height: 21px;
  font-weight: 700;
}

.activity-product-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.activity-product-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-product-meta-row .price {
  font-size: 14px;
  line-height: 21px;
  font-weight: 700;
}

.activity-cashback-pill {
  border-radius: var(--radius-pill);
  background: rgba(107, 124, 106, 0.16);
  color: var(--success);
  padding: 2px 8px;
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.price {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.price.large {
  font-size: 24px;
}

.compact-product-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.compact-product-clickable {
  padding-right: 20px;
}

.compact-product-click-indicator {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary);
  color: var(--white);
}

.compact-product-card .product-image.compact-product-image {
  width: 100px;
  height: 100px;
  border-radius: 10px;
}

.compact-product-card h3 {
  font-size: 15px;
  line-height: 23px;
  font-weight: 700;
}

.product-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 8px;
}

.compact-product-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.compact-product-ineligible {
  border: 1px solid rgba(107, 114, 128, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(107, 114, 128, 0.12);
  color: var(--muted);
  padding: 2px 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.product-card-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-product-card .price {
  font-size: 18px;
  line-height: 25px;
  font-weight: 800;
}

.compact-product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-product-actions .btn-secondary {
  background: var(--app-bg);
}

.public-profile-screen {
  gap: 16px;
}

.profile-with-banner {
  padding-top: 0;
}

.public-profile-hero {
  display: flex;
  flex-direction: column;
  margin: -16px -16px 0;
  padding: 0 16px 16px;
  background:
    linear-gradient(180deg, rgba(253, 251, 248, 0) 0%, var(--app-bg) 84%),
    var(--pie-sand-light);
}

.public-profile-banner {
  width: calc(100% + 32px);
  height: 184px;
  margin: 0 -16px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.public-profile-banner-fallback,
.public-profile-banner-control {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--pie-sand-deep), var(--surface) 54%, rgba(107, 124, 106, 0.20));
  color: rgba(45, 42, 38, 0.38);
}

.public-profile-banner-control {
  color: var(--muted);
  cursor: pointer;
}

.public-profile-banner-control img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-file-hitarea {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.banner-file-hitarea input,
.avatar-edit-control input {
  display: none;
}

.public-banner-remove {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.public-banner-change {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  padding: 4px 10px;
  font-size: 12px;
  line-height: 17px;
  font-weight: 800;
  pointer-events: none;
}

.public-avatar-edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.avatar-edit-control {
  cursor: pointer;
}

.public-profile {
  position: relative;
  z-index: 1;
  margin-top: -46px;
  background: var(--surface);
  border-color: rgba(221, 212, 199, 0.88);
  box-shadow: 0 16px 38px rgba(45, 42, 38, 0.14);
}

.public-profile-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
}

.public-avatar-wrap {
  margin-top: -36px;
}

.public-avatar-wrap .avatar {
  width: 88px;
  height: 88px;
  border: 4px solid var(--surface);
  border-radius: 44px;
  box-shadow: 0 10px 24px rgba(45, 42, 38, 0.16);
}

.public-profile-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.public-title-block {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.public-profile h1 {
  font-size: 25px;
  line-height: 31px;
  letter-spacing: 0;
}

.public-profile-bio {
  max-width: 58ch;
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
}

.public-category-row {
  margin-top: 2px;
}

.public-name-grid {
  width: 100%;
}

.public-profile-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.public-profile-actions .btn {
  flex: 1 1 0;
}

.public-follow-button {
  min-width: 132px;
}

.followers-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

button.followers-pill {
  cursor: pointer;
}

.followers-pill svg {
  color: var(--brand-primary);
}

.followers-pill.disabled {
  opacity: 0.9;
}

.public-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.public-stat {
  min-width: 0;
  min-height: 66px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--app-bg);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  padding: 10px;
}

.public-stat-icon {
  width: 30px;
  height: 30px;
  grid-row: 1 / 3;
  border-radius: 8px;
  background: rgba(107, 124, 106, 0.12);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.public-stat strong,
.public-stat span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-stat strong {
  color: var(--text);
  font-size: 16px;
  line-height: 20px;
  font-weight: 900;
}

.public-stat span:last-child {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
  font-weight: 800;
}

.public-quick-actions {
  margin-top: 12px;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--app-bg);
  padding: 4px;
}

.profile-tabs button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  cursor: pointer;
}

.profile-tabs button strong {
  color: var(--text);
  font-size: 14px;
  line-height: 18px;
  font-weight: 900;
}

.profile-tabs button.selected {
  background: var(--brand-primary);
  color: var(--white);
}

.profile-tabs button.selected strong {
  color: var(--white);
}

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

.filter-chip {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 7px 10px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.selected {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: var(--text-inverse);
}

.social-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.social-link-card {
  position: relative;
  flex: 1 1 min(45%, 210px);
  min-width: min(45%, 210px);
  min-height: 120px;
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
}

.social-link-card-icon {
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.social-link-platform {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-link-username {
  max-width: 100%;
  overflow: hidden;
  color: var(--brand-primary);
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-edit-wrap {
  position: relative;
}

.social-delete-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 10;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--danger);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.social-link-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--muted);
}

.add-social-screen {
  gap: 8px;
  padding-top: 4px;
  padding-bottom: 24px;
}

.add-social-subtitle {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.add-social-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.add-social-platform-label {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
  font-weight: 600;
}

.add-social-platform-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-social-picker-wrap {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
}

.add-social-picker-control {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0 12px;
  font-size: 15px;
}

.add-social-picker-control:disabled {
  opacity: 0.65;
}

.add-social-platform-icon-wrap {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.add-social-field {
  margin-top: 4px;
}

.add-social-footer-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.add-social-footer-button {
  flex: 1 1 0;
}

.profile-head h1,
.profile-head h2,
.auth-card h1,
.connect-card h1,
.quest-detail-head h1 {
  margin: 0;
  font-size: 22px;
  line-height: 29px;
  font-weight: 900;
}

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

.settings-list,
.settings-card {
  display: flex;
}

.settings-list {
  flex-direction: column;
  gap: 0;
}

.settings-list h3 {
  margin: 0 0 8px;
}

.settings-list button,
.settings-card {
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.settings-list button:last-child,
.settings-card:last-child {
  border-bottom: 0;
}

.settings-list .danger {
  color: var(--danger);
  font-weight: 800;
}

.social-link-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-link-copy a {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.dashboard-list-card {
  min-height: 58px;
  gap: 12px;
}

.dashboard-social-stack {
  gap: 8px;
}

.dashboard-social-section-title {
  margin: 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.dashboard-social-icon {
  color: var(--brand-primary);
  flex: 0 0 auto;
}

.dashboard-social-icon-muted {
  color: var(--muted);
  flex: 0 0 auto;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dashboard-stat {
  align-items: center;
  text-align: center;
  gap: 2px;
}

.dashboard-stat strong {
  font-size: 24px;
}

.dashboard-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  color: var(--muted);
}

.field-hint {
  font-size: 12px;
  color: var(--faint);
}

.field-error {
  font-size: 12px;
  font-weight: 700;
  color: var(--danger);
}

.field-success {
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
}

.text-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.text-field-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.text-field-required,
.text-field-error {
  color: var(--danger);
}

.text-field-row {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--surface);
}

.text-field-row:focus-within {
  border-color: var(--brand-primary);
}

.text-field-row-error {
  border-color: var(--danger);
}

.text-field-row-disabled {
  opacity: 0.6;
  background: var(--surface-alt);
}

.text-field-control {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 4px 0;
  font-size: 15px;
  line-height: 20px;
}

.text-field-control::placeholder {
  color: var(--faint);
}

.text-field-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--muted);
}

.text-field-message {
  font-size: 12px;
  line-height: 17px;
}

.text-field-helper {
  color: var(--faint);
}

.picker-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.picker-field-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.picker-field-wrap {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--surface);
}

.picker-field-control {
  width: 100%;
  min-height: 52px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-size: 15px;
  line-height: 23px;
  outline: 0;
}

.price-input {
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
}

.picker-field-wrap:focus-within {
  border-color: var(--brand-primary);
}

.picker-field-disabled .picker-field-wrap,
.picker-field-disabled .picker-field-control {
  background: var(--surface-alt);
}

.picker-field-disabled .picker-field-wrap {
  opacity: 0.7;
}

.picker-field-disabled .picker-field-control {
  color: var(--muted);
}

.picker-field-helper {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}

.input-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(107, 124, 106, 0.08);
}

.input-summary span {
  color: var(--muted);
  font-size: 12px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--brand-primary);
  flex: 0 0 auto;
}

.checkbox-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.checkbox-copy strong {
  font-size: 13px;
  line-height: 18px;
}

.checkbox-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 11px;
  outline: 0;
}

.input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(107, 124, 106, 0.12);
}

.input:disabled {
  opacity: 0.65;
  background: var(--surface-alt);
  color: var(--muted);
  cursor: not-allowed;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

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

.media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 12px;
  align-items: start;
}

.media-picker {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.centered-media {
  align-items: center;
}

.centered-media .button-grid {
  width: min(100%, 320px);
}

.banner-preview,
.avatar-preview {
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
}

.banner-preview {
  aspect-ratio: 16 / 7;
  border-radius: 8px;
}

.avatar-preview {
  width: 104px;
  height: 104px;
  border-radius: 52px;
  align-self: center;
}

.media-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.file-control {
  position: relative;
  overflow: hidden;
}

.file-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.media-preview-control {
  display: block;
  cursor: pointer;
}

.media-preview-control .banner-preview,
.media-preview-control .avatar-preview {
  display: block;
}

.media-preview-control .avatar-preview {
  margin: 0 auto;
}

.media-preview-control input {
  display: none;
}

.check-row,
.check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.check-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 9px;
}

.quest-product-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quest-product-price {
  color: var(--text);
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.quest-product-cashback-pill {
  border-radius: 999px;
  background: rgba(107, 124, 106, 0.16);
  color: var(--success);
  padding: 2px 8px;
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.consent-row {
  align-items: flex-start;
}

.consent-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-weight: 400;
}

.consent-copy strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.consent-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.modal-backdrop.telemetry-consent-backdrop {
  align-items: center;
  padding: 16px;
}

.modal-sheet.telemetry-consent-sheet {
  width: min(100%, 520px);
  max-height: calc(100vh - 32px);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-elegant);
}

.telemetry-consent-sheet .modal-header {
  margin-bottom: 0;
}

.telemetry-consent-sheet .modal-header h2 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 800;
}

.telemetry-consent-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.telemetry-consent-subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 23px;
}

.telemetry-switch-row {
  min-height: 92px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
}

.telemetry-switch-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-switch-copy strong {
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}

.telemetry-switch-copy span {
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}

.telemetry-switch-control {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.telemetry-switch-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.telemetry-switch-track {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--border-strong);
  padding: 3px;
  transition: background 120ms ease;
}

.telemetry-switch-thumb {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-minimal);
  transition: transform 120ms ease, background 120ms ease;
}

.telemetry-switch-control input:checked + .telemetry-switch-track {
  background: var(--terracotta);
}

.telemetry-switch-control input:checked + .telemetry-switch-track .telemetry-switch-thumb {
  transform: translateX(20px);
  background: var(--brand-primary);
}

.telemetry-switch-control input:focus-visible + .telemetry-switch-track {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
}

.telemetry-consent-version {
  color: var(--faint);
  font-size: 13px;
  line-height: 18px;
}

.telemetry-consent-actions {
  display: flex;
  gap: 8px;
}

.telemetry-consent-actions .btn {
  flex: 1 1 0;
}

.telemetry-dev-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.telemetry-dev-title {
  color: var(--text);
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
}

.telemetry-dev-copy,
.telemetry-dev-confirm p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.telemetry-dev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.telemetry-dev-actions .btn {
  flex: 1 1 150px;
}

.telemetry-dev-confirm {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(230, 57, 70, 0.25);
  border-radius: 8px;
  background: rgba(230, 57, 70, 0.08);
}

.telemetry-dev-confirm strong {
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.check-card .product-image {
  width: 52px;
  height: 52px;
}

.check-card-disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.form-section-card,
.task-editor {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-editor {
  background: var(--surface);
}

.quest-product-dropdown-trigger {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.quest-product-dropdown-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quest-product-dropdown-trigger:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.quest-product-dropdown-menu {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-selected-products {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quest-selected-product-pill {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(107, 124, 106, 0.22);
  border-radius: 8px;
  background: rgba(107, 124, 106, 0.1);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.quest-selected-product-pill button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.quest-selected-product-pill button:hover {
  background: rgba(107, 124, 106, 0.12);
  color: var(--text);
}

.quest-limit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 140px);
  align-items: end;
  gap: 12px;
}

.quest-range-input {
  width: 100%;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

.quest-range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.quest-completion-number {
  text-align: center;
}

@media (max-width: 640px) {
  .quest-limit-grid {
    grid-template-columns: 1fr;
  }
}

.task-validation-notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(107, 124, 106, 0.24);
  border-radius: 8px;
  background: rgba(107, 124, 106, 0.08);
  padding: 10px 12px;
  color: var(--success);
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.task-validation-notice-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-validation-notice-title {
  color: var(--text);
  font-weight: 600;
}

.incomplete-task-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--app-bg);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

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

.task-url-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.affiliate-connection {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.affiliate-header {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.affiliate-title-block,
.affiliate-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.affiliate-title-block {
  min-width: 0;
}

.instruction-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.empty-state,
.loader {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-state {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  padding: 24px 12px;
}

.empty-state h3 {
  color: var(--text);
  margin: 0;
  font-size: 17px;
}

.loader {
  min-height: 160px;
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.load-more-spinner-row {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--brand-primary);
  animation: spin 900ms linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
  flex: 0 0 auto;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.modal-sheet {
  width: min(100vw, 520px);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: 0 -14px 40px rgba(45, 42, 38, 0.18);
}

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

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.quest-summary-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 8px;
}

.quest-summary-card div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quest-summary-card strong {
  font-size: 15px;
}

.quest-summary-card span {
  color: var(--muted);
  font-size: 11px;
}

.quest-detail-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.quest-detail-section h2 {
  margin: 0;
  font-size: 18px;
  line-height: 25px;
}

.quest-detail-cta-meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 4px;
}

.quest-detail-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.quest-detail-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.quest-detail-progress-label strong {
  color: var(--text);
}

.quest-detail-time {
  text-align: center;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.connect-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--brand-primary);
}

.connection-screen {
  gap: 12px;
}

.connect-card {
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  gap: 8px;
}

.connect-title-row,
.connect-connected-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connect-title-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.connection-body {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}

.connect-connected-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.connected-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  background: rgba(107, 124, 106, 0.16);
  color: var(--brand-primary);
  padding: 4px 8px;
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.connection-section-title {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}

.connection-detail-copy {
  margin: 0;
  white-space: pre-line;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}

code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.auth-screen {
  min-height: calc(100vh - 53px);
  justify-content: center;
}

.auth-card {
  width: 100%;
  border-radius: 18px;
  background: var(--surface);
  padding: 22px;
  box-shadow: 0 12px 24px rgba(61, 41, 24, 0.08);
}

.auth-card h1 {
  font-weight: 700;
}

.auth-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.auth-tabs button {
  min-height: 40px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.auth-tabs button.selected {
  border-color: var(--brand-primary);
  background: rgba(107, 124, 106, 0.12);
  color: var(--text);
}

.auth-status {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  font-weight: 500;
}

.auth-status-error {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(230, 57, 70, 0.08);
}

.auth-status-success {
  color: var(--success);
  border-color: var(--brand-primary);
  background: rgba(107, 124, 106, 0.12);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field:has(.input[aria-invalid="true"]) .field-hint {
  color: var(--danger);
  font-weight: 700;
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.password-strength-track {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--border);
}

.password-strength-track span {
  display: block;
  height: 100%;
  border-radius: 2px;
}

.password-strength-label {
  min-width: 44px;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.password-strength-weak {
  color: var(--danger);
  background: var(--danger);
}

.password-strength-fair {
  color: var(--warning);
  background: var(--warning);
}

.password-strength-good {
  color: var(--info);
  background: var(--info);
}

.password-strength-strong {
  color: var(--success);
  background: var(--success);
}

.password-strength-label.password-strength-weak,
.password-strength-label.password-strength-fair,
.password-strength-label.password-strength-good,
.password-strength-label.password-strength-strong {
  background: transparent;
}

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

.role-chip {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
}

.role-chip-active {
  border-color: var(--brand-primary);
  background: rgba(107, 124, 106, 0.12);
}

.auth-forgot-link {
  appearance: none;
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0 0;
  text-decoration: underline;
}

.auth-forgot-link:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.email-confirmation-screen {
  min-height: calc(100vh - 53px);
  justify-content: center;
}

.email-confirmation-card {
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  border-radius: 18px;
  background: var(--surface);
  padding: 28px;
  box-shadow: 0 12px 24px rgba(61, 41, 24, 0.08);
}

.email-confirmation-icon {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background: rgba(107, 124, 106, 0.12);
  color: var(--brand-primary);
}

.email-confirmation-card h1 {
  font-size: 24px;
  line-height: 31px;
  font-weight: 700;
}

.toast-stack {
  position: fixed;
  left: 50%;
  top: 60px;
  transform: translateX(-50%);
  width: min(calc(100vw - 32px), 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  min-width: 60%;
  max-width: 92%;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--text);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(45, 42, 38, 0.18);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
}

.toast-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.toast-title {
  color: var(--white);
  font-weight: 700;
}

.toast-description {
  color: var(--white);
  margin-top: 4px;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--danger);
}

.toast-info {
  background: var(--info);
}

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

.swatch {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.swatch span {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  grid-row: span 2;
}

.swatch strong,
.swatch code {
  font-size: 11px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.style-guide-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.style-guide-header p,
.style-section > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.style-section,
.style-block,
.style-color-body,
.style-card-body,
.style-card-sample,
.style-type-card,
.style-shadow-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.style-section h2,
.style-block h3,
.style-card-body strong,
.style-color-body strong {
  margin: 0;
  color: var(--text);
}

.style-section h2 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 900;
}

.style-block h3 {
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
}

.style-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.style-color-card,
.style-gradient-card {
  overflow: hidden;
}

.style-color-swatch {
  height: 80px;
  border-bottom: 1px solid var(--border);
}

.style-color-body,
.style-card-body {
  padding: 12px;
}

.style-token-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.style-token-row code,
.style-code-line,
.style-shadow-item code {
  min-width: 0;
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  padding: 5px 7px;
  font-size: 11px;
}

.style-gradient-preview {
  height: 72px;
  margin-inline: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.style-code-line {
  display: block;
  margin: 0 12px 12px;
}

.style-type-card h1,
.style-type-card h2,
.style-type-card h3,
.style-type-card h4,
.style-type-card h5,
.style-type-card h6,
.style-type-card p {
  margin: 0;
}

.style-type-card h1 { font-size: 28px; line-height: 34px; font-weight: 600; }
.style-type-card h2 { font-size: 24px; line-height: 30px; font-weight: 600; }
.style-type-card h3 { font-size: 22px; line-height: 28px; font-weight: 600; }
.style-type-card h4 { font-size: 20px; line-height: 26px; font-weight: 600; }
.style-type-card h5 { font-size: 18px; line-height: 24px; font-weight: 600; }
.style-type-card h6 { font-size: 16px; line-height: 22px; font-weight: 600; }

.style-divider {
  height: 1px;
  background: var(--border);
  margin-block: 4px;
}

.style-medium { font-weight: 500; }
.style-semibold { font-weight: 600; }
.style-bold { font-weight: 700; }
.style-xs-muted {
  font-size: 12px;
  line-height: 17px;
}

.style-shadow-grid {
  display: grid;
  gap: 12px;
}

.style-shadow-preview {
  min-height: 80px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.style-row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.style-card-neutral {
  border-color: var(--border-strong);
  box-shadow: 0 2px 4px rgba(45, 42, 38, 0.08);
}

.style-card-elevated {
  box-shadow: 0 4px 12px rgba(45, 42, 38, 0.12);
}

.confirmation-email {
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
  font-weight: 900;
}

.not-found-screen {
  min-height: 100%;
  justify-content: center;
}

.not-found-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 0 24px;
}

.not-found-content h1 {
  margin: 0;
  color: var(--text);
  font-size: 40px;
  line-height: 48px;
  font-weight: 700;
}

.not-found-content p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 25px;
}

.not-found-content .text-link-button {
  margin-top: 8px;
  padding: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.text-link-button {
  border: 0;
  background: transparent;
  color: var(--brand-primary);
  padding: 8px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 767px) {
  .desktop-nav {
    display: none;
  }
}

@media (min-width: 768px) {
  .app-viewport {
    display: block;
    overflow-x: hidden;
  }

  .phone-shell {
    width: 100%;
    max-width: none;
    border-left: 0;
    border-right: 0;
  }

  .topbar {
    min-height: 64px;
    gap: 14px;
    padding: 10px clamp(20px, 3vw, 40px);
  }

  .topbar-left {
    gap: 8px;
  }

  .logo {
    padding-inline: 0;
    font-size: 20px;
    line-height: 28px;
  }

  .desktop-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .desktop-nav::-webkit-scrollbar {
    display: none;
  }

  .desktop-nav-item span {
    display: none;
  }

  .topbar .search-wrap {
    flex: 1 1 220px;
    max-width: 360px;
  }

  .topbar-spacer {
    flex: 1 1 auto;
  }

  .topbar-actions {
    flex: 0 0 auto;
  }

  .bottom-nav {
    display: none;
  }

  .main-scroll {
    width: 100%;
  }

  .screen {
    width: min(100%, 1180px);
    max-width: 1180px;
    margin-inline: auto;
    padding: 28px clamp(24px, 4vw, 48px) 44px;
    gap: 18px;
  }

  .screen.flush {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .screen-inner {
    width: min(100%, 860px);
    max-width: 860px;
    margin-inline: auto;
    padding: 28px clamp(24px, 4vw, 48px) 44px;
    gap: 18px;
  }

  .center-screen {
    min-height: calc(100vh - 64px);
  }

  .greeting {
    padding-top: 0;
  }

  .auth-screen,
  .email-confirmation-screen,
  .connection-screen,
  .edit-profile-screen,
  .product-form-screen,
  .quest-form-screen,
  .add-social-screen,
  .topup-screen,
  .topup-history-screen,
  .withdraw-screen,
  .not-found-screen {
    max-width: 860px;
  }

  .dashboard-screen,
  .profile-screen,
  .public-profile-screen,
  .influencer-settings-screen {
    max-width: 980px;
  }

  .marketplace-screen,
  .home-screen,
  .influencers-screen,
  .quests-screen,
  .influencer-products-screen,
  .influencer-quests-screen,
  .style-guide-screen {
    max-width: 1180px;
  }

  .marketplace-head {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 0;
  }

  .marketplace-search {
    width: min(100%, 520px);
  }

  .controls-band {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
  }

  .top-tabs {
    max-width: 460px;
    padding: 0;
  }

  .segmented {
    width: min(100%, 680px);
  }

  .influencers-screen > .screen-inner {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .marketplace-screen > .stack,
  .quest-feed-list,
  .influencer-products-screen > .stack,
  .influencer-quests-screen > .stack,
  .style-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
    gap: 16px;
  }

  .home-screen > .stack,
  .influencers-screen > .screen-inner > .stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 16px;
  }

  .home-screen > .stack > .feed-footer,
  .quest-feed-list > .feed-footer,
  .influencer-quests-screen > .stack > .load-more-spinner-row,
  .influencer-quests-screen > .stack > .btn {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 360px);
  }

  .activity-card,
  .quest-card,
  .influencer-card,
  .marketplace-product-card,
  .compact-product-card {
    height: 100%;
  }

  .influencer-card {
    margin-bottom: 0;
  }

  .form-stack {
    gap: 16px;
  }

  .form-section-card,
  .task-editor {
    padding: 16px;
  }

  .product-detail-screen .hero-product-image {
    width: min(calc(100% - 48px), 1180px);
    height: min(420px, 38vw);
    margin: 24px auto 0;
    border: 1px solid var(--border);
    border-radius: 14px;
  }

  .product-detail-screen .product-detail-content {
    width: min(100%, 860px);
    max-width: 860px;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .product-detail-bottom-bar {
    position: static;
    width: min(100%, 860px);
    margin: 0 auto 44px;
    padding: 0 clamp(24px, 4vw, 48px);
    background: transparent;
    border-top: 0;
  }

  .product-detail-bottom-bar .btn {
    display: flex;
    max-width: 360px;
    margin-left: auto;
  }

  .quest-detail-screen {
    max-width: 860px;
  }

  .profile-with-banner {
    padding-top: 28px;
  }

  .public-profile-hero {
    margin: 0;
    padding: 0;
    background: transparent;
  }

  .public-profile-banner {
    width: 100%;
    height: 280px;
    max-height: none;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
  }

  .public-profile {
    margin: -56px 0 0;
  }

  .public-profile-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
  }

  .public-avatar-wrap {
    margin-top: -44px;
  }

  .public-avatar-wrap .avatar {
    width: 104px;
    height: 104px;
    border-radius: 52px;
  }

  .public-profile-actions {
    grid-column: auto;
    justify-content: flex-end;
  }

  .public-profile-actions .btn {
    flex: 0 0 auto;
  }

  .public-profile-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .modal-sheet {
    width: min(720px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 18px 60px rgba(45, 42, 38, 0.22);
  }
}

@media (min-width: 1024px) {
  .desktop-nav-item span {
    display: inline;
  }

  .desktop-nav-item {
    padding-inline: 12px;
  }
}

@media (min-width: 1180px) {
  .marketplace-screen > .stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quest-feed-list,
  .influencer-products-screen > .stack,
  .influencer-quests-screen > .stack {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .style-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .profile-screen {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: start;
  }

  .profile-screen > .profile-head {
    grid-column: 1;
  }

  .profile-screen > .cashback-budget-card,
  .profile-screen > .cashback-earned-card {
    grid-column: 2;
  }

  .profile-screen > .settings-list {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .topbar {
    padding-inline: 8px;
  }

  .screen,
  .screen-inner {
    padding-inline: 12px;
  }

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

  .dashboard-grid,
  .quest-summary-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .modal-sheet .button-grid {
    grid-template-columns: 1fr;
  }
}
