:root {
  color-scheme: light;
  --bg: #fdfcfc;
  --surface: #fdfcfc;
  --surface-2: #f6fbf8;
  --ink: #052719;
  --muted: #65756d;
  --line: rgba(0, 142, 76, 0.14);
  --green-950: #00331d;
  --green-900: #005f34;
  --green-800: #007a42;
  --green-700: #008e4c;
  --gold-500: #f7c84b;
  --gold-600: #e6a916;
  --gold-700: #a97000;
  --gold-soft: #fff5cf;
  --danger: #d64545;
  --shadow: 0 12px 30px rgba(0, 75, 40, 0.08);
  --shadow-soft: 0 8px 22px rgba(0, 75, 40, 0.06);
  --font-brand: "Top4an Accent", "Fira Sans", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Fira Sans", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Fira Sans", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-number: "Fira Sans", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  font-family: var(--font-ui);
}

@font-face {
  font-family: "Top4an Accent";
  src:
    url("/assets/fonts/top4an-accent-v1.woff2") format("woff2"),
    url("/assets/fonts/top4an-accent-v1.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  background: linear-gradient(180deg, #fdfcfc 0%, #f3faf6 100%);
  color: var(--ink);
  font-family: var(--font-ui);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 8px 88px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 16px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: var(--green-700);
  box-shadow: 0 0 0 1px rgba(0, 142, 76, 0.18), 0 9px 20px rgba(0, 95, 52, 0.16);
}

.brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-title span {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 780;
  line-height: 1.14;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  width: 128px;
  min-height: 40px;
  display: grid;
  grid-template-columns: 25px minmax(55px, 1fr) 29px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(0, 142, 76, 0.14);
  border-radius: 999px;
  padding: 4px 5px 4px 8px;
  background: rgba(253, 252, 252, 0.92);
  color: var(--green-950);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, #fff9db 0 17%, transparent 18%),
    linear-gradient(145deg, #ffe37a 0%, var(--gold-500) 42%, var(--gold-600) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(169, 112, 0, 0.18),
    0 7px 14px rgba(230, 169, 22, 0.24);
}

.status span {
  min-width: 55px;
  overflow: hidden;
  font-family: var(--font-number);
  font-size: 14.5px;
  font-weight: 850;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status::after {
  content: "";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(#fdfcfc, #fdfcfc) center / 13px 2px no-repeat,
    linear-gradient(#fdfcfc, #fdfcfc) center / 2px 13px no-repeat,
    var(--green-700);
  box-shadow: 0 8px 17px rgba(0, 142, 76, 0.22);
}

.shell { display: contents; }

.screen-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.profile-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.profile-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-copy h1 { margin: 0; }

.profile-copy p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-wrap {
  position: relative;
  flex: 0 0 auto;
}

.language-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 142, 76, 0.2);
  border-radius: 16px;
  background: #fdfcfc;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.language-toggle .flag-tile {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.language-toggle[aria-expanded="true"] {
  border-color: rgba(0, 142, 76, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 142, 76, 0.12), var(--shadow-soft);
}

.language-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  width: min(330px, calc(100vw - 24px));
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(253, 252, 252, 0.98);
  box-shadow: 0 22px 54px rgba(0, 75, 40, 0.14);
}

.language-menu.hidden,
.hidden,
.hidden-view {
  display: none !important;
}

.language-option {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fdfcfc;
  color: var(--ink);
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
  font-weight: 730;
}

.language-option.active {
  border-color: rgba(0, 142, 76, 0.24);
  background: #eaf7f0;
}

.language-option.active::after {
  content: "\2713";
  margin-left: auto;
  color: var(--green-700);
  font-weight: 900;
}

.flag-tile {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(8, 23, 15, 0.08);
}

.flag-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.22), transparent 44%, rgba(0,0,0,0.12));
  pointer-events: none;
}

.flag-ru { background: linear-gradient(#fff 0 33.33%, #1c57a7 33.33% 66.66%, #d52b1e 66.66%); }
.flag-be { background: linear-gradient(90deg, #fff 0 16%, transparent 16%), linear-gradient(#c8313e 0 68%, #2d8a42 68%); }
.flag-kk { background: radial-gradient(circle at 50% 50%, #f6d24a 0 16%, transparent 17%), #00a3dd; }
.flag-ky { background: radial-gradient(circle at 50% 50%, #ffd34d 0 18%, transparent 19%), #e1292e; }
.flag-lv { background: linear-gradient(#8c1530 0 40%, #fff 40% 60%, #8c1530 60%); }
.flag-lt { background: linear-gradient(#fdb913 0 33.33%, #006a44 33.33% 66.66%, #c1272d 66.66%); }
.flag-et { background: linear-gradient(#4891d9 0 33.33%, #111 33.33% 66.66%, #fff 66.66%); }
.flag-az { background: radial-gradient(circle at 54% 50%, #fff 0 10%, transparent 11%), linear-gradient(#00b5e2 0 33.33%, #ef3340 33.33% 66.66%, #509e2f 66.66%); }
.flag-hy { background: linear-gradient(#d90012 0 33.33%, #0033a0 33.33% 66.66%, #f2a800 66.66%); }
.flag-ka { background: linear-gradient(90deg, transparent 0 42%, #c8102e 42% 58%, transparent 58%), linear-gradient(transparent 0 42%, #c8102e 42% 58%, transparent 58%), #fff; }
.flag-uz { background: linear-gradient(#1eb7e8 0 30%, #fff 30% 36%, #ce1126 36% 40%, #fff 40% 60%, #ce1126 60% 64%, #1eb53a 64%); }
.flag-tg { background: radial-gradient(circle at 50% 50%, #f7c600 0 9%, transparent 10%), linear-gradient(#c8102e 0 31%, #fff 31% 69%, #006747 69%); }
.flag-tk { background: linear-gradient(90deg, #8b1e3f 0 20%, transparent 20%), radial-gradient(circle at 62% 38%, #fff 0 10%, transparent 11%), #00843d; }
.flag-en { background: linear-gradient(90deg, transparent 0 42%, #fff 42% 58%, transparent 58%), linear-gradient(transparent 0 42%, #fff 42% 58%, transparent 58%), linear-gradient(35deg, transparent 0 45%, #fff 45% 55%, transparent 55%), linear-gradient(-35deg, transparent 0 45%, #fff 45% 55%, transparent 55%), #012169; }

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

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

.section-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.section-head h2,
.section-title h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-head p,
.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.25;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.section-head .section-label,
.section-title .section-label {
  font-family: var(--font-brand);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.examples-title span {
  display: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.25;
}

.section-label::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fdfcfc 0 12%, transparent 13%),
    linear-gradient(145deg, var(--gold-500), var(--gold-600));
  box-shadow:
    inset 0 0 0 1px rgba(169, 112, 0, 0.16),
    0 6px 14px rgba(230, 169, 22, 0.16);
}

.examples-grid {
  display: grid;
  gap: 7px;
  overflow: visible;
  padding: 0;
}

.examples-grid::-webkit-scrollbar { display: none; }

.example-card {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  height: auto;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 9px 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(0, 75, 40, 0.08);
  isolation: isolate;
}

.example-card::before {
  display: none;
}

.example-card::after {
  content: "\203A";
  position: static;
  z-index: 1;
  width: auto;
  height: auto;
  display: block;
  background: none;
  color: #a0aa9f;
  opacity: 1;
  font-size: 30px;
  font-weight: 520;
  line-height: 1;
  justify-self: end;
  -webkit-mask: none;
  mask: none;
  filter: none;
}

.song-demo,
.card-demo,
.text-demo {
  background: var(--surface);
}

.song-demo {
  --example-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l10-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='16' cy='16' r='3'/%3E%3C/svg%3E");
}

.card-demo {
  --example-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='3'/%3E%3Cpath d='m4 15 4.5-4 3.5 3 2-2 6 5'/%3E%3Ccircle cx='15.5' cy='9.5' r='1.4'/%3E%3C/svg%3E");
}

.text-demo {
  --example-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 17.2V21h3.8L18.9 9.9l-3.8-3.8L4 17.2zm16.4-8.7 1.1-1.1a1.6 1.6 0 0 0 0-2.2l-1.7-1.7a1.6 1.6 0 0 0-2.2 0l-1.1 1.1 3.9 3.9z'/%3E%3C/svg%3E");
}

.example-card > span:last-child {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 0;
  display: block;
}

.example-card strong {
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: 25px;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
  white-space: pre-line;
}

.example-card span span {
  display: none;
  color: rgba(253, 252, 252, 0.82);
  font-size: 0;
  font-weight: 660;
  line-height: 1;
}

.example-play {
  width: 38px;
  height: 38px;
  display: grid !important;
  place-items: center;
  border-radius: 13px;
  background: #e8f7ef;
  color: var(--green-700);
}

.example-play::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--example-icon) center / contain no-repeat;
  mask: var(--example-icon) center / contain no-repeat;
}

.examples-view {
  display: grid;
  gap: 12px;
}

.examples-view-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.examples-view-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 820;
  line-height: 1.15;
}

.examples-view-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.25;
}

.examples-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fdfcfc;
  color: var(--green-900);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.examples-back span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.examples-back::before {
  content: "";
  width: 20px;
  height: 20px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.example-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px;
  background: #eef8f3;
}

.example-tab {
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.example-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(0, 75, 40, 0.08);
}

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

.create-view {
  display: grid;
  gap: 16px;
}

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

.create-view-head h2 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 23px;
  font-weight: 860;
  line-height: 1.04;
}

.create-view-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
  line-height: 1.35;
}

.create-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: #e8f7ef;
  color: var(--green-700);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.create-form {
  display: grid;
  gap: 11px;
}

.create-price {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(0, 142, 76, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, #fdfcfc 0%, #eff9f3 100%);
  color: var(--muted);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 690;
}

.create-price strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 880;
  line-height: 1;
}

.create-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #f4fbf7;
  padding: 5px;
}

.create-mode-button {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 880;
  cursor: pointer;
}

.create-mode-button.active {
  background: var(--green-700);
  color: #fdfcfc;
  box-shadow: 0 10px 22px rgba(0, 142, 76, 0.18);
}

.create-builder {
  display: grid;
  gap: 7px;
}

.choice-group {
  display: grid;
  gap: 7px;
}

.choice-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
  font-weight: 880;
  line-height: 1;
}

.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.choice-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fdfcfc;
  color: var(--ink);
  padding: 7px 11px 7px 8px;
  cursor: pointer;
}

.choice-chip.selected {
  border-color: var(--green-700);
  background: var(--green-700);
  color: #fdfcfc;
  box-shadow: 0 10px 22px rgba(0, 142, 76, 0.16);
}

.choice-chip-icon {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #e8f7ef;
  color: var(--green-700);
  font-size: 15px;
  line-height: 1;
}

.choice-chip.selected .choice-chip-icon {
  background: rgba(253, 252, 252, 0.18);
  color: #fdfcfc;
}

.choice-chip strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 820;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-select {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fdfcfc;
}

.choice-select.expanded {
  border-color: rgba(0, 142, 76, 0.28);
  box-shadow: 0 10px 24px rgba(0, 75, 40, 0.07);
}

.choice-select-button {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(74px, 0.8fr) minmax(0, 1.2fr) 20px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.choice-select-title strong {
  display: block;
  font-size: 14px;
  font-weight: 880;
  line-height: 1;
}

.choice-select-value {
  overflow: hidden;
  justify-self: end;
  max-width: 100%;
  border-radius: 999px;
  background: #e8f7ef;
  color: var(--green-900);
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-select-value.muted {
  color: #6d7b73;
  background: #f3f8f5;
}

.choice-select-arrow {
  color: #93a49a;
  font-size: 28px;
  font-weight: 360;
  line-height: 1;
  transform: translateY(-1px);
}

.choice-select.expanded .choice-select-arrow {
  color: var(--green-700);
  transform: translateY(-1px) rotate(90deg);
}

.choice-select-panel {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.choice-custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.choice-custom-input {
  min-height: 42px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fdfcfc;
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  outline: none;
}

.choice-custom-input:focus {
  border-color: rgba(0, 142, 76, 0.48);
  box-shadow: 0 0 0 4px rgba(0, 142, 76, 0.10);
}

.choice-custom-done {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--green-700);
  color: #fdfcfc;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 880;
  cursor: pointer;
}

.create-field {
  display: grid;
  gap: 6px;
}

.create-field span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.create-field input,
.create-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fdfcfc;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.35;
  outline: none;
}

.create-field textarea {
  min-height: 132px;
  resize: vertical;
}

.create-details-field textarea {
  min-height: 148px;
  font-size: 15px;
}

.create-field input:focus,
.create-field textarea:focus {
  border-color: rgba(0, 142, 76, 0.48);
  box-shadow: 0 0 0 4px rgba(0, 142, 76, 0.10);
}

.create-example {
  margin: -3px 0 0;
  border: 1px solid rgba(0, 142, 76, 0.13);
  border-radius: 15px;
  background: #eef9f3;
  color: #315847;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.34;
}

.create-submit {
  min-height: 48px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 850;
}

.create-submit:disabled {
  opacity: 0.62;
  cursor: wait;
}

.create-note {
  margin: 0;
}

.mini-example-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.mini-example-copy {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.mini-example-kicker {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 7px;
  background: #e8f7ef;
  color: var(--green-900);
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
}

.mini-example-item h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 840;
  line-height: 1.15;
}

.mini-example-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.35;
}

.mini-audio-button {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 12px 12px;
  border: 1px solid rgba(0, 142, 76, 0.18);
  border-radius: 15px;
  background: #e8f7ef;
  color: var(--green-900);
  padding: 7px 10px;
  text-align: left;
  cursor: pointer;
}

.mini-audio-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-700);
  color: #fdfcfc;
}

.mini-audio-icon::before {
  content: "";
  width: 15px;
  height: 15px;
  display: block;
  margin-left: 2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mini-audio-button.playing {
  background: #dff4e9;
  border-color: rgba(0, 142, 76, 0.3);
}

.mini-audio-button.playing .mini-audio-icon::before {
  width: 14px;
  height: 14px;
  margin-left: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 5h4v14H7zm6 0h4v14h-4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 5h4v14H7zm6 0h4v14h-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mini-audio-label {
  overflow: hidden;
  color: currentColor;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-example img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: #eef8f3;
}

.greeting-example-text {
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 620 !important;
  line-height: 1.45 !important;
}

.quick-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

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

.quick-head p { display: none; }

.gift-actions {
  display: grid;
  gap: 7px;
}

.gift-action {
  min-height: 61px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  border: 1px solid rgba(253, 252, 252, 0.36);
  border-radius: 17px;
  background: var(--green-700);
  color: #fdfcfc;
  padding: 9px 13px;
  text-align: left;
  cursor: pointer;
}

.gift-action:last-child { border-bottom: 1px solid rgba(253, 252, 252, 0.36); }

.gift-action::after {
  content: "\203A";
  color: rgba(253, 252, 252, 0.84);
  font-size: 34px;
  line-height: 1;
  justify-self: end;
}

.gift-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(253, 252, 252, 0.16);
  color: #fdfcfc;
  font-size: 0;
}

.gift-icon::before {
  content: "";
  width: 21px;
  height: 21px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

.gift-action.song .gift-icon {
  color: var(--green-700);
  --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l10-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='16' cy='16' r='3'/%3E%3C/svg%3E");
}

.gift-action.card .gift-icon {
  color: var(--green-700);
  --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='3'/%3E%3Cpath d='m4 15 4.5-4 3.5 3 2-2 6 5'/%3E%3Ccircle cx='15.5' cy='9.5' r='1.4'/%3E%3C/svg%3E");
}

.gift-action.greeting .gift-icon {
  color: var(--green-700);
  --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 17.2V21h3.8L18.9 9.9l-3.8-3.8L4 17.2zm16.4-8.7 1.1-1.1a1.6 1.6 0 0 0 0-2.2l-1.7-1.7a1.6 1.6 0 0 0-2.2 0l-1.1 1.1 3.9 3.9z'/%3E%3C/svg%3E");
}

.gift-action.song .gift-icon,
.gift-action.card .gift-icon,
.gift-action.greeting .gift-icon {
  color: #fdfcfc;
}

.gift-action > span:last-child {
  min-width: 0;
  display: block;
}

.gift-action strong {
  overflow: hidden;
  color: #fdfcfc;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-action span span {
  display: none;
  overflow: hidden;
  color: var(--muted);
  font-size: 0;
  font-weight: 610;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary { display: none; }

.panel {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.section-title {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.products,
.operations,
.stats-grid,
.referral-grid {
  display: grid;
  gap: 10px;
}

.product,
.operation,
.stat,
.referral-stat,
.referral-hero,
.referral-chart-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: none;
}

.product {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) max-content 12px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.product-media {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e8f7ef;
  color: var(--green-900);
  font-size: 18px;
  font-weight: 850;
}

.product-copy { min-width: 0; display: grid; gap: 3px; }
.product-title { color: var(--ink); font-size: 14px; font-weight: 820; line-height: 1.15; }
.product-note { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.2; }
.price { color: var(--green-700); font-size: 15px; font-weight: 850; white-space: nowrap; }
.chevron { color: #a0aa9f; font-size: 20px; }
.badge { width: fit-content; border-radius: 999px; padding: 4px 7px; background: #e8f7ef; color: var(--green-700); font-size: 11px; font-weight: 780; }

.custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.custom-row input {
  min-height: 44px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fdfcfc;
  color: var(--ink);
  padding: 0 12px;
  font-size: 16px;
  outline: none;
}

.primary {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: var(--green-900);
  color: #fdfcfc;
  font-weight: 800;
  cursor: pointer;
}

.tabs,
.referral-periods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px;
  background: #eef8f3;
  margin-bottom: 12px;
}

.referral-periods { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tab,
.referral-period {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.tab.active,
.referral-period.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(0, 75, 40, 0.08);
}

.stat,
.referral-stat,
.operation {
  padding: 12px;
}

.stat span,
.referral-stat span,
.operation-time,
.message {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.stat strong,
.referral-stat strong,
.operation-title {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.operation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.operation-amount { font-weight: 850; white-space: nowrap; }
.operation-amount.plus { color: var(--green-700); }
.operation-amount.minus { color: var(--danger); }

.referral-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

#referralLinkText {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-chart-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-top: 10px;
}

.referral-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.referral-chart-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 880;
}

.referral-chart-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.referral-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.referral-metric {
  min-height: 34px;
  border: 1px solid rgba(0, 142, 76, 0.15);
  border-radius: 12px;
  background: #eef8f3;
  color: var(--green-900);
  padding: 0 5px;
  font-size: 11px;
  font-weight: 840;
  cursor: pointer;
}

.referral-metric.active {
  border-color: var(--green-700);
  background: var(--green-700);
  color: #fdfcfc;
  box-shadow: 0 8px 18px rgba(0, 142, 76, 0.16);
}

.referral-chart-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.referral-chart-summary strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.referral-chart-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
  text-align: right;
}

.referral-chart {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  border: 1px solid rgba(0, 142, 76, 0.12);
  border-radius: 15px;
  background: linear-gradient(180deg, #fbfffd 0%, #eff9f4 100%);
}

.referral-chart-svg {
  width: 100%;
  height: 176px;
  display: block;
}

.referral-chart-grid {
  stroke: rgba(0, 75, 40, 0.08);
  stroke-width: 1;
}

.referral-chart-area {
  fill: url(#referralAreaGradient);
}

.referral-chart-line {
  fill: none;
  stroke: var(--green-700);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.referral-chart-dot {
  fill: #fdfcfc;
  stroke: var(--green-700);
  stroke-width: 2.6;
}

.referral-chart-dot.selected {
  fill: var(--gold-500);
  stroke: #fdfcfc;
  stroke-width: 2.2;
  filter: drop-shadow(0 4px 8px rgba(0, 75, 40, 0.18));
}

.referral-chart-label {
  fill: #6d7b73;
  font-size: 10px;
  font-weight: 740;
  text-anchor: middle;
}

.referral-chart-hit {
  position: absolute;
  width: 38px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 60;
  width: min(430px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 6px 6px max(6px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(253, 252, 252, 0.94);
  box-shadow: 0 -8px 22px rgba(0, 75, 40, 0.08);
}

.bottom-nav-button {
  min-width: 0;
  min-height: 56px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #6b7a72;
  cursor: pointer;
}

.bottom-nav-button span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  font-size: 0;
}

.bottom-nav-button span::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.bottom-nav-button[data-view-button="home"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11.5 12 4l9 7.5'/%3E%3Cpath d='M5.5 10.5V20h13v-9.5'/%3E%3Cpath d='M9.5 20v-5h5v5'/%3E%3C/svg%3E");
}

.bottom-nav-button[data-view-button="wallet"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16v12H4z'/%3E%3Cpath d='M16 12h4v3h-4a1.5 1.5 0 0 1 0-3z'/%3E%3Cpath d='M7 7l8-3 2 3'/%3E%3C/svg%3E");
}

.bottom-nav-button[data-view-button="activity"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 5h12M7 12h12M7 19h12'/%3E%3Cpath d='M4 5h.01M4 12h.01M4 19h.01'/%3E%3C/svg%3E");
}

.bottom-nav-button[data-view-button="profile"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3.5 20a5.5 5.5 0 0 1 11 0'/%3E%3Cpath d='M17 8v6M14 11h6'/%3E%3C/svg%3E");
}

.bottom-nav-button strong {
  max-width: 100%;
  overflow: hidden;
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav-button.active {
  color: #fdfcfc;
  background: var(--green-700);
}

@media (max-width: 360px) {
  .app { padding-inline: 7px; }
  .example-card { min-height: 56px; padding-inline: 12px; }
  .example-card strong { font-size: 22px; }
  .choice-chip { padding-right: 10px; }
  .choice-chip strong { font-size: 13px; }
  .gift-action { grid-template-columns: 38px minmax(0, 1fr) 14px; padding-inline: 11px; }
  .gift-action strong { font-size: 21px; }
  .gift-icon { width: 36px; height: 36px; }
  .brand-title span { font-size: 15px; }
  .status { min-width: 82px; }
}
