/*
  Mini App uslublari — to'q mavzu (eski tasdiqlangan dizayn): qora fon, to'q kartalar, oltin rang.
  Barcha ranglar shu yerda (o'zgaruvchilar). Rangni o'zgartirish uchun faqat :root ni tahrirlang.
*/
:root {
  /* Eski (tasdiqlangan) dizayn: dizayn/1-bosh-sahifa.html va PDF */
  --bg: #111318;          /* sahifa foni — deyarli qora */
  --card: #1B1E25;        /* kartochkalar — to'q kulrang */
  --card2: #232731;       /* rasm o'rni, ichki bloklar */
  --line: #262A33;        /* ingichka to'q chegara */
  --line2: #2F343F;
  --input: #0C0D11;       /* input maydonlari — qora fon */
  --accent: #F5A623;      /* asosiy — to'q sariq / oltin */
  --accent-dark: #E0951A;
  --accent-soft: #2B2416; /* sariq belgilar foni */
  --accent-line: rgba(245, 166, 35, .35);
  --text: #F2F3F5;        /* asosiy matn — oq */
  --text2: #C9CDD5;
  --muted: #9AA1AD;       /* ikkinchi darajali matn — kulrang */
  --faint: #6F7683;
  --chip: #262A33;        /* tanlanmagan chip — to'q kulrang */
  --chip-fg: #F2F3F5;     /* ... oq matn */
  --on-accent: #14110A;   /* sariq tugma ustidagi qora matn */
  --green: #3DD68C;  --green-soft: #15261D;  --green-line: #24442F;
  --red: #FF7A6B;    --red-soft: #2A1A17;    --red-line: #5C2B22;
  --amber: #F5A623;  --amber-soft: #2B2416;  --amber-line: #4A3A1A;
  --gray-soft: #262A33;
  --overlay: rgba(15, 17, 21, .82); /* rasm ustidagi belgilar foni */
  --star: #F5A623;
  --shadow: none;
  --radius: 18px;
  --tabbar-h: 62px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overscroll-behavior: none; }
body { color: var(--text); font: 14px/1.4 Inter, system-ui, -apple-system, sans-serif; }
a { color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
button { font-family: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
img { max-width: 100%; }
#app { height: 100%; }

/* ---------- Ekran karkasi: [tepa] [aylanadigan qism] [amal paneli] [pastki menyu] ---------- */
.screen {
  height: var(--tg-viewport-stable-height, 100vh);
  background: var(--bg); color: var(--text);
  display: flex; flex-direction: column; overflow: hidden;
}
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.page { padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.action-bar {
  padding: 10px 16px; background: var(--card); border-top: 1px solid var(--line);
  flex-shrink: 0; display: flex; gap: 10px;
}

/* Pastki menyu (5 ta tab) */
.tabbar {
  flex-shrink: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--card); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + var(--safe-bottom));
}
.tab {
  border: none; background: transparent; color: var(--muted); padding: 4px 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font: 600 10.5px/1.1 Inter, sans-serif; min-width: 0;
}
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab .tab-ico {
  width: 44px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
}
.tab.on { color: var(--accent); }
.tab.on .tab-ico { background: var(--accent-soft); }

/* ---------- Tugmalar ---------- */
.btn-main {
  flex: 1; width: 100%; height: 52px; border-radius: 16px; border: none; background: var(--accent);
  color: var(--on-accent); font: 700 16px Inter, sans-serif; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-main:active:not(:disabled) { background: var(--accent-dark); }
.btn-post {
  height: 58px; border-radius: 18px; font-size: 17px;
  box-shadow: 0 6px 16px rgba(245, 166, 35, .22);
}
.btn-soft {
  height: 48px; border-radius: 14px; border: none; background: var(--accent-soft); color: var(--accent);
  font: 700 15px Inter, sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1;
}
.btn-ghost {
  height: 48px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); color: var(--text);
  font: 600 15px Inter, sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1;
}
.btn-small {
  height: 32px; padding: 0 12px; border-radius: 10px; border: none; background: var(--chip); color: var(--chip-fg);
  font: 600 12.5px Inter, sans-serif; white-space: nowrap;
}
.btn-small.blue { background: var(--accent-soft); color: var(--accent); }
.btn-danger {
  height: 48px; border-radius: 14px; border: 1px solid var(--red-line); background: var(--red-soft); color: var(--red);
  font: 600 15px Inter, sans-serif;
}
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
  box-shadow: var(--shadow);
}

/* ---------- Kartalar va sarlavhalar ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow);
}
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.ico {
  width: 34px; height: 34px; border-radius: 11px; background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
  font-style: normal;
}
.ico.green { background: var(--green-soft); color: var(--green); }
.ico.amber { background: var(--amber-soft); color: var(--amber); }
.ico.red { background: var(--red-soft); color: var(--red); }
.ico.big { width: 56px; height: 56px; border-radius: 18px; font-size: 28px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.h1 { margin: 0; font-family: 'Space Grotesk', Inter, sans-serif; font-size: 26px; font-weight: 700; line-height: 1.1; }
.h2 { margin: 0; font-size: 16px; font-weight: 700; }
.badge-m416 {
  padding: 3px 8px; border-radius: 8px; background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 700;
}
.row-title { display: flex; align-items: center; gap: 8px; }
.empty {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 20px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: var(--shadow);
}
.loader { text-align: center; color: var(--muted); font-size: 13px; padding: 12px; }
.error {
  background: var(--red-soft); border: 1px solid var(--red-line); border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: var(--red);
}

/* ---------- Filtrlar ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-price, .chip-count, .chip-lvl {
  height: 34px; border: none; font: 600 13px Inter, sans-serif; background: var(--chip); color: var(--chip-fg);
}
.chip-price { padding: 0 13px; border-radius: 17px; }
.chip-count { min-width: 44px; padding: 0 10px; border-radius: 10px; }
.chip-lvl { flex: 1; min-width: 0; padding: 0; border-radius: 9px; font-size: 12px; font-weight: 700; }
.on-accent { background: var(--accent) !important; color: var(--on-accent) !important; }
.field-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.input-price {
  height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--input);
  color: var(--text); font: 600 15px Inter, sans-serif; padding: 0 12px; outline: none; width: 100%;
}
.input-price:focus, .input-big:focus, .textarea:focus, .num-input:focus { border-color: var(--accent); background: var(--input); }
.skin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.skin-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 4px 4px 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--input); color: var(--text); text-align: center;
}
.skin-tile img { width: 100%; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
.skin-tile span { font: 600 11px/1.2 Inter, sans-serif; }
.btn-dashed {
  height: 38px; border-radius: 12px; border: 1px dashed var(--line2); background: transparent; color: var(--accent);
  font: 600 13px Inter, sans-serif;
}
.picked {
  display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 14px;
  border: 2px solid var(--accent); background: var(--accent-soft);
}
.picked img { width: 112px; height: 55px; object-fit: cover; border-radius: 10px; display: block; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn-sort {
  height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card);
  color: var(--chip-fg); font: 600 13px Inter, sans-serif; display: flex; align-items: center; gap: 6px;
}

/* ---------- E'lon kartochkalari ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
}
.card-hero { position: relative; height: 108px; background: var(--card2); overflow: hidden; }
.card-hero img { width: 100%; height: 108px; object-fit: cover; display: block; }
.ph {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--muted); font-size: 11px;
}
.lv-badge {
  position: absolute; top: 8px; left: 8px; padding: 4px 8px; border-radius: 8px; background: var(--overlay);
  color: var(--text); font-size: 11px; font-weight: 700;
}
.star-btn {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 10px; border: none;
  background: var(--overlay); color: var(--muted); display: flex; align-items: center; justify-content: center;
  padding: 0; font-size: 16px;
}
.star-btn.on { color: var(--star); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.card-price { font-size: 16px; font-weight: 800; color: var(--accent); }
.card-stats { display: flex; flex-wrap: wrap; gap: 4px; }
.card-stats span {
  padding: 2px 6px; border-radius: 6px; background: var(--chip); font-size: 11px; font-weight: 600; color: var(--text2);
  white-space: nowrap;
}
.card-skin { display: flex; align-items: center; gap: 6px; padding: 3px; border-radius: 8px; background: var(--bg); }
.card-skin img { width: 40px; height: 20px; object-fit: cover; border-radius: 5px; display: block; flex-shrink: 0; }
.card-skin span { font-size: 11px; font-weight: 600; line-height: 1.2; }
/* Sotilgan: kulrang */
.is-sold { filter: grayscale(1); opacity: .62; }
.sold-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg);
  padding: 4px 12px; border-radius: 8px; border: 2px solid var(--red); color: var(--red); background: var(--overlay);
  font: 800 13px Inter, sans-serif; letter-spacing: .08em;
}

/* Ro'yxat qatori (Natijalar, Mening e'lonlarim) */
.row-item {
  display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 10px; box-shadow: var(--shadow); text-decoration: none; color: var(--text);
}
.row-thumb {
  position: relative; width: 78px; height: 62px; border-radius: 12px; overflow: hidden; background: var(--card2); flex-shrink: 0;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-thumb .sold-badge { font-size: 9px; padding: 2px 5px; border-width: 1.5px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-price { font-size: 15px; font-weight: 800; color: var(--accent); }
.row-sub { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-time { font-size: 11.5px; color: var(--muted); }
.row-item.sold .row-price { color: var(--muted); text-decoration: line-through; }
.status {
  align-self: flex-start; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.st-review { background: var(--amber-soft); color: var(--amber); }
.st-ok { background: var(--green-soft); color: var(--green); }
.st-rej { background: var(--red-soft); color: var(--red); }
.st-sold { background: var(--gray-soft); color: var(--muted); }
.reason { font-size: 12px; color: var(--red); background: var(--red-soft); border-radius: 8px; padding: 6px 8px; }

.search-chip {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--text); box-shadow: var(--shadow);
  font: 600 13px Inter, sans-serif;
}
.search-chip .go { margin-left: auto; color: var(--accent); flex-shrink: 0; }

/* ---------- E'lon sahifasi ---------- */
.hero { position: relative; height: 260px; background: var(--card2); flex-shrink: 0; overflow: hidden; }
.hero-track { display: flex; height: 260px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-track img { flex: 0 0 100%; width: 100%; height: 260px; object-fit: cover; display: block; scroll-snap-align: start; }
.hero .ph { height: 260px; font-size: 12px; }
.hero-btn {
  position: absolute; top: 14px; width: 42px; height: 42px; border-radius: 14px; border: none;
  background: var(--overlay); color: var(--text); display: flex; align-items: center; justify-content: center;
  padding: 0; box-shadow: var(--shadow); font-size: 19px;
}
.hero-btn.on { color: var(--star); }
.hero-count {
  position: absolute; bottom: 14px; right: 16px; padding: 4px 10px; border-radius: 10px; background: rgba(17, 24, 39, .6);
  font-size: 12px; font-weight: 600; color: #fff;
}
.detail { padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.d-price { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 30px; font-weight: 700; color: var(--accent); }
.d-title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.stat span:first-child { font-size: 12px; color: var(--muted); }
.stat span:last-child { font-size: 18px; font-weight: 700; }
.d-skin {
  display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; box-shadow: var(--shadow);
}
.d-skin img { width: 104px; height: 51px; object-fit: cover; border-radius: 10px; display: block; flex-shrink: 0; }
.bars { display: grid; gap: 4px; }
.bars span { height: 6px; border-radius: 3px; background: var(--line2); }
.info-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow);
}
.safe {
  display: flex; align-items: center; gap: 12px; background: var(--green-soft); border: 1px solid var(--green-line);
  border-radius: 14px; padding: 14px;
}

/* ---------- E'lon berish ---------- */
.form-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; flex-shrink: 0; }
.form-title { margin: 0; font-family: 'Space Grotesk', Inter, sans-serif; font-size: 22px; font-weight: 700; }
.steps-bar { display: flex; gap: 6px; padding: 0 16px 8px; flex-shrink: 0; }
.steps-bar span { flex: 1; height: 4px; border-radius: 2px; background: var(--line2); }
.steps-bar span.on { background: var(--accent); }
.form { padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 18px; }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; }
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.photo-add {
  height: 76px; border-radius: 14px; border: 1.5px dashed var(--accent); background: var(--accent-soft); color: var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font: 600 11px Inter, sans-serif;
}
.photo {
  position: relative; height: 76px; border-radius: 14px; background: var(--card2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 11px; border: none;
  background: rgba(17, 24, 39, .65); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0;
}
.form-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text2); }
.input-big {
  height: 48px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card);
  color: var(--text); font: 700 17px Inter, sans-serif; padding: 0 14px; outline: none; width: 100%;
}
.counter {
  display: flex; align-items: center; justify-content: space-between; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow);
}
.counter > span { font-size: 14px; font-weight: 600; }
.counter-ctl { display: flex; align-items: center; gap: 4px; }
.counter-ctl button {
  width: 44px; height: 44px; border-radius: 12px; border: none; background: var(--accent-soft); color: var(--accent);
  font: 700 20px Inter, sans-serif; padding: 0;
}
.counter-val { min-width: 40px; text-align: center; font-size: 17px; font-weight: 700; }
.num-input {
  width: 104px; height: 44px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--input); color: var(--text); font: 700 17px Inter, sans-serif; text-align: center; outline: none;
  padding: 0 8px;
}
.added {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
}
.added-top { display: flex; align-items: center; gap: 10px; }
.added-top img { width: 96px; height: 47px; object-fit: cover; border-radius: 10px; display: block; flex-shrink: 0; }
.btn-x, .btn-x-sm {
  border-radius: 10px; border: none; background: var(--chip); color: var(--chip-fg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
}
.btn-x { width: 36px; height: 36px; }
.btn-x-sm { width: 32px; height: 32px; }
.lvl-row { display: flex; gap: 5px; }
.lvl-row button {
  flex: 1; min-width: 0; height: 32px; border-radius: 8px; border: none; padding: 0; background: var(--chip);
  color: var(--chip-fg); font: 700 12px Inter, sans-serif;
}
.picker {
  background: var(--card); border: 1.5px solid var(--accent); border-radius: 16px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.picker .skin-tile img { height: 46px; }
.btn-add-skin {
  height: 48px; border-radius: 14px; border: 1.5px dashed var(--accent); background: var(--accent-soft); color: var(--accent);
  font: 700 14px Inter, sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.link-chip {
  height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line2); background: var(--card);
  color: var(--chip-fg); font: 600 13px Inter, sans-serif;
}
.link-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.textarea {
  min-height: 88px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card);
  color: var(--text); font: 400 14px/1.5 Inter, sans-serif; padding: 12px 14px; outline: none; resize: none; width: 100%;
}
.fee-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fee-sum { font-size: 22px; font-weight: 800; color: var(--accent); }

/* To'lov qadami */
.copy-box {
  display: flex; align-items: center; gap: 10px; background: var(--input); border: 1px solid var(--line2);
  border-radius: 14px; padding: 10px 10px 10px 14px;
}
.copy-box .val { flex: 1; min-width: 0; font: 700 17px/1.3 'Space Grotesk', Inter, sans-serif; letter-spacing: .02em; word-break: break-all; }
.receipt-drop {
  height: 120px; border-radius: 16px; border: 1.5px dashed var(--accent); background: var(--accent-soft); color: var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: 700 14px Inter, sans-serif;
  width: 100%;
}
.receipt-preview { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card2); }
.receipt-preview img { width: 100%; max-height: 320px; object-fit: contain; display: block; background: var(--card2); }
.receipt-preview .photo-x { width: 30px; height: 30px; border-radius: 15px; top: 8px; right: 8px; }

/* Yuborilgandan keyin */
.done {
  flex: 1; overflow-y: auto; padding: 32px 20px 24px; display: flex; flex-direction: column; align-items: center;
  gap: 20px; text-align: center;
}
.done-icon {
  width: 88px; height: 88px; border-radius: 44px; background: var(--green-soft); display: flex; align-items: center;
  justify-content: center; color: var(--green); font-size: 40px;
}
.steps {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 14px; text-align: left; box-shadow: var(--shadow);
}
.step { display: flex; align-items: flex-start; gap: 12px; }
.step-n {
  width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; font-size: 12.5px; font-weight: 800;
  background: var(--accent-soft); color: var(--accent);
}
.step-n.done { background: var(--green); color: var(--on-accent); }

/* ---------- Profil ---------- */
.profile-head {
  display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #2B2416, #1B1E25); border: 1px solid var(--accent-line);
  color: #fff; border-radius: 22px; padding: 18px; 
}
.avatar {
  width: 64px; height: 64px; border-radius: 32px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font: 700 26px Inter, sans-serif; overflow: hidden;
  border: 2px solid var(--accent-line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: none; background: transparent;
  color: var(--text); font: 600 15px Inter, sans-serif; text-align: left; text-decoration: none;
}
.menu-item + .menu-item { border-top: 1px solid var(--line); }
.menu-item .arr { margin-left: auto; color: var(--faint); }
.menu-item .cnt {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent-soft);
  color: var(--accent); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.menu-item .cnt + .arr { margin-left: 6px; }
.dev { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0 8px; }

/* ---------- Do'stlar ---------- */
.ref-hero {
  background: linear-gradient(135deg, #2B2416, #1B1E25); border: 1px solid var(--accent-line); color: #fff; border-radius: 22px; padding: 20px;
  display: flex; flex-direction: column; gap: 6px; 
}
.ref-count { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 40px; font-weight: 700; line-height: 1; color: var(--accent); }
.top-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; }
.top-row + .top-row { border-top: 1px solid var(--line); }
.top-row.me { background: var(--accent-soft); border-radius: 12px; padding: 10px; }
.top-n {
  width: 30px; height: 30px; border-radius: 15px; background: var(--chip); display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.top-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-cnt { font-weight: 800; color: var(--accent); white-space: nowrap; }

/* ---------- Qo'llanma ---------- */
.guide-step { display: flex; align-items: flex-start; gap: 12px; }
.guide-step + .guide-step { margin-top: 2px; }
.card-green { background: var(--green-soft); border: 1px solid var(--green-line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card-warn { background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.admin-chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--bg);
  border: 1px solid var(--green-line); color: var(--green); font-weight: 700; font-size: 13px; text-decoration: none;
}

/* ---------- Tez orada ---------- */
.soon {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow);
}
.soon .ico.big { width: 84px; height: 84px; border-radius: 26px; font-size: 42px; }
.pill { padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12.5px; }

/* ---------- Tanishuv (birinchi kirish) ---------- */
.onb { height: 100%; display: flex; flex-direction: column; background: var(--bg); padding: 16px 20px calc(20px + var(--safe-bottom)); }
.onb-skip { align-self: flex-end; border: none; background: transparent; color: var(--muted); font: 600 14px Inter, sans-serif; padding: 8px; }
.onb-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.onb-art {
  width: 150px; height: 150px; border-radius: 44px; background: linear-gradient(135deg, #2B2416, #1B1E25); border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center; font-size: 72px;
}
.onb-title { margin: 0; font-family: 'Space Grotesk', Inter, sans-serif; font-size: 25px; font-weight: 700; }
.onb-text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 320px; }
.dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--line2); transition: width .2s; }
.dots span.on { width: 22px; background: var(--accent); }

/* Kichik xabar (nusxalandi va h.k.) */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px + var(--safe-bottom)); transform: translateX(-50%);
  background: rgba(17, 24, 39, .9); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  z-index: 50; pointer-events: none; max-width: 86%; text-align: center;
}

/* Telegram'dan tashqarida ochilganda */
.outside { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.emo { font-style: normal; margin-right: 6px; }
.emo-big { font-style: normal; font-size: 24px; margin-right: 8px; vertical-align: 2px; }

/* ---------- E'lon berish: sotish turi, narx hisobi ---------- */
.mode-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text);
}
.mode-card:active { border-color: var(--accent); }
.mode-title { font-size: 17px; font-weight: 800; }
.money {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 7px; font-size: 14px;
}
.money > div { display: flex; justify-content: space-between; gap: 10px; color: var(--text2); }
.money b { color: var(--text); white-space: nowrap; }
.money .gets { border-top: 1px dashed var(--line2); padding-top: 7px; }
.money .gets span, .money .gets b, .warn-line.gets b { color: var(--green); }
.warn-box { gap: 10px; border-color: var(--accent-line); }
.warn-line { font-size: 16px; line-height: 1.4; }
.warn-line b { color: var(--accent); }

/* ---------- Qo'llanma: ochilib-yopiladigan bo'limlar ---------- */
.acc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acc[open] { border-color: var(--accent-line); }
.acc summary {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  font-weight: 700; font-size: 15px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary span:first-of-type { flex: 1; }
.acc-arr { color: var(--faint); display: flex; transition: transform .2s; }
.acc[open] .acc-arr { transform: rotate(90deg); color: var(--accent); }
.acc-body { padding: 0 16px 14px; color: var(--text2); line-height: 1.55; font-size: 14px; }
.acc-body p { margin: 0; }
.acc-body b { color: var(--text); }
.acc-steps, .acc-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.acc-steps li::marker { color: var(--accent); font-weight: 800; }
.acc-list li::marker { color: var(--accent); }
.acc-note { margin-top: 10px; background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; }
.acc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.acc-link { color: var(--accent); font-weight: 700; text-decoration: none; word-break: break-all; }
.acc .admin-chip { color: var(--accent); border-color: var(--accent-line); background: var(--bg); }

/* ---------- 🏆 Kolleksiya ---------- */
.badges { position: absolute; top: 8px; left: 8px; right: 44px; display: flex; flex-wrap: wrap; gap: 4px; }
.badges .lv-badge { position: static; }
.coll-badge {
  padding: 4px 8px; border-radius: 8px; background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 800; white-space: nowrap;
}
.coll-row b { color: var(--accent); font-size: 17px; font-family: 'Space Grotesk', Inter, sans-serif; }
.num-input.wide { width: 140px; }
/* Saralash tugmasi uzun bo'lsa — keyingi qatorga o'tadi */
.list-head { flex-wrap: wrap; row-gap: 8px; }
.list-head > div { flex-wrap: wrap; justify-content: flex-end; }
.btn-sort { white-space: nowrap; }
