:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --ink: #17201b;
  --muted: #66736b;
  --line: #dfe6df;
  --teal: #0f8b7d;
  --teal-deep: #08695f;
  --mint: #dff5ee;
  --gold: #f3b236;
  --gold-soft: #fff1ca;
  --danger: #d65c45;
  --shadow: 0 16px 40px rgba(23, 32, 27, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #dbe4df;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(15, 139, 125, 0.18), transparent 28rem),
    linear-gradient(135deg, #eef4f1 0%, #dce7e0 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.phone-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(23, 32, 27, 0.08), 0 24px 80px rgba(23, 32, 27, 0.18);
  overflow: hidden;
}

.app {
  min-height: 100vh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.page {
  display: none;
  min-height: 100vh;
  padding: 18px 16px 24px;
}

.page-active {
  display: block;
}

.hidden {
  display: none !important;
}

.topbar,
.profile-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar {
  padding: 8px 0 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(23, 32, 27, 0.06);
}

.hero-panel,
.invite-card,
.wallet-card,
.merchant-card,
.progress-card,
.form-card,
.auth-panel,
.notice-card,
.profile-editor,
.detail-card,
.detail-hero,
.merchant-overview article,
.info-list,
.balance-list {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 8px;
  min-height: 220px;
  padding: 18px 14px 16px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}

.hero-copy h2 {
  margin-top: 12px;
  font-size: 23px;
  line-height: 1.16;
}

.hero-copy p {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.hero-panel img {
  width: 100%;
  height: 100%;
  max-height: 210px;
  align-self: center;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(15, 139, 125, 0.16));
}

.pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--mint);
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button,
.outline-button,
.text-button {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--teal);
  color: white;
}

.outline-button {
  padding: 0 12px;
  border: 1px solid rgba(15, 139, 125, 0.28);
  background: var(--surface);
  color: var(--teal-deep);
}

.text-button {
  background: transparent;
  color: var(--teal);
}

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

.stats-grid article {
  min-width: 0;
  border: 1px solid rgba(223, 230, 223, 0.85);
  border-radius: 8px;
  padding: 12px 10px;
  background: var(--surface);
}

.stats-grid span,
.wallet-card span,
.progress-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stats-grid strong {
  display: inline-block;
  margin-top: 7px;
  font-size: 20px;
  line-height: 1;
}

.stats-grid small {
  color: var(--muted);
  font-size: 11px;
}

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

.quick-actions button {
  display: grid;
  gap: 8px;
  min-height: 78px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(23, 32, 27, 0.06);
}

.quick-actions svg {
  color: var(--teal);
}

.section-head {
  margin: 18px 0 10px;
}

.chip-row,
.segmented {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar,
.segmented::-webkit-scrollbar {
  display: none;
}

.chip {
  min-height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chip-active,
.segmented .segment-active {
  border-color: transparent;
  background: var(--teal);
  color: white;
}

.task-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.task-card {
  border: 1px solid rgba(223, 230, 223, 0.92);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(23, 32, 27, 0.06);
}

.task-card header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.task-title {
  min-width: 0;
}

.task-title h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.32;
}

.task-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.reward {
  display: grid;
  min-width: 74px;
  justify-items: end;
  color: var(--danger);
  font-weight: 900;
}

.reward strong {
  font-size: 20px;
  line-height: 1;
}

.reward span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #eef4f1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

.task-foot small {
  color: var(--muted);
  line-height: 1.35;
}

.join-button {
  min-width: 86px;
  min-height: 38px;
  border-radius: 8px;
  background: var(--gold);
  color: #2b2210;
  font-weight: 900;
}

.progress-card {
  padding: 16px;
}

.progress-card strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.progress-track {
  height: 9px;
  margin-top: 14px;
  border-radius: 999px;
  background: #e7ece7;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.segmented {
  margin-top: 16px;
  border-radius: 8px;
  padding: 4px;
  background: #e8eee9;
}

.segmented button {
  min-height: 38px;
  flex: 1;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented .segment-active {
  color: white;
}

.invite-card {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(15, 139, 125, 0.96), rgba(8, 105, 95, 0.96)),
    var(--teal);
  color: white;
}

.invite-card .pill {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.invite-card h2 {
  margin: 14px 0 18px;
  font-size: 22px;
}

.poster-panel {
  display: grid;
  gap: 12px;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.poster-preview {
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.poster-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 32 / 45;
  object-fit: cover;
  background: white;
}

.poster-preview canvas,
.qr-source {
  display: none;
}

.qr-fallback {
  display: none;
}

.qr-fallback span {
  border-radius: 1px;
  background: #17201b;
}

.qr-fallback span:nth-child(3n) {
  background: transparent;
}

.poster-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

.poster-panel strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: white;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.qr-actions button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 8px;
  background: white;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 900;
}

.invite-stats {
  margin-top: 14px;
}

.rule-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rule-list h2 {
  margin-bottom: 2px;
}

.rule-list article {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.rule-list span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: #875b08;
  font-weight: 900;
}

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

.referral-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.mini-avatar,
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  color: var(--teal-deep);
  font-weight: 900;
}

.mini-avatar {
  width: 40px;
  height: 40px;
}

.referral-item div {
  min-width: 0;
  flex: 1;
}

.referral-item h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.referral-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--gold-soft);
  color: #875b08;
  font-size: 11px;
  font-weight: 900;
}

.profile-head {
  padding: 8px 0 16px;
}

.avatar {
  width: 58px;
  height: 58px;
  font-size: 21px;
}

.profile-head div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.profile-head p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.profile-head h1 {
  font-size: 22px;
}

.wallet-card {
  padding: 18px;
  background: #17201b;
  color: white;
}

.wallet-card span {
  color: rgba(255, 255, 255, 0.66);
}

.wallet-card strong {
  display: block;
  margin-top: 8px;
  font-size: 42px;
  line-height: 1;
}

.wallet-card p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.merchant-card {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
}

.merchant-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.menu-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.menu-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}

.menu-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
}

.menu-list svg {
  width: 20px;
  height: 20px;
  color: var(--teal);
}

.menu-list strong {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sub-page {
  padding-bottom: 110px;
}

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

.form-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.auth-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.auth-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.form-card label,
.auth-panel label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-card .wide-field {
  width: 100%;
}

.form-card input,
.form-card select,
.form-card textarea,
.detail-card textarea,
.auth-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  outline: 0;
}

.form-card input,
.form-card select,
.auth-panel input {
  min-height: 46px;
  padding: 0 12px;
}

.form-card textarea {
  display: block;
  min-height: 96px;
  width: 100%;
  resize: vertical;
  padding: 12px;
  line-height: 1.55;
}

#publishTaskProofNote {
  min-height: 136px;
}

.detail-card textarea {
  display: block;
  min-height: 112px;
  resize: vertical;
  padding: 12px;
  line-height: 1.55;
}

.full-button {
  width: 100%;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.auth-panel input:focus {
  border-color: rgba(15, 139, 125, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 139, 125, 0.1);
}

.auth-panel input[readonly] {
  color: var(--muted);
  background: #f3f5f4;
  cursor: not-allowed;
}

.sms-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  width: 100%;
}

.sms-code-row button {
  min-height: 46px;
  padding: 0 10px;
  white-space: nowrap;
}

.sms-code-row button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.sms-code-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.upload-box {
  display: grid;
  min-height: 92px;
  place-items: center;
  gap: 8px;
  border: 1px dashed rgba(15, 139, 125, 0.42);
  border-radius: 8px;
  background: #f4fbf8;
  color: var(--teal-deep);
  font-weight: 900;
}

.upload-box input[type="file"] {
  display: none;
}

.notice-card {
  margin-top: 14px;
  padding: 16px;
}

.notice-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.profile-editor {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
}

.avatar-large {
  width: 72px;
  height: 72px;
  font-size: 26px;
}

.fixed-submit {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 20;
  width: min(398px, calc(100vw - 32px));
  min-height: 48px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(15, 139, 125, 0.24);
}

.phone-shell.sub-open .bottom-nav {
  display: none;
}

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

.merchant-overview article {
  min-width: 0;
  padding: 12px 10px;
}

.merchant-overview span,
.info-list span,
.balance-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.merchant-overview strong {
  display: inline-block;
  margin-top: 7px;
  font-size: 20px;
  line-height: 1;
}

.merchant-overview small {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-section {
  margin-top: 16px;
}

.merchant-menu {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.wallet-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.wallet-actions button {
  min-height: 44px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.wallet-actions button:nth-child(2) {
  background: #17201b;
}

.balance-actions {
  margin-bottom: 14px;
}

.merchant-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(23, 32, 27, 0.06);
}

.merchant-menu span {
  font-size: 16px;
  font-weight: 900;
}

.merchant-menu strong {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-task-list {
  margin-top: 18px;
}

.compact-head {
  margin-top: 0;
}

.info-list,
.balance-list {
  display: grid;
  overflow: hidden;
}

.info-list article,
.balance-list article {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.info-list article:last-child,
.balance-list article:last-child {
  border-bottom: 0;
}

.info-list strong {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.balance-list div {
  min-width: 0;
}

.balance-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.balance-list em {
  flex: 0 0 auto;
  color: var(--teal-deep);
  font-style: normal;
  font-weight: 900;
}

.balance-list .negative {
  color: var(--danger);
}

.balance-page-list {
  margin-top: 14px;
}

.order-tabs {
  margin-top: 0;
}

.order-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.order-card {
  border: 1px solid rgba(223, 230, 223, 0.92);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(23, 32, 27, 0.06);
}

.order-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.order-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.order-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.proof-box {
  margin: 12px 0;
  border-radius: 8px;
  padding: 12px;
  background: #f4f8f6;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.proof-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
}

.proof-box p {
  margin: 0;
}

.proof-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 72px);
  gap: 8px;
  margin-top: 10px;
  align-items: start;
}

.proof-image-grid img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f8f6;
  cursor: zoom-in;
}

.image-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 22, 19, 0.72);
}

.image-preview-dialog {
  position: relative;
  width: min(100%, 360px);
}

.image-preview-dialog img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.image-preview-close {
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: #17201b;
  color: white;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.submitted-proof-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.submitted-proof-panel:empty {
  display: none;
}

.record-panel {
  margin-top: 14px;
  border: 1px solid rgba(223, 230, 223, 0.92);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(23, 32, 27, 0.06);
}

.record-panel h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

.record-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.record-copy {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border-radius: 8px;
  padding: 12px;
  background: #f4f8f6;
}

.record-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.record-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.audit-timeline {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.audit-timeline article {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
}

.audit-timeline span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #eef4f1;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 900;
}

.audit-timeline strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.audit-timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.order-actions button {
  flex: 1 1 86px;
  min-height: 38px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.order-actions .secondary {
  background: #eef4f1;
  color: var(--teal-deep);
}

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

.inline-units {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid rgba(18, 32, 27, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.inline-units input {
  width: 58px;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-weight: 900;
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: #17201b;
  color: white;
}

.detail-hero span,
.detail-hero p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.detail-hero h2 {
  margin: 8px 0;
  font-size: 22px;
}

.detail-hero strong {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 30px;
  line-height: 1;
}

.detail-card {
  margin-top: 14px;
  padding: 16px;
}

.detail-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.step-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.step-list article {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.step-list span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--teal-deep);
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  display: grid;
  width: min(100vw, 430px);
  grid-template-columns: repeat(4, 1fr);
  transform: translateX(-50%);
  border-top: 1px solid rgba(223, 230, 223, 0.95);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  display: grid;
  min-height: 56px;
  place-items: center;
  gap: 4px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
}

.bottom-nav .nav-active {
  background: var(--mint);
  color: var(--teal-deep);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 32px));
  transform: translateX(-50%) translateY(16px);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(23, 32, 27, 0.92);
  color: white;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 360px) {
  .page {
    padding-right: 12px;
    padding-left: 12px;
  }

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

  .hero-panel img {
    max-height: 150px;
  }

  .stats-grid,
  .quick-actions {
    gap: 8px;
  }

  .stats-grid strong {
    font-size: 18px;
  }

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

  .merchant-overview strong {
    font-size: 17px;
  }
}

@media (min-width: 700px) {
  body {
    padding: 24px 0;
  }

  .phone-shell {
    min-height: calc(100vh - 48px);
    border-radius: 24px;
  }

  .bottom-nav {
    bottom: 24px;
    border-radius: 0 0 24px 24px;
  }
}
