/* Fix round 3: the phone quick wins (Claude, 15 Nov 2026). Markup and notes: inc/v2/v2-fix3-pq.php.
   Every rule starts with body.chvf3 (option chv2_fix3_live) and sits inside a phone media query: nothing here reaches a
   computer (900 px and wider). No :has() without a fallback that leaves today's look, no nesting, -webkit- beside mask. */

/* the phone <source> of the product picture never makes a box of its own (all widths: the picture stays where it was) */
body.chvf3 .p3-gal__main picture.f3-pic{display:contents}

/* ============================================================ 1. product page: the vial whole, on a floor glow, in its marks */
@media (max-width:899.98px){
  /* the frame: black, with a soft pool of light where the vial stands; it ends before the frame's own edge, so no box shows */
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic){
    container-type:size;
    background:
      radial-gradient(26% 5.5% at 50% 90.5%,rgba(255,255,255,.38),rgba(255,255,255,.12) 48%,rgba(255,255,255,0) 100%),
      radial-gradient(56% 9.5% at 50% 90.5%,rgba(255,255,255,.1),rgba(255,255,255,0) 100%),
      radial-gradient(58% 60% at 50% 44%,rgba(255,255,255,.05),rgba(255,255,255,0) 100%),
      #000}
  /* the cut-out is 1200 x 1500 with the vial at 20.8% to 82.3% of its height and 32% to 68% of its width: cap to base takes
     85% of the frame (cap at 5%, base at 90%); the short reflection baked into the file fades out before the frame's edge */
  body.chvf3.chv2s3 .p3-page>.p3-wrap .f3-pic .p3-gal__img.chv2-r{
    left:50%;top:-23.7%;right:auto;bottom:auto;width:auto;height:138%;aspect-ratio:4/5;translate:-50% 0;
    object-fit:contain;object-position:50% 50%;transform-origin:50% 82%;
    -webkit-mask-image:linear-gradient(180deg,#000 0,#000 85%,transparent 89.4%);-webkit-mask-composite:source-over;
    mask-image:linear-gradient(180deg,#000 0,#000 85%,transparent 89.4%);mask-composite:add}
  /* the corner marks stand around the vial, as on the home page's first screen (the vial is 39.7% of the frame's height
     wide); a browser without container units keeps them in the frame's corners */
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic .p3-gal__img--vial.is-sel) .p3-tick--tl{left:calc(50% - 19.9cqh - 18px);top:calc(5cqh - 8px)}
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic .p3-gal__img--vial.is-sel) .p3-tick--tr{right:calc(50% - 19.9cqh - 18px);top:calc(5cqh - 8px)}
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic .p3-gal__img--vial.is-sel) .p3-tick--bl{left:calc(50% - 19.9cqh - 18px);bottom:calc(10cqh - 7px)}
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic .p3-gal__img--vial.is-sel)::after{content:"";position:absolute;z-index:2;width:16px;height:16px;right:calc(50% - 19.9cqh - 18px);bottom:calc(10cqh - 7px);border:0 solid var(--line-2);border-right-width:1px;border-bottom-width:1px;pointer-events:none}
  @supports not (width:1cqh){body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic)::after{content:none}}
  /* the spray's cut-out is taller and slimmer in its file (tip at 11.9%, base at 86%, 23% of the width): tip at 5%, base at
     92.5%, its marks 10.9% of the frame's height either side of the middle */
  body.chvf3.chv2s3 .p3-page>.p3-wrap .f3-pic .p3-gal__img--spray.chv2-r{height:118%;top:-9%;
    -webkit-mask-image:linear-gradient(180deg,#000 0,#000 87.5%,transparent 92%);mask-image:linear-gradient(180deg,#000 0,#000 87.5%,transparent 92%)}
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic .p3-gal__img--spray.is-sel) .p3-tick--tl{left:calc(50% - 10.9cqh - 22px);top:calc(5cqh - 8px)}
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic .p3-gal__img--spray.is-sel) .p3-tick--tr{right:calc(50% - 10.9cqh - 22px);top:calc(5cqh - 8px)}
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic .p3-gal__img--spray.is-sel) .p3-tick--bl{left:calc(50% - 10.9cqh - 22px);bottom:calc(7.5cqh - 7px)}
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic .p3-gal__img--spray.is-sel)::after{content:"";position:absolute;z-index:2;width:16px;height:16px;right:calc(50% - 10.9cqh - 22px);bottom:calc(7.5cqh - 7px);border:0 solid var(--line-2);border-right-width:1px;border-bottom-width:1px;pointer-events:none}
  body.chvf3.chv2s3 .p3-page>.p3-wrap .p3-gal__main:has(.f3-pic .p3-gal__img--spray.is-sel){
    background:
      radial-gradient(20% 5% at 50% 93%,rgba(255,255,255,.34),rgba(255,255,255,.1) 48%,rgba(255,255,255,0) 100%),
      radial-gradient(50% 7% at 50% 93%,rgba(255,255,255,.09),rgba(255,255,255,0) 100%),
      radial-gradient(58% 60% at 50% 44%,rgba(255,255,255,.05),rgba(255,255,255,0) 100%),
      #000}
}

/* ============================================================ 2. product page: the pen lies flatter and whole */
@media (max-width:899.98px){
  /* the picture holds the pen at 41.8 degrees; 25 more lay it at about 17. Its length is 1.178 times the picture's width, so
     a picture 75% of the frame wide gives a pen about 0.88 of the frame long, whole, with air at both ends */
  body.chvf3 .c3-root .p3-gal__main .p3-gal__img--pen{top:48%;left:50%;width:75%;height:auto;translate:-50% -50%;rotate:25deg;transform-origin:50% 50%}
}
/* a tall frame (tall phones): a little steeper and longer, so the pen fills it */
@media (max-width:899.98px) and (min-height:800px){
  body.chvf3 .c3-root .p3-gal__main .p3-gal__img--pen{width:82%;rotate:12deg}
}

/* ============================================================ 3. home: the price card never covers the vial or its glow
   The vial row used to fill the screen's height whatever stood on it; on a short screen the card covered the vial's base.
   Now the row takes the room that is really free: from the button's lower edge (--f3-g1) to the card's upper edge
   (--f3-g2), 10 px under the button and 12 px above the card, never bigger than today, centred when there is room to spare.
   In the picture the vial stands at 40% to 78% of the height and its corner marks start at 36.4%: 41.59% in all.
   --f3-g1 adds up the copy block as v2-home.css sets it (two lines of headline, two of sentence); v2-fix3-pq.js checks the
   real page once and corrects the two numbers if a phone wraps the words differently.
   Review fix (15 Nov 2026): rules 3 and 4 step aside while one of the phone choices for the home first screen has taken
   it over (inc/v2/v2-ph-home.php, live since 15 Nov with its option off, marks the section .hxp only when every part went
   in): that choice sizes the same row itself, and both together put the card back on the vial. The band above the picture now really dims with it (.hx-js sits on
   <html>, so the first attempt's rule never matched). */
@media (max-width:767.98px){
  body.chvf3 .hx:not(.hxp){
    --f3-g1:calc(clamp(58px,calc(var(--hx-h) * .096),80px) + 2.06 * clamp(27px,calc(var(--hx-h) * .043),35px) + clamp(8px,calc(var(--hx-h) * .014),12px) + 2.7 * clamp(14.5px,calc(var(--hx-h) * .0205),16.5px) + clamp(12px,calc(var(--hx-h) * .02),17px) + clamp(46px,calc(var(--hx-h) * .064),52px));
    --f3-g2:calc(var(--hx-h) - var(--cl3-pb,0px) - 104.5px);
    --f3-room:calc(var(--f3-g2) - var(--f3-g1) - 22px);
    --hx-sh:min(216.5vw,var(--hx-h),calc(var(--f3-room) / .4159));
    --f3-top:calc(var(--f3-g1) + 10px + (var(--f3-room) - .4159 * var(--hx-sh)) / 2 - .3641 * var(--hx-sh))}
  /* the stage keeps its place at the top of the screen; the row of vials stands lower inside it by --f3-top */
  body.chvf3 .hx:not(.hxp) .hx-stage{top:0;bottom:auto;height:calc(var(--f3-top) + var(--hx-sh))}
  body.chvf3 .hx:not(.hxp) .hx-row{height:var(--hx-sh);margin-top:var(--f3-top)}
  body.chvf3 .hx:not(.hxp) .hx-brp{top:calc(var(--f3-top) + .39 * var(--hx-sh));height:calc(.385 * var(--hx-sh))}
  /* above the picture: its own top row of colour carried on upwards (the picture's first 40 rows are one flat band), so no
     edge shows behind the header; it dims and lights up with the picture */
  body.chvf3 .hx:not(.hxp) .hx-row::before{content:"";position:absolute;left:0;right:0;bottom:calc(100% - 1px);height:140px;pointer-events:none;transition:filter .5s linear;
    background:linear-gradient(90deg,#020202 0,#020202 10%,#050505 15%,#060508 20%,#09090b 25%,#0a0c0e 30%,#0c0e10 35%,#0e1011 40%,#0f1112 45%,#0f1112 55%,#0e1011 60%,#0c0e10 65%,#090b0c 70%,#080a0b 75%,#060508 80%,#050505 85%,#030303 90%,#020202 95%,#010101 100%)}
  .hx-js body.chvf3 .hx:not(.hxp):is([data-hx="pre"],[data-hx="run"]) .hx-row::before{filter:brightness(.3) saturate(0)}
}
/* reduced motion: the picture is never dimmed (v2-home.css), so neither is the band */
@media (max-width:767.98px) and (prefers-reduced-motion:reduce){
  .hx-js body.chvf3 .hx[data-hx] .hx-row::before{filter:none;transition:none}
}

/* ============================================================ 4. home: the side vials fade out at the screen edges
   One mask on the strip: the vial in the frame is whole and sharp, its neighbours go out towards the edges, so no label is
   cut in the middle of a word. Where the neighbours stand whole on the screen (short screens, after rule 3) the fade is
   light and they stay readable; the further the edge cuts into them, the earlier they are gone (--f3-xl is the left
   neighbour's outer edge: under 0 means cut). The lower edge of the (now shorter) picture goes out softly behind the card.
   Review fix (15 Nov 2026): on very short screens (iPhone SE in Safari, 375x548; 320x568) the row is so small that the
   SECOND neighbours come in at the edges, cut mid-word ("GLP-3", "Sema"), under the light fade. --f3-xi is the second
   neighbour's inner edge (the row's pitch is .246 of its height, a vial .157 wide): while it is on the screen (over 0) the
   fade runs from just inside it to the first neighbour's outer edge, so the second neighbours are gone and the first ones
   stay whole and sharp. While it is off the screen (every taller phone) the rule below is exactly the one before. */
@media (max-width:767.98px){
  body.chvf3 .hx:not(.hxp){--f3-xl:calc(50vw - .325 * var(--hx-sh));--f3-xi:calc(50vw - .4135 * var(--hx-sh));
    --f3-p0:max(clamp(0px,calc(-1.2 * var(--f3-xl)),11vw),calc(var(--f3-xi) + 4px));
    --f3-p1:max(calc(var(--f3-p0) + 8px),min(calc(27vw + .6 * var(--f3-p0)),calc(var(--f3-xl) + max(0px,calc(-1 * var(--f3-xi))) * 1000)))}
  body.chvf3 .hx:not(.hxp) .hx-scroll{
    -webkit-mask-image:linear-gradient(90deg,transparent 0,transparent var(--f3-p0),#000 var(--f3-p1),#000 calc(100% - var(--f3-p1)),transparent calc(100% - var(--f3-p0)),transparent 100%),linear-gradient(180deg,#000 0,#000 calc(100% - 44px),transparent 100%);-webkit-mask-composite:source-in;
    mask-image:linear-gradient(90deg,transparent 0,transparent var(--f3-p0),#000 var(--f3-p1),#000 calc(100% - var(--f3-p1)),transparent calc(100% - var(--f3-p0)),transparent 100%),linear-gradient(180deg,#000 0,#000 calc(100% - 44px),transparent 100%);mask-composite:intersect}
}

/* ============================================================ 5. card vials 1.3 times bigger, 8 px lower
   Shop and category grids, Build a Stack, the product page's "More peptides". scale, not transform: transform centres the
   shop's and the stack's pictures (left:50%, translateX(-50%)), and a scale is applied to that shift too, so there the scale
   grows from the picture's own left edge, which is the card's centre line. */
@media (max-width:767.98px){
  body.chvf3.chv2s4 .s3 .s3-pb--vial img.chv2-c,
  body.chvf3.chv2s4 .sx-page .sx-card__img--vial.chv2-c{scale:1.3;transform-origin:0 62%;margin-top:8px}
  /* a "More peptides" tile carries its "+" in the lower right corner, right beside the vial's base: the vial grows from its
     own lower right corner (68% 82% of the picture), up and to the left, so that corner stays where it was, clear of the "+",
     and the cap stays 10 px or more under the tile's top. Vials only: a spray is taller and would leave the tile. */
  body.chvf3.chv2s5.chv2s3 .c3-root .p3-rel .p3-p--vial .p3-p__tile>img.chv2-c{scale:1.26;transform-origin:68% 82%}
}

/* ============================================================ 6. cart: no white "0"
   The count is marked data-f3z while it is 0 (the page, the cart fragment and v2-fix3-pq.js all set it). */
@media (max-width:899.98px){
  body.chvf3 .c3-root.hd3 .hd3-cart .cl-cart-count[data-f3z],
  body.chvf3 .cl-cart-count[data-f3z]{display:none}
}

/* ============================================================ 9. the sticky Add bar says what the chosen row says
   assets/v4/v2-pack.js copies the chosen row's words ("2 pens + 1 FREE", "1 vial") into the bar (span.f3-pw) and marks the
   bar f3-words; f3-amts = the product has several amounts, so the amount stays in front ("10 mg · 2 pens + 1 FREE · AED 1,198");
   f3-tight = that line would run into "ADD" on this phone, so the amount steps out. No row chosen: the bar reads as before. */
@media (max-width:899.98px){
  body.chvf3 .c3-root .p3-pbar:not(.f3-words) .f3-pw{display:none}
  body.chvf3 .c3-root .p3-pbar.f3-words .chv2-pack__x,
  body.chvf3 .c3-root .p3-pbar.f3-words:not(.f3-amts) [data-p3-amt],
  body.chvf3 .c3-root .p3-pbar.f3-words.f3-tight [data-p3-amt]{display:none}
  body.chvf3 .c3-root .p3-pbar.f3-words.f3-amts:not(.f3-tight) .f3-pw::before{content:"\0020\00b7\0020"}
}

/* ============================================================ 10. text floor: capitals 12 px, sentences 13 px, nothing under 11 px
   Every line below was measured smaller on a 390 px phone (pq/bin/08-floor.mjs). :not(#f3) only lifts a rule above the class
   rule it replaces. Line heights are set where the old one was a fixed number of pixels, so no row grows. */
@media (max-width:899.98px){
  /* the five tabs */
  body.chvf3 .cl3-pb .cl3-pb__l{font-size:12px;letter-spacing:-.01em}
}
@media (max-width:767.98px){
  /* home: the price card's top line, the research line, the Library section's two tabs */
  body.chvf3 .hx-tag__top{font-size:12px;letter-spacing:.08em;line-height:16.5px}
  body.chvf3 .hx-ruo{font-size:13px}
  body.chvf3:not(#f3) .chvl-tab{font-size:12px}
  /* shop: the offer strip's small line; Build a Stack: a card's format line */
  body.chvf3 .c3-root.s3 .sx-strip__sub{font-size:12px;letter-spacing:.09em}
  body.chvf3 .sx-page .sx-card__m{font-size:12px;letter-spacing:.07em}
  /* product page: the research line, the fact labels, the profile door's label */
  body.chvf3 .c3-root .p3-buy__ruo{font-size:13px}
  body.chvf3.chv2s3 .chv2-fact dt,
  body.chvf3.chv2s3 .chv2-prof small{font-size:12px;letter-spacing:.08em}
  /* cart and the other pages built from the kit: small capital labels; the free-one badge */
  body.chvf3:not(#f3) .t-label{font-size:12px}
  body.chvf3:not(#f3) .clb-badge{font-size:12px;letter-spacing:.04em}
  body.chvf3 .k-kv dt{font-size:12px}
  /* calculator: the three result labels */
  body.chvf3 .c3-root.k3c-page .k3c-stats dt{font-size:12px;letter-spacing:.06em}
  body.chvf3 .c3-root.k3c-page .k3c-stats dd.k3c-stats__2{font-size:12px}
  /* Review fix (15 Nov 2026): the signed-in account home (not in the first sweep): "ORDER #1188", the tracking cards'
     "DELIVERY WINDOW" / "COURIER" (also on Track order and the order-received page), Buy again's "2 + 1 FREE", the "SOON"
     pill: capitals 12 px, as the same labels already are on a computer; the medal row's "1st order" / "AED 2,500" 11 px with
     a hair less spacing, so "AED 20,000" stays on one line in its 58 px column on a 360 px phone (12 px would not fit) */
  body.chvf3.cl-acp .chv2-ah a.chv2-ah__olink,
  body.chvf3.chv2d .chv2-trk__card small,
  body.chvf3.cl-acp .chv2-ah__again em,
  body.chvf3.cl-acp .chv2-ah__soon{font-size:12px}
  body.chvf3.cl-acp .chv2-ah__badges li span{font-size:11px;letter-spacing:-.02em}
}
@media (max-width:899.98px){
  /* the menu: "17 COMPOUNDS" on the format rows, the list of compounds under a research area */
  body.chvf3 .c3-root.hd3 .nm-fmt__n,
  body.chvf3 .c3-root.hd3 .nm-pfmt__meta .nm-fmt__n{font-size:12px;letter-spacing:.08em}
  body.chvf3 .c3-root.hd3 .nm-area--s .nm-area__c{font-size:12px}
  /* three format tiles in a row are narrow: the capitals fit at 12 px without their letter spacing */
  body.chvf3 .c3-root.hd3 .nm-pfmts:has(> li:nth-child(3)) .nm-pfmt__meta .nm-fmt__n{font-size:12px;letter-spacing:0}
}
/* Review fix (15 Nov 2026): under 385 px wide they keep their capitals, as everywhere else on the site (the first attempt
   showed them in small letters there, "17 compounds", on every 375 px iPhone too). "17 COMPOUNDS" needs 89.6 px at 12 px and
   the tile gives it 89 px at 375 wide and 84 px at 360 wide: 12 px with a hair less spacing from 370 px, 11 px under that. */
@media (max-width:384.98px){
  body.chvf3 .c3-root.hd3 .nm-pfmts:has(> li:nth-child(3)) .nm-pfmt__meta .nm-fmt__n{letter-spacing:-.02em}
}
@media (max-width:369.98px){
  body.chvf3 .c3-root.hd3 .nm-pfmts:has(> li:nth-child(3)) .nm-pfmt__meta .nm-fmt__n{font-size:11px;letter-spacing:0}
}

/* 10b. tap height 44 px where it was smaller: Build a Stack's amount chips (32 px high). The chip keeps its look; an
   unseen 6 px above and below it also takes the tap. */
@media (max-width:767.98px){
  body.chvf3 .sx-page .sx-chip{position:relative}
  body.chvf3 .sx-page .sx-chip::after{content:"";position:absolute;left:0;right:0;top:-7px;bottom:-7px}
}

/* 10c. the first-order pop-up's close button (its own plugin, untouched) is a 32 px circle on phones: an unseen ring of 6 px
   around it takes the tap too, so the target is 44 px; the circle itself looks as before */
@media (max-width:767.98px){
  body.chvf3 .clw-close::before{content:"";position:absolute;inset:-7px;border-radius:50%}
}

/* ============================================================ 12. one picture per format: on a phone the search panel shows the
   menu's three pictures (inc/v2/v2-fix3-pq.php gives each tile a phone <source>): the BPC-157 vial, the GLP-3 pen lying as in
   the menu, the spray. The <picture> never makes a box of its own. */
body.chvf3 .cl-search__format-media picture.f3-sf{display:contents}
@media (max-width:899.98px){
  body.chvf3 .cl-search__format-media .f3-sf--vial img,
  body.chvf3 .cl-search__format-media .f3-sf--spray img{scale:1.22;transform-origin:50% 60%}
  body.chvf3 .cl-search__format-media .f3-sf--pen img{width:100%;height:100%;object-fit:contain;padding:9% 6%;scale:1.12}
}
