@import url('https://fonts.googleapis.com/css2?family=Coiny&family=Montserrat+Alternates:wght@400;500;600;700;800;900&display=swap');

:root{
  --primary:#3CB39D;
  --mint:#91DACC;
  --bg:#fff7f2;
  --text:#1f2937;
  --muted:#6b7280;
  --font-main: "Montserrat Alternates", system-ui, -apple-system, sans-serif;
  --font-display: "Coiny", cursive;
}

body{
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-main);
}

/* Global font override — all pages use Montserrat Alternates */
body, input, textarea, select, button {
  font-family: var(--font-main);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
}

/* v2 helpers */
.v2-container{
  max-width: 1100px;
}

.v2-hero{
  background: #fff7f2;
  border-radius: 18px;
  padding: 46px 26px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 16px 36px rgba(0,0,0,0.06);
}

.v2-card{
  border-radius: 16px;
  border: 1px solid rgba(60,179,157,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  background: #fff;
}

.v2-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(60,179,157,0.2);
  background: rgba(145,218,204,0.12);
  color: #0f766e;
}

.v2-btn{
  background: var(--primary);
  border: none;
}
.v2-btn:hover{ filter: brightness(0.97); }

/* Background helper (from figma) */
.v2-paragraph-bg{
  background-image: url("/static/v2/assets/paragraph-bg-shadow.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Navbar tweaks */
.navbar .nav-link{
  font-weight: 700;
  color: rgba(15, 118, 110, 0.75);
}
.navbar .nav-link:hover{ color: rgba(15,118,110,1); }

/* Index hero (close to figma header block) */
.v2-hero-title{
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.v2-hero-subtitle{
  color: rgba(31,41,55,0.65);
  font-weight: 600;
}
.v2-btn-secondary{
  background: rgba(145,218,204,0.35);
  color: rgba(15,118,110,0.95);
  border: 1px solid rgba(60,179,157,0.25);
}
.v2-btn-secondary:hover{ filter: brightness(0.98); }

/* About card decorations (approximate to figma pills) */
.v2-about-card{
  background: rgba(255,247,242,0.75);
}
.v2-about-pill{
  position:absolute;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  color: rgba(15,118,110,0.95);
  background: rgba(145,218,204,0.25);
  border: 1px solid rgba(60,179,157,0.25);
}
.v2-about-pill-left{ left: 6px; top: 8px; transform: rotate(-6deg); }
.v2-about-pill-right{ right: 6px; top: 8px; transform: rotate(6deg); }
.v2-about-pill-bottom{ left: 12px; bottom: -14px; transform: rotate(-3deg); }

/* Analyze page ribbons (approximation) */
.v2-ribbon-card{
  position: relative;
  overflow: hidden;
}
.v2-ribbon-card::before,
.v2-ribbon-card::after{
  content:"";
  position:absolute;
  left:-20%;
  right:-20%;
  height:34px;
  opacity:0.65;
  transform: rotate(-6deg);
  top: 18px;
  background: linear-gradient(90deg, rgba(145,218,204,0.85), rgba(145,218,204,0.15));
}
.v2-ribbon-card::after{
  top: 44px;
  transform: rotate(5deg);
  background: linear-gradient(90deg, rgba(255,176,122,0.65), rgba(255,176,122,0.10));
}

/* Problems strip — salmon/peach (matches design) */
.v2-problems-block{
  background: rgba(255, 195, 165, 0.22);
  border-radius: 16px;
  border: 2px solid rgba(240, 140, 100, 0.28);
  padding: 18px;
}
.v2-problem-tiles{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap: 10px;
}
.v2-problem-tile{
  width: 110px;
  height: 86px;
  border-radius: 14px;
  background: rgba(255, 210, 185, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  font-weight: 800;
  color: rgba(170, 55, 20, 0.88);
  text-align: center;
  padding: 8px;
  font-size: 12px;
  border: 2px solid rgba(240, 140, 100, 0.45);
}
.v2-problem-tile--inactive {
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.28);
  border-color: rgba(0,0,0,0.07);
  box-shadow: none;
}
.v2-problem-exclaim {
  height: 22px;
  width: auto;
  flex-shrink: 0;
}
.v2-problem-label{
  letter-spacing: 0.02em;
  text-transform: lowercase;
  font-family: "Coiny", cursive;
}

/* Advice block */
.v2-advice-wrap{
  background: rgba(145,218,204,0.22);
  border-radius: 18px;
  border: 1px solid rgba(60,179,157,0.18);
  padding: 18px;
}
.v2-advice-grid{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.v2-advice-card{
  flex: 0 0 calc(33.33% - 10px);
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  border: 2px solid rgba(60,179,157,0.35);
  padding: 16px 14px;
  min-height: 92px;
  display:flex;
  flex-direction: column;
  gap: 6px;
  align-items:center;
  justify-content:center;
  text-align:center;
}
@media (max-width: 700px){
  .v2-advice-card { flex: 0 0 calc(50% - 8px); }
}
@media (max-width: 480px){
  .v2-advice-card { flex: 0 0 100%; }
}
.v2-advice-title{
  font-weight: 900;
  color: rgba(15,118,110,0.95);
}
.v2-advice-text{
  color: rgba(31,41,55,0.75);
  font-weight: 700;
  font-size: 14px;
}

/* Analyze v2: product cards (close to figma blocks) */
.v2-section-title{
  font-weight: 800;
  color: #0f766e;
}

.v2-products-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.v2-product-card{
  border-radius: 18px;
  background: #FAF5EF;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  padding: 14px 14px 14px 14px;
  display: block;
  transition: box-shadow .15s;
}
.v2-product-card:hover{
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
}
.v2-product-top{
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 14px;
  align-items: center;
}
.v2-product-img-wrap{
  width: 110px;
  height: 96px;
  background: #EDE9E3;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.v2-product-img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}
.v2-modal-full-ingredients{
  font-size: 12px;
  color: rgba(31,41,55,0.7);
  margin: 8px 0 12px;
  line-height: 1.35;
}
.v2-modal-description{
  font-size: 13px;
  color: #333;
  line-height: 1.55;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fafafa;
  border-radius: 10px;
  border-left: 3px solid rgba(60,179,157,0.4);
}
.v2-modal-text{
  font-size: 13px;
  color: #444;
  line-height: 1.55;
}
.v2-modal-attrs-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
.v2-modal-attr-row{
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  background: #f8f8f8;
  border-radius: 8px;
  font-size: 12px;
}
.v2-modal-attr-key{
  color: #999;
  font-weight: 600;
  text-transform: lowercase;
  margin-bottom: 2px;
}
.v2-modal-attr-val{
  color: #222;
  font-weight: 700;
}
.v2-product-name{
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.25;
  color: #0f766e;
  margin-bottom: 8px;
}
.v2-product-meta{ text-align: left; }

/* New card name layout */
.v2-product-rank-name{
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 6px;
  color: #1a1a2e;
}
.v2-rank-tag{
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  margin-right: 4px;
}
.v2-product-brand{
  font-weight: 800;
  color: #1a1a2e;
  margin-right: 4px;
}
.v2-product-title-text{
  font-weight: 500;
  color: #3a3a3a;
}
.v2-product-priority-score{
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}
.v2-product-priority-score span{
  font-weight: 800;
  color: var(--primary);
}
.v2-product-accent{
  width: 40px;
  height: 40px;
  background: #D4ED3A;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  align-self: flex-start;
  margin-top: 2px;
  overflow: hidden;
}
.v2-product-accent--link{
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}
.v2-product-accent--link:hover{
  opacity: .85;
  transform: scale(1.08);
}
.v2-ga-icon{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.v2-ga-icon-sm{
  width: 16px;
  height: 16px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.v2-product-link--ga{
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.v2-products-shell{
  border-radius: 18px;
  border: 2px solid rgba(60,179,157,0.35);
  padding: 18px;
  max-height: 640px;
  overflow: auto;
}
.v2-products-header{
  text-align:center;
  color: rgba(15,118,110,0.95);
  font-weight: 900;
}
.v2-dots{
  display:flex;
  gap:6px;
  justify-content:center;
  margin-top: 6px;
  margin-bottom: 10px;
}
.v2-dot{
  width:6px; height:6px; border-radius:999px;
  background: rgba(15,118,110,0.30);
}
.v2-dot.active{ background: rgba(15,118,110,0.80); }
/* ── Product search bar ─────────────────────────────────────────────────── */
.v2-search-wrap {
  position: relative;
  margin-bottom: 10px;
}
.v2-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #9ca3af;
  pointer-events: none;
  line-height: 1;
}
.v2-product-search {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1.5px solid #e0d8d0;
  border-radius: 999px;
  font-size: 14px;
  color: #333;
  background: #fafaf9;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.v2-product-search:focus {
  border-color: rgba(15,118,110,0.5);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.08);
  background: #fff;
}
.v2-product-search::placeholder { color: #b5aca4; }

.v2-products-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.v2-products-filter{
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(145,218,204,0.18);
  border: 1px solid rgba(60,179,157,0.25);
  padding: 6px 10px;
  border-radius: 999px;
}
.v2-products-filter label{
  font-weight: 700;
  color: #0f766e;
  font-size: 12px;
}
.v2-products-filter select{
  border: none;
  background: transparent;
  font-weight: 800;
  color: #0f766e;
  font-size: 12px;
  min-width: 180px;
  max-width: 240px;
  padding: 6px 8px;
}
.v2-products-filter select[multiple]{
  background: #fff;
  border: 1px solid rgba(60,179,157,0.25);
  border-radius: 12px;
}
.v2-multi-select{
  position: relative;
}
.v2-multi-trigger{
  border: 1px solid rgba(60,179,157,0.35);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f766e;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.v2-multi-caret{
  font-size: 12px;
}
.v2-multi-panel{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  max-width: 320px;
  background: #fff;
  border: 1px solid rgba(60,179,157,0.25);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.08);
  padding: 10px;
  z-index: 5;
  display: none;
}
.v2-multi-panel.open{
  display: block;
}
.v2-multi-option{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.v2-multi-option:hover{
  background: rgba(145,218,204,0.18);
}
.v2-multi-option input{
  accent-color: #3cb39d;
}
.v2-products-page{
  display: flex;
  align-items: center;
  gap: 8px;
}
.v2-products-page button{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(60,179,157,0.35);
  background: #fff;
  color: #0f766e;
  font-weight: 900;
  cursor: pointer;
}
.v2-products-page button:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}
#v2-page-info{
  font-size: 12px;
  color: #6b7280;
  font-weight: 700;
}
.v2-products-toggle{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(145,218,204,0.18);
  border: 1px solid rgba(60,179,157,0.25);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  color: #0f766e;
  font-size: 12px;
  cursor: pointer;
}
.v2-products-toggle input{
  accent-color: #3cb39d;
}
.v2-product-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.v2-problem-chip{
  display: inline-flex;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(145,218,204,0.18);
  border: 1px solid rgba(60,179,157,0.25);
  color: #0f766e;
  font-weight: 700;
}
.v2-product-rank{
  font-size: 12px;
  color: rgba(15,118,110,0.65);
  font-weight: 800;
  margin-bottom: 6px;
}

/* Ingredient scorer badges */
.v2-scorer-badge{
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}
.v2-scorer-priority    { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.v2-scorer-recommended { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.v2-scorer-neutral     { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }
.v2-scorer-caution     { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.v2-scorer-avoid       { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.v2-scorer-blocked     { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.v2-scorer-note{
  font-size: 11px;
  margin-bottom: 4px;
  line-height: 1.4;
}
.v2-scorer-note--warn{ color: #9a3412; }
.v2-scorer-note--good{ color: #065f46; }
.v2-product-link{
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.v2-product-link:hover{ text-decoration: underline; }
.v2-analyze-composition-btn{
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(15,118,110,0.07);
  border: 1px solid rgba(15,118,110,0.25);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.v2-analyze-composition-btn:hover{ background: rgba(15,118,110,0.15); }

.v2-pill-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.v2-ingredient-pill{
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(120, 160, 210, 0.22);
  border: 2px solid rgba(64, 116, 185, 0.45);
  color: #1f4f99;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.v2-ingredient-pill.excluded{
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.55);
  color: rgba(185, 28, 28, 1);
  text-decoration: line-through;
}

/* Modal (products) */
.v2-modal{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.50);
  z-index: 3000;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
}
.v2-modal-content{
  width: min(680px, 100%);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  border: 1.5px solid #E8E1D9;
  position: relative;
  margin: auto;
}
.v2-modal-header{
  padding: 18px 18px 0 18px;
  position: relative;
  background: #fff;
}
.v2-modal-close{
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: #F0ECE6;
  color: #555;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.v2-modal-close:hover{ background: #E4DDD5; }

/* Modal top: image left + info right */
.v2-modal-top{
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 52px 14px 18px; /* right padding for close button */
}
.v2-modal-image{
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 14px;
  background: #EDE9E3;
  flex-shrink: 0;
}
.v2-modal-top-info{
  flex: 1;
  min-width: 0;
}
.v2-modal-title{
  font-weight: 800;
  font-size: 15px;
  color: #1a1a2e;
  line-height: 1.3;
  margin-bottom: 8px;
  margin-right: 36px;
}
.v2-modal-category-tag{
  display: inline-block;
  background: #F0ECE6;
  color: #5a4a3a;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Modal body */
.v2-modal-body{
  padding: 0 18px 20px 18px;
  max-height: 72vh;
  overflow: auto;
}
.v2-modal-section{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #F0ECE6;
}
.v2-modal-section:first-child{ border-top: none; padding-top: 0; }
.v2-modal-section-title{
  font-weight: 800;
  font-size: 13.5px;
  color: #1a1a2e;
  margin-bottom: 10px;
}

/* How-to-use numbered steps */
.v2-how-step{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
  margin-bottom: 6px;
}
.v2-how-num{
  font-weight: 800;
  color: var(--primary);
  font-size: 13px;
  flex-shrink: 0;
  min-width: 18px;
}

/* "Мой уход" add row */
.v2-modal-add-row{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.v2-modal-freq-select{
  border: 1.5px solid #E0D8D0;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  background: #FAF5EF;
  cursor: pointer;
  min-width: 160px;
  font-family: var(--font-main);
}
.v2-modal-freq-select:focus{
  outline: none;
  border-color: var(--primary);
}
.v2-modal-add-btn{
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  font-family: var(--font-main);
}
.v2-modal-add-btn:hover{ filter: brightness(0.95); }
.v2-modal-add-btn:disabled{ opacity: 0.6; cursor: not-allowed; }
.v2-modal-notes{
  width: 100%;
  margin-top: 8px;
  border: 1.5px solid #E0D8D0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: #555;
  background: #FAF5EF;
  resize: none;
  font-family: var(--font-main);
}
.v2-modal-notes:focus{ outline: none; border-color: var(--primary); }

/* "Решает проблемы" 2-column grid */
.v2-modal-problems-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
.v2-modal-problem-item{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #1a1a2e;
  font-weight: 600;
}
.v2-modal-problem-item::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* Характеристики grid */
.v2-modal-attrs-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.v2-modal-attr-row{
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  background: #F8F4EF;
  border-radius: 10px;
  font-size: 12px;
}
.v2-modal-attr-key{
  color: #9ca3af;
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 11px;
}
.v2-modal-attr-val{
  color: #1a1a2e;
  font-weight: 700;
  font-size: 12.5px;
}

/* Description / Состав / Предостережения */
.v2-modal-description{
  font-size: 13px;
  color: #444;
  line-height: 1.6;
}
.v2-modal-text{
  font-size: 13px;
  color: #444;
  line-height: 1.55;
}
.v2-modal-full-ingredients{
  font-size: 11.5px;
  color: rgba(31,41,55,0.6);
  line-height: 1.5;
}

/* Ingredient pills */
.v2-modal-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.v2-modal-chip{
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(145,218,204,0.18);
  border: 1px solid rgba(60,179,157,0.25);
  font-weight: 700;
  color: rgba(15,118,110,0.95);
  font-size: 12px;
}
.v2-modal-group{ margin-bottom: 10px; }
.v2-modal-group-title{
  font-weight: 800;
  color: #1f4f99;
  font-size: 12px;
  margin-bottom: 6px;
}
.v2-modal-ingredient{
  display:inline-block;
  margin: 0 6px 6px 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(60,179,157,0.10);
  border: 1px solid rgba(60,179,157,0.25);
  font-weight: 700;
  color: rgba(15,118,110,0.95);
  font-size: 12px;
}

/* Consent modal + loading overlay */
.v2-consent-modal{
  display:none;
  position: fixed;
  inset:0;
  background: rgba(0,0,0,0.45);
  z-index: 4000;
  padding: 18px;
}
.v2-consent-content{
  max-width: 560px;
  margin: 8vh auto 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}
.v2-consent-header{
  background: linear-gradient(135deg, rgba(60,179,157,1), rgba(46,139,87,1));
  color:#fff;
  padding: 16px 18px;
  text-align:center;
}
.v2-consent-body{ padding: 18px; }
.v2-consent-checkbox{
  display:flex;
  gap: 10px;
  padding: 12px;
  background: rgba(145,218,204,0.12);
  border-radius: 12px;
  border: 1px solid rgba(60,179,157,0.18);
  margin-bottom: 12px;
}
.v2-consent-checkbox input{ margin-top: 4px; }
.v2-consent-checkbox label{ color: rgba(31,41,55,0.8); font-weight: 600; }

/* ─── Loading / Finished overlays (redesigned to match Figma) ─── */
.v2-loading,
.v2-finished {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.30);
  z-index: 5000;
  place-items: center;
}

.v2-loading-card,
.v2-finished-card {
  width: min(480px, 90vw);
  border-radius: 28px;
  background: #fff7f2;
  padding: 52px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.22);
}

/* Diagonal teal band inside card */
.v2-loading-card::before,
.v2-finished-card::before {
  content: '';
  position: absolute;
  width: 170%;
  height: 38px;
  background: rgba(145, 218, 204, 0.52);
  border-radius: 19px;
  top: 28%;
  left: -35%;
  transform: rotate(-7deg);
  pointer-events: none;
}
/* Diagonal orange band */
.v2-loading-card::after,
.v2-finished-card::after {
  content: '';
  position: absolute;
  width: 170%;
  height: 26px;
  background: rgba(255, 176, 122, 0.44);
  border-radius: 13px;
  bottom: 22%;
  left: -35%;
  transform: rotate(8deg);
  pointer-events: none;
}

.v2-loading-inner,
.v2-finished-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Sun-rays spinner (replaces CSS ring) */
.v2-rays-spinner {
  width: 68px;
  height: 68px;
  animation: v2-rays-spin 1.4s linear infinite;
  filter: drop-shadow(0 0 6px rgba(60,179,157,0.30));
}
@keyframes v2-rays-spin { to { transform: rotate(360deg); } }

.v2-loading-title {
  font-weight: 900;
  color: #3cb39d;
  font-size: clamp(19px, 2.4vw, 26px);
  font-family: "Montserrat Alternates", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

/* Signature illustration */
.v2-finished-icon {
  width: auto;
  height: 120px;
  filter: drop-shadow(0 4px 10px rgba(60,179,157,0.22));
}
.v2-finished-title {
  font-weight: 900;
  color: #3cb39d;
  font-size: clamp(17px, 2.2vw, 24px);
  font-family: "Montserrat Alternates", system-ui, sans-serif;
  max-width: 300px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.v2-finished-inner {
  animation: v2-fade-up 0.35s ease forwards;
}
@keyframes v2-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modal image override — keep contain quality, respect new compact size */
.v2-modal-image {
  object-fit: contain !important;
}

/* Custom tooltip for modal ingredients (desktop hover + mobile tap) */
.v2-has-tooltip {
  position: relative;
  cursor: help;
}
.v2-has-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background: rgba(15, 25, 40, 0.93);
  color: #fff;
  font-size: 11px;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
  z-index: 200;
  white-space: normal;
  text-align: left;
}
.v2-has-tooltip:hover::after,
.v2-has-tooltip.tip-open::after {
  opacity: 1;
}
@media (max-width: 768px) {
  .v2-has-tooltip::after {
    left: 0;
    transform: none;
    width: 180px;
  }
}

/* Ingredient pills: interactive affordance */
.v2-ingredient-pill {
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.v2-ingredient-pill:hover:not(.excluded) {
  transform: translateY(-2px);
  background: rgba(120, 160, 210, 0.38);
  box-shadow: 0 4px 12px rgba(64, 116, 185, 0.22);
}
.v2-ingredient-pill:active { transform: translateY(0); }
.v2-ingredient-pill.excluded { opacity: 0.75; }

/* Photo lightbox overlay */
.v2-photo-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9000;
  overflow: hidden;
}
.v2-photo-lightbox.open { display: block; }
.v2-photo-lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  line-height: 1;
}
.v2-photo-lb-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

/* Collapsible card sections (details/summary) */
details.v2-card > summary {
  list-style: none;
  outline: none;
}
details.v2-card > summary::-webkit-details-marker { display: none; }

.v2-collapsible-summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
}
.v2-collapsible-summary::-webkit-details-marker { display: none; }

.v2-chevron {
  font-size: 18px;
  color: #9ca3af;
  transition: transform 150ms ease;
  display: inline-block;
  flex-shrink: 0;
  font-style: normal;
  line-height: 1;
}
details[open] > summary .v2-chevron {
  transform: rotate(90deg);
}
details.v2-card > summary + * {
  margin-top: 12px;
}

/* ─── Hero wavy background SVG ─── */
.v2-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  border-radius: inherit;
}

/* ─── Hero diagonal deco bands (main page) ─── */
.v2-hero-deco {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.v2-hero-deco-band {
  position: absolute;
  width: 170%;
  left: -35%;
  border-radius: 22px;
}
.v2-hero-deco-band-teal {
  height: 44px;
  background: rgba(145, 218, 204, 0.50);
  top: 26%;
  transform: rotate(-8deg);
}
.v2-hero-deco-band-orange {
  height: 28px;
  background: rgba(255, 176, 122, 0.40);
  top: 54%;
  transform: rotate(5deg);
}
.v2-hero-deco-band-teal2 {
  height: 18px;
  background: rgba(145, 218, 204, 0.28);
  bottom: 18%;
  transform: rotate(-11deg);
}

/* ─── Analysis page hero with repeating-text ribbon ─── */
.v2-analysis-hero {
  background: #fff7f2;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  padding: 38px 24px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.v2-analysis-hero::before {
  content: 'результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты ·';
  position: absolute;
  font-size: 8px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(60, 179, 157, 0.42);
  white-space: nowrap;
  width: 100%;
  left: 0;
  top: 0;
  transform: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
  padding: 6px 0;
  display: block;
  text-align: center;
}
.v2-analysis-hero::after {
  content: 'результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты · результаты ·';
  position: absolute;
  font-size: 8px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 176, 122, 0.48);
  white-space: nowrap;
  width: 100%;
  left: 0;
  bottom: 0;
  transform: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
  padding: 6px 0;
  display: block;
  text-align: center;
}

/* ─── "Проанализировать другое" big button ─── */
.v2-analyze-another-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3cb39d;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 999px;
  padding: 17px 42px;
  font-weight: 900;
  font-size: clamp(15px, 1.6vw, 18px);
  letter-spacing: -0.01em;
  box-shadow: 0 10px 28px rgba(60, 179, 157, 0.38);
  transition: filter 140ms ease, transform 140ms ease;
  font-family: "Montserrat Alternates", system-ui, sans-serif;
}
.v2-analyze-another-btn:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
}
.v2-analyze-another-btn:active {
  transform: translateY(0);
}

/* ─── Support section (Figma-accurate) ─── */
.v2-support-section {
  width: min(1308px, calc(100% - 48px));
  margin: 0 auto 40px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
}

/* Two columns: form | heading+contacts+tube */
.v2-support-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 424px;
}

/* ── Left: outer teal card ── */
.v2-support-form-outer {
  background: #91DACC;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

/* Inner frosted darker-teal card */
.v2-support-form-inner {
  background: rgba(60,179,157,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 32px 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Title: "Форма\nобратной связи" */
.v2-support-form-title {
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 24px;
  line-height: 1.3;
  color: #fff;
  text-align: center;
  margin-bottom: 4px;
}
.v2-sft-bold  { font-weight: 800; }
.v2-sft-reg   { font-weight: 400; }

/* Inputs */
.v2-sf-field { display: flex; flex-direction: column; }
.v2-sf-input,
.v2-sf-textarea {
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 14px;
  background: #91DACC;
  border: 1.5px solid #3CB39D;
  border-radius: 20px;
  padding: 0 18px;
  height: 62px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  color: #1a3a34;
  transition: border-color 0.18s;
}
.v2-sf-input::placeholder,
.v2-sf-textarea::placeholder {
  color: rgba(8,21,28,0.45);
  font-size: 13px;
  text-align: center;
}
.v2-sf-input:focus,
.v2-sf-textarea:focus {
  border-color: #2a9b85;
}
.v2-sf-textarea {
  height: 126px;
  padding-top: 18px;
  resize: none;
}

/* Submit button */
.v2-sf-btn-row {
  display: flex;
  justify-content: center;
}
.v2-sf-btn {
  background: #FFB280;
  color: #fff;
  font-family: "Montserrat Alternates", sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 17px;
  height: 33px;
  width: 196px;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}
.v2-sf-btn:hover { background: #ff9855; transform: scale(1.03); }

.v2-sf-ok {
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

/* ── Right column: heading top, then contacts + tube side-by-side ── */
.v2-support-right {
  padding: 32px 28px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

.v2-support-heading {
  font-family: "Montserrat Alternates", sans-serif;
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 800;
  color: #3CB39D;
  margin: 0;
  line-height: 1.2;
}

/* Row: contacts box on left, tube on right */
.v2-support-right-body {
  display: flex;
  align-items: flex-end;
  gap: 0;
  flex: 1;
}

.v2-support-contacts {
  background: #fff;
  border: 1px solid #e8f4f2;
  border-radius: 12px;
  padding: 18px 22px;
  flex: 1;
  min-width: 0;
  box-shadow: 0 2px 12px rgba(60,179,157,0.08);
  align-self: center;
}

.v2-sc-social-title {
  font-family: "Montserrat Alternates", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #1a3a34;
  margin-bottom: 12px;
}

.v2-sc-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 14px;
  color: #3d3d3d;
}
.v2-sc-links a {
  color: #3CB39D;
  text-decoration: none;
  font-weight: 600;
}
.v2-sc-links a:hover { text-decoration: underline; }

/* Cream tube illustration — tall, aligned to bottom */
.v2-support-tube {
  flex-shrink: 0;
  width: 160px;
  height: auto;
  display: block;
  align-self: flex-end;
  pointer-events: none;
  margin-bottom: -4px;
}

/* Mobile */
@media (max-width: 480px) {
  .v2-support-columns { grid-template-columns: 1fr; }
  .v2-support-right-body { flex-direction: column; align-items: flex-start; }
  .v2-support-tube { width: 110px; align-self: flex-end; }
}


/* ─── Ingredients section ─── */
.v2-ingredients-title {
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
@media (max-width: 480px) {
  .v2-ingredients-title {
    font-size: 17px;
    line-height: 1.35;
  }
}
.v2-ingredients-blue { color: #1e40af; }
.v2-ingredients-gray { color: #9ca3af; }

/* 4-column masonry grid */
.v2-ing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}
.v2-ing-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Base card */
.v2-ing-card {
  border-radius: 26px;
  overflow: hidden;
}

/* Text cards */
.v2-ing-text {
  background: #FFF7F2;
  padding: 24px 20px;
}
.v2-ing-text h3 {
  font-family: "Montserrat Alternates", system-ui, sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: #1f2937;
  margin: 0 0 10px;
  line-height: 1.2;
}
.v2-ing-text p {
  font-family: "Montserrat Alternates", system-ui, sans-serif;
  font-size: 16px;
  color: #6b7280;
  line-height: 1.55;
  margin: 0;
}

/* Illustration cards */
.v2-ing-illus {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 260px;
  padding: 20px 16px;
  overflow: hidden;
}
.v2-ing-svg {
  width: 100%;
  height: auto;
  max-width: 230px;
  display: block;
  object-fit: contain;
}
.v2-ing-illus--tall {
  min-height: 440px;
}
.v2-ing-illus--tall .v2-ing-svg {
  max-width: 260px;
  max-height: 400px;
}

/* Mobile product strips — hidden on desktop */
.v2-ing-mobile-strip {
  display: none;
}

/* Mobile */
@media (max-width: 860px) {
  .v2-ing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .v2-ing-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    overflow-x: clip;
  }
  /* Hide big illustration blocks */
  .v2-ing-illus { display: none !important; }
  /* Smaller h3 so long Russian words fit */
  .v2-ing-text h3 { font-size: 20px; }
  /* Show product strips — min-width:0 prevents grid item from expanding beyond column */
  .v2-ing-mobile-strip {
    display: flex;
    min-width: 0;
    width: 100%;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 0 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .v2-ing-mobile-strip::-webkit-scrollbar { display: none; }
  .v2-ing-mobile-strip img {
    height: 44px;
    width: auto;
    flex-shrink: 0;
    border-radius: 8px;
    background: #f0ece6;
    object-fit: contain;
  }
}

/* ─── Reviews section ─── */
.v2-reviews {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  background: #fff;
  width: min(1308px, calc(100% - 48px));
  margin: 0 auto 24px;
  border-radius: 20px;
}

/* Diagonal band strips */
.v2-rev-bands {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.v2-rev-band {
  position: absolute;
  width: 160%;
  left: -30%;
  height: 42px;
  border-radius: 0;
}

/* Stage: grid — [arrow][card][arrow], always perfectly centered */
.v2-rev-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 80px minmax(0, 830px) 80px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* Arrow buttons */
.v2-rev-arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(108,117,125,0.35);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(6px);
  color: #3CB39D;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, transform 0.15s;
  justify-self: center;
}
.v2-rev-arrow:hover {
  background: rgba(60,179,157,0.12);
  transform: scale(1.08);
}

/* Main review card */
.v2-reviews-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  background: rgba(108,117,125,0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 40px;
  overflow: hidden;
  max-width: 830px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.13);
  transition: opacity 0.16s;
}
.v2-reviews-card.v2-review-fade { opacity: 0; }

/* Photo column */
.v2-reviews-photo {
  background: #FFF7F2;
  overflow: hidden;
  min-height: 370px;
}
.v2-rev-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Placeholder gradient when no photo */
.v2-rev-photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: 370px;
  background: linear-gradient(160deg, #91DACC 0%, #FFB280 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-rev-photo-placeholder svg {
  width: 80px;
  opacity: 0.55;
}

/* Text column */
.v2-reviews-text {
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  background: rgba(255,255,255,0.88);
}
.v2-rev-leaf {
  width: 28px;
  height: 34px;
  flex-shrink: 0;
}
.v2-reviews-name {
  font-family: "Montserrat Alternates", sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #3CB39D;
}
.v2-reviews-quote {
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #3d3d3d;
  line-height: 1.6;
}

/* Dots */
.v2-rev-dots {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.v2-rev-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #3CB39D;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s;
}
.v2-rev-dot-active {
  background: #3CB39D;
}

/* Mobile */
@media (max-width: 480px) {
  /* overflow-x:clip clips diagonal bands; overflow-y:visible lets card grow */
  .v2-reviews {
    padding: 40px 0 50px;
    overflow-x: clip;
    overflow-y: visible;
  }
  .v2-reviews-card {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .v2-reviews-photo {
    display: block;
    height: 200px;
    min-height: 200px;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    flex-shrink: 0;
  }
  .v2-rev-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
  .v2-reviews-text {
    padding: 20px 20px 24px;
    gap: 10px;
    background: rgba(255,255,255,0.93);
    border-radius: 0 0 20px 20px;
  }
  .v2-rev-stage {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: start;
    padding: 0 8px;
  }
  .v2-rev-arrow { width: 40px; height: 40px; font-size: 22px; margin-top: 80px; }
  .v2-reviews-name { font-size: 17px; }
  .v2-reviews-quote { font-size: 14px; }
}

/* ─── Mobile: ingredients grid 1 col ─── */
@media (max-width: 700px) {
  .v2-ingredients-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .v2-ingredient-figure-left,
  .v2-ingredient-figure-right {
    grid-column: span 1;
  }
}
@media (max-width: 480px) {
  .v2-ingredients-grid {
    grid-template-columns: 1fr;
  }
  .v2-ingredient-figure-left,
  .v2-ingredient-figure-right {
    grid-column: span 1;
  }
}


/* ── Questionnaire CTA on analyze page ─────────────────────────────────── */
.v2-q-cta {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf8 0%, #fef9f5 100%);
  border: 1.5px solid var(--mint);
  border-radius: 16px;
  padding: 20px 22px;
}
.v2-q-cta-icon { font-size: 26px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.v2-q-cta-body { flex: 1; min-width: 0; }
.v2-q-cta-title { font-weight: 700; font-size: 15px; color: var(--primary); margin-bottom: 4px; }
.v2-q-cta-text  { font-size: 13px; color: #555; line-height: 1.4; }
.v2-q-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  align-items: stretch;
  min-width: 120px;
}
.v2-q-applied {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf8;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: #065f46;
}
.v2-q-applied-icon { font-size: 16px; }
.v2-q-applied-text { flex: 1; font-weight: 600; }
.v2-q-applied-link { color: var(--primary); text-decoration: underline; font-size: 12px; flex-shrink: 0; }
@media (max-width: 580px) {
  .v2-q-cta { flex-direction: column; }
  .v2-q-cta-actions { flex-direction: row; min-width: unset; }
}

/* ── Face Mesh canvas ───────────────────────────────────────────────────── */
#face-mesh-canvas {
  position: absolute;
  left: 0; top: 0;
  pointer-events: none;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* ── Dark Circles badge ─────────────────────────────────────────────────── */
.v2-dark-circles-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.v2-dark-circles-badge--found {
  background: rgba(160, 80, 220, 0.12);
  border: 1.5px solid rgba(160, 80, 220, 0.55);
  color: #7c3aed;
}
.v2-dark-circles-badge--clear {
  background: rgba(0, 220, 200, 0.08);
  border: 1.5px solid rgba(0, 220, 200, 0.4);
  color: #0891b2;
}

/* ── Loading spinners ───────────────────────────────────────────────────── */
@keyframes v2-spin { to { transform: rotate(360deg); } }
.v2-spinner-lg {
  width: 36px; height: 36px; margin: 0 auto;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #00ddc8;
  border-radius: 50%;
  animation: v2-spin 0.8s linear infinite;
}
.v2-spinner-sm {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(0,200,185,0.25);
  border-top-color: #00c8b8;
  border-radius: 50%;
  animation: v2-spin 0.7s linear infinite;
  vertical-align: middle;
}

/* ── Product skeleton cards ─────────────────────────────────────────────── */
@keyframes v2-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.v2-product-skeleton {
  height: 220px;
  border-radius: 14px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: v2-shimmer 1.4s infinite;
}

/* ── Page info dots (fixed width, CSS pulse — no layout shift) ─────────── */
.v2-page-dots {
  display: inline-block;
  animation: v2-dots-pulse 1.2s ease-in-out infinite;
}
@keyframes v2-dots-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

/* ── Background loading badge ───────────────────────────────────────────── */
.v2-bg-loading-badge {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0,220,200,0.08);
  border: 1px solid rgba(0,220,200,0.3);
  color: #0891b2;
  font-size: 13px;
  font-weight: 600;
}

/* ── Detected Problems List ─────────────────────────────────────────────── */
.v2-detected-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
  color: #444;
}
.v2-detected-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.v2-detected-yes {
  background: rgba(0, 180, 70, 0.13);
  color: #15803d;
}
.v2-detected-no {
  background: rgba(0, 0, 0, 0.06);
  color: #aaa;
}
.v2-detected-pending {
  background: rgba(0, 0, 0, 0.05);
  color: #ccc;
  font-size: 13px;
}
.v2-detected-label {
  flex: 1;
}

/* ── Routine builder ─────────────────────────────────────── */
.v2-routine-toggle-btn {
  border: 1px solid rgba(60,179,157,0.45);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  color: #0f766e;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.v2-routine-toggle-btn.active {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}
.v2-routine-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.v2-routine-step {
  border-radius: 16px;
  border: 2px solid rgba(60,179,157,0.25);
  padding: 14px;
  cursor: pointer;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .15s, box-shadow .15s, background .15s;
  background: #fff;
}
.v2-routine-step:hover {
  border-color: rgba(60,179,157,0.55);
  box-shadow: 0 2px 12px rgba(60,179,157,0.12);
}
.v2-routine-step.active {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15,118,110,.1);
}
.v2-routine-step.selected {
  background: rgba(60,179,157,0.06);
  border-color: rgba(60,179,157,0.5);
}
.v2-routine-step.conflict {
  border-color: #ef4444 !important;
  background: rgba(239,68,68,0.05);
}
.v2-routine-step__icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 6px;
}
.v2-routine-step__label {
  font-weight: 800;
  font-size: 13px;
  color: #0f766e;
}
.v2-routine-step__status {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 3px;
  line-height: 1.3;
  word-break: break-word;
}
.v2-routine-step.selected .v2-routine-step__status {
  color: #065f46;
}
.v2-routine-conflicts {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #991b1b;
  line-height: 1.6;
}
.v2-routine-add-btn {
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border: none;
  cursor: pointer;
  margin-top: 6px;
  transition: background .15s;
}
.v2-routine-add-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: default;
}
.v2-routine-step-badge {
  display: inline-block;
  background: rgba(60,179,157,0.15);
  color: #065f46;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  margin-bottom: 4px;
}
/* "Выбрать для этапа" button inside product card */
.v2-select-for-step-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid #0f766e;
  background: transparent;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.v2-select-for-step-btn:hover {
  background: #0f766e;
  color: #fff;
}

/* ─── Check Product Page ─────────────────────────────────────────────────── */
.v2-check-access-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(15,118,110,0.06);
  border: 1px solid rgba(15,118,110,0.25);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.v2-check-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.v2-check-tab {
  border: 1.5px solid rgba(60,179,157,0.35);
  background: #fff;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  transition: all .14s;
}
.v2-check-tab.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.v2-check-tab-body { }

.v2-check-ingredient-panel {
  background: #FAF5EF;
  border-radius: 20px;
  padding: 24px;
  max-width: 680px;
}
.v2-check-photo-zone {
  border: 2px dashed rgba(60,179,157,0.4);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s;
  background: #fff;
}
.v2-check-photo-zone:hover { border-color: #0f766e; }
.v2-check-photo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.v2-check-ingredients-textarea {
  width: 100%;
  border: 1.5px solid rgba(60,179,157,0.3);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-family: var(--font-main);
  resize: vertical;
  background: #fff;
  color: #374151;
  outline: none;
  transition: border-color .14s;
}
.v2-check-ingredients-textarea:focus { border-color: #0f766e; }
.v2-check-analyze-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: opacity .14s;
}
.v2-check-analyze-btn:disabled { opacity: 0.6; cursor: default; }

/* ── No-products CTA (analyze page, unauthenticated) ── */
.v2-no-products-cta {
  text-align: center;
  padding: 48px 24px;
  background: #f9fafb;
  border-radius: 20px;
  border: 1.5px dashed rgba(15,118,110,0.25);
}
.v2-no-products-icon {
  font-size: 36px;
  color: #0f766e;
  margin-bottom: 12px;
  font-family: 'Coiny', cursive;
}
.v2-no-products-title {
  font-family: 'Coiny', cursive;
  font-size: 22px;
  color: #0f766e;
  margin-bottom: 10px;
}
.v2-no-products-text {
  font-size: 14px;
  color: #6b7280;
  max-width: 360px;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.v2-no-products-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.v2-no-products-btn {
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  transition: opacity .14s;
}
.v2-no-products-btn--primary {
  background: #0f766e;
  color: #fff;
  border: none;
}
.v2-no-products-btn--ghost {
  background: transparent;
  color: #0f766e;
  border: 1.5px solid rgba(15,118,110,0.45);
}
.v2-no-products-btn:hover { opacity: 0.85; }

/* ── Mobile breakpoints ─────────────────────────────────── */
@media (max-width: 600px) {

  /* Routine bento: 2 cols → 1 col */
  .v2-routine-bento {
    grid-template-columns: 1fr;
  }

  /* No-products CTA: reduce padding */
  .v2-no-products-cta {
    padding: 32px 16px;
  }
  .v2-no-products-title {
    font-size: 19px;
  }

  /* Check-product ingredient panel: remove max-width cap */
  .v2-check-ingredient-panel {
    max-width: 100%;
    padding: 16px;
  }

  /* Products shell: compact padding, no horizontal scroll */
  .v2-products-shell {
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* Products toolbar: 2x2 grid instead of column stack */
  .v2-products-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    flex-direction: unset;
  }
  /* Pagination spans full width */
  .v2-products-toolbar .v2-products-page,
  .v2-products-toolbar .v2-page-nav {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .v2-products-filter {
    width: auto;
    padding: 5px 8px;
    gap: 5px;
    border-radius: 12px;
    min-width: 0;
    overflow: hidden;
  }
  .v2-products-filter label {
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .v2-products-filter .v2-multi-trigger {
    padding: 3px 8px;
    font-size: 11px;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* Price inputs smaller */
  .v2-price-input, input[id*="price"] {
    width: 52px !important;
    font-size: 12px !important;
    padding: 4px 6px !important;
  }

  /* Product card: smaller image on mobile */
  .v2-product-top {
    grid-template-columns: 80px 1fr auto;
    gap: 10px;
  }
  .v2-product-img-wrap {
    width: 80px;
    height: 72px;
  }
  .v2-product-accent {
    width: 32px;
    height: 32px;
    font-size: 13px;
    border-radius: 8px;
  }

  /* Routine add btn + conflicts: full padding */
  .v2-routine-add-btn {
    padding: 13px 12px;
    font-size: 13px;
  }

  /* Check-product tabs: full width */
  .v2-check-tab {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 8px 10px;
  }

  /* Product modal: full-screen on mobile */
  .v2-modal-content {
    max-height: 95dvh;
    border-radius: 20px 20px 0 0;
    margin-top: auto;
  }
}

/* ── Multi-select search panel ─────────────────────────────────────────── */
.v2-multi-panel--search {
  max-height: 280px;
  overflow-y: auto;
  display: none;
}
.v2-multi-panel--search.open {
  display: block;
}
.v2-multi-search-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  margin-bottom: 6px;
  outline: none;
  color: #1f2937;
}
.v2-multi-search-input:focus {
  border-color: #3cb39d;
}

/* ── Modal tabs (Bug 6) ────────────────────────────────────────────────── */
.v2-modal-tab-nav {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #f3f4f6;
  margin-bottom: 14px;
  padding-bottom: 0;
  flex-shrink: 0;
}
.v2-modal-tab-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.v2-modal-tab-btn:hover { color: #0f766e; }
.v2-modal-tab-btn.active { color: #0f766e; border-bottom-color: #0f766e; }

/* ── Speedometer gauge (Feature 8) ─────────────────────────────────────── */
.v2-cp-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0 4px;
}
.v2-cp-gauge-svg {
  width: 200px;
  height: 120px;
  overflow: visible;
}
.v2-cp-gauge-label {
  font-size: 14px;
  font-weight: 800;
  color: #374151;
  margin-top: 4px;
  letter-spacing: -0.01em;
}
#v2-gauge-needle {
  transition: none;
}

/* ============================================================
   Unified Figma-style top navigation (all v2 pages via base)
   ============================================================ */
.v2-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: 78px;
  background-color: #ffffff;
  box-shadow: 0px 2px 4px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  box-sizing: border-box;
}
.v2-topnav-brand {
  height: 64px;
  display: flex;
  align-items: center;
  font-family: "Coiny", cursive;
  font-weight: 400;
  color: #3cb39d;
  font-size: 32px;
  line-height: 48px;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.v2-topnav-links {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.v2-topnav-links::-webkit-scrollbar { display: none; }
.v2-topnav-link {
  display: inline-flex;
  align-items: center;
  font-family: "Montserrat Alternates", sans-serif;
  font-weight: 500;
  color: #3cb39d;
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
}
.v2-topnav-link:hover { opacity: 0.75; }
.v2-topnav-support { color: #f59e0b !important; font-weight: 700; }
.v2-topnav-auth {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.v2-topnav-btn {
  all: unset;
  box-sizing: border-box;
  min-width: 80px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 2px solid #3cb39d;
  cursor: pointer;
  font-weight: 600;
  color: #3cb39d;
  font-size: 15px;
  padding: 0 16px;
  white-space: nowrap;
  text-decoration: none;
  font-family: "Montserrat Alternates", sans-serif;
}
.v2-topnav-btn:hover { opacity: 0.8; }
.v2-topnav-btn-filled {
  all: unset;
  box-sizing: border-box;
  min-width: 130px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #3cb39d;
  border-radius: 14px;
  border: 1px solid #3cb39d;
  cursor: pointer;
  font-weight: 600;
  color: #ffffff;
  font-size: 15px;
  padding: 0 20px;
  text-decoration: none;
  font-family: "Montserrat Alternates", sans-serif;
}
.v2-topnav-btn-filled:hover { opacity: 0.85; }
@media (max-width: 1100px) {
  .v2-topnav { gap: 14px; padding: 0 16px; }
  .v2-topnav-links { gap: 18px; }
}
@media (max-width: 768px) {
  .v2-topnav { height: 60px; gap: 10px; }
  .v2-topnav-brand { font-size: 22px; }
  .v2-topnav-links { display: none !important; }
  .v2-topnav-auth { display: none !important; }
  .v2-hamburger { display: flex !important; }
}
