/* ==========================================================================
   Telefon ichidagi ilova maketlari (HTML/CSS) — screenshot emas, qo'lda
   yig'ilgan, har qanday o'lchamda o'tkir va 10 tilga moslashgan ekranlar.
   Hamma o'lchamlar 280px kenglikdagi ekranga mo'ljallangan.
   ========================================================================== */

.m-screen {
  --g: #219c62;
  --gd: #17794c;
  --ink: #12201a;
  --mut: #6b7c73;
  --chip: #eaf0ec;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 12px 0;
  background: #f7f9f8;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
}
.m-screen * { box-sizing: border-box; }
.m-screen img { display: block; max-width: none; }

.m-bar { display: flex; align-items: center; gap: 8px; height: 26px; flex: none; }
.m-bar b { flex: 1; font-size: 13px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-back, .m-dot {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  background: var(--chip); display: grid; place-items: center; color: #2c3b33;
}
.m-back svg, .m-dot svg { width: 13px; height: 13px; }
.m-3d { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 3px 3px rgba(8, 14, 11, 0.25)); }

/* pastki navigatsiya */
.m-nav {
  margin: auto -4px 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 5px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 -2px 16px rgba(13, 20, 27, 0.12);
  flex: none;
}
.m-nav span { display: grid; place-items: center; height: 34px; border-radius: 15px; color: #6b7c73; }
.m-nav span svg { width: 17px; height: 17px; }
.m-nav .on { background: var(--g); color: #fff; }

/* umumiy bloklar */
.m-card { background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(13, 20, 27, 0.08); }
.m-ph { position: relative; overflow: hidden; background-size: cover; background-position: center; }
.m-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 12, 9, 0.78), rgba(6, 12, 9, 0) 62%); }
.m-ph > * { position: relative; z-index: 1; }
.m-meta { position: absolute !important; left: 10px; right: 10px; bottom: 8px; color: #fff; }
.m-meta strong { display: block; font-size: 13px; font-weight: 800; line-height: 1.15; }
.m-meta small { font-size: 9.5px; font-weight: 600; opacity: 0.92; }
.m-play {
  position: absolute !important; left: 50%; top: 42%; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; background: rgba(10, 16, 12, 0.45); border: 1.5px solid rgba(255, 255, 255, 0.9);
  display: grid; place-items: center; color: #fff;
}
.m-play svg { width: 14px; height: 14px; fill: currentColor; stroke: none; margin-left: 2px; }
.m-badge { display: inline-block; padding: 2px 7px; border-radius: 99px; background: var(--g); color: #fff; font-size: 7.5px; font-weight: 800; letter-spacing: 0.05em; margin-bottom: 3px; }
.m-heart { position: absolute !important; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(10, 16, 12, 0.4); color: #fff; display: grid; place-items: center; }
.m-heart svg { width: 13px; height: 13px; fill: #ff6b6b; stroke: #ff6b6b; }

.m-row { display: flex; gap: 8px; }
.m-row > * { flex: 1; min-width: 0; }
.m-mini { padding: 5px; }
.m-mini .m-ph { height: 72px; border-radius: 10px; }
.m-mini p { margin: 5px 2px 1px; font-weight: 700; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-mini small { margin: 0 2px; color: var(--mut); font-size: 8.5px; }
.m-star { color: #e8a317; }

.m-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 13px;
  background: var(--g); color: #fff; font-weight: 800; font-size: 11.5px; box-shadow: 0 4px 0 #115c39; flex: none;
}
.m-btn svg { width: 14px; height: 14px; }
.m-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 99px; background: var(--chip); font-size: 9px; font-weight: 700; color: #2c3b33; }
.m-line { height: 6px; border-radius: 4px; background: #dfe7e2; }
.m-line.s { width: 55%; }
.m-line.m { width: 78%; }
.m-line.g { background: var(--g); }

/* ---- 2 qidiruv ---- */
.m-search { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 12px; background: var(--chip); flex: none; }
.m-search > svg { width: 14px; height: 14px; color: #7b8b82; flex: none; }
.m-search img { width: 22px; height: 22px; margin-left: -2px; }
.m-ings { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; flex: none; }
.m-ing { aspect-ratio: 1; border-radius: 11px; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(13, 20, 27, 0.08); position: relative; }
.m-ing img { width: 78%; height: 78%; object-fit: contain; }
.m-ing.on { background: #dff3e8; box-shadow: 0 0 0 1.5px var(--g); }
.m-ing.on::after { content: "✓"; position: absolute; right: -3px; top: -4px; width: 13px; height: 13px; border-radius: 50%; background: var(--g); color: #fff; font-size: 8px; font-weight: 800; display: grid; place-items: center; }
.m-res { display: flex; align-items: center; gap: 8px; padding: 5px; }
.m-res .m-ph { width: 46px; height: 46px; border-radius: 10px; flex: none; }
.m-res .m-ph::after { display: none; }
.m-res div { flex: 1; min-width: 0; }
.m-res p { margin: 0 0 4px; font-weight: 700; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-res em { font-style: normal; flex: none; padding: 3px 7px; border-radius: 99px; background: #dff3e8; color: var(--gd); font-weight: 800; font-size: 9.5px; }

/* ---- 3 bugungi taklif ---- */
.m-big { height: 228px; border-radius: 18px; flex: none; box-shadow: 0 8px 18px rgba(13, 20, 27, 0.18); }
.m-dice { position: absolute !important; top: -8px; right: -6px; width: 70px; z-index: 3; filter: drop-shadow(0 8px 6px rgba(8, 14, 11, 0.35)); transform: rotate(14deg); }
.m-chiprow { display: flex; gap: 5px; flex: none; }

/* ---- 4 kaloriya ---- */
.m-cam { flex: 1; min-height: 200px; border-radius: 18px; }
.m-cam::before { content: ""; position: absolute; inset: 22px 26px; z-index: 2;
  background:
    linear-gradient(#fff, #fff) left top / 18px 2.5px no-repeat, linear-gradient(#fff, #fff) left top / 2.5px 18px no-repeat,
    linear-gradient(#fff, #fff) right top / 18px 2.5px no-repeat, linear-gradient(#fff, #fff) right top / 2.5px 18px no-repeat,
    linear-gradient(#fff, #fff) left bottom / 18px 2.5px no-repeat, linear-gradient(#fff, #fff) left bottom / 2.5px 18px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 18px 2.5px no-repeat, linear-gradient(#fff, #fff) right bottom / 2.5px 18px no-repeat; }
.m-scan { position: absolute !important; left: 26px; right: 26px; top: 58%; height: 2px; background: #5be39a; box-shadow: 0 0 12px 3px rgba(91, 227, 154, 0.8); z-index: 2; }
.m-kcal { display: flex; align-items: baseline; gap: 4px; }
.m-kcal b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--gd); }
.m-kcal span { font-size: 11px; font-weight: 700; color: var(--mut); }
.m-macro { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.m-macro div { text-align: center; font-size: 9px; color: var(--mut); font-weight: 600; }
.m-macro i { display: block; height: 5px; border-radius: 4px; margin: 4px 0 2px; }
.m-macro b { display: block; color: var(--ink); font-size: 11px; }

/* ---- 5 haftalik reja ---- */
.m-ai { display: flex; align-items: center; gap: 9px; padding: 11px; border-radius: 16px; background: linear-gradient(135deg, #9b6bff, #6b4de0); box-shadow: 0 4px 0 #4f37ad; color: #fff; flex: none; }
.m-ai img { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3)); }
.m-ai b { display: block; font-size: 12px; font-weight: 800; }
.m-ai .m-line { background: rgba(255, 255, 255, 0.45); margin-top: 5px; }
.m-day { padding: 7px 9px; display: flex; align-items: center; gap: 8px; }
.m-day > b { width: 24px; height: 24px; flex: none; border-radius: 50%; background: #dff3e8; color: var(--gd); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.m-day .m-ph { width: 44px; height: 38px; border-radius: 9px; flex: none; }
.m-day .m-ph::after { display: none; }
.m-day em { margin-left: auto; font-style: normal; font-weight: 800; color: var(--mut); font-size: 9.5px; white-space: nowrap; }
.m-swap { width: 20px; height: 20px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; color: #2c3b33; flex: none; }
.m-swap svg { width: 11px; height: 11px; }

/* ---- 6 xarajatlar ---- */
.m-stat { padding: 9px 10px; }
.m-stat small { color: var(--mut); font-size: 8.5px; font-weight: 600; }
.m-stat b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.m-stat b.up { color: #e0574f; }
.m-bars { display: flex; align-items: flex-end; gap: 6px; flex: 1; min-height: 100px; padding: 10px 12px 8px; }
.m-bars i { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(#ff8fbf, #ec5f9b); }
.m-bars i.d { background: #f6cfe0; }
.m-exp { display: flex; align-items: center; gap: 9px; padding: 7px 10px; }
.m-exp img { width: 26px; height: 26px; object-fit: contain; }
.m-exp .m-line { flex: 1; }
.m-exp b { font-weight: 800; font-size: 11px; }

/* ---- 7 AI chat ---- */
.m-msg { padding: 10px 11px; border-radius: 4px 14px 14px 14px; background: #ece9fb; display: flex; flex-direction: column; gap: 6px; max-width: 88%; }
.m-msg.me { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: var(--g); }
.m-msg.me .m-line { background: rgba(255, 255, 255, 0.6); }
.m-msg .m-line { background: #cdc6f0; }
.m-mealcard { display: flex; gap: 8px; align-items: center; padding: 5px; border-radius: 11px; background: #fff; }
.m-mealcard .m-ph { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.m-mealcard .m-ph::after { display: none; }
.m-mealcard b { font-size: 10px; display: block; }
.m-mealcard small { color: var(--gd); font-weight: 800; font-size: 11px; }
.m-input { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 5px 0 12px; border-radius: 13px; background: var(--chip); flex: none; }
.m-input .m-line { flex: 1; background: #cfd9d3; }
.m-send { width: 28px; height: 28px; border-radius: 50%; background: #8d63f2; color: #fff; display: grid; place-items: center; }
.m-send svg { width: 13px; height: 13px; }

/* ---- 8 retsept ---- */
.m-rh { height: 132px; border-radius: 16px; flex: none; margin: 0 -2px; }
.m-stars { color: #e8a317; letter-spacing: 1px; font-size: 10px; }
.m-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.m-trio div { padding: 7px 4px; border-radius: 12px; background: #fff; text-align: center; box-shadow: 0 2px 8px rgba(13, 20, 27, 0.07); font-weight: 800; font-size: 11px; }
.m-trio small { display: block; color: var(--mut); font-size: 8px; font-weight: 600; }
.m-step { display: flex; align-items: center; justify-content: space-between; }
.m-step b { font-size: 12px; font-weight: 800; }
.m-stepper { display: inline-flex; align-items: center; gap: 10px; padding: 3px 8px; border-radius: 99px; background: var(--chip); font-weight: 800; font-size: 12px; }
.m-ingr { display: flex; align-items: center; gap: 8px; padding: 4px 2px; }
.m-ingr img { width: 26px; height: 26px; object-fit: contain; }
.m-ingr .m-line { flex: 1; }
.m-ingr b { font-size: 10px; font-weight: 800; }
.m-eat { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.m-eat div { padding: 7px 9px; border-radius: 12px; font-size: 9px; font-weight: 700; }
.m-eat b { display: block; font-size: 11.5px; }
.m-eat .a { background: #fdeccf; color: #8a5a06; }
.m-eat .c { background: #d3f1ec; color: #0d6f66; }

/* ---- 9 kitoblar ---- */
.m-books { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.m-cover { position: relative; aspect-ratio: 0.72; border-radius: 4px 9px 9px 4px; box-shadow: 4px 6px 12px rgba(13, 20, 27, 0.22), inset 3px 0 0 rgba(0, 0, 0, 0.14); overflow: hidden; }
.m-cover::before { content: ""; position: absolute; inset: 9px 9px 9px 12px; border: 1.5px solid rgba(255, 255, 255, 0.55); border-radius: 2px; }
.m-cover i { position: absolute; left: 50%; top: 40%; width: 34px; height: 34px; margin: -17px 0 0 -14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18); }
.m-cover span { position: absolute; left: 18px; right: 12px; bottom: 16px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.75); box-shadow: 0 8px 0 -0.5px rgba(255, 255, 255, 0.45); }
.m-cap .m-line { margin-top: 5px; }

/* ---- 10 maqsad ---- */
.m-goal { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: linear-gradient(135deg, #2fc77b, #17935a); box-shadow: 0 5px 0 #11703f; color: #fff; flex: none; }
.m-ring { position: relative; width: 84px; height: 84px; flex: none; }
.m-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-linecap: round; }
.m-ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.m-ring b { font-size: 17px; font-weight: 800; }
.m-ring small { font-size: 8px; opacity: 0.9; }
.m-goal p { margin: 0; font-size: 9.5px; opacity: 0.95; }
.m-goal strong { display: block; font-size: 13px; font-weight: 800; margin-bottom: 3px; }
.m-prog { height: 6px; border-radius: 4px; background: #e3ebe6; overflow: hidden; margin-top: 6px; }
.m-prog i { display: block; height: 100%; border-radius: 4px; }
.m-tile2 { display: flex; align-items: center; gap: 8px; padding: 9px 10px; }
.m-tile2 img { width: 30px; height: 34px; object-fit: contain; flex: none; }
.m-tile2 > div { flex: 1; min-width: 0; }
.m-tile2 b { font-size: 11.5px; font-weight: 800; }
.m-prem { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 16px; background: linear-gradient(135deg, #f6b650, #e0901d); box-shadow: 0 4px 0 #b8741a; color: #fff; flex: none; }
.m-prem img { width: 40px; height: 34px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3)); }
.m-prem b { font-size: 12.5px; font-weight: 800; }
.m-prem .m-line { background: rgba(255, 255, 255, 0.55); margin-top: 5px; }

/* ---- 11 til va mavzu ---- */
.m-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.m-lang { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: #fff; box-shadow: 0 1px 5px rgba(13, 20, 27, 0.07); font-weight: 600; font-size: 9.5px; white-space: nowrap; overflow: hidden; }
.m-lang code { flex: none; font: 800 8px/1 "Poppins", sans-serif; padding: 3px 4px; border-radius: 5px; background: var(--chip); color: #2c3b33; }
.m-lang.on { background: var(--g); color: #fff; }
.m-lang.on code { background: rgba(255, 255, 255, 0.25); color: #fff; }
.m-seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 12px; background: var(--chip); gap: 3px; }
.m-seg span { height: 26px; border-radius: 9px; display: grid; place-items: center; color: #5a6b62; }
.m-seg span svg { width: 15px; height: 15px; }
.m-seg .on { background: #fff; color: var(--gd); box-shadow: 0 2px 6px rgba(13, 20, 27, 0.15); }
.m-rem { display: flex; align-items: center; gap: 9px; padding: 9px 11px; }
.m-rem img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.m-rem > div { flex: 1; }
.m-rem b { font-size: 11px; font-weight: 800; display: block; }
.m-rem small { color: var(--mut); font-size: 9px; }
.m-tog { width: 34px; height: 20px; border-radius: 99px; background: var(--g); position: relative; flex: none; }
.m-tog::after { content: ""; position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }

/* ---- hero maketi: barcha funksiyalar plitalari ---- */
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; flex: none; }
.app-mini {
  display: flex; align-items: center; gap: 7px; padding: 10px 10px; min-width: 0;
  border-radius: 15px; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1.15;
}
.app-mini img { width: 32px; height: 32px; flex: none; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.28)); }
.app-mini span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-mini.g { background: linear-gradient(135deg, #2fc77b, #17935a); box-shadow: 0 3px 0 #11703f; }
.app-mini.a { background: linear-gradient(135deg, #f6b650, #e0901d); box-shadow: 0 3px 0 #b8741a; }
.app-mini.t { background: linear-gradient(135deg, #2cd0c2, #13998f); box-shadow: 0 3px 0 #0d6f66; }
.app-mini.p { background: linear-gradient(135deg, #f58ab7, #e2518d); box-shadow: 0 3px 0 #ae3a69; }
.app-mini.v { grid-column: 1 / -1; background: linear-gradient(135deg, #9b6bff, #6b4de0); box-shadow: 0 3px 0 #4f37ad; }

/* Telefonda plitka tor — ikonka matn ustiga chiqadi, so'zlar kesilmaydi */
@media (max-width: 760px) {
  .app-mini:not(.v) { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px 9px; text-align: left; }
  .app-mini:not(.v) img { width: 26px; height: 26px; }
  .app-mini span { overflow-wrap: anywhere; }
  /* Balandlik kontentga moslashadi — pastki menyu ekrandan chiqib ketmaydi */
  .phone { height: auto; }
  .phone-screen { height: auto; }
  .app-hero-card { height: 124px; }
}
