/* 推广页通用布局；末尾 skin_pocket 覆盖层负责视觉表现，业务行为由 app.js/core.js 维护。 */
:root {
  --poly-ink: #18202a;
  --poly-text: #24303d;
  --poly-muted: #687585;
  --poly-line: rgba(36, 48, 61, 0.16);
  --poly-panel: #fffdf8;
  --poly-panel-2: #f7fbf4;
  --poly-orange: #ff9a66;
  --poly-orange-dark: #ef7446;
  --poly-teal: #62b9b0;
  --poly-header: #365f63;
  --poly-green: #6fbf5f;
  --poly-yellow: #ffe099;
  --poly-blue: #2e7bcf;
  --poly-danger: #c92d21;
  --poly-shadow: rgba(24, 32, 42, 0.12);
  color: var(--poly-text);
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  color: var(--poly-text);
  background: transparent;
  letter-spacing: 0;
}

button,
input,
textarea { font: inherit; }

button {
  min-width: 0;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none !important;
}

[hidden] { display: none !important; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--poly-orange);
  outline-offset: 2px;
}

.app {
  position: relative;
  width: 100%;
  max-width: 880px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, #f7faf4 0%, #fff4ea 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(52px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  color: #fff;
  background: var(--poly-header);
  border-bottom: 2px solid rgba(255, 224, 153, 0.72);
  box-shadow: 0 4px 10px var(--poly-shadow);
}

.topbar strong {
  max-width: calc(100% - 170px);
  overflow: hidden;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button,
.text-button {
  border: 0;
  background: transparent;
}

.topbar .icon-button {
  position: absolute;
  left: 10px;
  top: calc(env(safe-area-inset-top) + 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-50%);
}

.topbar .text-button {
  position: absolute;
  right: 10px;
  top: calc(env(safe-area-inset-top) + 26px);
  max-width: 105px;
  padding: 7px 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
}

.text-button {
  padding: 6px 4px;
  color: var(--poly-blue);
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

main { padding: 0 12px 96px; }

.hero {
  position: relative;
  min-height: 180px;
  margin: 12px 0;
  padding: 25px 150px 24px 20px;
  overflow: hidden;
  color: #fff;
  background: var(--poly-header);
  border: 1px solid rgba(24, 32, 42, 0.22);
  border-radius: 6px;
  box-shadow: 0 6px 14px var(--poly-shadow);
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero::before {
  right: 78px;
  bottom: -50px;
  width: 170px;
  height: 135px;
  background: rgba(98, 185, 176, 0.24);
  clip-path: polygon(50% 0, 100% 42%, 78% 100%, 10% 88%, 0 27%);
}

.hero::after {
  right: -46px;
  top: -42px;
  width: 155px;
  height: 155px;
  background: rgba(255, 224, 153, 0.15);
  clip-path: polygon(50% 0, 100% 34%, 84% 100%, 16% 87%, 0 28%);
}

.eyebrow {
  position: relative;
  z-index: 1;
  color: var(--poly-yellow);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 13px 0 9px;
  color: #fff;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
}

.hero p {
  position: relative;
  z-index: 1;
  max-width: 360px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

.hero-art {
  position: absolute;
  right: 23px;
  top: 27px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 105px;
  height: 112px;
  color: #fff;
  background: transparent;
}

.hero-art::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(145deg, var(--poly-yellow), var(--poly-orange));
  clip-path: polygon(50% 0, 96% 24%, 88% 80%, 50% 100%, 9% 78%, 0 25%);
  filter: drop-shadow(7px 9px 0 rgba(24, 32, 42, 0.18));
  pointer-events: none;
}

.hero-art span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 4px;
  overflow: hidden;
  color: var(--poly-header);
  border: 2px solid rgba(54, 95, 99, 0.45);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.hero-art i {
  position: absolute;
  right: -1px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--poly-teal);
  border: 3px solid var(--poly-header);
  border-radius: 50%;
  font-size: 20px;
  font-style: normal;
  z-index: 2;
}

.dashboard {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.card {
  position: relative;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  background: var(--poly-panel);
  border: 1px solid var(--poly-line);
  border-radius: 6px;
  box-shadow: 0 6px 14px var(--poly-shadow);
}

.card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--poly-teal), var(--poly-yellow), var(--poly-orange));
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.card-heading > * { min-width: 0; }

.card-heading > span,
.card-heading h2,
.record-heading h2,
label {
  color: var(--poly-ink);
  font-weight: 800;
}

small,
.muted {
  color: var(--poly-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.large-number,
.medium-number {
  display: block;
  direction: ltr;
  color: var(--poly-orange-dark);
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}

.large-number {
  margin: 15px 0 4px;
  font-size: 39px;
  line-height: 1.1;
}

.medium-number {
  margin: 14px 0 18px;
  font-size: 29px;
}

.primary,
.secondary {
  min-height: 42px;
  padding: 11px 16px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  color: #fff;
  background: var(--poly-orange);
  border: 0;
  box-shadow: 0 3px 0 rgba(185, 92, 54, 0.82);
}

.primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(185, 92, 54, 0.82);
}

.secondary {
  color: var(--poly-header);
  background: var(--poly-panel-2);
  border: 1px solid rgba(98, 185, 176, 0.55);
  box-shadow: 0 2px 0 rgba(54, 95, 99, 0.18);
}

.secondary:active { transform: translateY(1px); }

.soft {
  color: var(--poly-header);
  background: #eef7ef;
  border: 1px solid rgba(111, 191, 95, 0.34);
  box-shadow: 0 2px 0 rgba(54, 95, 99, 0.16);
}

.wallet .primary { margin-top: 14px; }

.wallet-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
  padding-top: 14px;
  color: var(--poly-muted);
  border-top: 1px solid var(--poly-line);
  font-size: 14px;
}

.wallet-meta b {
  display: block;
  margin-top: 6px;
  color: var(--poly-header);
  font-size: 16px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 13px 0;
  color: var(--poly-muted);
  font-size: 15px;
}

.metric-row b { color: var(--poly-header); }

.pill {
  padding: 5px 10px;
  color: #9a5a30 !important;
  background: #fff0df;
  border: 1px solid rgba(255, 154, 102, 0.34);
  border-radius: 6px;
}

.invite-code {
  display: block;
  direction: ltr;
  margin: 8px 0 16px;
  overflow-wrap: anywhere;
  color: var(--poly-header);
  font-size: 24px;
  letter-spacing: 2px;
  unicode-bidi: isolate;
}

.invite-card .muted:last-child { margin-bottom: 0; }

.invite-metrics {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
}

.invite-metrics div {
  display: grid;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.invite-metrics b {
  color: var(--poly-header);
  font-size: 26px;
}

.invite-metrics span {
  color: var(--poly-muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.section-heading {
  position: relative;
  margin: 12px 0;
  padding: 17px 18px 16px;
  overflow: hidden;
  background: var(--poly-panel);
  border: 1px solid var(--poly-line);
  border-left: 4px solid var(--poly-orange);
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(24, 32, 42, 0.08);
}

.section-heading::after {
  position: absolute;
  right: -25px;
  bottom: -40px;
  width: 100px;
  height: 100px;
  content: "";
  background: rgba(98, 185, 176, 0.12);
  clip-path: polygon(50% 0, 100% 38%, 76% 100%, 5% 82%, 0 25%);
}

.section-heading .eyebrow { color: #9a673b; }

.section-heading h1 {
  position: relative;
  z-index: 1;
  margin: 7px 0 2px;
  color: var(--poly-ink);
  font-size: 24px;
  font-weight: 800;
}

.section-heading p {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.filters {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 5px;
  margin-bottom: 12px;
  padding: 4px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--poly-line);
  border-radius: 6px;
}

.filters button {
  min-width: 0;
  min-height: 36px;
  padding: 8px 14px;
  overflow-wrap: anywhere;
  color: var(--poly-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
}

.filters .selected {
  color: var(--poly-ink);
  background: #fffaf0;
  border-color: var(--poly-orange);
  box-shadow: inset 0 0 0 1px rgba(255, 154, 102, 0.2);
  font-weight: 800;
}

.list {
  display: grid;
  gap: 10px;
}

.list .card {
  padding: 15px 16px;
  box-shadow: 0 4px 10px rgba(24, 32, 42, 0.08);
}

.list h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--poly-ink);
  font-size: 16px;
}

.list p {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.7;
}

.list .amount {
  color: var(--poly-orange-dark);
  font-size: 18px;
  font-weight: 800;
}

.list .status {
  padding: 5px 9px;
  color: var(--poly-header);
  background: #edf7ef;
  border: 1px solid rgba(98, 185, 176, 0.36);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.list .status.warning {
  color: #966425;
  background: #fff4dc;
  border-color: rgba(255, 194, 87, 0.48);
}

.list .status.rejected {
  color: var(--poly-danger);
  background: #fff0ed;
  border-color: rgba(201, 87, 74, 0.28);
}

.list .meta {
  margin: 8px 0 0;
  color: var(--poly-muted);
}

.list .empty {
  margin: 0;
  padding: 36px 16px;
  color: var(--poly-muted);
  background: rgba(255, 253, 248, 0.72);
  border: 1px dashed rgba(54, 95, 99, 0.3);
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
}

.load-more {
  display: block;
  margin: 17px auto;
}

#withdraw-form { margin-bottom: 18px; }

.amount-field {
  display: flex;
  align-items: center;
  direction: ltr;
  gap: 11px;
  margin: 9px 0 12px;
  padding: 13px 12px;
  color: var(--poly-orange-dark);
  background: #fff;
  border: 1px solid var(--poly-line);
  border-radius: 6px;
  font-size: 26px;
  unicode-bidi: isolate;
}

.amount-field:focus-within {
  border-color: var(--poly-orange);
  box-shadow: inset 0 0 0 1px rgba(255, 154, 102, 0.22);
}

.amount-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--poly-text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 29px;
}

.pending-message,
.result {
  padding: 11px 12px;
  color: #8e672c;
  background: #fff4df;
  border: 1px solid rgba(255, 194, 87, 0.4);
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.7;
}

.result {
  color: var(--poly-header);
  background: #edf7ef;
  border-color: rgba(98, 185, 176, 0.4);
}

.record-heading {
  margin: 22px 2px 10px;
  padding-left: 10px;
  border-left: 4px solid var(--poly-orange);
}

.record-heading h2 {
  margin: 0;
  font-size: 18px;
}

.footnote {
  margin-bottom: 0;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 9;
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 880px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 253, 248, 0.97);
  border-top: 1px solid var(--poly-line);
  box-shadow: 0 -4px 12px rgba(24, 32, 42, 0.08);
  transform: translateX(-50%);
}

.bottom-nav button {
  position: relative;
  display: grid;
  flex: 1;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 51px;
  padding: 5px;
  overflow-wrap: anywhere;
  color: #7e8b96;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
}

.bottom-nav button > span:first-child {
  font-size: 21px;
  line-height: 1;
}

.bottom-nav span[data-i18n] {
  font-size: 14px;
  line-height: 1.25;
}

.bottom-nav [aria-selected="true"] {
  color: var(--poly-ink);
  background: #fff4e8;
  border-color: rgba(255, 154, 102, 0.42);
  font-weight: 800;
}

.bottom-nav [aria-selected="true"]::before {
  position: absolute;
  top: -8px;
  left: 20%;
  width: 60%;
  height: 3px;
  content: "";
  background: var(--poly-orange);
}

.page-footer {
  padding: 20px 0 2px;
  color: #8a949c;
  font-size: 14px;
  text-align: center;
}

.gate {
  padding: 78px 22px;
  text-align: center;
}

.gate h1 {
  margin: 21px 0 8px;
  color: var(--poly-ink);
  font-size: 20px;
  font-weight: 800;
}

.gate p {
  margin: 0;
  color: var(--poly-muted);
  font-size: 15px;
  line-height: 1.7;
}

.gate .primary {
  max-width: 220px;
  margin: 23px auto 0;
}

.emblem {
  display: grid;
  place-items: center;
  width: 82px;
  height: 88px;
  margin: 0 auto;
  padding: 9px;
  overflow: hidden;
  color: var(--poly-header);
  background: linear-gradient(145deg, var(--poly-yellow), var(--poly-orange));
  clip-path: polygon(50% 0, 96% 24%, 88% 80%, 50% 100%, 9% 78%, 0 25%);
  filter: drop-shadow(6px 7px 0 rgba(54, 95, 99, 0.15));
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

#notice:not(:empty) {
  position: fixed;
  top: calc(62px + env(safe-area-inset-top));
  left: 50%;
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 11px 15px;
  color: #fff;
  background: rgba(24, 32, 42, 0.94);
  border: 1px solid rgba(255, 224, 153, 0.4);
  border-radius: 6px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
  font-size: 15px;
  transform: translateX(-50%);
}

#preview-banner {
  padding: 7px;
  color: #73531d;
  background: var(--poly-yellow);
  border-bottom: 1px solid rgba(115, 83, 29, 0.18);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

dialog {
  width: min(500px, calc(100% - 28px));
  max-height: min(82vh, 680px);
  padding: 0;
  overflow: auto;
  color: var(--poly-text);
  background: var(--poly-panel);
  border: 2px solid var(--poly-ink);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

dialog::backdrop { background: rgba(18, 24, 31, 0.4); }

dialog .card-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 52px;
  padding: 0 10px 0 16px;
  color: #fff;
  background: var(--poly-header);
  border-bottom: 2px solid rgba(255, 224, 153, 0.72);
}

dialog .card-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

dialog .icon-button {
  padding: 5px 9px;
  color: #fff;
  font-size: 27px;
}

dialog ol {
  margin: 0;
  padding: 18px 22px 4px 38px;
  font-size: 15px;
  line-height: 1.85;
}

dialog > p { padding: 0 20px; }

dialog > .primary {
  width: calc(100% - 40px);
  margin: 16px 20px 22px;
}

textarea {
  width: 100%;
  min-height: 100px;
  margin-top: 13px;
  padding: 11px;
  color: var(--poly-text);
  background: #fff;
  border: 1px solid var(--poly-line);
  border-radius: 6px;
}

[dir="rtl"] .topbar .icon-button {
  right: 10px;
  left: auto;
  transform: translateY(-50%) scaleX(-1);
}

[dir="rtl"] .topbar .text-button {
  right: auto;
  left: 10px;
}

[dir="rtl"] .hero {
  padding-right: 20px;
  padding-left: 150px;
}

[dir="rtl"] .hero::before {
  right: auto;
  left: 78px;
}

[dir="rtl"] .hero::after {
  right: auto;
  left: -46px;
}

[dir="rtl"] .hero-art {
  right: auto;
  left: 23px;
}

[dir="rtl"] .section-heading {
  border-right: 4px solid var(--poly-orange);
  border-left-width: 1px;
}

[dir="rtl"] .section-heading::after {
  right: auto;
  left: -25px;
}

[dir="rtl"] .record-heading {
  padding-right: 10px;
  padding-left: 0;
  border-right: 4px solid var(--poly-orange);
  border-left: 0;
}

[dir="rtl"] dialog ol {
  padding-right: 38px;
  padding-left: 22px;
}

@media (max-width: 680px) {
  main { padding: 0 10px 92px; }
  .card-heading { align-items: flex-start; flex-wrap: wrap; }
  .bottom-nav { padding-left: 4px; padding-right: 4px; }
  .bottom-nav button { padding-left: 3px; padding-right: 3px; }

  .hero {
    min-height: 168px;
    margin: 10px 0;
    padding: 21px 125px 20px 16px;
  }

  .hero h1 { font-size: 25px; }

  .hero p {
    max-width: 190px;
    font-size: 14px;
  }

  .hero-art {
    right: 17px;
    top: 28px;
    width: 91px;
    height: 98px;
  }

  [dir="rtl"] .hero {
    padding-right: 16px;
    padding-left: 125px;
  }

  [dir="rtl"] .hero-art {
    right: auto;
    left: 17px;
  }

  .hero-art span {
    width: 51px;
    height: 51px;
  }

  .dashboard {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card { padding: 16px; }
  .large-number { font-size: 37px; }
  .invite-metrics { padding: 18px 12px; }
  .section-heading { margin-top: 10px; }
}

@media (max-width: 360px) {
  .hero { padding-right: 108px; }
  [dir="rtl"] .hero { padding-right: 16px; padding-left: 108px; }
  .hero h1 { font-size: 22px; }
  .hero-art { right: 11px; transform: scale(0.88); }
  [dir="rtl"] .hero-art { right: auto; left: 11px; }
  .filters { width: 100%; }
  .filters button { flex: 1; padding-right: 9px; padding-left: 9px; }
  .invite-card .card-heading { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

html.rules-open { overflow: hidden; }
html.rules-open body {
  position: fixed;
  top: var(--rules-scroll-top);
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}
#rules {
  overflow-y: auto;
  overscroll-behavior: contain;
}
#withdraw-notice {
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* skin_pocket：3D 美式超轻卡通视觉覆盖层，仅覆盖表现。 */
:root {
  --pocket-ink: #26344a;
  --pocket-text: #344258;
  --pocket-muted: #728198;
  --pocket-sky: #69c8ff;
  --pocket-sky-deep: #4199e6;
  --pocket-cream: #fff8e8;
  --pocket-paper: #fffdf8;
  --pocket-coral: #ff745f;
  --pocket-coral-deep: #cb4e4a;
  --pocket-yellow: #ffd75f;
  --pocket-yellow-deep: #d6a937;
  --pocket-mint: #6ed7ad;
  --pocket-mint-deep: #3ea681;
  --pocket-lilac: #9b8df4;
  --pocket-line: rgba(38, 52, 74, 0.16);
  --pocket-soft-shadow: rgba(56, 84, 119, 0.16);
  --pocket-hard-shadow: rgba(38, 52, 74, 0.28);
  --pocket-radius: 18px;
  --poly-ink: var(--pocket-ink);
  --poly-text: var(--pocket-text);
  --poly-muted: var(--pocket-muted);
  --poly-line: var(--pocket-line);
  --poly-panel: var(--pocket-paper);
  --poly-panel-2: #f3f8fc;
  --poly-orange: var(--pocket-coral);
  --poly-orange-dark: var(--pocket-coral-deep);
  --poly-teal: var(--pocket-mint);
  --poly-header: var(--pocket-sky);
  --poly-green: var(--pocket-mint);
  --poly-yellow: var(--pocket-yellow);
  --poly-blue: var(--pocket-sky-deep);
  --poly-danger: #cf3f45;
  --poly-shadow: var(--pocket-soft-shadow);
  font-family: "Avenir Next", "Arial Rounded MT Bold", -apple-system,
    BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  color: var(--pocket-text);
  font-family: "Avenir Next", "Arial Rounded MT Bold", -apple-system,
    BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

button,
a { -webkit-tap-highlight-color: transparent; }

.app {
  color: var(--pocket-text);
  background:
    radial-gradient(circle at 11% 8%, rgba(255, 215, 95, 0.28) 0 18px, transparent 19px),
    radial-gradient(circle at 88% 17%, rgba(110, 215, 173, 0.22) 0 25px, transparent 26px),
    radial-gradient(circle at 78% 82%, rgba(155, 141, 244, 0.12) 0 34px, transparent 35px),
    linear-gradient(180deg, #eff9ff 0%, var(--pocket-cream) 100%);
}

.topbar {
  color: #fff;
  background: linear-gradient(180deg, #73d1ff 0%, var(--pocket-sky) 58%, var(--pocket-sky-deep) 100%);
  border-bottom: 2px solid var(--pocket-ink);
  box-shadow:
    0 4px 0 rgba(38, 52, 74, 0.14),
    0 8px 18px rgba(65, 153, 230, 0.18);
  text-shadow: 0 2px 0 rgba(38, 52, 74, 0.18);
}

.topbar::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: rgba(255, 255, 255, 0.52);
  pointer-events: none;
}

.topbar strong {
  color: #fff;
  font-weight: 800;
}

.topbar .icon-button {
  color: #fff;
  text-shadow: none;
}

.topbar .icon-button svg {
  filter: drop-shadow(0 2px 0 rgba(38, 52, 74, 0.28));
}

.topbar .text-button {
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(38, 52, 74, 0.2);
}

.hero {
  color: var(--pocket-ink);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.66) 0 15px, transparent 16px),
    radial-gradient(circle at 78% 76%, rgba(255, 215, 95, 0.34) 0 28px, transparent 29px),
    linear-gradient(145deg, #b9e9ff 0%, #7fd2ff 55%, #69c8ff 100%);
  border: 2px solid var(--pocket-ink);
  border-radius: var(--pocket-radius);
  box-shadow:
    0 6px 0 var(--pocket-sky-deep),
    0 13px 22px rgba(65, 153, 230, 0.18);
}

.hero::before {
  right: 72px;
  bottom: -68px;
  width: 180px;
  height: 150px;
  background: rgba(110, 215, 173, 0.3);
  border: 2px solid rgba(38, 52, 74, 0.14);
  border-radius: 50%;
  clip-path: none;
}

.hero::after {
  right: -35px;
  top: -42px;
  width: 145px;
  height: 145px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 46% 54% 58% 42%;
  clip-path: none;
  transform: rotate(18deg);
}

.hero .eyebrow {
  color: #805624;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hero h1 {
  color: var(--pocket-ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.48);
}

.hero p {
  color: #4f627a;
  font-weight: 600;
}

.hero-art {
  background: transparent;
  filter: none;
  transform: rotate(8deg);
}

.hero-art::before {
  inset: 2px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.72) 0 8px, transparent 9px),
    linear-gradient(145deg, #ffe98b 0%, var(--pocket-yellow) 55%, #ffc951 100%);
  border: 2px solid var(--pocket-ink);
  border-radius: 30px;
  clip-path: none;
  filter: none;
  box-shadow:
    7px 7px 0 var(--pocket-yellow-deep),
    11px 13px 18px rgba(38, 52, 74, 0.16);
}

.hero-art span {
  color: var(--pocket-ink);
  background: rgba(255, 253, 248, 0.44);
  border: 2px solid var(--pocket-ink);
  text-shadow: 0 1px 0 #fff;
  transform: rotate(-8deg);
}

.hero-art i {
  right: -4px;
  bottom: 3px;
  color: var(--pocket-ink);
  background: var(--pocket-mint);
  border: 2px solid var(--pocket-ink);
  box-shadow: 0 4px 0 var(--pocket-mint-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  transform: rotate(-8deg);
}

.card,
.section-heading,
.filters,
.amount-field,
dialog {
  color: var(--pocket-text);
  background: var(--pocket-paper);
  border: 2px solid var(--pocket-ink);
  border-radius: var(--pocket-radius);
  box-shadow:
    0 6px 0 rgba(38, 52, 74, 0.16),
    0 12px 22px var(--pocket-soft-shadow);
}

.card::before {
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--pocket-sky) 0 34px,
    var(--pocket-yellow) 34px 68px,
    var(--pocket-coral) 68px 102px,
    var(--pocket-mint) 102px 136px
  );
}

.card-heading > span,
.card-heading h2,
.record-heading h2,
label { color: var(--pocket-ink); }

small,
.muted { color: var(--pocket-muted); }

.large-number,
.medium-number,
.invite-code,
.list .amount { color: var(--pocket-coral-deep); }

.primary,
.secondary {
  border: 2px solid var(--pocket-ink);
  border-radius: 14px;
  font-weight: 800;
  transition: transform 90ms ease, box-shadow 90ms ease;
}

.primary {
  color: #fff;
  background: linear-gradient(180deg, #ff8a73 0%, var(--pocket-coral) 100%);
  box-shadow:
    0 5px 0 var(--pocket-coral-deep),
    0 9px 14px rgba(203, 78, 74, 0.18);
  text-shadow: 0 1px 0 rgba(38, 52, 74, 0.2);
}

.primary:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 var(--pocket-coral-deep),
    0 4px 8px rgba(203, 78, 74, 0.15);
}

.secondary {
  color: var(--pocket-ink);
  background: linear-gradient(180deg, #fff1a4, var(--pocket-yellow));
  box-shadow:
    0 4px 0 var(--pocket-yellow-deep),
    0 8px 12px rgba(214, 169, 55, 0.16);
}

.secondary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--pocket-yellow-deep);
}

.soft {
  color: var(--pocket-ink);
  background: linear-gradient(180deg, #9aebcb, var(--pocket-mint));
  border-color: var(--pocket-ink);
  box-shadow:
    0 5px 0 var(--pocket-mint-deep),
    0 9px 14px rgba(62, 166, 129, 0.16);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

button:disabled {
  color: rgba(255, 255, 255, 0.88);
  background: #aab7c6 !important;
  border-color: #728198 !important;
  box-shadow: 0 3px 0 #7f8c9c !important;
}

.wallet-meta {
  border-top: 2px dashed rgba(38, 52, 74, 0.14);
}

.wallet-meta b,
.metric-row b,
.invite-metrics b { color: var(--pocket-ink); }

.pill {
  color: var(--pocket-ink) !important;
  background: #fff3b9;
  border: 2px solid var(--pocket-ink);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--pocket-yellow-deep);
}

.section-heading {
  border-left: 2px solid var(--pocket-ink);
}

.section-heading::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 7px;
  content: "";
  background: var(--pocket-coral);
  border: 1px solid var(--pocket-ink);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.section-heading::after {
  right: -20px;
  bottom: -30px;
  width: 92px;
  height: 92px;
  background: rgba(110, 215, 173, 0.24);
  border: 2px solid rgba(38, 52, 74, 0.12);
  border-radius: 50%;
  clip-path: none;
}

.section-heading .eyebrow { color: #93631f; }
.section-heading h1 { color: var(--pocket-ink); }

.filters {
  padding: 5px;
  background: rgba(255, 253, 248, 0.94);
  border-radius: 16px;
}

.filters button {
  border-radius: 11px;
  font-weight: 700;
}

.filters .selected {
  color: var(--pocket-ink);
  background: #fff3b9;
  border: 2px solid var(--pocket-ink);
  box-shadow: 0 3px 0 var(--pocket-yellow-deep);
}

.list { gap: 13px; }

.list .card {
  box-shadow:
    0 4px 0 rgba(38, 52, 74, 0.14),
    0 9px 16px rgba(56, 84, 119, 0.1);
}

.list h3 { color: var(--pocket-ink); }

.list .status {
  color: var(--pocket-ink);
  background: #e9fff5;
  border: 2px solid var(--pocket-ink);
  border-radius: 11px;
  box-shadow: 0 3px 0 rgba(62, 166, 129, 0.34);
}

.list .status.warning {
  color: var(--pocket-ink);
  background: #fff3b9;
  border-color: var(--pocket-ink);
  box-shadow: 0 3px 0 var(--pocket-yellow-deep);
}

.list .status.rejected {
  color: #8f3038;
  background: #ffe9e5;
  border-color: var(--pocket-ink);
  box-shadow: 0 3px 0 rgba(203, 78, 74, 0.3);
}

.list .empty {
  color: var(--pocket-muted);
  background: rgba(255, 253, 248, 0.84);
  border: 2px dashed rgba(38, 52, 74, 0.32);
  border-radius: 16px;
}

.amount-field {
  background: #f3f8fc;
  border-color: rgba(38, 52, 74, 0.38);
  border-radius: 13px;
  box-shadow: inset 0 2px 0 rgba(38, 52, 74, 0.04);
}

.amount-field:focus-within {
  background: #fff;
  border-color: var(--pocket-sky-deep);
  box-shadow: 0 0 0 3px rgba(105, 200, 255, 0.2);
}

.amount-field,
.amount-field input { color: var(--pocket-coral-deep); }

.pending-message,
.result {
  color: #805a20;
  background: #fff3c6;
  border: 2px solid var(--pocket-ink);
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(214, 169, 55, 0.28);
}

.result {
  color: var(--pocket-ink);
  background: #e9fff5;
  box-shadow: 0 3px 0 rgba(62, 166, 129, 0.28);
}

.record-heading {
  padding: 7px 12px;
  background: linear-gradient(180deg, #fff1a4, var(--pocket-yellow));
  border: 2px solid var(--pocket-ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--pocket-yellow-deep);
}

.footnote .text-button {
  color: var(--pocket-coral-deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

#legacy-opening-note {
  color: #6d5631;
  background:
    radial-gradient(circle at 92% 25%, rgba(255, 255, 255, 0.62) 0 11px, transparent 12px),
    linear-gradient(180deg, #fff5bd, #ffe38a);
  border-color: var(--pocket-ink);
  box-shadow:
    0 5px 0 var(--pocket-yellow-deep),
    0 10px 16px rgba(214, 169, 55, 0.14);
  font-weight: 700;
}

.bottom-nav {
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 253, 248, 0.98);
  border-top: 2px solid var(--pocket-ink);
  box-shadow: 0 -5px 0 rgba(38, 52, 74, 0.11), 0 -12px 22px rgba(56, 84, 119, 0.1);
}

.bottom-nav button {
  color: var(--pocket-muted);
  border-radius: 14px;
  font-weight: 700;
}

.bottom-nav [aria-selected="true"] {
  color: var(--pocket-ink);
  background: #fff3b9;
  border: 2px solid var(--pocket-ink);
  box-shadow: 0 3px 0 var(--pocket-yellow-deep);
}

.bottom-nav [aria-selected="true"]::before { display: none; }

.gate .emblem {
  color: var(--pocket-ink);
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.72) 0 8px, transparent 9px),
    linear-gradient(145deg, #ffe98b, var(--pocket-yellow));
  border: 2px solid var(--pocket-ink);
  border-radius: 28px;
  clip-path: none;
  filter: none;
  box-shadow:
    0 7px 0 var(--pocket-yellow-deep),
    0 13px 20px rgba(214, 169, 55, 0.18);
  transform: rotate(-5deg);
}

#notice:not(:empty) {
  color: #fff;
  background: rgba(38, 52, 74, 0.96);
  border: 2px solid var(--pocket-yellow);
  border-radius: 14px;
  box-shadow: 0 5px 0 rgba(38, 52, 74, 0.24), 0 10px 18px rgba(38, 52, 74, 0.2);
}

#preview-banner {
  color: var(--pocket-ink);
  background: linear-gradient(180deg, #ffe98b, var(--pocket-yellow));
  border-bottom: 2px solid var(--pocket-ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

dialog {
  background: var(--pocket-paper);
  border-color: var(--pocket-ink);
  border-radius: var(--pocket-radius);
  box-shadow:
    0 7px 0 rgba(38, 52, 74, 0.18),
    0 16px 28px rgba(38, 52, 74, 0.2);
}

dialog::backdrop { background: rgba(38, 52, 74, 0.42); }

dialog .card-heading {
  color: var(--pocket-ink);
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 255, 255, 0.62) 0 5px, transparent 6px),
    linear-gradient(180deg, #ffe884 0%, var(--pocket-yellow) 100%);
  border-bottom: 2px solid var(--pocket-ink);
  border-radius: 16px 16px 0 0;
}

dialog .card-heading h2,
dialog .icon-button {
  color: var(--pocket-ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

dialog > p:not(.muted) {
  color: var(--pocket-text);
  font-weight: 600;
  line-height: 1.8;
}

[dir="rtl"] .section-heading {
  border-right: 2px solid var(--pocket-ink);
  border-left: 2px solid var(--pocket-ink);
}

[dir="rtl"] .section-heading::before {
  right: 0;
  left: auto;
  border-right: 0;
  border-left: 1px solid var(--pocket-ink);
  border-radius: 8px 0 0 8px;
}

[dir="rtl"] .record-heading {
  padding-right: 12px;
  border: 2px solid var(--pocket-ink);
}

@media (max-width: 680px) {
  .card,
  .section-heading,
  dialog { border-radius: 16px; }

  .hero { border-radius: 18px; }
  .bottom-nav { padding-right: 5px; padding-left: 5px; }
  .bottom-nav button { border-radius: 12px; }
}

@media (max-width: 360px) {
  .hero-art { transform: rotate(8deg) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
