html {
  background: #e9ece7;
}

body {
  background: #f3f5f1;
  color: #1d2a21;
  font-family: var(--sans);
}

body::before {
  content: none;
}

body.no-scroll {
  overflow: hidden;
}

.h5-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f3f5f1;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

@media (min-width: 640px) {
  .h5-shell {
    margin: 20px auto;
    min-height: calc(100vh - 40px);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(29, 42, 33, 0.12);
    overflow: hidden;
  }
}

.page {
  padding: 0 16px 26px;
  min-height: 60vh;
}

/* boot / loading */

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
}
.boot-seal {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--pine);
  color: #f7f0dd;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 22px;
}
.boot-line {
  width: 54px;
  height: 1px;
  background: var(--line-strong);
  margin: 4px 0;
}
.boot-screen p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
}
.page-loading {
  min-height: 60vh;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(29, 42, 33, 0.14);
  border-top-color: var(--pine);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-state {
  min-height: 55vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  text-align: center;
  padding: 20px;
}
.error-state h3 { margin: 0; font-size: 16px; }
.error-state p { margin: 0; color: var(--ink-faint); font-size: 12px; max-width: 260px; }

/* header */

.app-top {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -16px;
  padding: 0 16px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(243, 245, 241, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e4e8e2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.seal {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--pine);
  color: #f7f0dd;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}
.brand-copy { min-width: 0; }
.brand-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #1d2a21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  display: block;
  font-size: 9px;
  color: var(--ink-faint);
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e0e5de;
  border-radius: 50%;
  background: #fff;
  color: #465246;
  display: inline-grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}
.icon-btn:hover { background: #eef3ec; color: var(--pine); }
.icon-btn .icon { width: 17px; height: 17px; }

.sub-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -16px 12px;
  height: 54px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(243, 245, 241, 0.96);
  border-bottom: 1px solid #e4e8e2;
}
.sub-title {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  flex: 1;
}
.header-spacer { width: 36px; flex: 0 0 auto; }

/* titles */

.simple-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 13px;
}
.simple-title h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.simple-title > span {
  font-size: 11px;
  color: var(--ink-faint);
}
.page-title { padding: 18px 0 12px; }
.page-title h1 { margin: 0; font-size: 23px; line-height: 1.25; }
.page-title p { margin: 4px 0 0; color: var(--ink-faint); font-size: 11px; }
.eyebrow {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 3px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 9px;
}
.section-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.section-note { font-size: 10px; color: var(--ink-faint); }

/* auth */

.auth-shell {
  min-height: 100vh;
  padding: 34px 20px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 430px;
  margin: 0 auto;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.auth-brand .seal { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; }
.auth-brand-name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.auth-brand small { display: block; font-size: 9px; color: var(--ink-faint); margin-top: 1px; }
.auth-card {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 8px 30px rgba(29, 42, 33, 0.06);
}
.auth-card h1 { margin: 0; font-size: 22px; line-height: 1.3; }
.auth-sub { margin: 4px 0 16px; color: var(--ink-faint); font-size: 11px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  background: #f0f3ee;
  border-radius: 9px;
  margin-bottom: 17px;
}
.auth-tab {
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}
.auth-tab.is-active {
  background: #fff;
  color: var(--pine);
  box-shadow: 0 1px 3px rgba(29, 42, 33, 0.1);
}
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-form .field { margin: 0; }
.auth-error {
  display: none;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  line-height: 1.5;
}
.auth-error.is-visible { display: block; }
.auth-closed {
  padding: 9px 10px;
  margin-bottom: 12px;
  border-radius: 7px;
  background: #fbeee7;
  color: #9b4a2a;
  font-size: 11px;
}
.auth-submit { margin-top: 3px; }
.demo-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f7f2;
  border: 1px dashed #d8dfd4;
  font-size: 10px;
  color: var(--ink-soft);
}
.demo-box span { flex: 1; }
.demo-box b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.demo-box button {
  border: 1px solid #d8dfd4;
  background: #fff;
  color: var(--pine);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 10px;
}
.auth-footer {
  text-align: center;
  color: var(--ink-faint);
  font-size: 10px;
  margin: 15px 0 0;
}
.required-mark {
  color: var(--persimmon);
  font-size: 9px;
  font-weight: 500;
  margin-left: 2px;
}
.invite-check {
  margin-top: 5px;
  font-size: 10px;
  color: var(--ink-faint);
  min-height: 15px;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
}
.invite-check .icon { width: 12px; height: 12px; }
.invite-check.is-valid { color: #2d6a4b; }
.invite-check.is-invalid { color: var(--danger); }

/* fields */

.field { display: block; }
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.field-hint { display: block; font-size: 9px; color: var(--ink-faint); margin-top: 4px; line-height: 1.5; }
.input {
  width: 100%;
  height: 44px;
  border: 1px solid #dfe5dd;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.input:focus { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(23, 74, 53, 0.08); }
.input::placeholder { color: #a4ab9e; }
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 36px; padding-right: 42px; }
.input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #8c9587;
  display: flex;
}
.input-icon .icon { width: 16px; height: 16px; }
.form-card {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 13px;
  padding: 16px;
}
.form-heading { margin: 0 0 12px; font-size: 15px; }

/* buttons */

.btn {
  border-radius: 9px;
  min-height: 42px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.btn-primary {
  background: var(--pine);
  border-color: var(--pine);
  color: #fff;
}
.btn-primary:hover { background: var(--pine-2); border-color: var(--pine-2); }
.btn-lg { min-height: 46px; font-size: 14px; }
.btn-sm { min-height: 32px; font-size: 11px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-soft { background: #eef3ec; border-color: #e2e9df; color: var(--pine); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-icon { padding: 0; }

/* tabs / orders */

.order-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  background: #e9ede7;
  border-radius: 10px;
  margin-bottom: 12px;
}
.order-tab {
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #626c60;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.order-tab.is-active {
  background: #fff;
  color: var(--pine);
  box-shadow: 0 1px 3px rgba(29, 42, 33, 0.1);
}
.tab-count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #f0f2ee;
  color: #7b8477;
  font-size: 9px;
  line-height: 16px;
  font-family: var(--mono);
}
.order-tab.is-active .tab-count { background: #e7f0e7; color: var(--pine); }
.order-list { display: flex; flex-direction: column; gap: 9px; }
.order-card {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 12px;
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color 0.18s;
}
.order-card:active { border-color: #b9c9b6; }
.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.order-no { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.order-card-body { padding: 2px 0 9px; }
.order-item { display: flex; align-items: center; gap: 9px; }
.item-emoji {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #f3f5f0;
  display: grid;
  place-items: center;
  font-size: 21px;
}
.item-main { min-width: 0; flex: 1; }
.item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-meta { font-size: 10px; color: var(--ink-faint); margin-top: 1px; }
.order-price {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex: 0 0 auto;
}
.order-card-foot {
  padding-top: 9px;
  border-top: 1px solid #eef1ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: var(--ink-faint);
}
.order-cta { color: var(--pine); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.order-cta .icon { width: 12px; height: 12px; }

/* empty */

.empty {
  padding: 34px 20px;
  text-align: center;
  border: 1px dashed #d9e0d5;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}
.empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #edf2ea;
  color: #7b917d;
  display: grid;
  place-items: center;
  margin: 0 auto 9px;
}
.empty-icon .icon { width: 21px; height: 21px; }
.empty h3 { margin: 0 0 3px; font-size: 14px; }
.empty p { margin: 0; font-size: 11px; color: var(--ink-faint); line-height: 1.6; }
.list-empty { margin-top: 2px; }

/* order detail */

.detail-status {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 13px;
  padding: 16px;
  margin-bottom: 10px;
}
.detail-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.detail-date { font-size: 9px; color: var(--ink-faint); }
.detail-amount {
  margin: 12px 0 3px;
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}
.detail-amount .unit { font-size: 15px; margin-right: 2px; font-weight: 500; }
.detail-status-hint { font-size: 11px; color: var(--ink-soft); }
.detail-order-no { font-size: 9px; color: var(--ink-faint); margin-top: 9px; font-family: var(--mono); }
.detail-card {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 13px;
  padding: 14px;
  margin-bottom: 10px;
}
.detail-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.detail-card-title .muted { font-size: 9px; color: var(--ink-faint); font-weight: 400; }
.detail-items { display: flex; flex-direction: column; gap: 11px; }
.detail-item { display: flex; align-items: center; gap: 9px; }
.detail-item .item-emoji { width: 36px; height: 36px; font-size: 18px; }
.item-price {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 auto;
  text-align: right;
}
.item-qty { display: block; font-family: var(--sans); font-size: 9px; color: var(--ink-faint); font-weight: 400; }
.amount-lines {
  margin-top: 13px;
  padding-top: 9px;
  border-top: 1px dashed #e3e8e1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.amount-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-soft);
}
.amount-line b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.amount-line.total {
  margin-top: 3px;
  padding-top: 7px;
  border-top: 1px solid #eef1ec;
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
}
.amount-line.total b { font-size: 16px; }
.detail-note { margin: 0; font-size: 11px; line-height: 1.7; color: var(--ink-soft); }
.pay-card {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 13px;
  padding: 14px;
  margin-bottom: 10px;
}
.pay-headline h3 { margin: 0 0 9px; font-size: 13px; }
.payee-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f6f8f4;
  border: 1px solid #e8ede4;
}
.payee-box b { display: block; font-size: 12px; }
.payee-box span { display: block; font-size: 10px; color: var(--ink-faint); margin-top: 1px; }
.copy-small {
  border: 1px solid #dfe5da;
  background: #fff;
  color: var(--pine);
  border-radius: 6px;
  padding: 4px 7px;
  font: inherit;
  font-size: 9px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.copy-small .icon { width: 10px; height: 10px; }
.method-tabs { display: flex; gap: 5px; margin-top: 11px; }
.method-tab {
  flex: 1;
  height: 32px;
  border: 1px solid #e1e7dd;
  border-radius: 7px;
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.method-tab.is-active { border-color: var(--pine); background: #eef4ed; color: var(--pine); font-weight: 600; }
.method-tab .icon { width: 13px; height: 13px; }
#pay-method-area { margin-top: 9px; }
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e6ebe2;
  border-radius: 8px;
  margin-top: 7px;
}
.account-label { font-size: 9px; color: var(--ink-faint); margin-bottom: 1px; }
.account-value { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.qr-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid #e6ebe2;
  border-radius: 8px;
  margin-top: 7px;
}
.qr-panel img { width: 86px; height: 86px; object-fit: contain; border-radius: 6px; background: #fff; }
.qr-copy b { display: block; font-size: 12px; }
.qr-copy p { margin: 3px 0 0; font-size: 10px; color: var(--ink-faint); line-height: 1.5; }
.pay-hint {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 10px;
  font-size: 9px;
  color: var(--ink-faint);
  line-height: 1.6;
}
.pay-hint .icon { width: 12px; height: 12px; flex: 0 0 auto; margin-top: 1px; }
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 9px;
  background: #f2f6f0;
  border: 1px solid #e0e8dc;
  color: #48604a;
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 10px;
}
.info-banner .icon { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }
.info-banner.is-warn { background: #fbeee7; border-color: #f0d8ca; color: #8d4b2e; }
.income-receipt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 9px;
  background: #edf5ea;
  border: 1px solid #d9e8d2;
  margin-bottom: 10px;
}
.income-receipt span { display: block; font-size: 9px; color: #5b7059; }
.income-receipt b { display: block; font-family: var(--mono); font-size: 17px; color: var(--pine); }
.detail-action-bar { display: flex; gap: 8px; margin-top: 14px; }

/* team */

.team-summary {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 13px;
  overflow: hidden;
}
.team-total { padding: 16px; }
.team-total > span { display: block; font-size: 10px; color: var(--ink-faint); margin-bottom: 3px; }
.team-total > b {
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 700;
}
.team-amount-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #eef1ec;
}
.team-amount-row > div { padding: 11px 16px; }
.team-amount-row > div + div { border-left: 1px solid #eef1ec; }
.team-amount-row span { display: block; font-size: 9px; color: var(--ink-faint); margin-bottom: 1px; }
.team-amount-row b { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.team-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 9px;
}
.stat-box {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 10px;
  padding: 10px 11px;
}
.stat-box span { display: block; font-size: 9px; color: var(--ink-faint); margin-bottom: 2px; }
.stat-box b { font-family: var(--mono); font-size: 19px; line-height: 1.2; font-weight: 700; }
.team-stats .stat-box:last-child { grid-column: 1 / -1; }
.tree-card {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 13px;
  margin-top: 10px;
  overflow: hidden;
}
.tree-head {
  padding: 13px 14px 10px;
  border-bottom: 1px solid #eef1ec;
}
.tree-head h2 { margin: 0; font-size: 14px; }
.tree-head p { margin: 2px 0 0; font-size: 10px; color: var(--ink-faint); }
.tree-body { padding: 4px 10px 9px; }
.tree-self {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 4px;
  border-bottom: 1px solid #eef1ec;
}
.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e8f0e4;
  color: var(--pine);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.tree-self .grow b, .node-name { font-size: 12px; font-weight: 600; }
.tree-self .grow span { display: block; font-size: 9px; color: var(--ink-faint); margin-top: 1px; }
.tree-node-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 4px;
  border-bottom: 1px solid #f1f3ef;
}
.tree-children { padding-left: 15px; border-left: 1px solid #e7ece3; margin-left: 17px; }
.tree-children .tree-node-row { border-bottom-style: dashed; }
.node-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f1f4ee;
  color: #60725f;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}
.node-avatar.lv-1 { background: #e7f0e4; color: var(--pine); }
.node-main { min-width: 0; flex: 1; }
.node-name-line { display: flex; align-items: center; gap: 5px; }
.node-level {
  font-size: 8px;
  line-height: 14px;
  padding: 0 4px;
  border-radius: 3px;
  background: #edf3e9;
  color: #5b775d;
}
.node-account { font-family: var(--mono); font-size: 9px; color: var(--ink-faint); margin-top: 1px; }
.node-meta { font-size: 9px; color: var(--ink-soft); margin-top: 2px; }
.expand-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8de;
  border-radius: 50%;
  background: #fafbf8;
  color: #6f7e6e;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}
.expand-btn .icon { width: 13px; height: 13px; transition: transform 0.18s; }
.expand-btn.is-open .icon { transform: rotate(180deg); }
.expand-btn.is-loading { opacity: 0.5; }

/* mine */

.profile-card {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 13px;
  padding: 14px;
}
.profile-head { display: flex; align-items: center; gap: 11px; }
.profile-head .avatar { width: 48px; height: 48px; font-size: 18px; background: var(--pine); color: #fff; }
.profile-info h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.profile-info p { margin: 2px 0 0; color: var(--ink-faint); font-size: 10px; }
.profile-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f6f8f4;
  border: 1px dashed #dbe4d7;
}
.code-label { font-size: 9px; color: var(--ink-faint); }
.code-value { font-family: var(--mono); font-size: 19px; font-weight: 700; letter-spacing: 0.09em; line-height: 1.2; }
.code-copy {
  border: 1px solid #dfe7db;
  background: #fff;
  color: var(--pine);
  border-radius: 6px;
  padding: 5px 8px;
  font: inherit;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}
.code-copy .icon { width: 11px; height: 11px; }
.wallet-card {
  margin-top: 9px;
  background: var(--pine);
  border-radius: 13px;
  padding: 14px;
  color: #f5f2e8;
  overflow: hidden;
}
.wallet-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.wallet-label { font-size: 10px; color: rgba(255, 255, 255, 0.62); }
.wallet-amount { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -0.05em; line-height: 1.15; margin-top: 1px; }
.wallet-amount .unit { font-size: 14px; font-weight: 500; margin-right: 1px; }
.wallet-withdraw {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 7px;
  min-height: 32px;
  padding: 0 11px;
  font: inherit;
  font-size: 11px;
  flex: 0 0 auto;
}
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.wallet-cell {
  border: 0;
  background: transparent;
  color: #f5f2e8;
  text-align: left;
  padding: 9px 0 0;
  font: inherit;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}
.wallet-cell:first-child { border-left: 0; }
.wallet-cell span { display: block; font-size: 9px; color: rgba(255, 255, 255, 0.55); }
.wallet-cell b { display: block; font-family: var(--mono); font-size: 13px; font-weight: 600; margin-top: 1px; }
.menu-card {
  margin-top: 9px;
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 13px;
  overflow: hidden;
}
.menu-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f0f2ee;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row:active { background: #f6f8f3; }
.menu-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #eef3eb;
  color: var(--pine);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.menu-icon.gold { background: #f7eed8; color: #9a7026; }
.menu-icon.warm { background: #f8e9e1; color: #a75433; }
.menu-icon .icon { width: 14px; height: 14px; }
.menu-main { flex: 1; min-width: 0; }
.menu-main b { display: block; font-size: 12px; font-weight: 600; }
.menu-main span { display: block; font-size: 9px; color: var(--ink-faint); margin-top: 1px; }
.menu-value { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
.chevron { color: #a8b0a4; width: 14px; height: 14px; }
.logout-row { text-align: center; padding: 14px 0 2px; }
.logout-row button {
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font: inherit;
  font-size: 11px;
  padding: 6px;
}

/* ledger / statement / withdrawals */

.ledger-hero {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 13px;
  padding: 15px;
  margin-bottom: 10px;
}
.ledger-hero .label { font-size: 10px; color: var(--ink-faint); }
.ledger-hero .amount { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -0.05em; line-height: 1.2; }
.ledger-hero .amount .unit { font-size: 14px; font-weight: 500; }
.ledger-hero .meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #eef1ec;
}
.ledger-hero .meta > div { font-size: 9px; color: var(--ink-faint); }
.ledger-hero .meta b { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink); margin-top: 1px; }
.ledger-list { display: flex; flex-direction: column; gap: 7px; }
.ledger-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 10px;
  padding: 11px;
}
.ledger-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #edf3e9;
  color: #4f6f52;
  display: grid;
  place-items: center;
}
.ledger-icon.warm { background: #f8e9e1; color: #a75433; }
.ledger-icon .icon { width: 14px; height: 14px; }
.ledger-main { flex: 1; min-width: 0; }
.ledger-main b { display: block; font-size: 12px; }
.ledger-main p { margin: 1px 0 0; font-size: 9px; color: var(--ink-faint); line-height: 1.5; }
.ledger-date { display: block; font-size: 8px; color: #9ba294; margin-top: 3px; }
.ledger-amount {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--pine);
  flex: 0 0 auto;
}
.ledger-amount.is-negative { color: #a55232; }
.tiny { font-size: 9px; color: var(--ink-faint); line-height: 1.6; }

.withdraw-available {
  background: var(--pine);
  border-radius: 13px;
  padding: 15px;
  color: #fff;
  margin-bottom: 10px;
}
.withdraw-available > span { display: block; font-size: 10px; color: rgba(255, 255, 255, 0.62); }
.withdraw-available > b { display: block; font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -0.05em; }
.withdraw-available .unit { font-size: 14px; font-weight: 500; }
.amount-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dfe5dd;
  border-radius: 9px;
  background: #fff;
  padding: 0 10px;
  height: 46px;
}
.amount-input-wrap .currency { font-family: var(--mono); font-size: 17px; color: var(--ink-soft); }
.amount-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font: inherit;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--ink);
  background: transparent;
}
.all-btn {
  border: 0;
  background: #eef3eb;
  color: var(--pine);
  border-radius: 5px;
  padding: 5px 8px;
  font: inherit;
  font-size: 10px;
}
.method-select { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.method-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  border: 1px solid #e1e7dd;
  border-radius: 8px;
  font-size: 11px;
  color: var(--ink-soft);
}
.method-option input { display: none; }
.method-option.is-active { border-color: var(--pine); background: #eef4ed; color: var(--pine); font-weight: 600; }
.method-option .icon { width: 14px; height: 14px; }
.history-list { display: flex; flex-direction: column; gap: 7px; }
.history-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 10px;
  padding: 11px;
}
.history-main { flex: 1; min-width: 0; }
.history-main b { display: block; font-size: 12px; }
.history-main p { margin: 1px 0 4px; font-size: 9px; color: var(--ink-faint); }
.history-amount { font-family: var(--mono); font-size: 13px; font-weight: 700; }

/* shop edit */

.readonly-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  background: #f4f6f2;
  border: 1px solid #e5eae1;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
}
.readonly-phone .icon { width: 14px; height: 14px; }
.readonly-phone .lock { margin-left: auto; font-family: var(--sans); font-size: 9px; color: var(--ink-faint); }
.qr-upload-grid { display: grid; grid-template-columns: 1fr; gap: 7px; }
.qr-upload {
  position: relative;
  min-height: 122px;
  border: 1px dashed #d6dfd2;
  border-radius: 9px;
  background: #fafbf8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
}
.qr-upload img { width: 88px; height: 88px; object-fit: contain; }
.qr-upload-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #edf3e9;
  color: var(--pine);
  display: grid;
  place-items: center;
}
.qr-upload-label { font-size: 9px; color: var(--ink-faint); }
.qr-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 42, 33, 0.6);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
}
.qr-remove .icon { width: 11px; height: 11px; }
.qr-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* invite modal */

.sheet-head { text-align: center; }
.sheet-head .seal { margin: 0 auto 9px; }
.sheet-head h3 { margin: 0; font-size: 17px; }
.sheet-head p { margin: 4px 0 0; font-size: 10px; color: var(--ink-faint); line-height: 1.6; }
.invite-code-big {
  margin: 14px 0 9px;
  padding: 11px;
  border-radius: 9px;
  background: #f3f6f1;
  border: 1px dashed #d6e0d2;
  text-align: center;
}
.invite-code-big span { display: block; font-size: 9px; color: var(--ink-faint); }
.invite-code-big strong { display: block; font-family: var(--mono); font-size: 26px; letter-spacing: 0.12em; color: var(--pine); }
.invite-link-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 7px;
  background: #f6f8f4;
  border: 1px solid #e6ebe2;
}
.invite-link-box span { flex: 1; min-width: 0; font-family: var(--mono); font-size: 9px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-link-box button { border: 0; background: transparent; color: var(--pine); font: inherit; font-size: 9px; flex: 0 0 auto; }
.invite-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.invite-note { margin: 10px 0 0; font-size: 9px; color: var(--ink-faint); line-height: 1.6; text-align: center; }

/* bottom nav */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 480px);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 0 12px env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #e4e8e2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 30;
  backdrop-filter: blur(10px);
}
.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #899184;
  font-size: 10px;
  text-decoration: none;
}
.nav-item .icon { width: 20px; height: 20px; }
.nav-item.is-active { color: var(--pine); font-weight: 600; }
.nav-dot {
  position: absolute;
  top: 15px;
  left: calc(50% + 8px);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--persimmon);
  display: none;
}
.nav-item.has-dot .nav-dot { display: block; }

/* utilities */

.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-faint); }
.unit { font-size: 0.55em; font-weight: 500; }
.inline-link { color: var(--pine); }
.reveal { animation: fadeUp 0.28s var(--ease) both; }
.reveal-1 { animation-delay: 0.03s; }
.reveal-2 { animation-delay: 0.06s; }
.reveal-3 { animation-delay: 0.09s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.form-card .field { margin-top: 12px; }
.form-card .field:first-child { margin-top: 0; }
.order-cta.is-button { background: var(--pine); color: #fff; padding: 5px 10px; border-radius: 6px; }
.order-cta.is-button .icon { width: 11px; height: 11px; }
.home-title-side { display: flex; align-items: center; gap: 8px; }
.home-refresh { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); display: grid; place-items: center; }
.home-title-side span { font-size: 11px; color: var(--ink-faint); }
/* 首页轮播图：固定高度、居中裁剪（最佳上传 750×300） */
.banner-carousel { position: relative; margin: 10px 12px 0; border-radius: 12px; overflow: hidden; height: 140px; background: #e8ede6; box-shadow: 0 4px 14px rgba(29,42,33,.08); }
.banner-track { display: flex; height: 100%; transition: transform .5s ease; }
.banner-slide { flex: 0 0 100%; height: 100%; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.banner-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.banner-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.banner-dots span.is-active { background: #fff; width: 14px; border-radius: 4px; }

/* 抢单卡片 */
.grab-list { display: flex; flex-direction: column; gap: 9px; padding: 0 12px 16px; }
.grab-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 10px rgba(29,42,33,.05); }
.grab-card.is-mine { border-color: rgba(23,74,53,.35); background: #f6faf3; }
.grab-main { flex: 1; min-width: 0; }
.grab-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.grab-meta { font-size: 11px; color: var(--ink-faint); margin-top: 3px; }
.grab-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.grab-amount { font-size: 11px; color: var(--ink-faint); display: flex; align-items: baseline; gap: 4px; }
.grab-amount b { font-family: var(--mono); font-size: 16px; color: #c0392b; }

/* 抢单悬浮按钮：仅在有可抢单时出现 */
.grab-fab {
  position: fixed;
  right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  z-index: 60;
  background: radial-gradient(circle at 35% 28%, #ff7a45 0%, #ff4d2e 45%, #d81e06 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(216, 30, 6, .38), 0 0 0 0 rgba(255, 77, 46, .55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  animation: grabPulse 1.8s infinite;
}
.grab-fab-char { font-size: 25px; font-weight: 800; line-height: 1; letter-spacing: 0; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.grab-fab-label {
  position: absolute;
  top: -9px;
  left: -6px;
  background: #ffd83d;
  color: #8a2b00;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
  transform: rotate(-12deg);
}
@keyframes grabPulse {
  0% { box-shadow: 0 10px 24px rgba(216,30,6,.38), 0 0 0 0 rgba(255,77,46,.5); }
  70% { box-shadow: 0 10px 24px rgba(216,30,6,.38), 0 0 0 16px rgba(255,77,46,0); }
  100% { box-shadow: 0 10px 24px rgba(216,30,6,.38), 0 0 0 0 rgba(255,77,46,0); }
}

.grab-card.is-locked { opacity: .78; background: #fbfbf8; }
.grab-card.is-locked .btn[disabled] { opacity: .55; }
