/* Bagdar Mini App — бренд палитрасы + Telegram темасы (light/dark автоматты) */

:root {
  /* Bagdar бренді */
  --navy: #2F3C7E;
  --navy-soft: #47559b;
  --coral: #F96167;
  --gold: #F9E795;

  /* Telegram беретін түстер (болмаса — өз мәндеріміз) */
  --bg: var(--tg-theme-bg-color, #ffffff);
  --surface: var(--tg-theme-secondary-bg-color, #f2f3f7);
  --text: var(--tg-theme-text-color, #10131a);
  --muted: var(--tg-theme-hint-color, #79818f);
  --link: var(--tg-theme-link-color, var(--navy));
  --btn-bg: var(--tg-theme-button-color, var(--navy));
  --btn-text: var(--tg-theme-button-text-color, #ffffff);

  --radius: 16px;
  --radius-sm: 10px;
  --gap: 14px;
  --tabbar-h: 62px;
  --shadow: 0 2px 14px rgba(16, 19, 26, .08);
}

/* Қараңғы тема: карточкаларды фоннан ажырату */
body.dark {
  --surface: var(--tg-theme-secondary-bg-color, #1b1f27);
  --shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

.screen {
  min-height: 100vh;
  display: flex; flex-direction: column;
  /* Mini App телефонда ашылады, бірақ Telegram Desktop-та кең болмасын */
  max-width: 560px; margin: 0 auto;
}
.tabbar, .toast { max-width: 560px; margin-inline: auto; }

/* ------------------------------------------------------------------ header */

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 65%, #5a4a8f 100%);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 16px 18px;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow);
}

.hero__top { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px;
}

.hero__who { flex: 1; min-width: 0; }
.hero__name {
  font-weight: 650; font-size: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero__sub { font-size: 12.5px; opacity: .8; }

.badge {
  font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}
.badge--level { background: var(--gold); color: var(--navy); }

.xp { margin-top: 14px; }
.xp__track {
  height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  overflow: hidden;
}
.xp__fill {
  height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  transition: width .5s cubic-bezier(.22, .61, .36, 1);
}
.xp__meta {
  display: flex; justify-content: space-between;
  font-size: 12px; opacity: .85; margin-top: 6px;
}

/* ----------------------------------------------------------------- content */

.content {
  flex: 1;
  padding: var(--gap) 16px calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom));
}

.hidden { display: none !important; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: var(--gap);
}

.card__title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 12px;
}

.row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(127, 127, 127, .14);
}
.row:last-child { border-bottom: 0; }
.row__key { color: var(--muted); font-size: 14px; flex: 0 0 40%; }
.row__val { font-weight: 550; flex: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12.5px; font-weight: 550;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(47, 60, 126, .1); color: var(--navy);
}
body.dark .chip { background: rgba(249, 231, 149, .16); color: var(--gold); }
.chip--muted { background: rgba(127, 127, 127, .16); color: var(--muted); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 12px; text-align: center;
}
.stat__num { font-size: 21px; font-weight: 700; color: var(--navy); }
body.dark .stat__num { color: var(--gold); }
.stat__label { font-size: 12px; color: var(--muted); margin-top: 2px; }

.placeholder {
  text-align: center;
  padding: 46px 22px;
  color: var(--muted);
}
.placeholder__icon { font-size: 42px; }
.placeholder h2 { margin: 10px 0 6px; font-size: 18px; color: var(--text); }
.placeholder p { margin: 0 0 14px; font-size: 14px; }

/* ----------------------------------------------------------------- tabbar */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(var(--tabs, 5), 1fr);
  background: var(--bg);
  border-top: 1px solid rgba(127, 127, 127, .18);
  z-index: 20;
}
.tabbar__item {
  border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; font-weight: 550;
  color: var(--muted);
  transition: color .15s;
}
.tabbar__icon { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .7; }
.tabbar__item.is-active { color: var(--coral); }
.tabbar__item.is-active .tabbar__icon { filter: none; opacity: 1; transform: translateY(-1px); }

/* ---------------------------------------------------------------- overlay */

.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  display: grid; place-items: center;
  padding: 30px;
}
.overlay__box { text-align: center; max-width: 320px; }
.overlay__icon { font-size: 46px; }
.overlay__box h2 { margin: 12px 0 8px; font-size: 19px; }
.overlay__box p { margin: 0 0 20px; color: var(--muted); }

.btn {
  border: 0; border-radius: 12px; cursor: pointer;
  padding: 13px 22px;
  font-size: 15px; font-weight: 600;
  background: var(--btn-bg); color: var(--btn-text);
  width: 100%;
}
.btn--coral { background: var(--coral); color: #fff; }

.skeleton {
  background: linear-gradient(90deg, rgba(127,127,127,.12), rgba(127,127,127,.2), rgba(127,127,127,.12));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius-sm);
  height: 14px; margin: 8px 0;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------- 2-кезең: roadmap */

.badges {
  display: flex; gap: 7px;
  margin-top: 13px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.badges::-webkit-scrollbar { display: none; }

.badge-chip {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 17px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .18);
  transition: transform .2s;
}
.badge-chip.is-locked { opacity: .3; filter: grayscale(1); }
.badge-chip.is-new { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 2px 0 12px;
}
.section-title { font-size: 17px; font-weight: 650; margin: 0; }
.link-btn {
  border: 0; background: none; cursor: pointer;
  color: var(--coral); font-size: 13.5px; font-weight: 600;
  padding: 4px 0;
}

.item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 14px 6px;
  margin-bottom: var(--gap);
  transition: box-shadow .25s;
}
.item.is-done { box-shadow: inset 0 0 0 1.5px rgba(249, 97, 103, .45); }

.item__head { display: flex; align-items: flex-start; gap: 8px; }
.item__title { font-weight: 650; font-size: 15.5px; flex: 1; }
.item__count {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  white-space: nowrap; padding-top: 2px;
}
.item__cat { font-size: 12px; color: var(--muted); margin-top: 1px; }

.item__track {
  height: 5px; border-radius: 999px;
  background: rgba(127, 127, 127, .18);
  margin: 10px 0 4px; overflow: hidden;
}
.item__fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--navy), var(--coral));
  transition: width .45s cubic-bezier(.22, .61, .36, 1);
}
body.dark .item__fill { background: linear-gradient(90deg, var(--gold), var(--coral)); }

.step {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid rgba(127, 127, 127, .12);
  cursor: pointer;
  user-select: none;
}
.step:last-child { border-bottom: 0; }

.step__box {
  flex: 0 0 21px; width: 21px; height: 21px;
  margin-top: 1px;
  border-radius: 7px;
  border: 2px solid rgba(127, 127, 127, .45);
  display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 700;
  transition: background .18s, border-color .18s, transform .18s;
}
.step.is-done .step__box {
  background: var(--coral); border-color: var(--coral);
  transform: scale(1.06);
}
.step.is-done .step__box::after { content: "✓"; }
.step.is-busy { opacity: .55; pointer-events: none; }

.step__text { flex: 1; font-size: 14.5px; line-height: 1.4; }
.step.is-done .step__text { color: var(--muted); text-decoration: line-through; }

/* --------------------------------------------------------------- confetti */

.confetti {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 40;
  overflow: hidden;
}
.confetti i {
  position: absolute; top: -12px;
  width: 8px; height: 13px; border-radius: 2px;
  animation: fall 1.25s cubic-bezier(.25, .5, .45, 1) forwards;
}
@keyframes fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 22px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 45;
  opacity: 0; transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast--gold { background: var(--gold); color: var(--navy); }

/* --------------------------------------------- 3-кезең: мүмкіндіктер */

.segmented {
  display: flex; gap: 4px;
  background: var(--surface);
  border-radius: 12px; padding: 4px;
  margin-bottom: 12px;
}
.seg {
  flex: 1; border: 0; cursor: pointer;
  background: none; color: var(--muted);
  font-size: 13.5px; font-weight: 600;
  padding: 9px 6px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: background .18s, color .18s;
}
.seg.is-active { background: var(--bg); color: var(--text); box-shadow: var(--shadow); }
.seg__count {
  font-size: 11px; font-weight: 700;
  background: var(--coral); color: #fff;
  border-radius: 999px; padding: 1px 6px; min-width: 18px;
}
.seg__count:empty { display: none; }

.filter-row {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding-bottom: 8px;
}
.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  flex: 0 0 auto; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 550;
  padding: 7px 13px; border-radius: 999px;
  background: var(--surface); color: var(--muted);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.filter-chip.is-active { background: var(--navy); color: #fff; }
body.dark .filter-chip.is-active { background: var(--gold); color: var(--navy); }

.opp {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: var(--gap);
}
.opp__top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.opp__type {
  font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(47, 60, 126, .1); color: var(--navy);
}
body.dark .opp__type { background: rgba(249, 231, 149, .16); color: var(--gold); }

.opp__deadline {
  font-size: 12px; font-weight: 650;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(127, 127, 127, .16); color: var(--muted);
  margin-left: auto;
}
.opp__deadline.is-urgent { background: rgba(249, 97, 103, .16); color: var(--coral); }

.opp__title { font-weight: 650; font-size: 15.5px; margin-bottom: 5px; }
.opp__desc { font-size: 14px; color: var(--muted); line-height: 1.42; }
.opp__meta { font-size: 12px; color: var(--muted); margin-top: 7px; }

.opp__actions { display: flex; gap: 8px; margin-top: 13px; }
.opp__btn {
  flex: 1; border: 0; cursor: pointer;
  padding: 10px; border-radius: 11px;
  font-size: 13.5px; font-weight: 600;
  background: var(--bg); color: var(--text);
  text-align: center; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: background .15s, color .15s;
}
.opp__btn.is-saved { background: var(--coral); color: #fff; }
.opp__btn.is-busy { opacity: .5; pointer-events: none; }

/* ------------------------------------------------ 4-кезең: лидерборд */

.lb-list { background: var(--surface); border-radius: var(--radius); padding: 4px 14px; }

.lb-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(127, 127, 127, .12);
}
.lb-row:last-child { border-bottom: 0; }

.lb-rank {
  flex: 0 0 30px; text-align: center;
  font-size: 14px; font-weight: 700; color: var(--muted);
}
.lb-rank.is-medal { font-size: 19px; }

.lb-ava {
  flex: 0 0 32px; width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(47, 60, 126, .12); color: var(--navy);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13.5px;
}
body.dark .lb-ava { background: rgba(249, 231, 149, .18); color: var(--gold); }

.lb-who { flex: 1; min-width: 0; }
.lb-name {
  font-weight: 600; font-size: 14.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-sub { font-size: 12px; color: var(--muted); }

.lb-xp { font-weight: 700; font-size: 14px; color: var(--navy); white-space: nowrap; }
body.dark .lb-xp { color: var(--gold); }

.lb-row.is-me { background: rgba(249, 97, 103, .09); border-radius: 10px; padding-inline: 8px; }
.lb-row.is-me .lb-name { color: var(--coral); }

.lb-me-card {
  margin-top: 12px;
  background: var(--navy); color: #fff;
  border-radius: var(--radius); padding: 4px 14px;
}
.lb-me-card .lb-rank, .lb-me-card .lb-sub { color: rgba(255, 255, 255, .7); }
.lb-me-card .lb-xp { color: var(--gold); }
.lb-me-card .lb-ava { background: var(--gold); color: var(--navy); }
.lb-me-card .lb-row { border-bottom: 0; }

.lb-note {
  text-align: center; font-size: 12px; color: var(--muted);
  margin-top: 12px;
}

/* ------------------------------------------- 5-кезең: study buddy */

/* Табтар көбейгенде жазу сыймай қалмауы үшін кішірейеді. */
.tabbar[data-tabs="6"] .tabbar__item { font-size: 10px; }
.tabbar[data-tabs="7"] .tabbar__item { font-size: 9.5px; letter-spacing: -.2px; }
.tabbar[data-tabs="7"] .tabbar__icon { font-size: 18px; }

.rules { padding: 6px 2px 20px; }
.rules__title { font-size: 19px; font-weight: 700; margin: 8px 0 4px; }
.rules__sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.rules__item {
  display: flex; gap: 10px;
  background: var(--surface);
  border-radius: 12px; padding: 12px 13px;
  margin-bottom: 8px;
  font-size: 14px; line-height: 1.45;
}

.form-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted);
  margin: 14px 0 7px;
}
.form-input, .form-select {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid rgba(127, 127, 127, .22);
  border-radius: 12px; padding: 11px 12px;
  font-size: 15px; font-family: inherit;
  background: var(--bg); color: var(--text);
  resize: vertical;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--coral); }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn-row { display: flex; gap: 8px; margin-top: 16px; }
.btn-secondary {
  background: var(--surface); color: var(--muted);
  border: 0; border-radius: 12px; padding: 13px 18px;
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap;   /* «Бас тарту» екі жолға сынбасын */
}

.buddy-card { background: var(--surface); border-radius: var(--radius); padding: 14px; margin-bottom: var(--gap); }
.buddy-card.is-mine { box-shadow: inset 0 0 0 1.5px rgba(249, 97, 103, .45); }
.buddy-card__who { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.buddy-card__ava {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(47, 60, 126, .12); color: var(--navy);
  display: grid; place-items: center; font-weight: 700;
}
body.dark .buddy-card__ava { background: rgba(249, 231, 149, .18); color: var(--gold); }
.buddy-card__name { font-weight: 650; font-size: 14.5px; }
.buddy-card__meta { font-size: 12px; color: var(--muted); }
.buddy-card__text { font-size: 14.5px; line-height: 1.45; margin-bottom: 10px; }
.buddy-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.buddy-card__actions { display: flex; gap: 8px; }
.buddy-report {
  border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 13px; padding: 10px 12px;
  border-radius: 11px;
}
.buddy-report:active { color: var(--coral); }


/* ======================================================= навигатор (орындар) */

.place {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: var(--gap);
}
.place__top { display: flex; align-items: flex-start; gap: 10px; }
.place__icon {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-size: 19px;
  background: rgba(47, 60, 126, .08);
}
body.dark .place__icon { background: rgba(255, 255, 255, .07); }
.place__who { flex: 1 1 auto; min-width: 0; }
.place__name {
  font-size: 15.5px; font-weight: 650; line-height: 1.25;
  overflow-wrap: anywhere;
}
.place__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Лайфхак — карточканың негізгі мәні, сондықтан бөлектеніп тұрады. */
.place__hack {
  margin-top: 10px; padding: 9px 11px;
  background: rgba(249, 231, 149, .28);
  border-radius: 12px;
  font-size: 13.5px; line-height: 1.4;
  overflow-wrap: anywhere;
}
body.dark .place__hack { background: rgba(249, 231, 149, .12); }

.place__actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.place__btn {
  border: 0; cursor: pointer; text-decoration: none;
  font-size: 13px; font-weight: 600;
  padding: 8px 13px; border-radius: 999px;
  background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; gap: 5px;
}
body.dark .place__btn { background: var(--gold); color: var(--navy); }
.place__btn.is-busy { opacity: .55; pointer-events: none; }

.place__vote {
  border: 0; cursor: pointer;
  font-size: 13px; font-weight: 600;
  padding: 8px 13px; border-radius: 999px;
  background: rgba(47, 60, 126, .08); color: var(--text);
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .15s, color .15s, transform .12s;
}
body.dark .place__vote { background: rgba(255, 255, 255, .07); }
.place__vote.is-voted { background: var(--coral); color: #fff; }
.place__vote.is-busy { opacity: .55; pointer-events: none; }
.place__vote:active { transform: scale(.94); }

.place__report {
  margin-left: auto;
  border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 12px; padding: 8px 2px;
}
.place__report:disabled { opacity: .5; cursor: default; }

.place__mine {
  font-size: 11px; font-weight: 600;
  color: var(--muted); margin-top: 6px;
}

/* Форманың ашылуы */
.place-form { margin-bottom: var(--gap); }
.place-form .form-hint { margin-bottom: 8px; }

/* ============================================================ маркет (заттар) */

/* Гридте екі баған: телефонда фото-карточка сол өлшемде жақсы оқылады. */
.market-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap);
}
@media (max-width: 340px) { .market-grid { grid-template-columns: 1fr; } }

.mi {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.mi__photo {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  background: rgba(127, 127, 127, .12);
  display: block;
}
.mi__nophoto {
  width: 100%; aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  background: rgba(127, 127, 127, .1);
  color: var(--muted); font-size: 12px;
}
.mi__body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mi__price {
  font-size: 13.5px; font-weight: 700; color: var(--navy);
}
body.dark .mi__price { color: var(--gold); }
.mi__price.is-free { color: var(--coral); }
.mi__title {
  font-size: 13.5px; font-weight: 600; line-height: 1.3;
  overflow-wrap: anywhere;
}
.mi__meta { font-size: 11.5px; color: var(--muted); }
.mi__desc {
  font-size: 12px; color: var(--muted); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.mi__actions { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.mi__btn {
  flex: 1 1 auto; text-align: center; text-decoration: none;
  border: 0; cursor: pointer;
  font-size: 12.5px; font-weight: 600;
  padding: 7px 10px; border-radius: 999px;
  background: var(--navy); color: #fff;
}
body.dark .mi__btn { background: var(--gold); color: var(--navy); }
.mi__btn--ghost { background: rgba(47, 60, 126, .08); color: var(--text); }
body.dark .mi__btn--ghost { background: rgba(255, 255, 255, .07); color: var(--text); }
.mi__btn:disabled, .mi__btn.is-busy { opacity: .55; pointer-events: none; }
.mi__report {
  border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 11.5px; padding: 6px 2px; width: 100%;
}
.mi__report:disabled { opacity: .5; }

/* Жабылған/бұғатталған зат — сұрланып тұрады */
.mi.is-closed .mi__photo, .mi.is-closed .mi__nophoto { filter: grayscale(1); opacity: .6; }
.mi__status {
  font-size: 11px; font-weight: 650; color: var(--muted);
}

/* Ережелер экраны — study buddy-дегі .rules стилін қайта қолданамыз */
.market-hint { font-size: 12.5px; color: var(--muted); margin-bottom: var(--gap); }

/* ------------------------------------------------- профильдегі бейджтер */

.badge-list { display: flex; flex-direction: column; gap: 2px; }
.badge-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 0;
}
.badge-item + .badge-item { border-top: 1px solid rgba(127, 127, 127, .12); }
.badge-item__icon {
  flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; font-size: 17px;
  background: rgba(249, 231, 149, .35);
}
body.dark .badge-item__icon { background: rgba(249, 231, 149, .15); }
.badge-item.is-locked .badge-item__icon {
  background: rgba(127, 127, 127, .12);
  filter: grayscale(1); opacity: .55;
}
.badge-item__who { flex: 1 1 auto; min-width: 0; }
.badge-item__title { font-size: 14px; font-weight: 600; }
.badge-item.is-locked .badge-item__title { color: var(--muted); font-weight: 550; }
.badge-item__hint { font-size: 12px; color: var(--muted); margin-top: 1px; }
.badge-item__mark { flex: 0 0 auto; font-size: 14px; }

/* Тақырып жанындағы бірнеше сілтеме-батырма */
.head-actions { display: flex; gap: 12px; align-items: center; }

/* Фото таңдау аймағы */
.photo-pick {
  display: block; cursor: pointer;
  border: 1.5px dashed rgba(127, 127, 127, .4);
  border-radius: 14px; padding: 18px 12px;
  text-align: center; color: var(--muted); font-size: 13px;
}
.photo-pick input { display: none; }
.photo-pick.is-set { border-style: solid; padding: 0; overflow: hidden; }
.photo-pick__img { width: 100%; max-height: 220px; object-fit: cover; display: block; }

/* «Тексеруде» белгісі */
.mi__pending {
  font-size: 11px; font-weight: 650; color: var(--navy);
  background: rgba(249, 231, 149, .5);
  padding: 3px 8px; border-radius: 999px; display: inline-block;
}
body.dark .mi__pending { background: rgba(249, 231, 149, .18); color: var(--gold); }
