:root {
  color-scheme: light;
  --bg: #fff6fb;
  --card: rgba(255, 255, 255, 0.86);
  --card-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(244, 114, 182, 0.20);
  --text: #5b2443;
  --muted: #9d6b85;
  --accent: #ff7fbd;
  --accent-strong: #f04f9a;
  --gold: #ffbc4b;
  --danger: #e54878;
  --shadow: 0 18px 50px rgba(244, 114, 182, 0.20);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 4%, rgba(255, 191, 216, 0.85), transparent 15rem),
    radial-gradient(circle at 100% 0%, rgba(255, 226, 243, 0.95), transparent 15rem),
    linear-gradient(180deg, #fff7fc 0%, #ffeef7 48%, #fffafd 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(255, 127, 189, 0.14) 2px, transparent 2px),
    radial-gradient(circle at 54px 42px, rgba(255, 188, 75, 0.12) 2px, transparent 2px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

body.wechat-guide-open {
  overflow: hidden;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

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

.mobile-header {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 10px 2px 14px;
}

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

.install-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 127, 189, 0.32);
  border-radius: 999px;
  color: #8f2b5a;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(244, 114, 182, 0.14);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 6px;
  font-size: 23px;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.wallet-pill {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 127, 189, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.70);
  text-align: right;
}

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

.wallet-pill strong {
  display: block;
  margin-top: 3px;
  color: var(--accent-strong);
  font-size: 18px;
}

.install-tip,
.user-card,
.tab-panel,
.result-card,
.status-line,
.pay-card,
.rule-card,
.balance-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.install-tip {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px;
}

.install-tip[hidden] {
  display: none;
}

.install-tip strong {
  display: block;
  margin-bottom: 4px;
}

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

.install-tip button {
  min-height: 38px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.wechat-browser-guide {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 127, 189, 0.28), transparent 9rem),
    rgba(255, 246, 251, 0.96);
  backdrop-filter: blur(18px);
}

.wechat-browser-guide[hidden] {
  display: none;
}

.wechat-arrow {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 22px;
  color: var(--accent-strong);
  font-size: 58px;
  font-weight: 1000;
  line-height: 1;
  animation: floatArrow 1.15s ease-in-out infinite alternate;
}

.wechat-guide-card {
  width: min(100%, 430px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.wechat-guide-card h2 {
  margin-bottom: 10px;
  font-size: 28px;
}

.wechat-guide-card p {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.7;
}

.wechat-steps {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.wechat-steps span {
  display: block;
  padding: 12px 13px;
  border: 1px solid rgba(244, 114, 182, 0.18);
  border-radius: 16px;
  background: rgba(255, 240, 247, 0.86);
  color: #8f2b5a;
  font-weight: 900;
}

#copy-current-url {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #ff6bae, #ffadd4 54%, #ffd3e8);
  font-weight: 1000;
}

@keyframes floatArrow {
  from {
    transform: translate(-3px, 5px);
  }
  to {
    transform: translate(4px, -5px);
  }
}

/* Compact mobile layout: keep the core creation flow visible in one screen. */
.app-shell {
  padding: 6px 10px calc(62px + env(safe-area-inset-bottom));
}

.mobile-header {
  gap: 7px;
  padding: 5px 0 7px;
}

.install-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.eyebrow {
  margin-bottom: 2px;
  font-size: 9px;
}

h1 {
  font-size: 22px;
}

h2 {
  margin-bottom: 2px;
  font-size: 18px;
}

h3 {
  margin-bottom: 7px;
  font-size: 15px;
}

.wallet-pill {
  min-width: 78px;
  padding: 6px 8px;
  border-radius: 14px;
}

.wallet-pill span,
.balance-card span {
  font-size: 10px;
}

.wallet-pill strong {
  margin-top: 1px;
  font-size: 15px;
}

.user-card {
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 18px;
}

.login-form-card {
  gap: 6px;
}

.login-success-card {
  gap: 8px;
  padding: 0;
}

.login-success-card strong {
  font-size: 15px;
}

.login-success-card p {
  margin-top: 0;
  font-size: 11px;
}

.login-dot {
  flex-basis: 10px;
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 4px rgba(255, 127, 189, 0.14);
}

label {
  gap: 4px;
  font-size: 12px;
}

.username-row {
  gap: 6px;
}

input,
select {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 13px;
}

textarea {
  min-height: 78px;
  padding: 9px 10px;
  border-radius: 13px;
  line-height: 1.45;
  font-size: 13px;
}

.username-row button,
.copy-button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 12px;
  font-size: 12px;
}

.user-meta {
  gap: 6px;
  font-size: 10px;
}

.tab-panel {
  gap: 9px;
  padding: 11px;
  border-radius: 20px;
}

.section-title {
  gap: 8px;
}

.section-title p,
.pay-card p,
.rule-card p,
.balance-card p {
  line-height: 1.38;
  font-size: 11px;
}

.number-badge {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-size: 11px;
}

.tool-form {
  gap: 8px;
}

.form-grid {
  gap: 7px;
}

.upload-box {
  min-height: 86px;
  border-radius: 16px;
}

.upload-copy {
  gap: 3px;
}

.upload-copy strong {
  font-size: 15px;
}

.upload-copy span {
  font-size: 11px;
}

#upload-preview {
  height: 118px;
}

.primary-button {
  min-height: 42px;
  border-radius: 14px;
  font-size: 14px;
}

.ghost-button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 13px;
  font-size: 12px;
}

.result-area {
  margin-top: 8px;
}

.status-line {
  padding: 8px 10px;
  border-radius: 16px;
  font-size: 11px;
}

.result-card {
  margin-top: 8px;
  padding: 10px;
  border-radius: 18px;
}

.result-header {
  gap: 8px;
  margin-bottom: 8px;
}

.balance-card,
.pay-card,
.rule-card {
  padding: 10px;
  border-radius: 18px;
}

.balance-card strong {
  margin: 2px 0 4px;
  font-size: 27px;
}

.copy-row {
  gap: 7px;
  margin-bottom: 6px;
  padding: 7px;
  border-radius: 13px;
}

.bottom-tabs {
  gap: 5px;
  padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
}

.tab-button {
  min-height: 48px;
  border-radius: 14px;
}

.tab-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-size: 11px;
}

.tab-button strong {
  font-size: 11px;
}

.tab-button em {
  top: 2px;
  right: 4px;
  font-size: 9px;
}

/* TRUE FINAL ULTRA COMPACT OVERRIDE - keep at EOF. */
.app-shell { padding: 4px 8px calc(54px + env(safe-area-inset-bottom)); }
.mobile-header { gap: 5px; padding: 3px 0 5px; }
.install-button { min-height: 24px; padding: 0 7px; font-size: 10px; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
.wallet-pill { min-width: 70px; padding: 5px 7px; }
.wallet-pill strong { font-size: 14px; }
.user-card { gap: 4px; margin-bottom: 6px; padding: 6px 8px; border-radius: 16px; }
.login-form-card { gap: 4px; }
.login-success-card { gap: 6px; padding: 0; }
.login-success-card strong { font-size: 14px; }
.login-success-card p { margin-top: 0; font-size: 10px; }
.login-dot { flex: 0 0 9px; width: 9px; height: 9px; box-shadow: 0 0 0 3px rgba(255, 127, 189, 0.14); }
label { gap: 3px; font-size: 11px; }
.username-row { gap: 5px; }
input, select { min-height: 32px; padding: 0 8px; border-radius: 11px; font-size: 12px; }
textarea { min-height: 64px; padding: 7px 8px; border-radius: 12px; line-height: 1.35; font-size: 12px; }
.username-row button, .copy-button { min-height: 32px; padding: 0 9px; border-radius: 11px; font-size: 11px; }
.user-meta { gap: 5px; font-size: 9px; }
.tab-panel { gap: 7px; padding: 8px; border-radius: 18px; }
.section-title { gap: 6px; }
.section-title p, .pay-card p, .rule-card p, .balance-card p { line-height: 1.28; font-size: 10px; }
.number-badge { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 10px; font-size: 10px; }
.tool-form { gap: 6px; }
.form-grid { gap: 5px; }
.upload-box { min-height: 70px; border-radius: 14px; }
.upload-copy { gap: 2px; }
.upload-copy strong { font-size: 14px; }
.upload-copy span { font-size: 10px; }
#upload-preview { height: 96px; }
.primary-button { min-height: 36px; border-radius: 12px; font-size: 13px; }
.ghost-button { min-height: 32px; padding: 0 9px; border-radius: 11px; font-size: 11px; }
.result-area { margin-top: 6px; }
.status-line { padding: 6px 8px; border-radius: 14px; font-size: 10px; }
.result-card { margin-top: 6px; padding: 8px; border-radius: 16px; }
.result-header { gap: 6px; margin-bottom: 6px; }
.balance-card, .pay-card, .rule-card { padding: 8px; border-radius: 16px; }
.balance-card strong { margin: 1px 0 2px; font-size: 24px; }
.copy-row { gap: 5px; margin-bottom: 4px; padding: 5px; border-radius: 11px; }
.bottom-tabs { gap: 4px; padding: 4px 7px calc(4px + env(safe-area-inset-bottom)); }
.tab-button { min-height: 42px; border-radius: 12px; }
.tab-icon { width: 20px; height: 20px; border-radius: 7px; font-size: 10px; }
.tab-button strong { font-size: 10px; }
.tab-button em { top: 1px; right: 3px; font-size: 8px; }

/* TRUE FINAL ULTRA COMPACT OVERRIDE - keep at EOF. */
.app-shell { padding: 4px 8px calc(54px + env(safe-area-inset-bottom)); }
.mobile-header { gap: 5px; padding: 3px 0 5px; }
.install-button { min-height: 24px; padding: 0 7px; font-size: 10px; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
.wallet-pill { min-width: 70px; padding: 5px 7px; }
.wallet-pill strong { font-size: 14px; }
.user-card { gap: 4px; margin-bottom: 6px; padding: 6px 8px; border-radius: 16px; }
.login-form-card { gap: 4px; }
.login-success-card { gap: 6px; padding: 0; }
.login-success-card strong { font-size: 14px; }
.login-success-card p { margin-top: 0; font-size: 10px; }
.login-dot { flex: 0 0 9px; width: 9px; height: 9px; box-shadow: 0 0 0 3px rgba(255, 127, 189, 0.14); }
label { gap: 3px; font-size: 11px; }
.username-row { gap: 5px; }
input, select { min-height: 32px; padding: 0 8px; border-radius: 11px; font-size: 12px; }
textarea { min-height: 64px; padding: 7px 8px; border-radius: 12px; line-height: 1.35; font-size: 12px; }
.username-row button, .copy-button { min-height: 32px; padding: 0 9px; border-radius: 11px; font-size: 11px; }
.user-meta { gap: 5px; font-size: 9px; }
.tab-panel { gap: 7px; padding: 8px; border-radius: 18px; }
.section-title { gap: 6px; }
.section-title p, .pay-card p, .rule-card p, .balance-card p { line-height: 1.28; font-size: 10px; }
.number-badge { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 10px; font-size: 10px; }
.tool-form { gap: 6px; }
.form-grid { gap: 5px; }
.upload-box { min-height: 70px; border-radius: 14px; }
.upload-copy { gap: 2px; }
.upload-copy strong { font-size: 14px; }
.upload-copy span { font-size: 10px; }
#upload-preview { height: 96px; }
.primary-button { min-height: 36px; border-radius: 12px; font-size: 13px; }
.ghost-button { min-height: 32px; padding: 0 9px; border-radius: 11px; font-size: 11px; }
.result-area { margin-top: 6px; }
.status-line { padding: 6px 8px; border-radius: 14px; font-size: 10px; }
.result-card { margin-top: 6px; padding: 8px; border-radius: 16px; }
.result-header { gap: 6px; margin-bottom: 6px; }
.balance-card, .pay-card, .rule-card { padding: 8px; border-radius: 16px; }
.balance-card strong { margin: 1px 0 2px; font-size: 24px; }
.copy-row { gap: 5px; margin-bottom: 4px; padding: 5px; border-radius: 11px; }
.bottom-tabs { gap: 4px; padding: 4px 7px calc(4px + env(safe-area-inset-bottom)); }
.tab-button { min-height: 42px; border-radius: 12px; }
.tab-icon { width: 20px; height: 20px; border-radius: 7px; font-size: 10px; }
.tab-button strong { font-size: 10px; }
.tab-button em { top: 1px; right: 3px; font-size: 8px; }

/* FINAL ULTRA COMPACT OVERRIDE - keep at EOF. */
.app-shell { padding: 4px 8px calc(54px + env(safe-area-inset-bottom)); }
.mobile-header { gap: 5px; padding: 3px 0 5px; }
.install-button { min-height: 24px; padding: 0 7px; font-size: 10px; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
.wallet-pill { min-width: 70px; padding: 5px 7px; }
.wallet-pill strong { font-size: 14px; }
.user-card { gap: 4px; margin-bottom: 6px; padding: 6px 8px; border-radius: 16px; }
label { gap: 3px; font-size: 11px; }
input, select { min-height: 32px; padding: 0 8px; border-radius: 11px; font-size: 12px; }
textarea { min-height: 64px; padding: 7px 8px; border-radius: 12px; line-height: 1.35; font-size: 12px; }
.username-row button, .copy-button { min-height: 32px; padding: 0 9px; border-radius: 11px; font-size: 11px; }
.user-meta { font-size: 9px; }
.tab-panel { gap: 7px; padding: 8px; border-radius: 18px; }
.section-title { gap: 6px; }
.section-title p, .pay-card p, .rule-card p, .balance-card p { line-height: 1.28; font-size: 10px; }
.number-badge { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 10px; font-size: 10px; }
.tool-form { gap: 6px; }
.form-grid { gap: 5px; }
.upload-box { min-height: 70px; border-radius: 14px; }
.upload-copy strong { font-size: 14px; }
.upload-copy span { font-size: 10px; }
#upload-preview { height: 96px; }
.primary-button { min-height: 36px; border-radius: 12px; font-size: 13px; }
.status-line { padding: 6px 8px; border-radius: 14px; font-size: 10px; }
.balance-card, .pay-card, .rule-card { padding: 8px; border-radius: 16px; }
.balance-card strong { margin: 1px 0 2px; font-size: 24px; }
.copy-row { gap: 5px; margin-bottom: 4px; padding: 5px; border-radius: 11px; }
.bottom-tabs { gap: 4px; padding: 4px 7px calc(4px + env(safe-area-inset-bottom)); }
.tab-button { min-height: 42px; border-radius: 12px; }
.tab-icon { width: 20px; height: 20px; font-size: 10px; }
.tab-button strong { font-size: 10px; }

/* Extra compact override for smaller phone screens. */
.app-shell {
  padding: 4px 8px calc(54px + env(safe-area-inset-bottom));
}

.mobile-header {
  gap: 5px;
  padding: 3px 0 5px;
}

.install-button {
  min-height: 24px;
  padding: 0 7px;
  font-size: 10px;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 16px;
}

.wallet-pill {
  min-width: 70px;
  padding: 5px 7px;
}

.wallet-pill strong {
  font-size: 14px;
}

.user-card {
  gap: 4px;
  margin-bottom: 6px;
  padding: 6px 8px;
  border-radius: 16px;
}

label {
  font-size: 11px;
}

input,
select {
  min-height: 32px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 12px;
}

textarea {
  min-height: 64px;
  padding: 7px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.username-row button,
.copy-button {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 11px;
}

.user-meta {
  font-size: 9px;
}

.tab-panel {
  gap: 7px;
  padding: 8px;
  border-radius: 18px;
}

.section-title {
  gap: 6px;
}

.section-title p,
.pay-card p,
.rule-card p,
.balance-card p {
  line-height: 1.28;
  font-size: 10px;
}

.number-badge {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 10px;
}

.tool-form {
  gap: 6px;
}

.form-grid {
  gap: 5px;
}

.upload-box {
  min-height: 70px;
  border-radius: 14px;
}

.upload-copy strong {
  font-size: 14px;
}

.upload-copy span {
  font-size: 10px;
}

#upload-preview {
  height: 96px;
}

.primary-button {
  min-height: 36px;
  border-radius: 12px;
  font-size: 13px;
}

.status-line {
  padding: 6px 8px;
  border-radius: 14px;
  font-size: 10px;
}

.balance-card,
.pay-card,
.rule-card {
  padding: 8px;
  border-radius: 16px;
}

.balance-card strong {
  margin: 1px 0 2px;
  font-size: 24px;
}

.copy-row {
  gap: 5px;
  margin-bottom: 4px;
  padding: 5px;
  border-radius: 11px;
}

.bottom-tabs {
  gap: 4px;
  padding: 4px 7px calc(4px + env(safe-area-inset-bottom));
}

.tab-button {
  min-height: 42px;
  border-radius: 12px;
}

.tab-icon {
  width: 20px;
  height: 20px;
  font-size: 10px;
}

.tab-button strong {
  font-size: 10px;
}

/* Ultra compact override. This must remain the final block. */
.app-shell {
  padding: 4px 8px calc(54px + env(safe-area-inset-bottom));
}

.mobile-header {
  gap: 5px;
  padding: 3px 0 5px;
}

.install-button {
  min-height: 24px;
  padding: 0 7px;
  font-size: 10px;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 16px;
}

.wallet-pill {
  min-width: 70px;
  padding: 5px 7px;
}

.wallet-pill strong {
  font-size: 14px;
}

.user-card {
  gap: 4px;
  margin-bottom: 6px;
  padding: 6px 8px;
  border-radius: 16px;
}

label {
  gap: 3px;
  font-size: 11px;
}

input,
select {
  min-height: 32px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 12px;
}

textarea {
  min-height: 64px;
  padding: 7px 8px;
  border-radius: 12px;
  line-height: 1.35;
  font-size: 12px;
}

.username-row button,
.copy-button {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 11px;
}

.user-meta {
  font-size: 9px;
}

.tab-panel {
  gap: 7px;
  padding: 8px;
  border-radius: 18px;
}

.section-title {
  gap: 6px;
}

.section-title p,
.pay-card p,
.rule-card p,
.balance-card p {
  line-height: 1.28;
  font-size: 10px;
}

.number-badge {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 10px;
}

.tool-form {
  gap: 6px;
}

.form-grid {
  gap: 5px;
}

.upload-box {
  min-height: 70px;
  border-radius: 14px;
}

.upload-copy strong {
  font-size: 14px;
}

.upload-copy span {
  font-size: 10px;
}

#upload-preview {
  height: 96px;
}

.primary-button {
  min-height: 36px;
  border-radius: 12px;
  font-size: 13px;
}

.status-line {
  padding: 6px 8px;
  border-radius: 14px;
  font-size: 10px;
}

.balance-card,
.pay-card,
.rule-card {
  padding: 8px;
  border-radius: 16px;
}

.balance-card strong {
  margin: 1px 0 2px;
  font-size: 24px;
}

.copy-row {
  gap: 5px;
  margin-bottom: 4px;
  padding: 5px;
  border-radius: 11px;
}

.bottom-tabs {
  gap: 4px;
  padding: 4px 7px calc(4px + env(safe-area-inset-bottom));
}

.tab-button {
  min-height: 42px;
  border-radius: 12px;
}

.tab-icon {
  width: 20px;
  height: 20px;
  font-size: 10px;
}

.tab-button strong {
  font-size: 10px;
}

.user-card {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
}

.login-form-card[hidden],
.login-success-card[hidden] {
  display: none;
}

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

.login-success-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px;
}

.login-success-card strong {
  display: block;
  color: var(--accent-strong);
  font-size: 18px;
}

.login-success-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-dot {
  display: inline-block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 127, 189, 0.16);
}

label {
  display: grid;
  gap: 8px;
  color: #743557;
  font-size: 14px;
  font-weight: 900;
}

.username-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(244, 114, 182, 0.22);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
}

input,
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 168px;
  padding: 14px;
  line-height: 1.6;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(240, 79, 154, 0.62);
  box-shadow: 0 0 0 4px rgba(255, 127, 189, 0.14);
}

.username-row button,
.copy-button {
  min-height: 48px;
  padding: 0 15px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ffadd4);
  font-weight: 900;
  cursor: pointer;
}

.user-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

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

.tab-panel[hidden] {
  display: none;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.section-title p,
.pay-card p,
.rule-card p,
.balance-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.number-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  height: 42px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ffc2df);
  font-size: 14px;
  font-weight: 1000;
}

.hot-badge {
  color: #7a2b00;
  background: linear-gradient(135deg, #ffd8ef, #ffbc4b);
  font-size: 12px;
  text-transform: uppercase;
}

.tool-form {
  display: grid;
  gap: 15px;
}

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

.upload-box {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px dashed rgba(240, 79, 154, 0.38);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 238, 247, 0.92), rgba(255, 255, 255, 0.72));
}

.upload-box input {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.upload-copy strong {
  color: var(--text);
  font-size: 18px;
}

#upload-preview {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background: rgba(255, 230, 241, 0.54);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  font-weight: 1000;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #ff6bae, #ffadd4 54%, #ffd3e8);
  box-shadow: 0 16px 32px rgba(240, 79, 154, 0.24);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ghost-button {
  min-height: 44px;
  padding: 0 14px;
  color: #a32f67;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.result-area {
  margin-top: 14px;
}

.status-line {
  padding: 13px 15px;
  color: var(--muted);
  font-size: 14px;
}

.status-line.error {
  color: var(--danger);
}

.status-line.success {
  color: var(--accent-strong);
}

.result-card {
  margin-top: 14px;
  padding: 16px;
  background: var(--card-strong);
}

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

.result-header h2 {
  margin-bottom: 0;
}

#result-image {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 240, 247, 0.70);
}

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

.balance-card {
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 127, 189, 0.20), transparent 12rem),
    var(--card-strong);
}

.balance-card strong {
  display: block;
  margin: 6px 0 8px;
  color: var(--accent-strong);
  font-size: 38px;
  letter-spacing: -0.05em;
}

.pay-card,
.rule-card {
  padding: 16px;
  box-shadow: none;
}

.highlight-card {
  border-color: rgba(255, 188, 75, 0.35);
  background: linear-gradient(180deg, rgba(255, 224, 239, 0.72), rgba(255, 255, 255, 0.88));
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.70);
}

.copy-row span {
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 800;
}

.copy-button {
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

.bottom-tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(100%, 520px);
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(244, 114, 182, 0.18);
  background: rgba(255, 250, 253, 0.88);
  backdrop-filter: blur(22px);
  transform: translateX(-50%);
}

.tab-button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 62px;
  border: 0;
  border-radius: 18px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.tab-button.active {
  color: #8f2b5a;
  background: rgba(255, 127, 189, 0.13);
}

.tab-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 127, 189, 0.52);
  font-size: 12px;
  font-weight: 1000;
}

.tab-button.active .tab-icon {
  background: var(--accent);
}

.tab-button strong {
  font-size: 12px;
}

.tab-button em {
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #7a2b00;
  background: var(--gold);
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
  text-transform: uppercase;
}

@media (max-width: 380px) {
  .mobile-header {
    grid-template-columns: 1fr auto;
  }

  .install-button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (min-width: 760px) {
  .app-shell {
    padding-top: 24px;
  }
}

/* Final compact override. Keep this block last so it wins over base styles. */
.app-shell {
  padding: 6px 10px calc(62px + env(safe-area-inset-bottom));
}

.mobile-header {
  gap: 7px;
  padding: 5px 0 7px;
}

.install-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.eyebrow {
  margin-bottom: 2px;
  font-size: 9px;
}

h1 {
  font-size: 22px;
}

h2 {
  margin-bottom: 2px;
  font-size: 18px;
}

.wallet-pill {
  min-width: 78px;
  padding: 6px 8px;
  border-radius: 14px;
}

.wallet-pill span,
.balance-card span {
  font-size: 10px;
}

.wallet-pill strong {
  margin-top: 1px;
  font-size: 15px;
}

.user-card {
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 18px;
}

.login-form-card {
  gap: 6px;
}

.login-success-card {
  gap: 8px;
  padding: 0;
}

.login-success-card strong {
  font-size: 15px;
}

.login-success-card p {
  margin-top: 0;
  font-size: 11px;
}

.login-dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 4px rgba(255, 127, 189, 0.14);
}

label {
  gap: 4px;
  font-size: 12px;
}

.username-row {
  gap: 6px;
}

input,
select {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 13px;
}

textarea {
  min-height: 78px;
  padding: 9px 10px;
  border-radius: 13px;
  line-height: 1.45;
  font-size: 13px;
}

.username-row button,
.copy-button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 12px;
  font-size: 12px;
}

.user-meta {
  gap: 6px;
  font-size: 10px;
}

.tab-panel {
  gap: 9px;
  padding: 11px;
  border-radius: 20px;
}

.section-title {
  gap: 8px;
}

.section-title p,
.pay-card p,
.rule-card p,
.balance-card p {
  line-height: 1.38;
  font-size: 11px;
}

.number-badge {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-size: 11px;
}

.tool-form {
  gap: 8px;
}

.form-grid {
  gap: 7px;
}

.upload-box {
  min-height: 86px;
  border-radius: 16px;
}

.upload-copy {
  gap: 3px;
}

.upload-copy strong {
  font-size: 15px;
}

.upload-copy span {
  font-size: 11px;
}

#upload-preview {
  height: 118px;
}

.primary-button {
  min-height: 42px;
  border-radius: 14px;
  font-size: 14px;
}

.ghost-button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 13px;
  font-size: 12px;
}

.result-area {
  margin-top: 8px;
}

.status-line {
  padding: 8px 10px;
  border-radius: 16px;
  font-size: 11px;
}

.result-card {
  margin-top: 8px;
  padding: 10px;
  border-radius: 18px;
}

.result-header {
  gap: 8px;
  margin-bottom: 8px;
}

.bottom-tabs {
  gap: 5px;
  padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
}

.tab-button {
  min-height: 48px;
  border-radius: 14px;
}

.tab-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-size: 11px;
}

.tab-button strong {
  font-size: 11px;
}

.tab-button em {
  top: 2px;
  right: 4px;
  font-size: 9px;
}
