:root {
  color-scheme: light;
  --bg: #f3f6f2;
  --surface: #ffffff;
  --surface-strong: #1a2721;
  --text: #17231d;
  --muted: #68766f;
  --line: #dce5de;
  --green: #15715b;
  --green-dark: #0e5b48;
  --coral: #d86b4f;
  --amber: #c8841e;
  --blue: #416f9a;
  --danger: #c95748;
  --shadow: 0 8px 22px rgba(26, 39, 33, 0.06);
}

/* UI4 final cascade: keep creator-market styling after legacy responsive rules. */
body {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 107, 53, 0.12), transparent 28%),
    linear-gradient(180deg, #fff8f2 0%, #fffaf6 46%, #f7f4ee 100%);
}

body.is-front-home .app-shell,
body.is-front-surface .app-shell {
  padding-top: 10px;
  padding-bottom: calc(128px + env(safe-area-inset-bottom));
}

body.is-front-home #view-workbench > .section-head,
body.is-front-home #view-workbench > .function-pager,
body.is-workbench-orders #view-workbench > .section-head,
body.is-workbench-orders #view-workbench > .function-pager,
body.is-front-surface .legacy-tabs {
  display: none;
}

body:not(.is-front-surface) .front-tabs {
  display: none;
}

.topbar {
  border-bottom: 0;
  background: rgba(255, 248, 242, 0.96);
}

.hero-panel {
  min-height: 150px;
  padding: 18px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(34, 34, 34, 0.86), rgba(34, 34, 34, 0.36)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1000&q=80") center / cover;
  box-shadow: 0 16px 36px rgba(102, 52, 26, 0.2);
}

.hero-panel::before {
  display: none;
}

.hero-panel h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.hero-panel p,
.hero-note span,
.hero-note small {
  color: rgba(255, 255, 255, 0.82);
}

.hero-panel-label {
  color: #ffe1d1;
}

.hero-action,
.filter-bar button,
.form-panel button[type="submit"],
.task-sheet-actions button[data-action="take"],
.home-task-card button,
.wallet-withdraw-action {
  color: #fff;
  background: var(--orange);
}

.front-tabs {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(calc(100% - 24px), 456px);
  padding: 7px;
  border: 1px solid rgba(255, 107, 53, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(83, 45, 24, 0.16);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.front-tabs button {
  min-height: 50px;
  border-radius: 14px;
  color: #8c7a70;
}

.front-tabs button.active {
  color: var(--orange);
  background: #fff0e6;
}

.function-pager button.active,
.task-sort-row button.active,
.task-category-row button.active,
.auth-mode button.active,
.role-switch button.active,
.tabs button.active {
  border-color: rgba(255, 107, 53, 0.5);
  color: #fff;
  background: var(--orange);
}

.card,
.form-panel,
.summary-card,
.empty,
.filter-bar,
.todo-tile,
.quick-actions button,
.home-task-card,
.home-growth-link,
.wallet-ledger {
  border-color: rgba(255, 107, 53, 0.12);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.home-hero,
.home-hero.warn,
.home-hero.danger {
  padding: 18px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 107, 53, 0.95), rgba(255, 162, 82, 0.82)),
    url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1000&q=80") center / cover;
  box-shadow: 0 18px 34px rgba(255, 107, 53, 0.24);
}

.home-hero-head h3,
.home-metrics strong {
  color: #fff;
}

.home-hero-head span,
.home-hero p,
.home-metrics span {
  color: rgba(255, 255, 255, 0.82);
}

.home-primary-action,
.home-hero.warn .home-primary-action,
.home-hero.danger .home-primary-action {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--orange-dark);
  background: #fff;
}

.home-metrics div {
  background: rgba(255, 255, 255, 0.16);
}

.todo-tile.active,
.todo-tile.warn,
.todo-tile.danger {
  border-color: rgba(255, 107, 53, 0.3);
  background: #fff3eb;
}

.todo-tile strong,
.summary-card strong,
.task-sheet-facts .meta-box strong,
.task-sheet-facts .reward-box strong,
.home-task-card-topline strong,
.home-growth-link b,
.wallet-ledger-head > div > strong,
.wallet-ledger-metrics strong,
.wallet-ledger-row > strong.income {
  color: var(--orange-dark);
}

.task-sheet {
  overflow: hidden;
  padding: 0;
  border-left: 0;
}

.task-cover img {
  height: 160px;
  object-fit: cover;
}

.task-sheet .card-head,
.task-sheet-copy,
.task-sheet .warn-text,
.task-sheet-tags,
.task-action-hint,
.task-route,
.task-sheet-facts,
.task-sheet-actions {
  margin-right: 14px;
  margin-left: 14px;
}

.task-sheet-facts {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.task-sheet-actions {
  padding-bottom: 14px;
}

.task-route span.done,
.task-route span.active {
  color: var(--orange-dark);
}

.task-route span.done strong,
.task-route span.active strong {
  border-color: var(--orange);
  background: var(--orange);
}

.creator-profile-card {
  border-radius: 22px;
}

.profile-entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 107, 53, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(83, 45, 24, 0.08);
}

.profile-entry-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.profile-entry-card h3 {
  margin: 4px 0 2px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.profile-entry-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.profile-entry-card button {
  flex: 0 0 auto;
  min-height: 40px;
}

body.is-front-surface #view-workbench,
body.is-front-surface #view-tasks {
  padding-bottom: 28px;
}

@media (max-width: 430px) {
  .front-tabs {
    width: min(calc(100% - 18px), 456px);
  }

  .hero-panel {
    grid-template-columns: 1fr;
    min-height: 180px;
  }

  .task-sheet-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-entry-card {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-entry-card button {
    width: 100%;
  }
}

/* UI12 override: five front tabs stay in one row. */
.front-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.front-tabs button {
  min-width: 0;
}

.front-tabs em {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 430px) {
  .front-tabs {
    width: min(calc(100% - 14px), 456px);
    padding: 6px;
  }

  .front-tabs button {
    min-height: 48px;
    padding-inline: 2px;
  }

  .front-tabs span {
    font-size: 17px;
  }

  .front-tabs em {
    font-size: 11px;
  }
}

/* UI12 final override: five front tabs must stay on one row after legacy cascades. */
.front-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.front-tabs button {
  min-width: 0;
}

.front-tabs em {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 430px) {
  .front-tabs {
    width: min(calc(100% - 14px), 456px);
    padding: 6px;
  }

  .front-tabs button {
    min-height: 48px;
    padding-inline: 2px;
  }

  .front-tabs span {
    font-size: 17px;
  }

  .front-tabs em {
    font-size: 11px;
  }
}

.task-rank-strip,
.home-campaign-section,
.home-ranking-section,
.income-trend,
.profile-section {
  display: grid;
  gap: 12px;
}

.task-rank-strip {
  padding: 14px;
  border: 1px solid rgba(255, 107, 53, 0.13);
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: 0 14px 28px rgba(93, 54, 28, 0.08);
}

.task-rank-head,
.creator-level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-rank-head strong,
.creator-level-head h3 {
  color: #222;
  font-size: 17px;
  font-weight: 900;
}

.task-rank-head span,
.creator-level-head span,
.creator-level-card p,
.income-main-card span,
.income-mini-grid span,
.trend-bar span,
.campaign-card em,
.data-center-item em {
  color: #8a7669;
  font-size: 12px;
  font-style: normal;
}

.task-rank-grid {
  display: grid;
  gap: 8px;
}

.task-rank-item,
.ranking-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 107, 53, 0.1);
  border-radius: 14px;
  background: #fff8f2;
  text-align: left;
}

.task-rank-item em,
.ranking-row em {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  color: #fff;
  background: #222;
  font-style: normal;
  font-weight: 900;
}

.task-rank-item span,
.ranking-row span {
  overflow: hidden;
  color: #2c2521;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-rank-item strong,
.ranking-row strong {
  color: var(--orange-dark);
  font-size: 14px;
  font-weight: 900;
}

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

.campaign-card {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 150px;
  padding: 12px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  text-align: left;
  box-shadow: 0 16px 28px rgba(86, 50, 29, 0.13);
}

.campaign-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(34, 34, 34, 0.04), rgba(34, 34, 34, 0.74));
}

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

.campaign-card span,
.campaign-card strong,
.campaign-card em {
  position: relative;
  z-index: 1;
}

.campaign-card span {
  align-self: end;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.campaign-card strong {
  color: #ffe5d7;
  font-size: 13px;
  font-weight: 900;
}

.campaign-card em {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

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

.ranking-row {
  min-height: 50px;
  background: #fff;
}

.order-segment-row,
.message-category-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.message-category-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 12px;
}

.order-segment-row button,
.message-category-row button {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 8px 6px;
  border: 1px solid rgba(255, 107, 53, 0.1);
  border-radius: 14px;
  color: #7c6c62;
  background: #fffdf9;
}

.order-segment-row button.active,
.message-category-row button.active {
  border-color: rgba(255, 107, 53, 0.46);
  color: var(--orange-dark);
  background: #fff0e6;
}

.order-segment-row span,
.message-category-row span {
  font-size: 12px;
  font-weight: 800;
}

.order-segment-row strong,
.message-category-row strong {
  color: inherit;
  font-size: 16px;
  font-weight: 900;
}

.creator-level-card,
.income-trend,
.profile-section {
  padding: 16px;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 20px;
  background: #fffdf9;
  box-shadow: 0 14px 28px rgba(93, 54, 28, 0.08);
}

.creator-level-head h3 {
  margin: 3px 0 0;
}

.creator-level-head strong {
  color: #25a96d;
  font-size: 18px;
  font-weight: 900;
}

.creator-level-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #f0e5dc;
}

.creator-level-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #25c27a);
}

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

.data-center-item,
.income-mini-grid div {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid rgba(255, 107, 53, 0.1);
  border-radius: 16px;
  background: #fff8f2;
  text-align: left;
}

.data-center-item span,
.income-mini-grid span {
  color: #8a7669;
  font-size: 12px;
  font-weight: 800;
}

.data-center-item strong,
.income-mini-grid strong {
  color: #25201d;
  font-size: 18px;
  font-weight: 900;
}

.income-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.income-main-card {
  display: grid;
  align-content: space-between;
  min-height: 154px;
  padding: 18px;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 107, 53, 0.94), rgba(37, 194, 122, 0.78)),
    url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=900&q=80") center / cover;
  box-shadow: 0 18px 34px rgba(255, 107, 53, 0.2);
}

.income-main-card span,
.income-main-card strong {
  color: #fff;
}

.income-main-card strong {
  font-size: 32px;
  font-weight: 950;
}

.income-main-card .wallet-withdraw-action {
  width: max-content;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--orange-dark);
  background: #fff;
}

.income-trend {
  margin-bottom: 12px;
}

.income-trend-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  min-height: 118px;
  gap: 10px;
  padding-top: 8px;
}

.trend-bar {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 7px;
}

.trend-bar strong {
  display: block;
  width: 100%;
  max-width: 28px;
  min-height: 12px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #ff9d6c, var(--orange));
}

@media (max-width: 640px) {
  .home-campaign-grid,
  .income-overview {
    grid-template-columns: 1fr;
  }

  .order-segment-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .message-category-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .task-rank-item,
  .ranking-row {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    padding-inline: 8px;
  }

  .campaign-card {
    min-height: 136px;
  }

  .data-center-grid,
  .income-mini-grid {
    grid-template-columns: 1fr;
  }

  .order-segment-row {
    gap: 6px;
  }

  .order-segment-row button,
  .message-category-row button {
    min-height: 50px;
    padding-inline: 4px;
  }
}

.front-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.front-tabs button {
  min-width: 0;
}

.front-tabs em {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 107, 53, 0.13);
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: 0 14px 28px rgba(93, 54, 28, 0.08);
}

.home-search-box label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-search-box span {
  color: #8a7669;
  font-size: 12px;
  font-weight: 800;
}

.home-search-box input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 0;
  color: #25201d;
  background: transparent;
  font-size: 15px;
  font-weight: 800;
  outline: none;
}

.home-search-box input::placeholder {
  color: #b09a8b;
  font-weight: 700;
}

.home-search-box button {
  align-self: end;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
}

.smart-match-pill {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(37, 194, 122, 0.22);
  border-radius: 999px;
  color: #16724f;
  background: #effbf4;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.task-smart-line {
  display: flex;
  margin: 0 14px 8px;
}

.detail-visual .smart-match-pill {
  margin-top: 6px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(34, 34, 34, 0.22);
}

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

.detail-block-head span {
  color: #8a7669;
  font-size: 12px;
  font-weight: 800;
}

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

.video-case-card {
  overflow: hidden;
  display: grid;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 16px;
  background: #fff8f2;
}

.video-case-card img {
  width: 100%;
  aspect-ratio: 9 / 12;
  object-fit: cover;
}

.video-case-card div {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.video-case-card strong {
  color: #25201d;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.video-case-card span,
.video-case-card a {
  color: #8a7669;
  font-size: 12px;
  line-height: 1.45;
}

.video-case-card a {
  color: var(--orange-dark);
  font-weight: 900;
  text-decoration: none;
}

.task-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
}

.task-empty-state strong {
  color: #25201d;
  font-size: 16px;
  font-weight: 900;
}

.task-empty-state span {
  color: #8a7669;
  font-size: 13px;
}

.task-empty-state button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
}

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

  .video-case-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .video-case-card img {
    height: 100%;
    aspect-ratio: auto;
  }
}

@media (max-width: 430px) {
  .front-tabs {
    width: min(calc(100% - 14px), 456px);
    padding: 6px;
  }

  .front-tabs button {
    min-height: 48px;
    padding-inline: 2px;
  }

  .front-tabs span {
    font-size: 17px;
  }

  .front-tabs em {
    font-size: 11px;
  }

  .home-search-box {
    grid-template-columns: 1fr;
  }

  .home-search-box button {
    width: 100%;
  }
}

/* UI4 detail page final cascade. */
.inspector {
  border-color: rgba(255, 107, 53, 0.14);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-visual {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 18px;
  background: #ffe4d4;
}

.detail-visual img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.detail-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 15, 12, 0.04), rgba(21, 15, 12, 0.68));
}

.detail-visual > div {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  display: grid;
  gap: 3px;
  color: #fff;
}

.detail-visual span,
.detail-visual em {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.detail-visual strong {
  color: #fff;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.detail-block {
  display: grid;
  gap: 8px;
}

.detail-block h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.detail-requirements {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-requirements li {
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 14px;
  color: #51443d;
  background: #fff8f3;
  font-size: 13px;
  line-height: 1.45;
}

.detail-sticky-action {
  position: sticky;
  bottom: calc(84px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 36%);
}

.detail-sticky-action button {
  min-height: 48px;
  border-radius: 14px;
  color: #fff;
  background: var(--orange);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.22);
}

.detail-sticky-action .ghost {
  border: 1px solid rgba(255, 107, 53, 0.18);
  color: var(--orange-dark);
  background: #fff4eb;
  box-shadow: none;
}

.detail-sticky-action button:disabled {
  color: #fff;
  background: #c8d1cb;
  box-shadow: none;
  opacity: 1;
}

.inspector {
  border-color: rgba(255, 107, 53, 0.14);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-visual {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 18px;
  background: #ffe4d4;
}

.detail-visual img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.detail-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 15, 12, 0.04), rgba(21, 15, 12, 0.68));
}

.detail-visual > div {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  display: grid;
  gap: 3px;
  color: #fff;
}

.detail-visual span,
.detail-visual em {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.detail-visual strong {
  color: #fff;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.detail-block {
  display: grid;
  gap: 8px;
}

.detail-block h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.detail-requirements {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-requirements li {
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 14px;
  color: #51443d;
  background: #fff8f3;
  font-size: 13px;
  line-height: 1.45;
}

.detail-sticky-action {
  position: sticky;
  bottom: calc(84px + env(safe-area-inset-bottom));
  display: grid;
  margin-top: 4px;
  padding: 8px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 36%);
}

.detail-sticky-action button {
  min-height: 48px;
  border-radius: 14px;
  color: #fff;
  background: var(--orange);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.22);
}

/* 2026-07-24 front UI rebuild: creator task marketplace */
:root {
  --bg: #fff8f2;
  --surface: #ffffff;
  --surface-strong: #222222;
  --text: #222222;
  --muted: #7b716b;
  --line: #f0dfd2;
  --green: #25c27a;
  --green-dark: #14915c;
  --coral: #ff6b35;
  --amber: #f5a524;
  --blue: #4d7cfe;
  --danger: #e24d3d;
  --shadow: 0 10px 26px rgba(92, 55, 31, 0.08);
  --orange: #ff6b35;
  --orange-dark: #df4f1c;
  --cream: #fff8f2;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 107, 53, 0.12), transparent 28%),
    linear-gradient(180deg, #fff8f2 0%, #fffaf6 46%, #f7f4ee 100%);
  color: var(--text);
  font-family:
    Inter, "HarmonyOS Sans", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button:focus-visible {
  outline-color: rgba(255, 107, 53, 0.35);
}

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

body.is-front-home .app-shell,
body.is-front-surface .app-shell {
  padding-top: 10px;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

body.is-front-home #view-workbench > .section-head,
body.is-front-home #view-workbench > .function-pager {
  display: none;
}

body.is-front-surface .legacy-tabs {
  display: none;
}

body:not(.is-front-surface) .front-tabs {
  display: none;
}

.topbar {
  gap: 10px;
  padding: 8px 0 10px;
  border-bottom: 0;
  background: rgba(255, 248, 242, 0.96);
  backdrop-filter: blur(16px);
}

.brand img,
.auth-brand img {
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.18);
}

.brand strong,
.auth-brand strong {
  font-weight: 900;
}

.session-bar {
  border-color: rgba(255, 107, 53, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.session-bar .ghost,
.auth-back-link,
.auth-help-link,
.ghost {
  border-radius: 12px;
  color: var(--orange-dark);
}

.auth-card,
.card,
.form-panel,
.summary-card,
.empty,
.filter-bar,
.home-hero,
.home-section,
.wallet-ledger,
.identity-card {
  border-radius: 16px;
}

.auth-visual {
  min-height: 164px;
  border-radius: 18px;
  color: #222;
  background:
    linear-gradient(135deg, rgba(255, 107, 53, 0.18), rgba(255, 214, 143, 0.22)),
    #fff4e8;
}

.auth-visual h1 {
  font-size: 24px;
}

.auth-visual img {
  border-radius: 16px;
}

.auth-mode,
.role-switch {
  border-color: rgba(255, 107, 53, 0.18);
  border-radius: 14px;
  background: #fff2e9;
}

.auth-mode button,
.role-switch button,
.tabs button {
  border-radius: 12px;
}

.auth-mode button.active,
.role-switch button.active,
.tabs button.active {
  background: var(--orange);
}

.hero-panel {
  min-height: 150px;
  margin-top: 8px;
  padding: 18px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(34, 34, 34, 0.86), rgba(34, 34, 34, 0.36)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1000&q=80") center / cover;
  box-shadow: 0 16px 36px rgba(102, 52, 26, 0.2);
}

.hero-panel::before {
  display: none;
}

.hero-panel h1 {
  margin-top: 4px;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.hero-panel p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.hero-panel-label {
  color: #ffe1d1;
  font-size: 12px;
  letter-spacing: 0;
}

.hero-copy {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.hero-action {
  min-height: 42px;
  margin-top: 8px;
  padding: 0 16px;
  border-radius: 12px;
  color: #fff;
  background: var(--orange);
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(255, 107, 53, 0.3);
}

.hero-note {
  align-self: end;
  display: grid;
  gap: 3px;
  max-width: 146px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-note span,
.hero-note small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
}

.hero-note strong {
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
}

.summary-grid {
  gap: 10px;
}

.summary-card {
  min-height: 72px;
  border-color: rgba(255, 107, 53, 0.14);
}

.summary-card strong {
  color: var(--orange-dark);
}

.front-tabs {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: min(calc(100% - 24px), 456px);
  padding: 7px;
  border: 1px solid rgba(255, 107, 53, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(83, 45, 24, 0.16);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.front-tabs button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 50px;
  border-radius: 14px;
  color: #8c7a70;
  background: transparent;
  font-weight: 850;
}

.front-tabs span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 17px;
  line-height: 1;
}

.front-tabs em {
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.front-tabs button.active {
  color: var(--orange);
  background: #fff0e6;
}

.section-head {
  margin-top: 14px;
}

.section-head h2 {
  font-weight: 900;
}

.function-pager,
.task-sort-row,
.task-category-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: none;
}

.function-pager::-webkit-scrollbar,
.task-sort-row::-webkit-scrollbar,
.task-category-row::-webkit-scrollbar {
  display: none;
}

.function-pager button,
.task-sort-row button,
.task-category-row button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 107, 53, 0.16);
  border-radius: 999px;
  color: #6d5e55;
  background: #fff;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.function-pager button.active,
.task-sort-row button.active,
.task-category-row button.active {
  border-color: rgba(255, 107, 53, 0.5);
  color: #fff;
  background: var(--orange);
  box-shadow: 0 8px 18px rgba(255, 107, 53, 0.18);
}

.filter-bar {
  border-color: rgba(255, 107, 53, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

.filter-bar input,
.filter-bar select,
.form-panel input,
.form-panel textarea,
.form-panel select,
.auth-form input {
  border-color: rgba(255, 107, 53, 0.16);
  border-radius: 12px;
  background: #fffdfb;
}

.filter-bar button,
.export-line button,
.actions button,
.form-panel button[type="submit"],
.wallet-withdraw-action {
  min-height: 44px;
  border-radius: 12px;
}

.filter-bar button,
.actions button:not(.secondary):not(.ghost):not(.coral):not(.danger):not(.blue),
.form-panel button[type="submit"],
.wallet-withdraw-action,
.task-sheet-actions button[data-action="take"] {
  color: #fff;
  background: var(--orange);
}

.actions button.secondary,
.actions button.blue,
.ghost {
  border: 1px solid rgba(255, 107, 53, 0.18);
  color: var(--orange-dark);
  background: #fff4eb;
}

.card,
.form-panel {
  border-color: rgba(255, 107, 53, 0.12);
  box-shadow: var(--shadow);
}

.task-sheet {
  overflow: hidden;
  padding: 0;
  border-left: 0;
}

.task-sheet .card-head,
.task-sheet-copy,
.task-sheet .warn-text,
.task-sheet-tags,
.task-route,
.task-sheet-facts,
.task-sheet-actions {
  margin-right: 14px;
  margin-left: 14px;
}

.task-sheet .card-head {
  margin-top: 14px;
  border-bottom-color: rgba(255, 107, 53, 0.12);
}

.task-cover {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  background: #ffe8da;
}

.task-cover img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.task-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 14, 0.05), rgba(20, 16, 14, 0.6));
}

.task-cover-overlay {
  position: absolute;
  inset: auto 12px 12px 12px;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 10px;
  color: #fff;
}

.task-cover-overlay span,
.task-cover-overlay em {
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.task-cover-overlay strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.task-sheet h4,
.order-sheet h4 {
  font-size: 17px;
  font-weight: 900;
}

.task-sheet-copy {
  color: #55483f;
}

.badge {
  border-color: rgba(255, 107, 53, 0.14);
  color: #8e4c2f;
  background: #fff1e8;
}

.task-route::before {
  background: #f2d7c8;
}

.task-route span.done,
.task-route span.active {
  color: var(--orange-dark);
}

.task-route span.done strong,
.task-route span.active strong {
  border-color: var(--orange);
  background: var(--orange);
}

.task-sheet-facts {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.task-sheet-facts .meta-box {
  border-color: rgba(255, 107, 53, 0.14);
  background: #fff7f1;
}

.task-sheet-facts .meta-box strong,
.task-sheet-facts .reward-box strong {
  color: var(--orange-dark);
}

.task-sheet-actions {
  padding-bottom: 14px;
}

.order-sheet {
  border-left-color: var(--orange);
}

.status {
  border-radius: 999px;
  color: #0b8854;
  background: #e8faf2;
}

.workbench-home {
  gap: 14px;
}

.home-hero {
  padding: 18px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 107, 53, 0.95), rgba(255, 162, 82, 0.82)),
    url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1000&q=80") center / cover;
  box-shadow: 0 18px 34px rgba(255, 107, 53, 0.24);
}

.home-hero.warn,
.home-hero.danger {
  background:
    linear-gradient(135deg, rgba(255, 107, 53, 0.95), rgba(255, 162, 82, 0.82)),
    url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1000&q=80") center / cover;
}

.home-hero-head span,
.home-hero p,
.home-metrics span {
  color: rgba(255, 255, 255, 0.82);
}

.home-hero-head h3 {
  color: #fff;
}

.home-primary-action,
.home-hero.warn .home-primary-action,
.home-hero.danger .home-primary-action {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--orange-dark);
  background: #fff;
}

.home-metrics div {
  background: rgba(255, 255, 255, 0.16);
}

.home-metrics strong {
  color: #fff;
}

.todo-tile,
.quick-actions button {
  border-color: rgba(255, 107, 53, 0.12);
  border-radius: 16px;
}

.todo-tile.active,
.todo-tile.warn,
.todo-tile.danger {
  border-color: rgba(255, 107, 53, 0.3);
  background: #fff3eb;
}

.todo-tile strong {
  color: var(--orange-dark);
}

.quick-actions button {
  color: #6c5547;
  background: #fff;
}

.home-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

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

.home-task-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  min-height: 144px;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.home-task-card img {
  width: 100%;
  height: 100%;
  min-height: 144px;
  object-fit: cover;
}

.home-task-card-body {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
}

.home-task-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-task-card-topline span {
  color: #8b7568;
  font-size: 12px;
  font-weight: 800;
}

.home-task-card-topline strong {
  color: var(--orange-dark);
  font-size: 18px;
  font-weight: 950;
}

.home-task-card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.28;
}

.home-task-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #69584e;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-task-card button {
  min-height: 36px;
  border-radius: 12px;
  color: #fff;
  background: var(--orange);
  font-size: 13px;
  font-weight: 850;
}

.home-growth-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 18px;
  color: var(--text);
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow);
}

.home-growth-link span {
  display: grid;
  gap: 4px;
}

.home-growth-link strong {
  font-size: 16px;
  font-weight: 900;
}

.home-growth-link em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.home-growth-link b {
  flex: 0 0 auto;
  color: var(--orange-dark);
  font-size: 13px;
}

.creator-profile-card {
  display: grid;
  gap: 16px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(34, 34, 34, 0.92), rgba(80, 52, 38, 0.86)),
    url("https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&w=900&q=80") center / cover;
  box-shadow: 0 16px 36px rgba(92, 55, 31, 0.16);
}

.creator-profile-main {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.creator-profile-main img {
  width: 64px;
  height: 64px;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  object-fit: cover;
}

.creator-profile-main span,
.creator-profile-main p,
.creator-profile-stats span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.creator-profile-main h3 {
  margin: 2px 0 2px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

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

.creator-profile-stats div {
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.creator-profile-stats strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-ledger {
  border: 0;
  background: linear-gradient(180deg, #fff 0%, #fff7f1 100%);
}

.wallet-ledger-head {
  border-bottom-color: rgba(255, 107, 53, 0.14);
}

.wallet-ledger-head > div > strong,
.wallet-ledger-metrics strong,
.wallet-ledger-row > strong.income {
  color: var(--orange-dark);
}

@media (max-width: 430px) {
  .hero-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 180px;
  }

  .hero-note {
    justify-self: stretch;
    max-width: none;
  }

  .task-sheet-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-task-card {
    grid-template-columns: 102px minmax(0, 1fr);
  }

  .quick-actions {
    grid-template-columns: repeat(5, minmax(54px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .quick-actions button {
    min-width: 54px;
    white-space: normal;
  }

  .front-tabs {
    width: min(calc(100% - 18px), 456px);
  }
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus {
  outline: none;
}

button:focus-visible {
  outline: 2px solid rgba(21, 113, 91, 0.35);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

body.is-busy button {
  pointer-events: none;
}

body.is-busy button:not(:disabled) {
  opacity: 0.72;
}

[hidden] {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  padding: 18px 14px;
}

body.is-auth {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 107, 53, 0.12) 0%, rgba(255, 248, 242, 0.96) 48%, rgba(246, 249, 244, 0.98) 100%);
}

body.is-auth .auth-screen {
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 22px 14px calc(28px + env(safe-area-inset-bottom));
}

.auth-card {
  display: grid;
  gap: 14px;
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-brand-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.auth-links {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-brand img {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.auth-brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.25;
}

.auth-visual {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  min-height: 150px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--surface-strong);
}

.auth-visual p,
.auth-visual h1 {
  margin: 0;
}

.auth-visual p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.auth-visual h1 {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.18;
}

.auth-visual img {
  width: 100%;
  height: 112px;
  border-radius: 8px;
  object-fit: cover;
  object-position: right center;
}

.app-shell {
  width: min(100%, 480px);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 14px 14px calc(96px + env(safe-area-inset-bottom));
}

.app-shell.single-primary-nav {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

body.is-growth-page {
  background: linear-gradient(180deg, #fff0dc 0%, #f7dfbc 44%, #f6deb8 100%);
}

body.is-growth-page .app-shell {
  padding-top: 0;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

body.is-growth-page .topbar,
body.is-growth-page .hero-panel,
body.is-growth-page .summary-grid,
body.is-growth-page #view-workbench > .section-head,
body.is-growth-page #view-workbench > .function-pager,
body.is-growth-page .tabs {
  display: none;
}

body.is-growth-page .notice:not(.show),
body.is-growth-page .inspector[hidden] {
  display: none;
}

body.is-growth-page .growth-center {
  min-height: 100vh;
  margin: 0 -2px;
  padding-top: 0;
}

body.is-workbench-home .hero-panel,
body.is-workbench-home .summary-grid {
  display: none;
}

body.is-workbench-home .app-shell {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

body.is-workbench-secondary .hero-panel,
body.is-workbench-secondary .summary-grid {
  display: none;
}

body.is-workbench-secondary .app-shell {
  padding-top: 12px;
}

body.is-workbench-secondary #view-workbench > .section-head {
  margin-top: 8px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  gap: 12px;
  padding: 10px 0 9px;
  border-bottom: 1px solid rgba(220, 229, 222, 0.9);
  background: rgba(243, 246, 242, 0.97);
}

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

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(26, 39, 33, 0.1);
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.brand span,
.auth-brand span,
.section-head span,
.hero-panel p,
.meta,
.small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-back-link,
.auth-help-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(31, 143, 114, 0.28);
  border-radius: 7px;
  color: var(--green-dark);
  background: #eef8f2;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.auth-back-link {
  background: #fffaf5;
}

.auth-back-link:hover,
.auth-help-link:hover {
  border-color: rgba(31, 143, 114, 0.48);
  background: #e2f3eb;
}

.role-switch,
.auth-mode,
.function-pager,
.tabs,
.actions,
.badges,
.summary-grid,
.field-row {
  display: grid;
  gap: 8px;
}

.role-switch {
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.role-switch button,
.auth-mode button,
.tabs button,
.ghost {
  min-height: 36px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}

.role-switch button.active,
.auth-mode button.active,
.tabs button.active {
  color: #fff;
  background: var(--green-dark);
}

.auth-mode {
  grid-template-columns: repeat(2, 1fr);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3ef;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form:not(.active) {
  display: none;
}

.auth-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 12px;
}

.session-bar .ghost {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 74px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d7e3db;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(26, 39, 33, 0.04);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--green);
}

.hero-panel h1 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
}

.hero-panel-label {
  display: block;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.hero-panel-flow {
  display: grid;
  grid-template-columns: repeat(4, 24px);
  gap: 6px;
  padding-left: 12px;
}

.hero-panel-flow span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #cfe0d5;
  border-radius: 50%;
  color: var(--green-dark);
  background: #f2f8f4;
  font-size: 11px;
  font-weight: 800;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  margin: 12px 0;
}

.identity-grid {
  display: grid;
  gap: 12px;
}

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

.identity-card .actions {
  margin-top: 0;
}

.summary-card {
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(26, 39, 33, 0.04);
}

.summary-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.summary-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.notice {
  display: none;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--green-dark);
  background: #eaf6f0;
  font-size: 13px;
  line-height: 1.45;
}

.notice.error {
  color: var(--danger);
  background: #fff0ee;
}

.notice.show {
	display: block;
}

.inspector {
	display: grid;
	gap: 12px;
	margin: 10px 0 14px;
	padding: 14px;
	border: 1px solid rgba(31, 143, 114, 0.22);
	border-radius: 8px;
	background: #f2fbf6;
	box-shadow: 0 4px 16px rgba(16, 24, 40, 0.05);
}

.inspector[hidden] {
	display: none;
}

.inspector-head {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}

.inspector h3,
.inspector h4 {
	margin: 0;
}

.inspector h3 {
	font-size: 16px;
	line-height: 1.3;
}

.inspector h4 {
	font-size: 13px;
	line-height: 1.25;
}

.timeline {
	display: grid;
	gap: 7px;
}

.timeline-row,
.candidate-row,
.record-row {
	display: grid;
	gap: 6px;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #fff;
}

.candidate-row {
	grid-template-columns: 1fr auto;
	align-items: center;
}

.tabs {
	position: fixed;
	left: 50%;
	bottom: calc(10px + env(safe-area-inset-bottom));
	transform: translateX(-50%);
	width: min(calc(100% - 28px), 452px);
  z-index: 20;
  grid-template-columns: repeat(var(--tab-count, 5), 1fr);
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.18);
}

.tabs button {
  min-height: 48px;
  font-size: 12px;
}

.tabs.single-tab {
  display: none;
}

.function-pager {
  grid-auto-flow: column;
  grid-auto-columns: minmax(68px, max-content);
  overflow-x: auto;
  margin: 2px 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  scrollbar-width: none;
}

.function-pager::-webkit-scrollbar {
  display: none;
}

.function-pager button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.function-pager button.active {
  color: #fff;
  background: var(--green-dark);
}

.function-page {
  display: none;
}

.function-page.active {
  display: grid;
  gap: 12px;
}

.function-page > * {
  min-width: 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
}

.section-head.sub {
  margin-top: 18px;
}

.section-head.compact-head,
.function-page > h3:first-child {
  margin-top: 0;
}

.section-head.inline {
  margin: 0;
}

.head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#view-admin > .section-head {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

#view-admin .head-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

#view-admin .head-actions .ghost {
  min-height: 36px;
  padding: 0 8px;
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}

h2,
h3,
p {
  margin: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
}

h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  line-height: 1.25;
}

.ghost {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

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

.filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.filter-bar > input:first-child {
  grid-column: 1 / -1;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding-inline: 12px;
  font-size: 13px;
}

.filter-actions,
.export-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.filter-actions > button,
.export-line > button {
  flex: 1 1 0;
  min-width: 0;
}

.export-line {
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.export-line > button {
  flex-basis: 100%;
}

.filter-actions.three > button {
  flex-basis: calc((100% - 16px) / 3);
}

.filter-bar button,
.export-line button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.filter-bar button.secondary,
.export-line button.secondary {
  color: var(--green-dark);
  border: 1px solid rgba(31, 143, 114, 0.28);
  background: #edf8f2;
}

.filter-bar button.ghost {
  color: var(--muted);
  background: #fff;
}

.bulk-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  margin: -2px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bulk-bar span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.bulk-bar button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.bulk-bar button.ghost {
  color: var(--muted);
  background: #fff;
}

.bulk-bar button.secondary {
  color: var(--green-dark);
  border: 1px solid rgba(31, 143, 114, 0.28);
  background: #edf8f2;
}

.bulk-bar button.danger {
  background: var(--danger);
}

#view-admin .filter-bar {
  background: #fff;
}

#view-admin .card .actions {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

#view-admin .card .actions button {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.2;
}

#view-admin .card .meta-row {
  gap: 6px;
}

.compact-list {
  gap: 8px;
}

.empty {
  padding: 20px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
  font-size: 13px;
}

.card,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(26, 39, 33, 0.04);
}

.card {
  padding: 14px;
}

.compact-card {
  padding: 12px;
}

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

.batch-check {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fafbf9;
  font-size: 12px;
  line-height: 1;
}

.batch-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--green);
}

.card h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.card p {
	margin-top: 8px;
	color: #3c4656;
	font-size: 13px;
  line-height: 1.55;
}

.task-sheet {
  border-left: 3px solid var(--green);
}

.task-sheet .card-head,
.order-sheet .card-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.task-sheet h4,
.order-sheet h4 {
  font-size: 17px;
  line-height: 1.3;
}

.task-sheet-copy {
  max-height: 3.1em;
  overflow: hidden;
  color: #435047;
  text-overflow: ellipsis;
}

.task-sheet-tags {
  margin-top: 12px;
}

.task-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
  padding: 8px 4px 2px;
}

.task-route::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  border-radius: 999px;
  background: #dce5de;
}

.task-route span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #8b9a91;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.1;
}

.task-route strong {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #cfdad1;
  border-radius: 50%;
  color: #819087;
  background: #f5f8f5;
  font-size: 11px;
  font-weight: 850;
}

.task-route em {
  font-style: normal;
}

.task-route span.done,
.task-route span.active {
  color: var(--green-dark);
}

.task-route span.done strong,
.task-route span.active strong {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.task-route.is-alert span.active {
  color: var(--danger);
}

.task-route.is-alert span.active strong {
  border-color: var(--danger);
  background: var(--danger);
}

.task-sheet-facts {
  margin-top: 12px;
}

.task-sheet-facts .meta-box {
  border: 1px solid #e5ece7;
  background: #f4f8f5;
}

.task-sheet-facts .meta-box strong {
  color: var(--green-dark);
}

.task-sheet-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.task-sheet-actions button[data-action="take"] {
  color: #fff;
  background: var(--green);
}

.order-sheet {
  border-left: 3px solid var(--blue);
}

.status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--green-dark);
  background: #e8f5ef;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status.warn {
  color: #8a5b00;
  background: #fff4d7;
}

.status.danger {
  color: var(--danger);
  background: #fff0ee;
}

.badges {
  grid-template-columns: repeat(auto-fit, minmax(68px, max-content));
  margin-top: 10px;
}

.proof-links,
.upload-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.proof-links {
  margin-top: 8px;
}

.proof-links a {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--green-dark);
  background: #f3faf6;
  font-size: 12px;
  text-decoration: none;
}

.upload-line input[type="file"] {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 38px;
  padding: 7px;
}

.upload-line input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 8px;
  padding: 0 10px;
  border: 1px solid rgba(31, 143, 114, 0.28);
  border-radius: 7px;
  color: var(--green-dark);
  background: #edf8f2;
  font-weight: 750;
  cursor: pointer;
}

.upload-line .meta {
  flex: 1 1 180px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fafbf9;
  font-size: 12px;
}

.meta-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
  margin-top: 12px;
}

.meta-box {
  padding: 9px;
  border-radius: 8px;
  background: #f7faf8;
}

.meta-box strong {
  display: block;
  font-size: 15px;
}

.snapshot-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(61, 111, 182, 0.2);
  border-radius: 8px;
  background: #f7fbff;
}

.snapshot-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  border-radius: 8px;
  background: #fff;
}

.metric-form {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(61, 111, 182, 0.18);
}

.warn-text {
  color: #8a5b00;
}

.wallet-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.05);
}

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

.wallet-metric {
  min-height: 68px;
  padding: 10px;
  border-radius: 8px;
  background: #f7faf8;
}

.wallet-metric.strong {
  color: #fff;
  background: var(--green-dark);
}

.wallet-metric span,
.wallet-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.wallet-metric.strong span {
  color: rgba(255, 255, 255, 0.78);
}

.wallet-metric strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
  line-height: 1.15;
}

.wallet-ledger {
  display: grid;
  gap: 14px;
}

.wallet-ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.wallet-ledger-head span,
.wallet-ledger-metrics span,
.wallet-ledger-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.wallet-ledger-head > div > strong {
  display: block;
  margin-top: 4px;
  color: var(--green-dark);
  font-size: 28px;
  font-weight: 880;
  line-height: 1.05;
}

.wallet-withdraw-action {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

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

.wallet-ledger-metrics > div {
  padding: 9px;
  border-radius: 8px;
  background: #f4f8f5;
}

.wallet-ledger-metrics strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.wallet-ledger-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.wallet-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.wallet-ledger-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-ledger-row > strong {
  font-size: 15px;
  white-space: nowrap;
}

.wallet-ledger-row > strong.income {
  color: var(--green-dark);
}

.wallet-ledger-row > strong.expense {
  color: var(--danger);
}

.unified-order-section,
.publisher-wallet-summary {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.publisher-order-card {
  border-left-color: rgba(65, 111, 154, 0.28);
}

.publisher-wallet-summary {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf6;
}

.publisher-wallet-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.publisher-wallet-actions button {
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
}

@media (max-width: 430px) {
  .publisher-wallet-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.workflow-head {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.workflow-head h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.25;
}

.workflow-head p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workflow-head.is-rejected {
  border-left-color: var(--danger);
  background: #fff7f4;
}

.workflow-head.is-rejected p {
  color: var(--danger);
  font-weight: 700;
}

.workflow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-steps::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  border-radius: 999px;
  background: #dce5de;
}

.workflow-steps li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #9aa79f;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.workflow-steps li strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #cfdad1;
  border-radius: 50%;
  color: #819087;
  background: #f5f8f5;
  font-size: 12px;
}

.workflow-steps li.active,
.workflow-steps li.done {
  color: var(--green-dark);
  font-weight: 800;
}

.workflow-steps li.active strong,
.workflow-steps li.done strong {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.message-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #fff;
}

.message-toolbar .ghost {
	min-height: 32px;
}

.message-actions {
	grid-template-columns: minmax(112px, 1fr);
	margin-top: 10px;
}

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

.home-hero {
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(31, 143, 114, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(31, 143, 114, 0.13), rgba(255, 255, 255, 0) 58%),
    #ffffff;
  box-shadow: var(--shadow);
}

.home-hero.warn {
  border-color: rgba(242, 184, 75, 0.38);
  background:
    linear-gradient(135deg, rgba(242, 184, 75, 0.18), rgba(255, 255, 255, 0) 62%),
    #ffffff;
}

.home-hero.danger {
  border-color: rgba(239, 124, 91, 0.34);
  background:
    linear-gradient(135deg, rgba(239, 124, 91, 0.16), rgba(255, 255, 255, 0) 62%),
    #ffffff;
}

.home-hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.home-hero-head span,
.home-metrics span,
.todo-tile span,
.todo-tile em,
.home-order-row span,
.home-section-head button {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
}

.home-hero-head h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.2;
}

.home-primary-action {
  min-width: 92px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.home-hero.warn .home-primary-action {
  background: #c8871e;
}

.home-hero.danger .home-primary-action {
  background: var(--coral);
}

.home-hero p {
  margin: 0;
  color: #3c4656;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

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

.home-metrics div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f6faf7;
}

.home-metrics strong {
  display: block;
  overflow: hidden;
  color: var(--green-dark);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.todo-tile {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 94px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.05);
}

.todo-tile strong {
  color: var(--text);
  font-size: 28px;
  font-weight: 880;
  line-height: 1;
}

.todo-tile.active {
  border-color: rgba(31, 143, 114, 0.32);
  background: #effaf4;
}

.todo-tile.warn {
  border-color: rgba(242, 184, 75, 0.38);
  background: #fff9eb;
}

.todo-tile.danger {
  border-color: rgba(239, 124, 91, 0.34);
  background: #fff3ef;
}

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

.quick-actions button {
  min-height: 42px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.home-section-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.25;
}

.home-section-head button {
  min-height: 32px;
  padding: 0 10px;
}

.home-order-list {
  display: grid;
  gap: 8px;
}

.home-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.home-order-row strong,
.home-order-row span {
  display: block;
}

.home-order-row strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 820;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-order-row .status {
  display: inline-flex;
}

.growth-center {
  display: grid;
  gap: 12px;
  margin-top: -2px;
  color: #5d260f;
}

.growth-hero {
  display: grid;
  gap: 18px;
  min-height: 214px;
  padding: 14px 10px 24px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #fff1de 0%, #f9dfb9 100%);
}

.growth-topline {
  display: grid;
  grid-template-columns: 44px 1fr 48px;
  align-items: center;
  min-height: 48px;
}

.growth-topline h2 {
  color: #6b2d18;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
}

.growth-back,
.growth-rule,
.growth-detail-link {
  border: 0;
  background: transparent;
}

.growth-back {
  min-height: 44px;
  padding: 0;
  color: #7c321a;
  font-size: 42px;
  line-height: 1;
}

.growth-rule {
  min-height: 36px;
  padding: 0;
  color: rgba(124, 50, 26, 0.48);
  font-size: 16px;
  font-weight: 700;
}

.growth-score {
  display: grid;
  gap: 8px;
  padding: 0 8px;
}

.growth-score > span,
.growth-detail-link {
  color: rgba(93, 38, 15, 0.68);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  text-align: left;
}

.growth-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.growth-score-row strong {
  color: #8e2f16;
  font-size: 62px;
  font-weight: 880;
  line-height: 0.9;
}

.growth-score-row button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #d98934, #9f3f1f);
  font-size: 16px;
  font-weight: 820;
  box-shadow: 0 10px 20px rgba(169, 74, 32, 0.22);
}

.growth-detail-link {
  width: fit-content;
  min-height: 26px;
  padding: 0;
}

.growth-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(245, 210, 176, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(139, 68, 27, 0.08);
}

.growth-card h3 {
  margin: 0;
  color: #5d260f;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.22;
}

.checkin-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.checkin-day {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.checkin-day > span {
  color: rgba(93, 38, 15, 0.78);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.checkin-reward {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 78px;
  padding: 8px 3px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff7ef, #ffe5d2);
}

.checkin-day.featured .checkin-reward {
  color: #fff;
  background: linear-gradient(160deg, #ff4058, #ff8465);
  box-shadow: 0 10px 18px rgba(255, 78, 85, 0.2);
}

.checkin-day.checked:not(.featured) .checkin-reward {
  background: linear-gradient(180deg, #fffaf4, #fff0e2);
}

.checkin-reward strong {
  color: #b8521d;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.checkin-day.featured .checkin-reward strong {
  color: #fff;
}

.coin-mark {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, #fff5c6 0 18%, transparent 19%),
    linear-gradient(135deg, #fff1a3, #e7a332 58%, #b66c1d);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42), 0 4px 8px rgba(177, 99, 28, 0.16);
}

.small-coin {
  width: 18px;
  height: 18px;
  margin-right: 4px;
  vertical-align: -3px;
}

.checkin-button {
  justify-self: center;
  width: min(100%, 292px);
  min-height: 50px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #ffc8b5, #ff9ba1);
  font-size: 22px;
  font-weight: 850;
  box-shadow: 0 10px 18px rgba(255, 150, 148, 0.18);
}

.checkin-button:disabled {
  opacity: 1;
}

.growth-task-list {
  display: grid;
  gap: 16px;
}

.growth-task {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.growth-task-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #ff4a2d;
  background: #fff0ef;
  font-size: 20px;
  font-weight: 900;
}

.growth-task-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.growth-task-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.growth-task-title strong {
  color: #5d260f;
  font-size: 17px;
  font-weight: 830;
  line-height: 1.25;
}

.growth-reward {
  display: inline-flex;
  align-items: center;
  color: #ff2f20;
  font-size: 17px;
  font-weight: 880;
  line-height: 1.1;
  white-space: nowrap;
}

.growth-task p {
  margin: 0;
  color: rgba(93, 38, 15, 0.55);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.growth-task-action {
  min-height: 46px;
  padding: 0 15px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff9a32, #ff321f);
  font-size: 18px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(255, 87, 40, 0.2);
}

.growth-task-action:disabled {
  color: #fff;
  background: #e6d8cd;
  box-shadow: none;
  opacity: 1;
}

.growth-progress {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.growth-progress-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--growth-total, 5), 1fr);
  align-items: center;
  gap: 0;
}

.growth-progress-track::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: #f0ece8;
  transform: translateY(-50%);
}

.growth-progress-track span {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #eee9e4;
}

.growth-progress-track span.done {
  background: linear-gradient(135deg, #ffad54, #ff3f2d);
}

.growth-progress-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.growth-progress-labels span {
  color: rgba(93, 38, 15, 0.58);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.reconciliation-panel {
	display: grid;
	gap: 10px;
}

.budget-panel {
  display: grid;
  gap: 10px;
}

.budget-task-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.reconciliation-metric {
	min-height: 64px;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #fff;
}

.reconciliation-metric span,
.amount-stack span,
.signal-pill span {
	display: block;
	color: var(--muted);
	font-size: 12px;
	line-height: 1.35;
}

.reconciliation-metric strong {
	display: block;
	margin-top: 5px;
	font-size: 17px;
	line-height: 1.15;
}

.reconciliation-columns {
	display: grid;
	gap: 10px;
}

.reconciliation-block {
	display: grid;
	gap: 8px;
}

.reconciliation-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #fff;
}

.reconciliation-row strong,
.signal-pill strong {
	display: block;
	font-size: 13px;
	line-height: 1.35;
	word-break: break-word;
}

.amount-stack {
	display: grid;
	gap: 3px;
	min-width: 92px;
	text-align: right;
}

.stage-strip,
.signal-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

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

.signal-grid {
	margin-top: 10px;
}

.signal-pill {
	max-width: 100%;
	padding: 8px 9px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #f7faf8;
}

.ok-text {
	color: var(--green-dark);
}

.submission-stack {
	display: grid;
	gap: 8px;
	margin-top: 10px;
}

.submission-item {
	padding: 9px;
	border-radius: 8px;
	background: #f7faf8;
}

.submission-item a {
	color: var(--green-dark);
	font-size: 12px;
	font-weight: 700;
	word-break: break-all;
}

.tag-list {
	display: grid;
	gap: 8px;
	margin-top: 10px;
}

.tag-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	padding: 9px;
	border-radius: 8px;
	background: #f7faf8;
}

.tag-item strong,
.tag-item span {
	display: block;
}

.tag-item .actions {
	grid-template-columns: auto auto;
	align-items: center;
	margin-top: 0;
}

.actions {
	grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
	margin-top: 12px;
}

.actions button,
.form-panel button[type="submit"],
.primary {
  min-height: 40px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 750;
}

.actions button.secondary,
.secondary {
  color: var(--green-dark);
  border: 1px solid rgba(31, 143, 114, 0.28);
  background: #edf5f0;
}

.actions button.coral {
  background: var(--coral);
}

.actions button.blue {
  background: var(--blue);
}

.actions button.danger {
	background: var(--danger);
}

.actions button:disabled {
	color: #667085;
	border: 1px solid var(--line);
	background: #eef2ef;
}

.form-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.form-panel.compact {
  gap: 10px;
}

.field-row {
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label,
legend {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
  outline: none;
  font-size: 14px;
  line-height: 1.35;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 143, 114, 0.12);
}

fieldset {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset > .field-row {
  grid-column: 1 / -1;
}

fieldset legend {
  grid-column: 1 / -1;
}

fieldset label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 650;
}

fieldset input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.metrics-fieldset {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(31, 143, 114, 0.14);
  border-radius: 10px;
  background: rgba(31, 143, 114, 0.03);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.metrics-grid label,
.metrics-proof-field {
  display: grid;
  align-items: stretch;
  gap: 7px;
  min-width: 0;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.metrics-grid label input,
.metrics-proof-field input {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
}

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

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  line-height: 1.2;
  text-align: center;
}

.form-panel button[type="submit"],
.filter-bar button,
.bulk-bar button,
.export-line button,
.actions button,
.primary,
.secondary,
.ghost {
  appearance: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}

@media (max-width: 430px) {
  body.is-growth-page .app-shell {
    padding-inline: 10px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  body.is-growth-page .growth-center {
    margin-inline: 0;
  }

  .task-card.growth-card {
    padding-inline: 12px;
  }

  .growth-task {
    grid-template-columns: 44px minmax(0, 1fr) 82px;
    align-items: center;
    gap: 8px;
  }

  .growth-task-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .growth-task-title {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .growth-task-title strong {
    min-width: 0;
    font-size: 15px;
    white-space: nowrap;
  }

  .growth-reward {
    flex: 0 0 auto;
    font-size: 15px;
  }

  .growth-task p {
    font-size: 12px;
    line-height: 1.35;
  }

  .growth-task-action {
    min-height: 42px;
    padding: 0 11px;
    font-size: 15px;
  }

  .growth-progress-track span {
    width: 16px;
    height: 16px;
  }

  body.is-workbench-secondary .app-shell {
    padding-top: 10px;
  }

  .function-pager {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: visible;
    gap: 5px;
    padding: 5px;
  }

  .function-pager button {
    min-width: 0;
    padding: 0 6px;
  }

  .form-panel .field-row,
  .form-panel fieldset,
  .form-panel fieldset > .field-row {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 68px;
    margin-top: 8px;
    padding: 10px 12px;
  }

  .hero-panel h1 {
    font-size: 15px;
  }

  .hero-panel-flow {
    grid-template-columns: repeat(4, 22px);
    gap: 4px;
    padding-left: 8px;
  }

  .hero-panel-flow span {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .workflow-head {
    gap: 8px;
    padding: 12px;
  }

  .workflow-head h3 {
    font-size: 17px;
  }

  .workflow-steps {
    gap: 2px;
  }

  .workflow-steps::before {
    left: calc(12.5% + 6px);
    right: calc(12.5% + 6px);
  }

  .workflow-steps li {
    gap: 4px;
    font-size: 10px;
  }

  .workflow-steps li strong {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .auth-screen {
    padding-inline: 10px;
  }

  .auth-card {
    padding: 14px;
  }

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

  .auth-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .auth-visual {
    grid-template-columns: 1fr;
  }

  .auth-visual img {
    max-height: 108px;
  }

  .app-shell {
    padding-inline: 10px;
  }

  .hero-panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

  .growth-hero {
    min-height: 198px;
    padding-inline: 8px;
  }

  .growth-topline {
    grid-template-columns: 38px 1fr 42px;
  }

  .growth-topline h2 {
    font-size: 24px;
  }

  .growth-score-row strong {
    font-size: 54px;
  }

  .growth-card {
    padding: 13px;
  }

  .task-card.growth-card {
    padding: 11px;
  }

  .checkin-days {
    gap: 5px;
  }

  .checkin-reward {
    min-height: 70px;
  }

  .growth-task {
    grid-template-columns: 42px minmax(0, 1fr) 74px;
    gap: 7px;
  }

  .growth-task-icon {
    width: 42px;
    height: 42px;
    font-size: 17px;
  }

  .growth-task-title strong,
  .growth-reward {
    font-size: 14px;
  }

  .growth-task p,
  .growth-progress-labels span {
    font-size: 11px;
  }

  .growth-task-action {
    min-height: 40px;
    padding: 0 9px;
    font-size: 14px;
  }

  .field-row,
  .meta-row,
  .wallet-grid,
  .reconciliation-grid,
  .reconciliation-row,
  .invite-grid,
  .bulk-bar,
  .tag-item {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .filter-actions,
  .filter-actions.three {
    flex-wrap: wrap;
  }

  .filter-actions > button,
  .filter-actions.three > button {
    flex: 1 1 calc(50% - 4px);
  }

  .filter-actions.three > button.secondary {
    flex-basis: 100%;
  }

  .amount-stack {
    text-align: left;
  }

  .tag-item .actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* UI4 end-of-file cascade: creator-market visual system wins over legacy rules. */
.inspector {
  border-color: rgba(255, 107, 53, 0.14);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-visual {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 18px;
  background: #ffe4d4;
}

.detail-visual img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.detail-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 15, 12, 0.04), rgba(21, 15, 12, 0.68));
}

.detail-visual > div {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  display: grid;
  gap: 3px;
  color: #fff;
}

.detail-visual span,
.detail-visual em {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.detail-visual strong {
  color: #fff;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.detail-block {
  display: grid;
  gap: 8px;
}

.detail-block h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.detail-requirements {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-requirements li {
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 14px;
  color: #51443d;
  background: #fff8f3;
  font-size: 13px;
  line-height: 1.45;
}

.detail-sticky-action {
  position: sticky;
  bottom: calc(84px + env(safe-area-inset-bottom));
  display: grid;
  margin-top: 4px;
  padding: 8px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 36%);
}

.detail-sticky-action button {
  min-height: 48px;
  border-radius: 14px;
  color: #fff;
  background: var(--orange);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.22);
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 107, 53, 0.12), transparent 28%),
    linear-gradient(180deg, #fff8f2 0%, #fffaf6 46%, #f7f4ee 100%);
}

body.is-front-home .app-shell,
body.is-front-surface .app-shell {
  padding-top: 10px;
  padding-bottom: calc(128px + env(safe-area-inset-bottom));
}

body.is-front-home #view-workbench > .section-head,
body.is-front-home #view-workbench > .function-pager,
body.is-front-surface .legacy-tabs {
  display: none;
}

body:not(.is-front-surface) .front-tabs {
  display: none;
}

.topbar {
  border-bottom: 0;
  background: rgba(255, 248, 242, 0.96);
}

.hero-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 150px;
  padding: 18px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(34, 34, 34, 0.86), rgba(34, 34, 34, 0.36)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1000&q=80") center / cover;
  box-shadow: 0 16px 36px rgba(102, 52, 26, 0.2);
}

.hero-panel::before {
  display: none;
}

.hero-panel h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.hero-panel p,
.hero-note span,
.hero-note small {
  color: rgba(255, 255, 255, 0.82);
}

.hero-panel-label {
  color: #ffe1d1;
}

.hero-action,
.filter-bar button,
.form-panel button[type="submit"],
.task-sheet-actions button[data-action="take"],
.home-task-card button,
.wallet-withdraw-action {
  color: #fff;
  background: var(--orange);
}

.front-tabs {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(calc(100% - 24px), 456px);
  padding: 7px;
  border: 1px solid rgba(255, 107, 53, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(83, 45, 24, 0.16);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.front-tabs button {
  min-height: 50px;
  border-radius: 14px;
  color: #8c7a70;
  background: transparent;
}

.front-tabs button.active {
  color: var(--orange);
  background: #fff0e6;
}

.function-pager button.active,
.task-sort-row button.active,
.task-category-row button.active,
.auth-mode button.active,
.role-switch button.active,
.tabs button.active {
  border-color: rgba(255, 107, 53, 0.5);
  color: #fff;
  background: var(--orange);
}

.card,
.form-panel,
.summary-card,
.empty,
.filter-bar,
.todo-tile,
.quick-actions button,
.home-task-card,
.home-growth-link,
.wallet-ledger {
  border-color: rgba(255, 107, 53, 0.12);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.home-hero,
.home-hero.warn,
.home-hero.danger {
  padding: 18px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 107, 53, 0.95), rgba(255, 162, 82, 0.82)),
    url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1000&q=80") center / cover;
  box-shadow: 0 18px 34px rgba(255, 107, 53, 0.24);
}

.home-hero-head h3,
.home-metrics strong {
  color: #fff;
}

.home-hero-head span,
.home-hero p,
.home-metrics span {
  color: rgba(255, 255, 255, 0.82);
}

.home-primary-action,
.home-hero.warn .home-primary-action,
.home-hero.danger .home-primary-action {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--orange-dark);
  background: #fff;
}

.home-metrics div {
  background: rgba(255, 255, 255, 0.16);
}

.todo-tile.active,
.todo-tile.warn,
.todo-tile.danger {
  border-color: rgba(255, 107, 53, 0.3);
  background: #fff3eb;
}

.todo-tile strong,
.summary-card strong,
.task-sheet-facts .meta-box strong,
.task-sheet-facts .reward-box strong,
.home-task-card-topline strong,
.home-growth-link b,
.wallet-ledger-head > div > strong,
.wallet-ledger-metrics strong,
.wallet-ledger-row > strong.income {
  color: var(--orange-dark);
}

.task-sheet {
  overflow: hidden;
  padding: 0;
  border-left: 0;
}

.task-cover img {
  height: 160px;
  object-fit: cover;
}

.task-sheet .card-head,
.task-sheet-copy,
.task-sheet .warn-text,
.task-sheet-tags,
.task-route,
.task-sheet-facts,
.task-sheet-actions {
  margin-right: 14px;
  margin-left: 14px;
}

.task-sheet-facts {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.task-sheet-actions {
  padding-bottom: 14px;
}

.task-route span.done,
.task-route span.active {
  color: var(--orange-dark);
}

.task-route span.done strong,
.task-route span.active strong {
  border-color: var(--orange);
  background: var(--orange);
}

.creator-profile-card {
  border-radius: 22px;
}

body.is-front-surface #view-workbench,
body.is-front-surface #view-tasks {
  padding-bottom: 28px;
}

@media (max-width: 430px) {
  .front-tabs {
    width: min(calc(100% - 18px), 456px);
  }

  .hero-panel {
    grid-template-columns: 1fr;
    min-height: 180px;
  }

  .task-sheet-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* UI13 true final override: five front tabs stay in one row. */
.front-tabs {
  grid-template-columns: repeat(var(--front-tab-count, 5), minmax(0, 1fr));
}

.front-tabs button {
  min-width: 0;
}

.front-tabs em {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 430px) {
  .front-tabs {
    width: min(calc(100% - 14px), 456px);
    padding: 6px;
  }

  .front-tabs button {
    min-height: 48px;
    padding-inline: 2px;
  }

  .front-tabs span {
    font-size: 17px;
  }

  .front-tabs em {
    font-size: 11px;
  }
}

/* UI14 final profile message entry. */
.workbench-section-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 6px 0;
  background: rgba(255, 248, 242, 0.92);
}

.workbench-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.workbench-message-entry {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 12px;
  color: var(--orange-dark);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px rgba(83, 45, 24, 0.08);
  font-weight: 850;
}

body.is-workbench-profile .workbench-head-actions > span {
  display: none;
}

body.is-workbench-profile .workbench-message-entry {
  display: inline-flex;
}

body.is-identity-page .hero-panel,
body.is-identity-page .summary-grid {
  display: none;
}

body.is-front-home .summary-grid {
  display: none;
}

.workbench-message-entry span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  font-size: 14px;
  line-height: 1;
}

.workbench-message-entry em {
  font-size: 13px;
  font-style: normal;
  line-height: 1;
}

.workbench-message-entry b {
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 10px;
  line-height: 1;
}

@media (max-width: 430px) {
  .workbench-message-entry {
    min-height: 32px;
    padding-inline: 10px;
  }
}

/* UI23 global page back control. */
.page-back-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  margin: -2px 0 8px;
  padding: 4px 0 6px;
}

.page-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 82px;
  min-height: 36px;
  padding: 0 13px 0 10px;
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 12px;
  color: var(--orange-dark);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(83, 45, 24, 0.08);
  font-weight: 850;
}

.page-back-button span {
  font-size: 22px;
  line-height: 1;
}

.page-back-button em {
  font-size: 14px;
  font-style: normal;
  line-height: 1;
}

.page-back-button:active {
  transform: translateY(1px);
}

.page-back-button:focus-visible {
  outline: 3px solid rgba(255, 107, 53, 0.2);
  outline-offset: 2px;
}

body.is-growth-page .page-back-strip {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 48px;
  margin: 0 -2px 8px;
  padding: 8px 2px 6px;
  background: linear-gradient(180deg, rgba(255, 240, 220, 0.98), rgba(255, 240, 220, 0.72));
  backdrop-filter: blur(14px);
}

body.is-auth .page-back-strip {
  display: none;
}

@media (max-width: 430px) {
  .page-back-strip {
    min-height: 42px;
    margin-bottom: 6px;
  }

  .page-back-button {
    min-width: 76px;
    min-height: 34px;
    padding-inline: 9px 12px;
  }

  .page-back-button em {
    font-size: 13px;
  }
}

.status.muted {
  color: var(--muted);
  background: rgba(104, 118, 111, 0.08);
}

/* UI24 UX upgrades: unified account hub, task decision facts, order timeline. */
.ux-workbench {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 107, 53, 0.14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(83, 45, 24, 0.09);
}

.ux-workbench.compact {
  box-shadow: 0 8px 22px rgba(83, 45, 24, 0.06);
}

.ux-workbench-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.ux-workbench-head span,
.capability-card span,
.capability-card em,
.ux-todo-item span,
.ux-todo-item em,
.publisher-mini-board span,
.task-decision-strip span,
.task-decision-strip em,
.task-requirement-line b,
.order-timeline em,
.home-task-facts span {
  color: #7a675c;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.3;
}

.ux-workbench-head h3 {
  margin: 3px 0 2px;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.18;
}

.ux-workbench-head p {
  margin: 0;
  color: #6d5c52;
  font-size: 13px;
  line-height: 1.45;
}

.ux-workbench-head button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 12px;
  color: #fff;
  background: var(--orange);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.capability-grid,
.ux-todo-grid,
.publisher-mini-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.capability-card,
.ux-todo-item,
.publisher-mini-board button {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 14px;
  background: #fffaf6;
  text-align: left;
}

.capability-card.is-open {
  border-color: rgba(21, 113, 91, 0.2);
  background: #f2fbf7;
}

.capability-card strong,
.ux-todo-item strong,
.publisher-mini-board strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-card b {
  justify-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--orange-dark);
  background: rgba(255, 107, 53, 0.1);
  font-size: 12px;
  line-height: 1;
}

.capability-card.is-open b {
  color: var(--green-dark);
  background: rgba(21, 113, 91, 0.1);
}

.ux-todo-item.active,
.ux-todo-item.warn {
  border-color: rgba(255, 107, 53, 0.28);
  background: #fff1e8;
}

.publisher-mini-board button {
  background: #f8fbff;
  border-color: rgba(65, 111, 154, 0.16);
}

.publisher-mini-board strong {
  font-size: 15px;
}

.task-decision-strip {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 8px;
  margin: 2px 0;
}

.task-decision-strip > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 14px;
  background: #fffaf6;
}

.task-decision-strip strong {
  display: block;
  overflow: hidden;
  margin: 4px 0 2px;
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-decision-strip .task-decision-main strong {
  color: var(--orange-dark);
  font-size: 20px;
}

.task-requirement-line,
.home-task-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.task-requirement-line span,
.home-task-facts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: #5f5048;
  background: rgba(255, 107, 53, 0.08);
}

.task-requirement-line b {
  color: var(--orange-dark);
}

.home-task-facts {
  gap: 5px;
}

.home-task-facts span {
  min-height: 22px;
  padding-inline: 7px;
  font-size: 11px;
}

.order-next-step {
  padding: 10px 11px;
  border: 1px solid rgba(65, 111, 154, 0.14);
  border-radius: 14px;
  color: #294961;
  background: #f4f9ff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.order-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 2px 0;
}

.order-timeline span {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 8px 5px;
  border-radius: 12px;
  background: #f7f4ee;
  text-align: center;
}

.order-timeline b {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c8d1cb;
}

.order-timeline strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.order-timeline em {
  display: block;
  overflow: hidden;
  width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-timeline .done {
  background: #eef8f2;
}

.order-timeline .done b {
  background: var(--green);
}

.order-timeline .active {
  background: #fff1e8;
}

.order-timeline .active b {
  background: var(--orange);
}

.order-timeline .danger {
  background: #fff0ee;
}

.order-timeline .danger b {
  background: var(--danger);
}

.ux-action-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.ux-action-empty strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.ux-action-empty button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  color: #fff;
  background: var(--orange);
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 430px) {
  .ux-workbench {
    padding: 12px;
    border-radius: 16px;
  }

  .ux-workbench-head {
    grid-template-columns: 1fr;
  }

  .ux-workbench-head button {
    justify-self: start;
  }

  .task-decision-strip {
    grid-template-columns: 1fr;
  }

  .order-timeline {
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .order-timeline span {
    min-width: 56px;
  }
}

/* UI25 conversion flow upgrades: auth intent, identity flow, take confirm, submit checklist. */
.auth-intent-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.auth-intent-panel button {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(255, 107, 53, 0.14);
  border-radius: 14px;
  background: #fffaf6;
  text-align: left;
}

.auth-intent-panel button.active {
  border-color: rgba(255, 107, 53, 0.45);
  background: #fff0e6;
  box-shadow: 0 10px 22px rgba(255, 107, 53, 0.12);
}

.auth-intent-panel strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
}

.auth-intent-panel span {
  color: #7a675c;
  font-size: 12px;
  line-height: 1.35;
}

.identity-flow-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(65, 111, 154, 0.14);
  border-radius: 16px;
  background: #f7fbff;
}

.identity-flow-head {
  display: grid;
  gap: 3px;
}

.identity-flow-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.identity-flow-head strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
}

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

.identity-flow-steps div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
}

.identity-flow-steps b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
}

.identity-flow-steps strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.identity-flow-steps span {
  color: #61706a;
  font-size: 12px;
  line-height: 1.35;
}

.take-confirm-layer[hidden] {
  display: none;
}

.take-confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 16px;
}

.take-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 35, 29, 0.42);
  backdrop-filter: blur(6px);
}

.take-confirm-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(100%, 480px);
  max-height: min(88vh, 720px);
  overflow: auto;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(23, 35, 29, 0.24);
}

.take-confirm-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.take-confirm-head span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 900;
}

.take-confirm-head h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.25;
}

.take-confirm-checks,
.submission-checklist {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(21, 113, 91, 0.13);
  border-radius: 14px;
  background: #f4fbf7;
}

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

.take-confirm-checks strong {
  grid-column: 1 / -1;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 950;
}

.take-confirm-checks span {
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
  color: #31594e;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.take-confirm-card p {
  margin: 0;
  color: #5d5048;
  font-size: 13px;
  line-height: 1.5;
}

.take-confirm-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 9px;
}

.take-confirm-actions button {
  min-height: 42px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 900;
}

.submission-checklist {
  margin: 0 0 10px;
}

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

.submission-checklist-head span {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.submission-checklist-head strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
}

.submission-draft-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.submission-draft-actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.submission-checklist-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.submission-checklist-grid span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 7px;
  border-radius: 11px;
  background: #fff;
}

.submission-checklist-grid b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--amber);
  font-size: 12px;
  line-height: 1;
}

.submission-checklist-grid .done b {
  background: var(--green);
}

.submission-checklist-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-checklist-grid em,
.submission-checklist p {
  margin: 0;
  color: #68766f;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

/* UI26 task decision guidance: clearer take/apply states and safer confirmation. */
.task-action-hint {
  padding: 9px 10px;
  border: 1px solid rgba(65, 111, 154, 0.14);
  border-radius: 13px;
  color: #294961;
  background: #f4f9ff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}

.task-action-hint.ready {
  border-color: rgba(21, 113, 91, 0.18);
  color: var(--green-dark);
  background: #f2fbf7;
}

.task-action-hint.apply,
.task-action-hint.login {
  border-color: rgba(255, 107, 53, 0.18);
  color: var(--orange-dark);
  background: #fff4eb;
}

.task-action-hint.disabled {
  color: #68766f;
  background: #f4f8f5;
}

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

.task-fit-panel.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-fit-panel span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(21, 113, 91, 0.12);
  border-radius: 13px;
  background: #f4fbf7;
}

.task-fit-panel span.login,
.task-fit-panel span.apply {
  border-color: rgba(255, 107, 53, 0.16);
  background: #fff4eb;
}

.task-fit-panel span.disabled {
  border-color: rgba(104, 118, 111, 0.14);
  background: #f4f8f5;
}

.task-fit-panel b,
.task-fit-panel em,
.take-confirm-flow em {
  overflow: hidden;
  color: #68766f;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.task-fit-panel strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-fit-panel .ready strong {
  color: var(--green-dark);
}

.task-fit-panel .login strong,
.task-fit-panel .apply strong {
  color: var(--orange-dark);
}

.take-confirm-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.take-confirm-flow span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px 8px;
  border-radius: 12px;
  background: #fffaf6;
}

.take-confirm-flow b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 12px;
  line-height: 1;
}

.take-confirm-flow strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.detail-sticky-action {
  grid-template-columns: 0.82fr 1.18fr;
  gap: 8px;
}

.detail-sticky-action .ghost {
  border: 1px solid rgba(255, 107, 53, 0.18);
  color: var(--orange-dark);
  background: #fff4eb;
  box-shadow: none;
}

.detail-sticky-action button:disabled {
  color: #fff;
  background: #c8d1cb;
  box-shadow: none;
  opacity: 1;
}

/* UI27 submit flow: choose order in-place and preview proof links. */
.submission-order-picker,
.submission-proof-preview {
  display: grid;
  gap: 10px;
  margin: 0 0 10px;
}

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

.submission-order-head span,
.submission-proof-head span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 900;
}

.submission-order-head strong,
.submission-proof-head strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
}

.submission-order-head button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 900;
}

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

.submission-order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 107, 53, 0.14);
  border-radius: 15px;
  background: #fffaf6;
}

.submission-order-card.active {
  border-color: rgba(21, 113, 91, 0.28);
  background: #f2fbf7;
  box-shadow: 0 10px 24px rgba(21, 113, 91, 0.08);
}

.submission-order-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.submission-order-card span,
.submission-order-card em {
  overflow: hidden;
  color: #7a675c;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-order-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-order-card button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 12px;
  color: #fff;
  background: var(--orange);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.submission-order-card.active button {
  background: var(--green);
}

.submission-order-empty,
.submission-proof-empty {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px dashed rgba(255, 107, 53, 0.2);
  border-radius: 15px;
  background: #fffaf6;
}

.submission-order-empty strong,
.submission-proof-empty strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.submission-order-empty span,
.submission-proof-empty span {
  color: #7a675c;
  font-size: 12px;
  line-height: 1.45;
}

.submission-order-empty button {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 11px;
  color: #fff;
  background: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.submission-proof-preview {
  padding: 12px;
  border: 1px solid rgba(21, 113, 91, 0.13);
  border-radius: 15px;
  background: #f4fbf7;
}

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

.submission-proof-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(21, 113, 91, 0.12);
  border-radius: 13px;
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.submission-proof-card img,
.submission-proof-card b {
  width: 100%;
  aspect-ratio: 1.55;
  border-radius: 10px;
}

.submission-proof-card img {
  display: block;
  object-fit: cover;
  background: #eef8f2;
}

.submission-proof-card b {
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: #eef8f2;
  font-size: 18px;
  font-weight: 950;
}

.submission-proof-card span {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.submission-proof-card em {
  overflow: hidden;
  color: #68766f;
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 430px) {
  .auth-intent-panel,
  .take-confirm-checks,
  .task-fit-panel,
  .task-fit-panel.compact,
  .submission-order-grid,
  .submission-order-card {
    grid-template-columns: 1fr;
  }

  .identity-flow-steps,
  .submission-checklist-grid,
  .take-confirm-flow,
  .submission-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .submission-checklist-head,
  .submission-order-head,
  .submission-proof-head {
    grid-template-columns: 1fr;
  }

  .submission-draft-actions {
    justify-content: flex-start;
  }
}

/* UI7 publish wizard */
.publish-wizard {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid rgba(255, 107, 53, 0.14);
  border-radius: 16px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(83, 45, 24, 0.08);
}

.publish-wizard:empty {
  display: none;
}

.publish-wizard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.publish-wizard-head > div:first-child,
.publish-wizard-total {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.publish-wizard-head span,
.publish-wizard-head em,
.publish-wizard-total span {
  overflow: hidden;
  color: #826d61;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-wizard-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-wizard-total {
  justify-items: end;
  padding: 9px 11px;
  border: 1px solid rgba(21, 113, 91, 0.14);
  border-radius: 12px;
  background: #f2fbf7;
}

.publish-wizard-total strong {
  color: var(--green-dark);
  font-size: 17px;
}

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

.publish-wizard-step {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 70px;
  padding: 9px;
  border: 1px solid rgba(130, 109, 97, 0.18);
  border-radius: 12px;
  color: inherit;
  background: #fff;
  text-align: left;
}

.publish-wizard-step span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #8a6a5b;
  background: #fff1e8;
  font-size: 12px;
  font-weight: 950;
}

.publish-wizard-step strong,
.publish-wizard-step em {
  overflow: hidden;
  min-width: 0;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-wizard-step strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.publish-wizard-step em {
  color: #826d61;
  font-size: 11px;
  font-weight: 800;
}

.publish-wizard-step.active {
  border-color: rgba(255, 107, 53, 0.45);
  background: #fff6ee;
  box-shadow: 0 10px 20px rgba(255, 107, 53, 0.1);
}

.publish-wizard-step.active span {
  color: #fff;
  background: var(--orange);
}

.publish-wizard-step.done span {
  color: #fff;
  background: var(--green);
}

.publish-wizard-step.warn span {
  color: #fff;
  background: var(--danger);
}

.publish-wizard-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(21, 113, 91, 0.12);
  border-radius: 14px;
  background: #fff;
}

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

.publish-wizard-card-head strong,
.publish-wizard-card-head span {
  overflow: hidden;
  min-width: 0;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-wizard-card-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.publish-wizard-card-head span {
  color: #6f7c73;
  font-size: 12px;
  font-weight: 800;
}

.publish-budget-grid,
.publish-confirm-grid {
  display: grid;
  gap: 8px;
}

.publish-budget-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.publish-budget-grid > div,
.publish-confirm-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(21, 113, 91, 0.1);
  border-radius: 12px;
  background: #f7fbf8;
}

.publish-confirm-grid > div.wide {
  grid-column: 1 / -1;
}

.publish-budget-grid span,
.publish-confirm-grid span {
  overflow: hidden;
  color: #68766f;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-budget-grid strong,
.publish-confirm-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.publish-budget-grid strong {
  font-size: 15px;
}

.publish-wizard-pills,
.publish-wizard-alert,
.publish-wizard-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.publish-wizard-pills span {
  padding: 7px 9px;
  border: 1px solid rgba(201, 87, 72, 0.16);
  border-radius: 999px;
  color: var(--danger);
  background: #fff6f3;
  font-size: 12px;
  font-weight: 900;
}

.publish-wizard-pills span.done {
  border-color: rgba(21, 113, 91, 0.16);
  color: var(--green-dark);
  background: #eef8f2;
}

.publish-wizard-alert {
  padding: 9px;
  border: 1px dashed rgba(201, 87, 72, 0.22);
  border-radius: 12px;
  background: #fff8f5;
}

.publish-wizard-alert.ready {
  border-color: rgba(21, 113, 91, 0.2);
  background: #f3fbf6;
}

.publish-wizard-alert span {
  color: var(--danger);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.publish-wizard-alert.ready span {
  color: var(--green-dark);
}

.publish-wizard-actions {
  justify-content: flex-end;
}

.publish-wizard-actions button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.publish-wizard-actions .primary {
  color: #fff;
  background: var(--orange);
}

.publish-wizard-actions .ghost {
  color: var(--orange-dark);
  border: 1px solid rgba(255, 107, 53, 0.2);
  background: #fff7f1;
}

.form-panel.publish-form-ready > [data-publish-step] {
  display: none;
}

.form-panel.publish-form-ready[data-publish-current-step="1"] > [data-publish-step="1"],
.form-panel.publish-form-ready[data-publish-current-step="2"] > [data-publish-step="2"],
.form-panel.publish-form-ready[data-publish-current-step="3"] > [data-publish-step="3"] {
  display: grid;
}

.form-panel.publish-form-ready[data-publish-current-step="3"] > .upload-line[data-publish-step="3"] {
  display: flex;
}

.form-panel.publish-form-ready[data-publish-current-step="4"] > button[data-publish-step="4"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  padding-right: 16px;
  padding-left: 16px;
}

@media (max-width: 620px) {
  .publish-wizard-head,
  .publish-wizard-card-head,
  .publish-confirm-grid {
    grid-template-columns: 1fr;
  }

  .publish-wizard-total {
    justify-items: start;
  }

  .publish-wizard-steps,
  .publish-budget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* UI8 publish drafts and templates */
.publish-draft-toolbar {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(65, 111, 154, 0.12);
  border-radius: 14px;
  background: #f7fbff;
}

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

.publish-draft-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.publish-draft-head strong,
.publish-draft-head span {
  overflow: hidden;
  min-width: 0;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-draft-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.publish-draft-head span {
  color: #52687c;
  font-size: 12px;
  font-weight: 800;
}

.publish-draft-actions,
.publish-template-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.publish-draft-actions {
  justify-content: flex-end;
}

.publish-draft-actions button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.publish-draft-actions button:disabled {
  color: #8b9a92;
  border-color: rgba(104, 118, 111, 0.12);
  background: #eef3f1;
}

.publish-template-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.publish-template-row button {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(65, 111, 154, 0.14);
  border-radius: 12px;
  color: inherit;
  background: #fff;
  text-align: left;
}

.publish-template-row button:hover {
  border-color: rgba(255, 107, 53, 0.32);
  background: #fff8f2;
}

.publish-template-row strong,
.publish-template-row span {
  overflow: hidden;
  min-width: 0;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-template-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.publish-template-row span {
  color: #52687c;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 620px) {
  .publish-draft-head {
    grid-template-columns: 1fr;
  }

  .publish-draft-actions {
    justify-content: flex-start;
  }

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

body.is-front-surface #view-workbench > .workbench-section-head,
body.is-front-surface #view-workbench > .function-pager {
  display: none !important;
}
