:root{
    --purple:#7D78E6;--purple-lt:#BABBFA;--purple-xlt:#F4F4FE;--navy:#2B2E4A;
    --bg:#FAF8F4;--surface:#FFFFFF;--surface2:#F7F6F2;--surface3:#F4F4FE;
    /* Brand cream. Was referenced by .pv3-ex-img / .pv3-phone-visual but never
       defined, so both silently fell back to transparent. Same value as --bg. */
    --cream:#FAF8F4;
    --border:#EAE7DF;--border-md:#D8D4C8;--yellow:#F9CE47;
    --t1:#2B2E4A;--t2:#53566F;--t3:#8A8D9F;--t4:#B4B6C4;
    --r:10px;--r-sm:7px;--r-lg:16px;
    --disp:'Fraunces',Georgia,serif;--body:'DM Sans',system-ui,sans-serif;--mono:'DM Mono',monospace;
  }
  *{box-sizing:border-box;}
  body{margin:0;background:var(--bg);font-family:var(--body);color:var(--t1);font-size:15px;}
  @media(max-width:859px){body{background-image:radial-gradient(#eae7df .7px,transparent .7px);background-size:22px 22px;}}
  .wrap{max-width:1240px;margin:0 auto;padding:22px 28px 100px;}
  .top{display:flex;justify-content:space-between;align-items:center;padding:4px 0 20px;}
  .brand{font-family:var(--disp);font-size:20px;font-weight:700;color:var(--navy);}.brand span{color:var(--purple);}
  .steps{display:flex;align-items:center;font-family:var(--mono);font-size:11px;}
  .stepdot{display:flex;align-items:center;gap:7px;color:var(--t4);}
  .stepdot.clickable{cursor:pointer;}
  .stepdot.clickable:hover{color:var(--purple);}
  .stepdot.clickable:hover .n{border-color:var(--purple);color:var(--purple);}
  .stepdot.clickable.active:hover .n{color:#fff;}
  .stepdot.locked{cursor:not-allowed;opacity:.55;}
  .stepdot .n{width:22px;height:22px;border-radius:50%;border:1.5px solid var(--border-md);display:flex;align-items:center;justify-content:center;}
  .stepdot.active{color:var(--navy);}.stepdot.active .n{background:var(--purple);border-color:var(--purple);color:#fff;}
  .steps .bar{width:24px;height:1.5px;background:var(--border-md);margin:0 8px;}
  .layout{display:grid;grid-template-columns:minmax(0,1fr) 500px;gap:22px;align-items:start;}
  /* Mobile: the map goes ABOVE the form.
     Source order is left-card-then-map (correct for desktop's two columns).
     Collapsed to one column that buries the map under the search box and the
     38-card language picker — several screens down, so nobody scrolls to it and
     the whole "explore the map" affordance is dead on the device we test on
     first. Grid `order` flips it without touching the DOM. */
  @media(max-width:1000px){
    .layout{grid-template-columns:1fr;}
    .layout>.rcol{order:-1;}
    /* Sticky is a DESKTOP behaviour: the map trails you down the second column.
       Once it's first in a single column it sticks to the top and slides over
       the search box — the thing you're trying to use. */
    .rcol{position:static;}
  }
  .card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);}
  .lcard{padding:32px 34px;}
  @media(max-width:640px){.lcard{padding:24px 20px;}.wrap{padding:18px 14px 90px;}}
  h1{font-family:var(--disp);font-size:30px;margin:2px 0 5px;line-height:1.08;}
  .sub{color:var(--t3);font-size:15px;line-height:1.5;margin:0 0 22px;}
  .kick{font-family:var(--mono);font-size:10.5px;letter-spacing:.08em;color:var(--t4);text-transform:uppercase;margin:0 0 11px;}
  .legs{display:flex;flex-direction:column;gap:8px;margin-bottom:10px;}
  .leg{display:flex;gap:9px;align-items:center;}
  .leg .dot{width:24px;height:24px;border-radius:50%;background:var(--surface2);color:var(--t3);display:flex;align-items:center;justify-content:center;font-size:11px;font-family:var(--mono);flex:none;cursor:pointer;border:1px solid var(--border);}
  .leg.active .dot{background:var(--purple);color:#fff;border-color:var(--purple);}
  .leg-input{position:relative;flex:1;}.leg-input .pin{position:absolute;left:13px;top:12px;font-size:14px;}
  input[type=text]{width:100%;height:44px;padding:0 13px 0 36px;border:1px solid var(--border-md);border-radius:var(--r);font-size:14.5px;font-family:var(--body);outline:none;background:var(--surface);}
  input[type=text]:focus{border-color:var(--purple);box-shadow:0 0 0 3px var(--purple-xlt);}
  .leg-input input[readonly]{cursor:pointer;background:var(--surface2);}
  .leg.active .leg-input input[readonly]{border-color:var(--purple);background:var(--purple-xlt);}
  .leg .rm{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--t4);cursor:pointer;flex:none;font-size:13px;}.leg .rm:hover{background:#fbe9e9;color:#c0392b;}
  .ac{position:absolute;left:33px;right:33px;top:48px;z-index:40;background:var(--surface);border:1px solid var(--border-md);border-radius:var(--r);overflow:hidden;box-shadow:0 12px 30px rgba(43,46,74,.13);max-height:280px;overflow-y:auto;}
  .ac-opt{padding:10px 14px;cursor:pointer;border-bottom:1px solid var(--border);}.ac-opt:last-child{border:none;}.ac-opt:hover{background:var(--purple-xlt);}
  .ac-opt .name{font-size:14px;font-weight:500;}.ac-opt .ctx{font-size:11.5px;color:var(--t3);font-family:var(--mono);}
  .add-leg{display:inline-flex;align-items:center;gap:7px;background:none;border:1px dashed var(--border-md);color:var(--t2);border-radius:var(--r);padding:10px 15px;font-size:13.5px;cursor:pointer;margin-bottom:24px;font-family:var(--body);}
  .add-leg:hover{border-color:var(--purple);color:var(--purple);background:var(--purple-xlt);}
  .recs{display:grid;grid-template-columns:repeat(auto-fill,minmax(146px,1fr));gap:10px;}
  .rec{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:13px 15px;cursor:pointer;transition:border-color .1s;}
  .rec:hover{border-color:var(--purple-lt);}.rec.on{border:1.5px solid var(--purple);padding:12.5px 14.5px;background:var(--purple-xlt);}
  .rec.base{background:var(--surface2);cursor:default;}
  .rec .flag{font-size:20px;}.rec .nm{font-size:15px;font-weight:600;margin-top:6px;}.rec .tag{font-size:11px;color:var(--t3);margin-top:2px;font-family:var(--mono);}
  .rec .chk{position:absolute;top:12px;right:13px;color:var(--purple);font-size:15px;}.rec .always{position:absolute;top:12px;right:13px;font-size:9.5px;font-family:var(--mono);color:var(--t4);}
  .rec.base .eo{display:none;position:absolute;left:0;right:0;bottom:100%;background:var(--navy);color:#fff;border-radius:var(--r-sm);padding:11px 13px;z-index:30;box-shadow:0 8px 22px rgba(0,0,0,.26);}
  /* Transparent bridge so the pointer can travel from the card up into the
     tooltip without crossing dead space (which dropped the hover and closed it
     before you could click "Add English-only card"). */
  .rec.base .eo::after{content:'';position:absolute;left:0;right:0;top:100%;height:10px;}
  .rec.base:hover .eo, .rec.base .eo:hover{display:block;}
  .eo .eot{font-size:12px;margin-bottom:8px;line-height:1.45;}.eo .eot b{color:var(--yellow);}
  .eo button{width:100%;background:#fff;color:var(--navy);border:none;border-radius:6px;padding:7px;font-size:12px;font-family:var(--mono);cursor:pointer;font-weight:600;}
  .eo-added{margin-top:12px;background:var(--purple-xlt);border:1px solid var(--purple-lt);border-radius:var(--r);padding:11px 15px;font-size:13px;color:var(--t2);display:none;align-items:center;gap:10px;}
  .eo-added b{color:var(--navy);}.eo-added .x{margin-left:auto;cursor:pointer;color:var(--purple);font-family:var(--mono);font-size:12px;}
  .uncov{margin-top:12px;background:var(--surface2);border:1px solid var(--border);border-radius:var(--r);padding:12px 15px;font-size:13px;color:var(--t2);line-height:1.5;}
  .uncov b{color:var(--t1);font-weight:600;}.uncov .req{color:var(--purple);cursor:pointer;font-weight:600;}.uncov .req:hover{text-decoration:underline;}
  .uncov-picker{margin-top:10px;display:none;flex-wrap:wrap;gap:6px;}.uncov.open .uncov-picker{display:flex;}
  .uchip{font-size:12px;font-family:var(--mono);padding:5px 11px;border:1px solid var(--border-md);border-radius:13px;cursor:pointer;background:var(--surface);}.uchip.on{background:var(--purple);color:#fff;border-color:var(--purple);}
  .divider{display:flex;align-items:center;margin:26px 0 12px;color:var(--t4);font-family:var(--mono);font-size:10.5px;}
  .divider::before,.divider::after{content:'';flex:1;height:1px;background:var(--border);}.divider span{padding:0 11px;}
  .expander{border:1px solid var(--border);border-radius:var(--r);overflow:hidden;margin-top:6px;}
  .exp-head{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;cursor:pointer;}.exp-head:hover{background:var(--surface3);}
  .exp-title{font-size:14px;font-weight:500;}.exp-chev{color:var(--t3);transition:transform .18s;}.expander:not(.open) .exp-chev{transform:rotate(-90deg);}
  .exp-body{display:none;padding:8px 16px 16px;border-top:1px solid var(--border);}.expander.open .exp-body{display:block;}
  /* language picker — expanded by default, dialect flyouts */
  @keyframes stepOpen{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
  #directlangs{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin-top:4px;align-items:start;}
  .allergen-cat{border:1px solid var(--border);border-radius:var(--r);padding:12px 12px 10px;cursor:pointer;transition:all .15s ease;background:var(--bg);user-select:none;}
  .allergen-cat:hover{border-color:var(--purple-lt);background:var(--purple-xlt);}
  .allergen-cat.has-selections{border-color:var(--purple-lt);background:var(--purple-xlt);}
  .allergen-cat.expanded{grid-column:1/-1;background:var(--surface);border-color:var(--purple-lt);box-shadow:0 2px 14px rgba(125,120,230,.07);}
  .cat-header{display:flex;align-items:center;gap:8px;}
  .cat-icon{font-size:18px;line-height:1;}
  .cat-name{font-size:14px;font-weight:500;color:var(--t1);flex:1;line-height:1.3;}
  .cat-badge{min-width:18px;height:18px;background:var(--purple);color:#fff;border-radius:9px;font-family:var(--mono);font-size:10px;font-weight:500;display:none;align-items:center;justify-content:center;padding:0 5px;}
  .allergen-cat.has-selections .cat-badge{display:flex;}
  .cat-toggle-hint{font-family:var(--mono);font-size:9px;letter-spacing:.05em;text-transform:uppercase;color:var(--t4);margin-top:4px;text-align:right;}
  .cat-items-wrap{display:none;margin-top:12px;padding-top:12px;border-top:1px solid var(--border);animation:stepOpen 220ms ease both;}
  .allergen-cat.expanded .cat-items-wrap{display:block;}
  .cat-items{display:flex;flex-wrap:wrap;gap:6px;}
  .item-chip{display:inline-flex;align-items:center;padding:5px 12px;border-radius:16px;border:1px solid var(--border);background:var(--surface);color:var(--t2);font-size:13px;cursor:pointer;transition:all .15s ease;user-select:none;}
  .item-chip:hover{border-color:var(--purple-lt);background:var(--purple-xlt);color:var(--purple);}
  .item-chip.selected{background:var(--purple);border-color:var(--purple);color:#fff;font-weight:500;}
  .footer{display:flex;justify-content:space-between;align-items:center;margin-top:26px;padding-top:20px;border-top:1px solid var(--border);}
  .fstatus{font-size:13.5px;color:var(--t3);}.fstatus b{color:var(--t1);}
  .continue{background:var(--purple);color:#fff;border:none;border-radius:var(--r);padding:13px 28px;font-size:15px;font-weight:600;cursor:pointer;}.continue:hover{background:#6d68d6;}
  .cart-note{margin-top:12px;background:#FEFAEB;border:1px solid var(--yellow);border-radius:var(--r-sm);padding:10px 14px;font-size:12.5px;color:#7a5c00;display:none;}
  /* RIGHT — small map that dwell/click grows to overlay */
  .rcol{position:sticky;top:20px;}
  .map-card{overflow:hidden;}
  .map-top{padding:13px 18px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border);}
  .map-top .t{font-family:var(--mono);font-size:11px;letter-spacing:.05em;color:var(--t2);}.map-top .hint{font-size:10.5px;font-family:var(--mono);color:var(--t4);}
  .dtoggle-bar{display:flex;gap:6px;flex-wrap:wrap;padding:11px 16px 0;}
  .dtoggle{font-size:11.5px;font-family:var(--mono);padding:5px 11px;border-radius:13px;border:1px solid var(--border);background:var(--surface);cursor:pointer;color:var(--t2);}.dtoggle.active{background:var(--purple);color:#fff;border-color:var(--purple);}
  /* Fixed pixel heights are guesses that are wrong on every screen but the one
     they were picked on. clamp: never uselessly small, scales with the viewport,
     never taller than the window. */
  #map{width:100%;height:clamp(380px,58vh,720px);cursor:pointer;position:relative;background:#F4F2FB;}
  @media(max-width:1000px){#map{height:clamp(280px,42vh,420px);}}
  #map svg,#mapbig svg{display:block;width:100%;height:100%;}
  .country{fill:#D9D6EC;stroke:#C3BFE0;stroke-width:.35;transition:fill .12s;shape-rendering:geometricPrecision;}
  .country.clk{cursor:pointer;}.country.clk:hover{fill:#B9B4E0;cursor:pointer;}
  .country.sel{fill:var(--purple);stroke:#6d68d6;}
  .country.preview{fill:#A79FE0;stroke:var(--purple);}
  .mapzoom{position:absolute;right:12px;bottom:12px;display:flex;flex-direction:column;gap:4px;z-index:5;}
  .mapzoom .mz{width:32px;height:32px;border:1px solid var(--border-md);background:rgba(255,255,255,.95);border-radius:8px;font-size:18px;line-height:1;color:var(--t1);cursor:pointer;box-shadow:0 2px 8px rgba(43,46,74,.1);display:flex;align-items:center;justify-content:center;font-family:var(--body);}
  .mapzoom .mz:hover{border-color:var(--purple);color:var(--purple);background:#fff;}
  /* World appears only once the map is zoomed */
  .mapzoom .mz-world{display:none;width:auto;padding:0 10px;font-family:var(--mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;}
  #map.zoomed .mapzoom .mz-world,#mapbig.zoomed .mapzoom .mz-world{display:flex;}
  .clabel{fill:#fff;font-size:9px;font-family:var(--body);font-weight:600;pointer-events:none;paint-order:stroke;stroke:rgba(43,46,74,.55);stroke-width:2.5px;}
  .dwell-ring{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);font-family:var(--mono);font-size:10.5px;color:var(--t3);background:rgba(255,255,255,.85);padding:4px 12px;border-radius:12px;pointer-events:none;opacity:0;transition:opacity .2s;}
  #map:hover .dwell-ring{opacity:1;}
  /* big map overlay */
  .overlay{position:fixed;inset:0;background:rgba(43,46,74,.5);display:none;align-items:center;justify-content:center;z-index:100;padding:3vh 3vw;}
  .overlay.open{display:flex;}
  .ov-inner{background:var(--surface);border-radius:var(--r-lg);width:100%;max-width:1200px;height:94vh;overflow:hidden;display:flex;flex-direction:column;}
  .ov-top{padding:14px 22px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border);flex:none;}
  .ov-top .t{font-family:var(--mono);font-size:11px;color:var(--t2);}.ov-top .x{cursor:pointer;color:var(--t3);font-size:13px;font-family:var(--mono);}
  .ov-body{flex:1;display:flex;min-height:0;}
  #mapbig{flex:1;min-width:0;}
  .ov-side{width:340px;border-left:1px solid var(--border);flex:none;overflow-y:auto;background:var(--surface2);}
  .ov-side.empty{display:flex;align-items:center;justify-content:center;text-align:center;color:var(--t3);padding:30px;}
  .ov-hero{padding:20px 22px 16px;background:var(--surface);border-bottom:1px solid var(--border);}
  .ov-dest{font-family:var(--disp);font-size:24px;color:var(--navy);}.ov-sub{font-size:11.5px;color:var(--t3);font-family:var(--mono);margin-top:2px;}
  .ov-lang{margin-top:10px;font-size:12.5px;color:var(--t2);}.ov-lang b{color:var(--navy);}
  .ov-add{margin-top:14px;width:100%;background:var(--purple);color:#fff;border:none;border-radius:var(--r);padding:12px;font-size:14px;font-weight:600;cursor:pointer;}
  .ov-add:hover{background:#6d68d6;}
  .ov-regions-toggle{margin-top:10px;width:100%;background:none;border:1px solid var(--border-md);color:var(--t2);border-radius:var(--r);padding:10px;font-size:13px;font-family:var(--mono);cursor:pointer;}
  .ov-regions-toggle:hover{border-color:var(--purple);color:var(--purple);}
  .ov-regions{display:none;padding:4px 0;}.ov-regions.open{display:block;}
  .ov-rgn{padding:10px 22px;cursor:pointer;border-bottom:1px solid var(--border);font-size:13.5px;}
  .ov-rgn:hover{background:var(--purple-xlt);color:var(--purple);}
  .ov-body-sec{padding:16px 22px 4px;}
  .ov-sech{font-family:var(--mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--t4);margin:14px 0 9px;}.ov-sech:first-child{margin-top:2px;}
  .ov-dish{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid var(--border);}.ov-dish:last-child{border:none;}.ov-dish .n{font-size:13px;font-weight:500;}.ov-dish .g{font-size:11px;color:var(--t3);font-family:var(--mono);text-align:right;flex:none;max-width:50%;}
  .ov-arow{display:flex;align-items:center;gap:9px;padding:6px 0;border-bottom:1px solid var(--border);}.ov-arow:last-child{border:none;}.ov-adot{width:8px;height:8px;border-radius:50%;flex:none;}.ov-aname{flex:1;font-size:12.5px;}.ov-atag{font-size:9px;font-family:var(--mono);padding:2px 7px;border-radius:9px;text-transform:uppercase;flex:none;}
  .t-hidden{background:#FDF0DE;color:#B87415;}.t-common{background:#E9F2DD;color:#4A7A1B;}
/* cursor tooltip on small map */
  /* .tip lives in the MAP TOOLTIP block near the bottom of this file. The old
     230px prototype rule was here and its 200px mobile override still landed on
     the new markup, squeezing it. */
  .tip.show{display:block;}
  .tip .tn{font-family:var(--disp);font-size:16px;margin-bottom:6px;}
  .tip .tk{font-family:var(--mono);font-size:9px;letter-spacing:.05em;color:#9a9cc4;text-transform:uppercase;margin:8px 0 4px;}
  .tip .trow{display:flex;justify-content:space-between;font-size:11.5px;padding:1px 0;color:#e9e9f6;}.tip .trow .p{color:var(--purple-lt);font-family:var(--mono);}
  .tip .tl{font-size:11.5px;color:#e9e9f6;line-height:1.5;}
  .tip .ta{display:flex;align-items:center;gap:7px;font-size:11.5px;padding:1px 0;color:#e9e9f6;}.tip .ta .ad{width:7px;height:7px;border-radius:50%;flex:none;}

  /* MOBILE */
  @media(max-width:1000px){
    .ov-inner{height:92vh;}
    .ov-body{flex-direction:column;}
    #mapbig{height:38vh;flex:none;}
    /* flex:none was never overridden here, so the panel couldn't grow into the
       remaining space and couldn't scroll — everything below the fold (dishes,
       allergens, the Add button) was unreachable on a phone. */
    .ov-side{width:100%;border-left:none;border-top:1px solid var(--border);flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;}
  }
  @media(max-width:640px){
    .steps{display:none;}
    .layout{gap:16px;}
    #map{height:clamp(240px,36vh,360px);}
    .overlay{padding:0;}
    .ov-inner{height:100vh;border-radius:0;max-width:100%;}
    #mapbig{height:34vh;}
    .rec{padding:12px;}
    .dial-sub{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));}

  }

  @keyframes capHit{0%,100%{transform:translateX(0);}25%{transform:translateX(-4px);}75%{transform:translateX(4px);}}
  .allergen-grid.cap-hit{animation:capHit .3s;}
  .allergen-search-wrap{display:flex;align-items:center;gap:8px;border:1px solid var(--border-md);border-radius:var(--r-sm);padding:0 12px;margin:12px 0 4px;background:var(--surface);}
  .allergen-search-wrap .asearch-icon{font-size:14px;opacity:.6;}
  #allergen-search{flex:1;border:none;outline:none;background:none;height:42px;font-size:14px;font-family:var(--body);color:var(--t1);}
  /* stage 2 screen + motion */
  .s2screen{max-width:1200px;margin:0 auto;padding-top:0;}
  /* Merged from two consecutive declarations. The first was `margin-top:0
     !important`, which beat the second's `margin:-8px auto 0` — so the -8px
     never applied and the !important was load-bearing by accident. Keeping the
     winning value (0) explicitly; no visual change. */
  .s2-back-up{display:flex;flex-direction:column;align-items:center;gap:2px;background:none;border:none;color:var(--t3);font-family:var(--mono);font-size:11px;cursor:pointer;padding:0 0 12px;margin:0 auto;transition:color .15s;}
  .s2-back-up:hover{color:var(--purple);}
  .bu-arrow{font-size:20px;line-height:1;font-weight:700;transition:transform .15s;}
  .s2-back-up:hover .bu-arrow{transform:translateY(-3px);}
  .bu-txt{letter-spacing:.04em;text-transform:uppercase;}
  .s2col{display:grid;grid-template-columns:1fr;gap:0;transition:grid-template-columns .4s ease;}
  .s2col.revealed{grid-template-columns:1fr 380px;gap:22px;}
  .s2-main{transition:all .4s ease;}
  .s2-preview{opacity:0;transform:translateX(20px);transition:opacity .4s ease,transform .4s ease;pointer-events:none;overflow:hidden;height:0;padding:0;border:none;}
  .s2col.revealed .s2-preview{opacity:1;transform:none;pointer-events:auto;height:auto;padding:0;border:1px solid var(--border);position:sticky;top:20px;align-self:start;}
  @media(max-width:900px){.s2col.revealed{grid-template-columns:1fr;}}
  .allergen-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:10px;align-items:start;}
  .btn-back{background:none;border:1px solid var(--border-md);color:var(--t2);border-radius:var(--r);padding:13px 20px;font-size:15px;cursor:pointer;font-family:var(--body);}
  .btn-back:hover{border-color:var(--purple);color:var(--purple);}
  .s2-cap{display:flex;align-items:center;gap:12px;margin:6px 0 4px;}
  .cap-bar{flex:1;height:6px;background:var(--surface2);border-radius:3px;overflow:hidden;}
  .cap-fill{height:100%;background:var(--purple);transition:width .2s;}
  .s2-cap.over .cap-fill{background:#c0392b;}.cap-txt{font-family:var(--mono);font-size:11px;color:var(--t3);}.s2-cap.over .cap-txt{color:#c0392b;font-weight:600;}
  /* local flag treatments (clear, not a subtle pin) */
  .inline-local{font-family:var(--mono);font-size:9px;background:var(--navy);color:#fff;padding:1px 6px;border-radius:7px;}
  .cbr-check{width:18px;flex:none;text-align:center;color:var(--purple);font-weight:600;}
  .cbr.on .cbr-check{color:#fff;}
  .cbr-name{flex:1;}
  .local-tip{position:fixed;transform:translate(-50%,-100%);background:var(--navy);color:#fff;font-size:11.5px;line-height:1.4;padding:7px 11px;border-radius:8px;max-width:220px;z-index:130;   /* above the category modal (115) */pointer-events:none;box-shadow:0 8px 24px rgba(43,46,74,.2);display:none;text-align:center;}
  .item-chip.local-chip{background:#EEECFB;border-color:var(--purple-lt);color:var(--purple);}
  .item-chip.local-chip:hover{background:var(--purple-xlt);border-color:var(--purple);}
  .item-chip.local-chip.selected{background:var(--purple);border-color:var(--purple);color:#fff;}
  /* custom */
  .custom-type{display:flex;gap:8px;margin-bottom:8px;}
  .custom-type input{flex:1;height:40px;padding:0 12px;border:1px solid var(--border-md);border-radius:var(--r-sm);font-size:14px;font-family:var(--body);}
  .custom-type button{background:var(--purple);color:#fff;border:none;border-radius:var(--r-sm);padding:0 18px;font-size:13px;font-weight:600;cursor:pointer;}
  .custom-note{font-size:11.5px;color:var(--t3);font-style:italic;margin-bottom:10px;line-height:1.4;}
  .custom-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0;}
  .custom-chip{display:inline-flex;align-items:center;gap:6px;background:var(--purple);color:#fff;border-radius:15px;padding:5px 12px;font-size:12.5px;}
  .custom-chip.local{background:var(--navy);}
  .custom-chip .cx,.custom-chip .cxl{cursor:pointer;opacity:.8;}
  .custom-browse-h{font-family:var(--mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--t4);margin:12px 0 8px;}
  #custom-browse{width:100%;height:38px;padding:0 12px;border:1px solid var(--border-md);border-radius:var(--r-sm);font-size:13.5px;font-family:var(--body);}
  .custom-browse-list{margin-top:6px;max-height:260px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--r-sm);}
  .cbr{display:flex;justify-content:space-between;align-items:center;padding:9px 12px;border-bottom:1px solid var(--border);cursor:pointer;font-size:13px;}
  .cbr:last-child{border-bottom:none;}
  .cbr:hover{background:var(--purple-xlt);}
  .cbr.on{background:var(--purple);color:#fff;}
  .cbr-from{font-size:10px;color:var(--t4);font-family:var(--mono);}.cbr.on .cbr-from{color:rgba(255,255,255,.7);}
  .cbr-none{color:var(--t3);font-size:12.5px;padding:10px;}
  /* preview card */
  .pv-head{font-family:var(--mono);font-size:11px;letter-spacing:.05em;color:var(--t3);padding:14px 18px;border-bottom:1px solid var(--border);}
  .pv-tabs{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px;}
  .pv-tab{font-family:var(--body);font-size:11.5px;padding:4px 11px;border-radius:12px;border:1px solid var(--border);background:var(--surface);color:var(--t2);cursor:pointer;}
  .pv-tab:hover{border-color:var(--purple-lt);}
  .pv-tab.active{background:var(--purple);color:#fff;border-color:var(--purple);}
  .pv-line.muted-note{font-size:11.5px;color:var(--t3);font-style:italic;}
  .pv-body{padding:18px;}
  .pv-empty{text-align:center;color:var(--t3);padding:30px 12px;}.pv-empty-ic{font-size:30px;opacity:.4;}.pv-empty-t{font-size:13px;margin-top:10px;}
  /* The preview is a sample, not the deliverable. Selection is disabled so the
     card text can't be copied out of the free preview, and -webkit-touch-callout
     suppresses the iOS long-press "Copy / Look Up" sheet, which would otherwise
     hand the same text back on mobile. Matches the live generator's behavior. */
  .pv-card{border:1px solid var(--border);border-radius:var(--r);padding:18px;background:#fff;
    -webkit-user-select:none;-moz-user-select:none;user-select:none;
    -webkit-touch-callout:none;}
  .pv-heading{font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--navy);font-weight:600;margin-bottom:12px;padding-bottom:8px;border-bottom:2px solid var(--yellow);}
  .pv-line{font-size:13.5px;line-height:1.55;color:var(--t1);margin-bottom:9px;}
  .pv-line b{color:var(--navy);}
  .pv-foot{font-family:var(--mono);font-size:9.5px;color:var(--t4);margin-top:12px;padding-top:10px;border-top:1px solid var(--border);}

  /* stage 3 — visual product cards: 3 one-time | divider | scanner */
  .format-grid3{display:grid;grid-template-columns:3fr auto 1fr;gap:18px;margin-top:14px;align-items:start;}
  /* Mobile: ALL FOUR products in ONE grid, so every card is the same size.
     The desktop layout is two groups side by side (3 one-time | divider |
     scanner). Collapsing that to a single column left the groups intact — three
     cards sharing a 2-col grid at ~180px each, and the scanner alone at full
     width. Same aspect-ratio thumb, so the scanner's image rendered ~285px tall
     against their ~135px. It read as the headline product instead of the add-on.
     Two rounds of narrowing the CARD didn't help, because the THUMB was doing it.

     `display:contents` dissolves the two wrapper divs so their children become
     direct items of one grid. The scanner keeps its tint and a rule above it —
     colour marks the boundary, not size. */
  @media(max-width:900px){
    .format-grid3{grid-template-columns:repeat(2,1fr);gap:12px;}
    .fmt-vdivider{display:none;}
    .fmt-onetime-cards{display:contents;}
    .fmt-scanner-col{display:contents;}
    .fmt-scanner-col .pcard{margin-top:6px;border-top-width:1px;}
  }
  /* One-across only when two genuinely won't fit. */
  @media(max-width:520px){
    .format-grid3{grid-template-columns:1fr;}
  }
  .fmt-onetime-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;align-items:start;}
  .fmt-vdivider{width:1px;background:var(--border);align-self:stretch;min-height:220px;}
  .pcard{position:relative;border:1px solid var(--border);border-radius:14px;overflow:hidden;cursor:pointer;background:var(--surface);transition:all .15s ease;}
  .pcard:hover{border-color:var(--purple-lt);transform:translateY(-2px);box-shadow:0 6px 18px rgba(43,46,74,.08);}
  .pcard.selected{border-color:var(--purple);box-shadow:0 0 0 1px var(--purple);}
  .pcard-check{position:absolute;top:9px;right:9px;z-index:2;width:20px;height:20px;border-radius:50%;background:var(--purple);color:#fff;font-size:11px;display:none;align-items:center;justify-content:center;}
  .pcard.selected .pcard-check{display:inline-flex;}
  .pcard-thumb{aspect-ratio:4/3;background:linear-gradient(160deg,#FBEFD6,#FAF3E4);display:flex;align-items:center;justify-content:center;border-bottom:1px solid var(--border);}
  .pcard-imgph{width:calc(100% - 20px);height:calc(100% - 20px);border:1.5px dashed var(--border-md);border-radius:10px;display:flex;align-items:center;justify-content:center;background:repeating-linear-gradient(45deg,transparent,transparent 8px,rgba(0,0,0,.015) 8px,rgba(0,0,0,.015) 16px);}
  .imgph-label{font-family:var(--mono);font-size:9px;letter-spacing:.1em;color:var(--t4);}
  .pcard-meta{padding:12px 13px 14px;}
  .pcard-title{font-size:14px;font-weight:600;color:var(--t1);line-height:1.25;}
  .pcard-blurb{font-size:11.5px;color:var(--t3);margin-top:3px;line-height:1.35;}
  .pcard-price{font-family:var(--body);font-size:16px;color:var(--navy);margin-top:9px;font-weight:700;letter-spacing:-.01em;}
  /* scanner offset color */
  .fmt-scanner-col .pcard-scanner{background:linear-gradient(180deg,#FFF6E9,var(--surface));border-color:#F0D9A8;}
  .pcard-scanner 
  .pcard-scanner .pcard-imgph{border-color:#E5C983;background:repeating-linear-gradient(45deg,transparent,transparent 8px,rgba(246,201,74,.08) 8px,rgba(246,201,74,.08) 16px);}
  .pcard-scanner .pcard-price{color:#C79A2E;}
  .pcard-scanner.selected{border-color:var(--purple);box-shadow:0 0 0 1px var(--purple);}
  .pcard-desc{padding:0 13px 13px;font-size:11.5px;color:var(--t2);line-height:1.5;border-top:1px solid var(--border);padding-top:10px;margin-top:2px;animation:stepOpen 220ms ease both;min-height:76px;}
  .pcard-scanner .pcard-desc{border-top-color:#F0D9A8;}
  .fmt-pack-slot:empty{display:none;}
  .fmt-pack-slot{border-top:1px solid var(--border);background:var(--surface2);}
  .wpack-panel{padding:12px 13px 13px;text-align:left;cursor:default;}
  .wpack-head{font-family:var(--mono);font-size:9px;letter-spacing:.06em;text-transform:uppercase;color:var(--t4);margin-bottom:10px;}
  .wpack-row{display:flex;flex-direction:column;gap:4px;margin-bottom:10px;}
  .wpack-lang{font-size:11.5px;font-weight:500;color:var(--t2);}
  .wpack-sel{width:100%;font-family:var(--body);font-size:12.5px;padding:8px 10px;border:1px solid var(--border-md);border-radius:8px;background:var(--surface);color:var(--t1);cursor:pointer;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237D78E6' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;padding-right:28px;}
  .wpack-sel:hover{border-color:var(--purple-lt);}
  .wpack-sel:focus{outline:none;border-color:var(--purple);box-shadow:0 0 0 2px var(--purple-xlt);}
  .wpack-note{font-family:var(--mono);font-size:9px;color:var(--t4);margin-top:2px;}
  /* floating card tooltip */
  .pcard-tip{position:fixed;transform:translate(-50%,-100%);background:var(--navy);color:#fff;font-size:11.5px;line-height:1.4;padding:8px 11px;border-radius:8px;max-width:230px;z-index:100;pointer-events:none;box-shadow:0 8px 24px rgba(43,46,74,.2);display:none;}
  /* right-panel expanded examples */
  
  .pv3-pill{font-family:var(--body);font-size:11.5px;padding:5px 11px;border-radius:14px;border:1px solid var(--border);background:var(--surface);color:var(--t2);cursor:pointer;}
  
  .pv3-pill.active{background:var(--purple);color:#fff;border-color:var(--purple);}
  .pv3-desc{font-size:12.5px;color:var(--t2);line-height:1.5;margin-bottom:14px;}
  .pv3-examples{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
  .pv3-ex{text-align:center;}
  .pv3-ex-img{aspect-ratio:3/4;border-radius:10px;background:linear-gradient(135deg,var(--purple-xlt),var(--cream));border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:26px;}
  .pv3-ex-cap{font-size:10px;color:var(--t3);margin-top:5px;line-height:1.3;}
  .pv3-extra{margin-top:14px;padding-top:12px;border-top:1px solid var(--border);font-size:12.5px;color:var(--navy);line-height:1.5;}
  .pv3-extra-sub{color:var(--t3);font-size:11.5px;}
  .pv3-extra b{color:var(--purple);}
  .pv3-mock-note{font-family:var(--mono);font-size:9px;color:var(--t4);margin-top:12px;}
  /* total */
  .s3-total-wrap{font-family:var(--mono);font-size:12px;color:var(--t3);}
  .s3-total{font-size:17px;font-weight:600;color:var(--navy);margin-left:4px;}
  /* stage 3 right preview */
  .pv3-pills{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:12px;}
  .pv3-pill{font-family:var(--body);font-size:11.5px;padding:5px 11px;border-radius:14px;border:1px solid var(--border);background:var(--surface);color:var(--t2);cursor:pointer;}
  .pv3-pill:hover{border-color:var(--purple-lt);}
  .pv3-pill.active{background:var(--purple);color:#fff;border-color:var(--purple);}
  .pv3-desc{font-size:12.5px;color:var(--t2);line-height:1.5;margin-bottom:14px;}
  .pv3-sub{color:var(--t4);font-size:11.5px;}
  .pv3-mock{text-align:center;padding:10px;}
  .pv3-phone-visual{width:120px;height:220px;margin:0 auto;border:3px solid var(--navy);border-radius:22px;position:relative;background:var(--cream);display:flex;align-items:center;justify-content:center;}
  .pv3-phone-notch{position:absolute;top:8px;left:50%;transform:translateX(-50%);width:36px;height:5px;border-radius:3px;background:var(--navy);}
  .pv3-phone-screen{font-size:34px;display:flex;flex-direction:column;align-items:center;gap:10px;}
  .pv3-card-lines{display:flex;flex-direction:column;gap:5px;}
  .pv3-card-lines span{display:block;width:64px;height:5px;border-radius:3px;background:var(--purple-lt);}
  .pv3-card-lines span:nth-child(2){width:48px;}.pv3-card-lines span:nth-child(3){width:56px;}
  .pv3-card-visual{font-size:44px;width:150px;height:94px;margin:0 auto;border:2px solid var(--purple-lt);border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:var(--surface);}
  .pv3-mock-caption{font-size:12.5px;color:var(--t2);margin-top:14px;line-height:1.5;}
  .pv3-mock-note{font-family:var(--mono);font-size:9.5px;color:var(--t4);}
  .pv3-audio{padding:6px;}
  .pv3-audio-row{display:flex;align-items:center;justify-content:space-between;padding:11px 13px;border:1px solid var(--border);border-radius:var(--r-sm);margin-bottom:8px;font-size:12.5px;color:var(--t2);}
  .pv3-play{width:30px;height:30px;border-radius:50%;border:none;background:var(--purple);color:#fff;cursor:pointer;font-size:11px;}

  /* stage 3: single column (right preview removed) */
  #s3col.s2col, #s3col.s2col.revealed{grid-template-columns:1fr;gap:0;}
  #s3col .s2-main{max-width:none;width:100%;}
  .pcard-cta{margin-top:10px;font-family:var(--mono);font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--purple);}
  .pcard.selected .pcard-cta{color:var(--purple);font-weight:600;}
  .pcard-scanner .pcard-cta{color:#C79A2E;}
  /* format modal */
  .fmt-modal{position:fixed;inset:0;z-index:300;display:none;align-items:center;justify-content:center;padding:4vh 4vw;}
  .fmt-modal.open{display:flex;}
  .fmodal-backdrop{position:absolute;inset:0;background:rgba(43,46,74,.55);backdrop-filter:blur(2px);}
  /* Fixed dimensions so every product modal is identical — the right panel scrolls
   internally rather than the whole modal growing per product. */
.fmodal-inner{position:relative;z-index:1;background:var(--surface);border-radius:20px;width:min(1340px,96vw);height:min(720px,92vh);box-shadow:0 30px 90px rgba(43,46,74,.35);display:grid;grid-template-columns:1.75fr 1fr;overflow:hidden;}
  @media(max-width:680px){.fmodal-inner{grid-template-columns:1fr;}}
  .fmodal-close{position:absolute;top:12px;right:12px;z-index:3;width:32px;height:32px;border-radius:50%;border:none;background:rgba(255,255,255,.9);color:var(--navy);font-size:15px;cursor:pointer;box-shadow:0 2px 8px rgba(43,46,74,.15);}
  .fmodal-close:hover{background:#fff;}
  .fmodal-gallery{position:relative;background:linear-gradient(160deg,#FBEFD6,#FAF3E4);border-radius:20px 0 0 20px;overflow:hidden;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;}
  @media(max-width:680px){.fmodal-gallery{border-radius:20px 20px 0 0;min-height:280px;}}
  .fmodal-slides{width:100%;height:100%;position:relative;}
  .fmodal-slide{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:flex-start;padding:0 12px 12px;}
  .fmodal-slide.active{display:flex;}
  .fmodal-media{width:100%;flex:1;border-radius:12px;display:flex;align-items:center;justify-content:center;min-height:0;}
  .fmodal-media-label{font-family:var(--mono);font-size:10px;letter-spacing:.1em;color:var(--t4);}
  .fmodal-cap{flex:none;font-size:12px;color:var(--t3);margin-top:10px;font-family:var(--mono);text-align:center;}
  .fmodal-nav{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%;border:none;background:rgba(255,255,255,.92);color:var(--navy);font-size:20px;cursor:pointer;box-shadow:0 2px 10px rgba(43,46,74,.15);display:flex;align-items:center;justify-content:center;}
  .fmodal-nav.prev{left:12px;}.fmodal-nav.next{right:12px;}
  .fmodal-dots{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);display:flex;gap:6px;}
  .fmodal-dot{width:7px;height:7px;border-radius:50%;background:var(--border-md);cursor:pointer;}
  .fmodal-dot.active{background:var(--purple);}
  .fmodal-body{padding:36px 34px;display:flex;flex-direction:column;overflow-y:auto;height:100%;}
  .fmodal-title{font-family:var(--disp);font-size:24px;font-weight:600;color:var(--navy);}
  .fmodal-price{font-family:var(--mono);font-size:13px;color:var(--purple);margin-top:6px;}
  .fmodal-desc{font-size:15px;color:var(--t2);line-height:1.6;margin-top:14px;}
  .fmodal-packs{margin-top:18px;border-top:1px solid var(--border);padding-top:16px;}
  .fmodal-packs-head{font-family:var(--mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--t4);margin-bottom:10px;}
  .fmodal-pack-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
  .fmodal-pack-lang{font-size:13px;color:var(--t2);}
  .fmodal-pack-sel{font-family:var(--body);font-size:13px;padding:8px 10px;border:1px solid var(--border-md);border-radius:8px;background:var(--surface);color:var(--t1);cursor:pointer;}
  .fmodal-pack-sel:hover{border-color:var(--purple-lt);}
  .fmodal-pack-note{font-family:var(--mono);font-size:9.5px;color:var(--t4);margin-top:4px;}
  .fmodal-scanner-perk{margin-top:16px;font-size:13px;color:var(--navy);}
  .fmodal-scanner-perk b{color:var(--purple);}
  .fmodal-add{margin-top:auto;background:var(--purple);color:#fff;border:none;border-radius:12px;padding:14px;font-size:15px;font-weight:600;cursor:pointer;font-family:var(--body);}
  .fmodal-add:hover{background:#6d68d6;}
  .fmodal-add.added{background:var(--surface);color:var(--purple);border:1px solid var(--purple);}


  /* stage 4 right side — single shopify order summary */
  .rv-cart{border:1px solid var(--border);border-radius:var(--r);padding:18px 18px 16px;background:var(--surface);}
  .rv-cart-h{font-family:var(--mono);font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:var(--t3);padding-bottom:14px;border-bottom:1px solid var(--border);margin-bottom:4px;}
  .rv-cart-row{display:flex;align-items:center;gap:12px;padding:12px 0;}
  .rv-cart-items .rv-cart-row+.rv-cart-row{border-top:1px solid var(--border);}
  .rv-pimg{width:58px;height:58px;border-radius:10px;background:var(--surface2);border:1px solid var(--border);flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;background-image:repeating-linear-gradient(45deg,transparent,transparent 7px,rgba(0,0,0,.02) 7px,rgba(0,0,0,.02) 14px);}
  .rv-pimg.wallet,.rv-pimg.scanner{background-color:#FBEFD6;}
  .rv-pimg.audio{background-color:var(--purple-xlt);}
  .rv-pimg.digital{background-color:#E9F0FB;}
  .rv-pimg-lbl{font-family:var(--mono);font-size:8px;letter-spacing:.08em;color:var(--t4);}
  .rv-upsell-pimg{width:58px;height:58px;border-radius:10px;background:#fff;border:1px solid var(--purple-lt);flex:none;display:flex;align-items:center;justify-content:center;}
  .rv-cart-info{flex:1;min-width:0;}
  .rv-cart-nm{font-size:14px;font-weight:500;color:var(--t1);}
  .rv-cart-sub{font-size:11.5px;color:var(--t3);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .rv-cart-amt{font-family:var(--mono);font-size:13.5px;color:var(--t1);flex:none;}
  /* polished upsell line inside cart */
  /* Upsell thumbnail aligns with the cart-item thumbnails above it. Cart rows have
   0 left padding (thumbnails at the card's 18px content edge). The box keeps
   padding on top/right/bottom but drops it on the left, so its thumbnail starts
   at the same x. A small left margin on the thumbnail gives breathing room
   without re-introducing the offset. */
.rv-upsell{position:relative;display:flex;align-items:flex-start;gap:12px;margin:8px 0 4px;padding:13px 13px 13px 0;border:1px dashed var(--purple-lt);border-radius:11px;background:var(--purple-xlt);}
.rv-upsell .rv-upsell-pimg{margin-left:0;}
  .rv-upsell-thumb{width:40px;height:40px;border-radius:9px;background:#fff;border:1px solid var(--purple-lt);display:flex;align-items:center;justify-content:center;font-size:20px;flex:none;}
  /* Text column gets the full remaining width so the description reads on fewer
   lines instead of bunching. */
.rv-upsell-main{flex:1;min-width:0;padding-top:1px;}
.rv-upsell-t{font-size:15px;font-weight:700;color:var(--navy);line-height:1.3;}
.rv-upsell-d{font-size:12.5px;color:var(--t2);line-height:1.5;margin-top:5px;}
  .rv-upsell-t{font-size:15px;font-weight:700;color:var(--navy);line-height:1.3;}
  .rv-upsell-badge{display:inline-block;font-family:var(--mono);font-size:9.5px;background:var(--purple);color:#fff;padding:2px 7px;border-radius:8px;vertical-align:middle;margin-left:2px;}
  .rv-upsell-d{font-size:12.5px;color:var(--t2);line-height:1.5;margin-top:6px;}
  .rv-upsell-d b{color:var(--purple);}
  .rv-upsell-add{flex:none;background:var(--purple);color:#fff;border:none;border-radius:8px;padding:8px 20px;font-size:13px;font-weight:600;cursor:pointer;font-family:var(--body);}
  .rv-upsell-add:hover{background:#6d68d6;}
  .rv-upsell-x{position:absolute;top:6px;right:8px;background:none;border:none;color:var(--t4);font-size:11px;cursor:pointer;}
  /* summary lines */
  .rv-cart-lines{border-top:1px solid var(--border);margin-top:6px;padding-top:12px;}
  .rv-sumline{display:flex;justify-content:space-between;font-size:12.5px;color:var(--t2);margin-bottom:7px;}
  .rv-sumline span:last-child{font-family:var(--mono);}
  .rv-sumline.rv-disc{color:var(--purple);}.rv-sumline.rv-disc span:last-child{color:var(--purple);}
  .rv-ship-v{font-style:italic;color:var(--t3);}
  .rv-cart-total{display:flex;justify-content:space-between;align-items:baseline;padding-top:12px;border-top:1px solid var(--border);margin-top:4px;}
  .rv-recurring-note{font-size:11.5px;color:var(--t3);margin-top:8px;line-height:1.5;}
  .rv-recurring-note b{color:var(--purple);}
  .rv-ct-lbl{font-size:15px;font-weight:600;color:var(--navy);}
  .rv-ct-amt{font-family:var(--disp);font-size:25px;font-weight:600;color:var(--navy);}
  .rv-next{border:1px solid var(--border);border-radius:var(--r);padding:18px;background:var(--surface2);}
  .rv-next-h{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--t4);margin-bottom:14px;}
  .rv-next-row{display:flex;gap:12px;margin-bottom:14px;align-items:flex-start;}
  .rv-next-n{width:22px;height:22px;border-radius:50%;background:var(--purple);color:#fff;font-family:var(--mono);font-size:11px;display:flex;align-items:center;justify-content:center;flex:none;}
  .rv-next-row b{font-size:13.5px;color:var(--t1);}
  .rv-next-d{font-size:12px;color:var(--t3);margin-top:2px;line-height:1.45;}
  .rv-trust{display:flex;flex-wrap:wrap;gap:14px;margin-top:6px;padding-top:14px;border-top:1px solid var(--border);font-size:11px;color:var(--t3);}
  /* stage 4 review */
  .rv-card-wrap{max-width:none;}
  .rv-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:28px;margin-top:16px;align-items:start;}
  @media(max-width:900px){.rv-grid{grid-template-columns:1fr;}}
  .rv-block{border:1px solid var(--border);border-radius:var(--r);padding:16px 18px;margin-bottom:14px;}
  .rv-block-h{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--t4);margin-bottom:12px;}
  .rv-kv{display:flex;gap:14px;margin-bottom:10px;font-size:13.5px;}
  .rv-k{color:var(--t3);min-width:100px;}
  .rv-v{color:var(--t1);flex:1;}
  .rv-chips{display:flex;flex-wrap:wrap;gap:6px;}
  .rv-chip{background:var(--purple-xlt);color:var(--purple);border-radius:12px;padding:3px 10px;font-size:12px;}
  .rv-alg-row{display:flex;gap:14px;padding:7px 0;border-bottom:1px solid var(--border);font-size:13px;}
  .rv-alg-row:last-child{border-bottom:none;}
  .rv-alg-cat{min-width:130px;color:var(--t2);font-weight:500;}
  .rv-alg-items{flex:1;color:var(--t3);}
  .rv-empty{color:var(--t4);font-size:13px;font-style:italic;}
  .rv-line{display:flex;justify-content:space-between;gap:12px;padding:8px 0;font-size:13.5px;color:var(--t2);border-bottom:1px solid var(--border);}
  .rv-amt{font-family:var(--mono);color:var(--t1);}
  .rv-discount{color:var(--purple);}.rv-discount .rv-amt{color:var(--purple);}
  .rv-ship .rv-amt{font-family:var(--mono);font-size:12px;color:var(--t3);font-style:italic;}
  .rv-total-row{display:flex;justify-content:space-between;align-items:center;padding-top:14px;margin-top:6px;font-size:15px;font-weight:600;color:var(--navy);}
  .rv-total{font-family:var(--disp);font-size:22px;color:var(--navy);}
  .rv-side{position:sticky;top:20px;}
  .rv-preview{border:1px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:16px;}
  .rv-preview-h{font-family:var(--mono);font-size:10px;letter-spacing:.05em;color:var(--t3);padding:12px 14px;border-bottom:1px solid var(--border);}
  .rv-lang-tabs{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px;}
  .rv-tab{font-family:var(--body);font-size:11px;padding:4px 10px;border-radius:11px;border:1px solid var(--border);background:var(--surface);color:var(--t2);cursor:pointer;}
  .rv-tab.active{background:var(--purple);color:#fff;border-color:var(--purple);}
  .rv-preview-body{padding:16px;}
  .rv-card{border:1px solid var(--border);border-radius:var(--r);padding:16px;background:#fff;}
  .rv-card-h{font-family:var(--mono);font-size:10.5px;letter-spacing:.05em;color:var(--navy);font-weight:600;margin-bottom:10px;padding-bottom:7px;border-bottom:2px solid var(--yellow);}
  .rv-card-l{font-size:13px;line-height:1.5;color:var(--t1);margin-bottom:8px;}
  .rv-card-l b{color:var(--navy);}
  .rv-card-foot{font-family:var(--mono);font-size:9px;color:var(--t4);margin-top:10px;padding-top:8px;border-top:1px solid var(--border);}
  .rv-checkout{width:100%;background:var(--purple);color:#fff;border:none;border-radius:12px;padding:15px;font-size:15px;font-weight:600;cursor:pointer;font-family:var(--body);}
  .rv-checkout:hover{background:#6d68d6;}
  .rv-trial{position:relative;border:1px solid var(--purple-lt);border-radius:var(--r);padding:16px 16px 15px;margin-bottom:14px;background:linear-gradient(180deg,var(--purple-xlt),transparent);text-align:center;}
  .rv-trial-x{position:absolute;top:8px;right:10px;background:none;border:none;color:var(--t4);font-size:13px;cursor:pointer;}
  .rv-trial-ic{font-size:24px;}
  .rv-trial-t{font-size:14px;font-weight:600;color:var(--navy);margin-top:4px;}
  .rv-trial-sub{font-size:12px;color:var(--t3);line-height:1.5;margin-top:6px;}
  .rv-trial-sub b{color:var(--purple);}
  .rv-trial-cta{margin-top:12px;background:var(--purple);color:#fff;border:none;border-radius:10px;padding:10px 20px;font-size:13px;font-weight:600;cursor:pointer;font-family:var(--body);}
  .rv-trial-cta:hover{background:#6d68d6;}
  .rv-legal{font-size:10.5px;color:var(--t4);text-align:center;margin-top:10px;line-height:1.5;}
  .rec-nudge{display:flex;align-items:center;gap:10px;background:#FFF9E9;border:1px solid var(--yellow);border-radius:var(--r-sm);padding:11px 13px;margin-bottom:12px;font-size:12.5px;color:var(--t1);line-height:1.4;}
  .rec-nudge .nudge-ic{font-size:15px;flex:none;}
  .rec-nudge .nudge-txt{flex:1;}.rec-nudge .nudge-txt b{color:var(--navy);}
  .rec-nudge .nudge-add{flex:none;background:var(--navy);color:#fff;border:none;border-radius:14px;padding:6px 12px;font-size:11.5px;font-weight:600;cursor:pointer;font-family:var(--body);}
  .rec-nudge .nudge-add:hover{background:#3a3d5c;}
  .rec-nudge .nudge-x{flex:none;background:none;border:none;color:var(--t4);cursor:pointer;font-size:12px;}
/* ═══════════════════════════════════════════════════════════════════════════
   REFACTOR ADDITIONS — Stage 1 data layer wiring
   ═══════════════════════════════════════════════════════════════════════════ */

/* Category-level local highlight (task 6a).
   The category card itself goes purple when it holds destination-specific
   items, so the signal is visible while the card is COLLAPSED — otherwise a
   traveler has to open all 19 to discover where the local content is.
   Deliberately lighter than .has-selections so a user's own choices still win
   the visual hierarchy. Tooltip names the country; no text badge. */
.allergen-cat.has-local{border-color:var(--purple-lt);}
.allergen-cat.has-local .cat-name{color:var(--purple);}
.allergen-cat.has-local .cat-name::after{
  content:'';display:inline-block;width:5px;height:5px;border-radius:50%;
  background:var(--purple);margin-left:6px;vertical-align:middle;
}
.allergen-cat.has-local.has-selections{border-color:var(--purple);}

/* Review gate (behavior E). Draft allergen content has not passed
   native-speaker review. Stated plainly — not an alarm, not an apology. */
.s2-review-note{
  margin:-4px 0 14px;padding:9px 12px;border-radius:var(--r-sm);
  background:var(--surface2);border:1px solid var(--border);
  font-size:12.5px;line-height:1.5;color:var(--t2);
}

/* "Also spoken here" — the languages we can't generate.
   ~60% of destinations hit this path, so it renders as a normal, quiet fact
   of the page rather than an error state. */
.langexp-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.langexp-chip{
  font-size:12px;padding:4px 9px;border-radius:999px;
  background:var(--surface2);border:1px solid var(--border);color:var(--t2);
}
.langexp-chip .lx-prev{color:var(--t3);margin-left:5px;font-size:11px;}

/* Fallback-voice disclosure (task 8). */
.voice-note{
  margin-top:8px;font-size:12px;color:var(--t3);line-height:1.45;
}

/* No-data destinations (7 uninhabited territories). Graceful, not an error. */
.ov-side.nodata{color:var(--t3);font-size:13px;line-height:1.6;}


/* ═══ MAP TOOLTIP ═══════════════════════════════════════════════════════════
   Sectioned tooltip: languages + prevalence, dishes, local allergens.
   The ⚠ marks an endonym-vehicle — a local word that HIDES an allergen
   ("Dashi" = fish stock, "Ghee" = dairy). That flag is the product. */
.tip{position:fixed;z-index:200;pointer-events:none;background:var(--navy);color:#fff;border-radius:14px;padding:0;overflow:hidden;width:320px;box-shadow:0 12px 34px rgba(0,0,0,.32);display:none;}
/* Phone: a 320px fixed tooltip anchored to a tap point runs off a 390px screen.
   Pin it to the bottom, full width, and let it scroll if the content is tall.
   pointer-events stay off so it can't swallow the second tap. */
@media(max-width:640px){
  .tip{width:auto;left:10px!important;right:10px;top:auto!important;bottom:10px;max-height:56vh;overflow-y:auto;}
}
.tip.show{display:block;}
.tip .thead{padding:14px 16px 12px;background:rgba(255,255,255,.05);border-bottom:1px solid rgba(255,255,255,.09);}
.tip .tn{font-family:var(--disp);font-size:17px;font-weight:600;color:#fff;letter-spacing:-.01em;line-height:1.2;}
.tip .tinh{font-family:var(--mono);font-size:9px;color:#A9A4E8;margin-top:5px;line-height:1.4;}
.tip .tbody{padding:4px 16px 14px;}
.tip .tnd{font-size:12px;color:#c9c9d8;line-height:1.55;padding:12px 0 2px;}
.tip .tsec{padding:12px 0 0;}
.tip .tsec+.tsec{border-top:1px solid rgba(255,255,255,.07);margin-top:12px;}
.tip .tk{display:flex;align-items:center;gap:7px;font-family:var(--mono);font-size:8.5px;letter-spacing:.09em;text-transform:uppercase;color:#8E90A8;margin-bottom:8px;}
.tip .thid{background:rgba(249,206,71,.16);color:#F9CE47;padding:1px 6px;border-radius:7px;letter-spacing:.03em;}
.tip .tlang-wrap{display:flex;flex-direction:column;gap:5px;}
.tip .tlang{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.tip .tlang-n{font-size:12.5px;color:#f2f2fa;}
.tip .prev{font-family:var(--mono);font-size:7.5px;letter-spacing:.06em;text-transform:uppercase;padding:2px 7px;border-radius:8px;flex:none;}
.tip .prev-major{background:#7D78E6;color:#fff;}
.tip .prev-common{background:rgba(125,120,230,.30);color:#CFCBF6;}
.tip .prev-limited{background:rgba(255,255,255,.09);color:#9A9CB4;}
.tip .tdish{display:flex;flex-wrap:wrap;gap:5px;}
.tip .tdish-p{font-size:11px;color:#dcdcea;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.06);padding:3px 8px;border-radius:9px;}
.tip .talist{display:flex;flex-direction:column;gap:7px;}
.tip .ta{display:flex;align-items:center;gap:8px;}
.tip .ta .ad{width:8px;height:8px;border-radius:50%;flex:none;box-shadow:0 0 0 2px rgba(255,255,255,.09);}
.tip .atn{flex:1;font-size:12.5px;color:#f2f2fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tip .aflag{color:#F9CE47;font-size:9px;margin-left:5px;}
.tip .atc{font-family:var(--mono);font-size:8.5px;color:#8E90A8;flex:none;text-transform:uppercase;letter-spacing:.03em;}
.tip .tmore{font-family:var(--mono);font-size:9px;color:#7A7C94;margin-top:8px;}
.tip .tleg{font-family:var(--mono);font-size:8.5px;color:#8E90A8;margin-top:10px;padding-top:9px;border-top:1px solid rgba(255,255,255,.07);line-height:1.5;}

/* Overlay sidebar legend for the same "hidden" concept. */
.ov-leg{font-family:var(--mono);font-size:9px;color:var(--t3);margin-top:10px;line-height:1.5;}

/* ═══ ORPHANED CUSTOM LANGUAGES ═════════════════════════════════════════════
   A custom language outlives the destination that surfaced it — the person
   asked for it and it's still billed, so it must stay visible and removable. */
.orphan-custom{margin-top:12px;padding:12px 14px;border-radius:var(--r-sm);background:var(--surface2);border:1px solid var(--border);}
.orph-k{font-family:var(--mono);font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:var(--t3);margin-bottom:9px;}
.orph-chips{display:flex;flex-wrap:wrap;gap:6px;}
.orph-chips .uchip{cursor:pointer;}
.orph-x{margin-left:6px;opacity:.65;font-size:10px;}
.orph-note{font-size:11.5px;color:var(--t3);line-height:1.5;margin-top:9px;}


/* ═══ SIDEBAR ALLERGEN ROWS ═════════════════════════════════════════════════
   Same shape as the tooltip: dot + term + category. "Hidden" as a tag was
   wrong — these ARE local allergens, that's the section they're in. The ⚠ still
   marks the ones whose name conceals what's in them (Marisco → shellfish). */
.ov-atag.t-cat{background:var(--surface2);color:var(--t3);border:1px solid var(--border);}
.ov-aflag{color:#C9971E;font-size:10px;margin-left:6px;}
.ov-leg{font-family:var(--mono);font-size:9px;color:var(--t3);margin-top:10px;line-height:1.5;}

/* ═══ LANGUAGE PICKER ═══════════════════════════════════════════════════════
   Cards in a grid — same shape as the allergen categories, which is what read
   well. A scroll window wraps it so all 38 languages fit without Stage 1
   running several screens tall. */
/* #directlangs IS the grid — that rule lives at the top of this file, inherited
   from the prototype, and was correct all along. I broke it by adding
   `.lang-grid{display:block}` on the same element (ID and class both apply, and
   the later class rule won), then compounded it by nesting a scroll wrapper
   inside, which the grid can't see through.
   Structure now matches the prototype: #directlangs is the grid; the scroll cap
   sits on it directly; group headers span all columns. */
/* 38 languages, not the prototype's 10 — the picker must cap or Stage 1 runs
   past the fold.
   The real cap is measured at runtime (fitToViewport in main.js): a fixed px
   value is wrong on every screen except the one it was chosen on. What's here is
   the pre-JS fallback and the floor — on a short window the measured value goes
   negative, and a picker that vanishes is worse than one that makes the page
   scroll. */
#directlangs{max-height:268px;min-height:180px;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-right:4px;}
.lang-grp{grid-column:1/-1;position:sticky;top:0;z-index:2;background:var(--bg);font-family:var(--mono);font-size:9px;letter-spacing:.09em;text-transform:uppercase;color:var(--t3);padding:10px 2px 6px;border-bottom:1px solid var(--border);}

/* ═══ CUSTOM CARD ═══════════════════════════════════════════════════════════
   In the grid, offset in purple — the same move Stage 3 makes to set the
   scanner apart from the one-time products. Pulling it out into its own panel
   broke the scan pattern and read as a different kind of thing entirely. */
.custom-cat{background:linear-gradient(180deg,var(--purple-xlt),var(--surface));border-color:var(--purple-lt);}
.custom-cat .cat-name{color:var(--purple);}
.custom-cat.expanded{grid-column:1/-1;}
.custom-browse-legend{display:flex;align-items:center;gap:7px;font-family:var(--mono);font-size:9px;color:var(--t3);margin:12px 0 7px;}
.cbl-dot{width:9px;height:9px;border-radius:3px;background:var(--purple-xlt);border:1px solid var(--purple-lt);flex:none;}

/* Browse rows. Purple = the term's own language is one you're generating, so it
   prints natively rather than falling back to "term (category)". */
.cbr{display:flex;align-items:center;gap:10px;padding:9px 11px;cursor:pointer;border-bottom:1px solid var(--border);transition:background .12s;}
.cbr:last-child{border-bottom:none;}
.cbr:hover{background:var(--surface2);}
.cbr.cbr-tr{background:var(--purple-xlt);}
.cbr.cbr-tr .cbr-name{color:var(--purple);font-weight:500;}
.cbr.on{background:var(--purple);}
.cbr.on .cbr-name,.cbr.on .cbr-cat,.cbr.on .cbr-from,.cbr.on .cbr-check{color:#fff;}
.cbr-check{color:var(--purple);font-weight:700;flex:none;width:12px;}
.cbr-name{flex:1;font-size:14px;color:var(--t1);}
.cbr-cat{font-size:11.5px;color:var(--t3);flex:none;white-space:nowrap;}
/* Was 9px mono. At that size the origin column read as noise, which is most of
   why the list felt confusing — the information was there and illegible. */
.cbr-from{font-size:11.5px;color:var(--t4);flex:none;min-width:96px;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px;}
.cbr-none{padding:14px;text-align:center;color:var(--t3);font-size:12px;}

/* Explainer toast when a non-translating term is added. Informational, not a
   warning — the card is still correct, it just won't carry the endonym. */
.trans-note{position:fixed;left:50%;bottom:26px;transform:translate(-50%,14px);z-index:300;max-width:440px;display:flex;gap:9px;align-items:flex-start;background:var(--navy);color:#EDEDF6;border-radius:12px;padding:13px 16px;font-size:12.5px;line-height:1.5;box-shadow:0 14px 38px rgba(0,0,0,.3);opacity:0;pointer-events:none;transition:opacity .22s,transform .22s;}
.trans-note.show{opacity:1;transform:translate(-50%,0);}
.tn-ic{color:var(--yellow);flex:none;}

/* Orphaned custom language — a full rec card, globe icon, tap to drop. */
.rec.rec-custom{border-style:dashed;}

/* Group headers in the browse list: purple block, then A–Z. */
.cbr-grp{position:sticky;top:0;z-index:1;background:var(--surface2);font-family:var(--mono);font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:var(--t3);padding:7px 11px;border-bottom:1px solid var(--border);}


/* ═══ IDLE NUDGE ════════════════════════════════════════════════════════════
   Appears only after real inactivity, and only before anything is chosen.
   Anchored over the map, which is the one thing on the page whose purpose is
   not self-evident — a search box explains itself, a world map doesn't.

   The jiggle is a 3-cycle animation, not a loop. A permanently moving element
   in the corner of the eye is an irritant, and this is a suggestion, not an
   alarm. It stops. */
.nudge-pop{position:absolute;z-index:40;left:50%;top:14px;transform:translateX(-50%);
  display:flex;align-items:center;gap:2px;
  background:var(--navy);color:#fff;border-radius:12px;padding:9px 8px 9px 14px;
  box-shadow:0 10px 30px rgba(43,46,74,.28);
  animation:npIn .28s ease both, npJiggle .5s ease-in-out .5s 3;}
.nudge-pop[hidden]{display:none;}
.np-body{display:flex;align-items:center;gap:10px;}
.np-txt{font-size:13px;line-height:1.35;white-space:nowrap;}
.np-tour{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18);color:#fff;
  font-family:var(--body);font-size:12px;font-weight:600;border-radius:8px;padding:4px 10px;cursor:pointer;
  transition:background .15s;}
.np-tour:hover{background:rgba(255,255,255,.26);}
.np-x{background:none;border:none;color:rgba(255,255,255,.5);cursor:pointer;font-size:11px;padding:4px 6px;line-height:1;}
.np-x:hover{color:#fff;}
@keyframes npIn{from{opacity:0;transform:translateX(-50%) translateY(-6px);}to{opacity:1;transform:translateX(-50%) translateY(0);}}
@keyframes npJiggle{
  0%,100%{transform:translateX(-50%) translateY(0);}
  25%{transform:translateX(-50%) translateY(-4px) rotate(-.8deg);}
  75%{transform:translateX(-50%) translateY(-4px) rotate(.8deg);}
}
@media(max-width:640px){
  .np-txt{white-space:normal;font-size:12.5px;}
  .nudge-pop{left:10px;right:10px;transform:none;animation:npInM .28s ease both, npJiggleM .5s ease-in-out .5s 3;}
  @keyframes npInM{from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:translateY(0);}}
  @keyframes npJiggleM{0%,100%{transform:translateY(0);}25%{transform:translateY(-4px) rotate(-.8deg);}75%{transform:translateY(-4px) rotate(.8deg);}}
}

/* Tour spotlight — the ring the walkthrough puts around each target in turn. */
.tour-ring{position:absolute;pointer-events:none;z-index:39;border-radius:14px;
  box-shadow:0 0 0 3px var(--purple),0 0 0 9px rgba(125,120,230,.22);
  animation:tourPulse 1.1s ease-in-out infinite;transition:all .3s ease;}
@keyframes tourPulse{0%,100%{box-shadow:0 0 0 3px var(--purple),0 0 0 9px rgba(125,120,230,.22);}
  50%{box-shadow:0 0 0 3px var(--purple),0 0 0 15px rgba(125,120,230,.06);}}

/* Respect the OS setting. Vestibular disorders are real and a jiggling box is
   exactly the trigger. The nudge still appears; it just doesn't move. */
@media(prefers-reduced-motion:reduce){
  .nudge-pop{animation:npIn .28s ease both;}
  .tour-ring{animation:none;}
}


/* ═══ LANGUAGE CARDS ════════════════════════════════════════════════════════
   Equal height: a plain language card kept an empty hint row (&nbsp;) so it's
   exactly as tall as a family card's affordance row. Without it, Japanese sat
   shorter than Arabic beside it and the grid looked ragged. */
.lang-plain .lang-hint-empty{visibility:hidden;}

/* The dialect affordance, made obvious. Was a faint mono "DIALECTS"; now it
   names the count, previews the variants, and carries a caret — so it reads as
   "there's more inside, tap to see it" rather than a label. */
.lang-dial-hint{display:flex;align-items:baseline;gap:6px;text-align:left;text-transform:none;letter-spacing:0;font-family:var(--body);font-size:11px;color:var(--t3);flex-wrap:wrap;}
.ld-count{font-weight:600;color:var(--purple);white-space:nowrap;}
.ld-preview{color:var(--t4);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;}
.ld-caret{color:var(--purple);font-weight:700;margin-left:auto;transition:transform .15s;}
.lang-family.expanded .ld-caret{transform:rotate(90deg);}
.lang-family{position:relative;}
/* A faint accent so family cards are visibly a different KIND of card even
   before you read the hint. */
.lang-family:not(.expanded):hover{border-color:var(--purple-lt);}


/* ═══ PRODUCT MEDIA ═════════════════════════════════════════════════════════
   Real preview images and video in the format modal, card thumbnails, and the
   Stage 4 summary. The dashed placeholder boxes stay in the markup and show
   through only when a file is missing (.media-missing), so nothing looks broken
   before assets are uploaded. */

/* Modal carousel media. Slides vary in aspect (16:9 / 9:16 / 1:1); the frame is
   a fixed height and the media is object-fit:contain, so a vertical scan clip
   letterboxes rather than cropping the very thing it demonstrates. */
.fmodal-slide .fmodal-media{position:relative;overflow:hidden;background:transparent;display:flex;align-items:flex-start;justify-content:center;width:100%;flex:1 1 auto;min-height:0;}
/* Media itself is rounded and sits on the tinted gallery backdrop — no black
   letterbox frame. contain keeps the whole image/clip visible; the rounding is
   on the media, not a hard container edge. */
/* Media scales to fill the gallery for its own aspect ratio: a 16:9 image spans
   the full width, a 1:1 photo stays square — both as large as the frame allows,
   so the artwork is readable instead of floating small in empty space. */
/* Image flush to the top of the gallery (no frame above), top corners square,
   bottom corners rounded — anchored, larger. */
.fmodal-img,.fmodal-vid{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:0 0 16px 16px;box-shadow:0 10px 30px rgba(43,46,74,.18);background:#fff;}
.fmodal-media-fallback{position:absolute;inset:0;display:none;align-items:center;justify-content:center;padding:20px;text-align:center;}
.fmodal-media-fallback span{font-family:var(--mono);font-size:10px;letter-spacing:.08em;color:var(--t4);}
/* Only reveal the fallback (and hide the broken <img>) when flagged. */
.fmodal-slide.media-missing .fmodal-img,
.fmodal-slide.media-missing .fmodal-vid{display:none;}
.fmodal-slide.media-missing .fmodal-media{background:repeating-linear-gradient(45deg,transparent,transparent 10px,rgba(125,120,230,.04) 10px,rgba(125,120,230,.04) 20px);border:1.5px dashed var(--border-md);}
.fmodal-slide.media-missing .fmodal-media-fallback{display:flex;}
/* Portrait slide: a 9:16 clip fills the vertical space and centers, rather than
   leaving huge side bars. Same rule at all widths. */
.fmodal-slide.ar-9x16 .fmodal-img,
.fmodal-slide.ar-9x16 .fmodal-vid{max-height:100%;max-width:100%;width:auto;margin:0 auto;}
@media(max-width:680px){
  .fmodal-slide.ar-9x16 .fmodal-img,
  .fmodal-slide.ar-9x16 .fmodal-vid{max-height:100%;max-width:100%;width:auto;margin:0 auto;}
}

/* Stage 3 card thumbnail. */
.pcard-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.pcard-thumb{position:relative;overflow:hidden;}
.pcard-thumb .pcard-imgph{position:absolute;inset:10px;}
.pcard-thumb:not(.media-missing) .pcard-imgph{display:none;}   /* hide placeholder when the img loads */

/* Stage 4 summary row thumbnail. */
.rv-pimg-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.rv-pimg{position:relative;}
.rv-pimg:not(.media-missing) .rv-pimg-lbl{display:none;}
.rv-upsell-pimg{position:relative;overflow:hidden;}
.rv-upsell-pimg .rv-pimg-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.rv-upsell-pimg:not(.media-missing) .rv-pimg-lbl{display:none;}


/* ═══ COUNTRY FLAGS (Twemoji SVG) ═══════════════════════════════════════════
   Self-hosted so they render identically on every OS — Windows has no flag-emoji
   font, which would otherwise show "AR" instead of the flag. Sized to sit where
   the emoji did. */
.flagimg{width:22px;height:22px;vertical-align:middle;border-radius:3px;display:inline-block;object-fit:cover;box-shadow:0 0 0 1px rgba(0,0,0,.06);}
.rec .flag .flagimg{width:24px;height:24px;}
.cat-icon .flagimg{width:20px;height:20px;}


/* ═══ MAP TOOLTIP / OVERLAY — LEGIBILITY + FLAGS ════════════════════════════
   The section headers were 8.5px in a very light lilac-grey and the language
   names 12.5px — both too small/faint to read at a glance on the map. Bump the
   sizes and darken the headers (they're on a dark tooltip, so "darker" = more
   opaque white). */
.tk{font-size:10.5px !important;color:#c7c9e8 !important;letter-spacing:.06em !important;}
.tlang-n{font-size:14px !important;color:#fff !important;}
.tlang{margin-bottom:3px;}
.prev{font-size:9px;}
.tdish-p{font-size:12.5px;}
.ta .atn{font-size:13px;}
.ta .atc{font-size:10px;}

/* Flag beside the country name in the tooltip + overlay headers. */
.tn{display:flex;align-items:center;gap:9px;}
.tflag{width:26px;height:26px;flex:none;}
.ov-dest{display:flex;align-items:center;gap:11px;}
.ovflag{width:30px;height:30px;flex:none;}

/* Overlay section titles ("Common dishes" / "Local allergens") were too light. */
.ov-sech{color:var(--t3) !important;font-size:10.5px !important;font-weight:600;}


/* Required Twemoji CC BY 4.0 attribution. Discreet, always present. */
.site-credit{max-width:1200px;margin:24px auto 40px;padding:16px 24px 0;border-top:1px solid var(--border);font-size:11px;color:var(--t4);line-height:1.6;}
.site-credit a{color:var(--t3);text-decoration:underline;text-underline-offset:2px;}
.site-credit a:hover{color:var(--purple);}


/* ═══ STAGE 4 SCANNER OFFER — LEGIBILITY ════════════════════════════════════
   "$1/mo" read as $1-per-month. It's a one-time first-month price, so the cart
   amount now says "$1 today" and the recurring $9/mo lives in the note below.
   The upsell offer was 11-13px and easy to miss for the strongest offer on the
   page — enlarged and made explicit. */
.rv-amt-today{color:var(--purple);font-weight:700;white-space:nowrap;}
.rv-upsell-offer{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;margin:7px 0 2px;}
.rv-offer-price{font-family:var(--disp);font-size:26px;font-weight:700;color:var(--purple);line-height:1;}
.rv-offer-first{font-size:13px;color:var(--t2);font-weight:600;}
.rv-offer-save{font-size:11px;font-weight:700;color:#1a7f4b;background:#e6f6ec;border:1px solid #b8e6c8;border-radius:8px;padding:3px 9px;letter-spacing:.01em;}


/* Stage 2 subtitle emphasis — country names and the "Purple items" cue, both
   in the brand purple so the colour reference is self-explaining. */
.s2-country{color:var(--purple);font-weight:700;}
.s2-purple{color:var(--purple);font-weight:700;}


/* Stage 2 snippet preview: the "rest continues in X" note under the one
   translated sentence. */
.pv-snip-note{font-size:13px;color:var(--t2);line-height:1.55;margin-top:10px;padding-top:10px;border-top:1px dashed var(--border);}
.pv-snip-sub{display:block;font-size:11.5px;color:var(--t3);margin-top:4px;}


/* Scanner modal gallery uses the warmer yellow, matching its card tint. */
#fmt-modal.fmt-scanner .fmodal-gallery{background:linear-gradient(160deg,#FFF0C4,#FFF6DE);}

.pcard-scanner .pcard-thumb{background:linear-gradient(160deg,#FFF0C4,#FFF6DE);}
/* Hero image on the card: rounded, inset from the tinted backdrop, not full-bleed. */
/* Thin offset border — the image nearly fills the tinted thumb (was a chunky
   12px frame). 4px keeps just a sliver of the beige/yellow as an accent. */
.pcard-img{position:absolute;inset:4px;width:calc(100% - 8px);height:calc(100% - 8px);object-fit:cover;border-radius:9px;box-shadow:0 2px 10px rgba(43,46,74,.10);}


/* ═══ AUDIO DEMO PLAYER (Stage 3 modal) ═════════════════════════════════════
   Six curated language samples, one voice each. Card ships both voices. */
.fmodal-audio{margin-top:16px;}
.fa-head{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--t3);margin-bottom:9px;}
.audio-demo-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.audio-demo{display:flex;align-items:center;gap:9px;padding:9px 11px;border:1px solid var(--border);border-radius:10px;background:var(--surface);cursor:pointer;text-align:left;transition:all .14s;font-family:var(--body);}
.audio-demo:hover{border-color:var(--purple-lt);background:var(--purple-xlt);}
.audio-demo.playing{border-color:var(--purple);background:var(--purple-xlt);}
.ad-play{width:22px;height:22px;flex:none;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--purple);color:#fff;font-size:9px;padding-left:1px;}
.audio-demo.playing .ad-play{background:var(--navy);}
.audio-demo.playing .ad-play::before{content:'⏸';}
.audio-demo.playing .ad-play{font-size:0;}
.audio-demo.playing .ad-play::before{font-size:11px;}
.ad-label{flex:1;font-size:13px;color:var(--t1);font-weight:500;}
.ad-voice{font-family:var(--mono);font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:var(--t4);flex:none;}
.fa-note{font-size:12px;color:var(--t3);line-height:1.5;margin-top:11px;padding-top:11px;border-top:1px dashed var(--border);}
@media(max-width:520px){ .audio-demo-list{grid-template-columns:1fr;} }


/* ═══ LANGUAGE SEARCH (expanding magnifier in the picker header) ═════════════
   Collapsed = just the icon. Click expands a field to the left of it so the
   section keeps its height instead of growing a row. */
.exp-head{position:relative;}
.lang-search-wrap{margin-left:auto;margin-right:10px;display:flex;align-items:center;justify-content:flex-end;}
.lang-search-input{width:180px;opacity:1;padding:6px 10px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-family:var(--body);background:var(--surface);margin-right:6px;}
.lang-search-wrap.open .lang-search-input{width:180px;opacity:1;padding:6px 10px;border-color:var(--border);pointer-events:auto;margin-right:6px;}
.lang-search-btn{background:none;border:none;cursor:pointer;font-size:14px;line-height:1;padding:4px;border-radius:6px;flex:none;}
.lang-search-btn:hover{background:var(--surface2);}
@media(max-width:520px){ .lang-search-wrap.open .lang-search-input{width:120px;} }

/* Cross-contamination line renders slightly muted (it's supporting detail). */
.pv-line-sub{color:var(--t2);font-size:13px;}


/* ═══ STAGE 2 CUSTOM-REQUEST — INFO TOOLTIP + NUDGE ═════════════════════════ */
.custom-info{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;margin-left:7px;border-radius:50%;background:var(--purple-xlt);color:var(--purple);font-size:11px;font-weight:700;font-family:var(--mono);cursor:help;position:relative;flex:none;}
.custom-info-pop{display:none;position:absolute;left:50%;transform:translateX(-50%);bottom:calc(100% + 9px);width:250px;background:var(--navy);color:#fff;font-family:var(--body);font-weight:400;font-size:12px;line-height:1.5;padding:11px 13px;border-radius:var(--r-sm);box-shadow:0 8px 22px rgba(0,0,0,.26);z-index:40;text-transform:none;letter-spacing:normal;}
.custom-info-pop::after{content:'';position:absolute;left:50%;transform:translateX(-50%);top:100%;border:6px solid transparent;border-top-color:var(--navy);}
.custom-info:hover .custom-info-pop, .custom-info:focus .custom-info-pop{display:block;}
/* transparent bridge so moving up into the pop doesn't drop the hover */
.custom-info:hover .custom-info-pop::before{content:'';position:absolute;left:0;right:0;top:100%;height:10px;}


/* Modal value-prop bullets — fill the right panel, larger and scannable. */
.fmodal-bullets{list-style:none;margin:16px 0 4px;padding:0;display:flex;flex-direction:column;gap:11px;}
.fmodal-bullets li{position:relative;padding-left:26px;font-size:13.5px;line-height:1.5;color:var(--t1);}
.fmodal-bullets li::before{content:'';position:absolute;left:0;top:6px;width:15px;height:15px;border-radius:50%;background:var(--purple-xlt);}
.fmodal-bullets li::after{content:'✓';position:absolute;left:3px;top:4px;font-size:10px;color:var(--purple);font-weight:700;}

/* Media larger inside the roomier gallery. */



/* Stage 2 custom-request nudge — floating navy popup like the Stage 1 map prompt
   (not a static inline block). Points at the "Something else?" card and jiggles
   once to draw the eye. */
.custom-cat{position:relative;}
.cust-nudge-pop{position:absolute;z-index:40;right:18px;bottom:calc(100% + 10px);top:auto;
  display:flex;align-items:center;gap:4px;
  background:var(--navy);color:#fff;border-radius:12px;padding:8px 8px 8px 13px;
  box-shadow:0 10px 30px rgba(43,46,74,.28);
  animation:cnpIn .28s ease both, cnpJiggle .5s ease-in-out .6s 3;}
.cust-nudge-pop::after{content:'';position:absolute;right:32px;top:100%;border:7px solid transparent;border-top-color:var(--navy);}
.cnp-txt{font-size:12.5px;line-height:1.35;white-space:nowrap;}
.cnp-x{background:none;border:none;color:rgba(255,255,255,.5);cursor:pointer;font-size:11px;padding:3px 5px;line-height:1;}
.cnp-x:hover{color:#fff;}
@keyframes cnpIn{from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:translateY(0);}}
@keyframes cnpJiggle{0%,100%{transform:translateY(0);}25%{transform:translateY(-4px) rotate(-.8deg);}75%{transform:translateY(-4px) rotate(.8deg);}}
@media(prefers-reduced-motion:reduce){ .cust-nudge-pop{animation:cnpIn .28s ease both;} }
@media(max-width:640px){ .cnp-txt{white-space:normal;} .cust-nudge-pop{right:8px;left:8px;bottom:calc(100% + 10px);} }


/* ═══ CAROUSEL THUMBNAIL FILMSTRIP ══════════════════════════════════════════
   Small previews of every slide under the media, so the visitor sees what's next
   and can jump around. Current slide highlighted. */
.fmodal-strip{flex:none;margin-top:10px;display:flex;gap:8px;justify-content:center;padding:0 4px;z-index:5;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;max-width:100%;}
.fmodal-strip::-webkit-scrollbar{display:none;}
.fmodal-strip-thumb{position:relative;flex:none;width:52px;height:40px;border-radius:7px;overflow:hidden;border:2px solid transparent;background:rgba(255,255,255,.5);cursor:pointer;padding:0;transition:border-color .15s,transform .15s;box-shadow:0 2px 8px rgba(43,46,74,.14);}
.fmodal-strip-thumb img,.fmodal-strip-thumb video{width:100%;height:100%;object-fit:cover;display:block;}
.fmodal-strip-thumb:hover{transform:translateY(-2px);}
.fmodal-strip-thumb.active{border-color:var(--purple);}
.fst-vic{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:11px;text-shadow:0 1px 4px rgba(0,0,0,.5);pointer-events:none;}
/* Media sits a bit higher so the strip has room. */

/* Move the caption above the strip. */
.fmodal-cap{margin-bottom:6px;}
@media(max-width:820px){ .fmodal-strip-thumb{width:44px;height:34px;} }


/* Upsell CTA column — $1 price stacked right above the Add button, so the left
   text column keeps the full width and the price/action read as one unit. */
.rv-upsell-cta-col{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:7px;padding-top:1px;}
.rv-upsell-price{display:flex;align-items:baseline;gap:5px;white-space:nowrap;}
.rv-upsell-price .rv-offer-price{font-family:var(--disp);font-size:24px;font-weight:700;color:var(--purple);line-height:1;}
.rv-upsell-price .rv-offer-first{font-size:12px;color:var(--t2);font-weight:600;}
.rv-upsell-add{align-self:stretch;text-align:center;}


/* Cart line-item breakdown — hover the amount to see the math (e.g. "$7 × 2
   languages"). The displayed total stays clean; the breakdown is a tooltip. */
.rv-cart-amt{position:relative;cursor:default;}
.rv-amt-bd{display:none;position:absolute;right:0;top:calc(100% + 6px);white-space:nowrap;background:var(--navy);color:#fff;font-family:var(--mono);font-size:10.5px;font-weight:400;letter-spacing:.02em;padding:6px 9px;border-radius:7px;box-shadow:0 6px 18px rgba(43,46,74,.22);z-index:20;}
.rv-amt-bd::after{content:'';position:absolute;right:12px;bottom:100%;border:5px solid transparent;border-bottom-color:var(--navy);}
.rv-cart-amt:hover .rv-amt-bd,.rv-cart-amt:focus .rv-amt-bd{display:block;}


/* Soften the first-paint of async-populated grids (language picker, format
   thumbnails) so they ease in instead of snapping in after the data/image loads.
   Purely cosmetic — no layout shift. */
@keyframes gridFadeIn{from{opacity:0;}to{opacity:1;}}
#directlangs .allergen-cat{animation:gridFadeIn .25s ease both;}
.pcard-img{animation:gridFadeIn .3s ease both;}
@media(prefers-reduced-motion:reduce){ #directlangs .allergen-cat,.pcard-img{animation:none;} }


/* ═══ STAGE 4 — PRODUCT EXPLAINER + CHIP TOOLTIPS ═══════════════════════════ */
/* Thumbnail hover → what the product is. */
.rv-pimg{position:relative;}
.rv-pimg-tip{display:none;position:absolute;left:0;top:calc(100% + 8px);width:230px;background:var(--navy);color:#fff;font-family:var(--body);font-size:11.5px;line-height:1.5;padding:9px 11px;border-radius:9px;box-shadow:0 8px 22px rgba(43,46,74,.26);z-index:30;}
.rv-pimg-tip::after{content:'';position:absolute;left:20px;bottom:100%;border:6px solid transparent;border-bottom-color:var(--navy);}
.rv-pimg:hover .rv-pimg-tip,.rv-pimg:focus .rv-pimg-tip{display:block;}

/* Name/price hover → the price math (reuse .rv-amt-bd; add a left-anchored variant). */
.rv-cart-hoverable{position:relative;cursor:default;}
.rv-cart-info .rv-amt-bd.rv-bd-left{right:auto;left:0;}
.rv-cart-info .rv-amt-bd.rv-bd-left::after{right:auto;left:12px;}
.rv-cart-info:hover .rv-amt-bd.rv-bd-left,.rv-cart-info:focus .rv-amt-bd.rv-bd-left{display:block;}

/* English-only chip tooltip. */
.rv-chip-eo{position:relative;cursor:help;border-bottom:1px dotted var(--purple);}
.rv-chip-tip{display:none;position:absolute;left:0;top:calc(100% + 8px);width:250px;background:var(--navy);color:#fff;font-weight:400;font-size:11.5px;line-height:1.5;padding:9px 11px;border-radius:9px;box-shadow:0 8px 22px rgba(43,46,74,.26);z-index:30;white-space:normal;}
.rv-chip-tip::after{content:'';position:absolute;left:16px;bottom:100%;border:6px solid transparent;border-bottom-color:var(--navy);}
.rv-chip-eo:hover .rv-chip-tip,.rv-chip-eo:focus .rv-chip-tip{display:block;}


/* ═══ WALLET MINIMUM CONFIRM (Stage 3 modal overlay) ════════════════════════ */
.wallet-min-ov{position:absolute;inset:0;background:rgba(43,46,74,.45);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:60;border-radius:20px;padding:24px;}
.wmc-card{background:#fff;border-radius:16px;max-width:360px;width:100%;padding:24px;box-shadow:0 20px 60px rgba(43,46,74,.35);text-align:center;}
.wmc-t{font-family:var(--disp);font-size:19px;font-weight:600;color:var(--navy);margin-bottom:8px;}
.wmc-d{font-size:13px;color:var(--t2);line-height:1.55;margin-bottom:18px;}
.wmc-btns{display:flex;flex-direction:column;gap:9px;}
.wmc-more{background:var(--purple);color:#fff;border:none;border-radius:9px;padding:11px;font-size:13.5px;font-weight:600;cursor:pointer;font-family:var(--body);}
.wmc-keep{background:none;border:1px solid var(--border-md);color:var(--t2);border-radius:9px;padding:10px;font-size:12.5px;cursor:pointer;font-family:var(--body);}
.wmc-keep:hover{background:var(--surface2);}

/* ═══ MERGE PASS 1 — generic modal, consent, gate (ported from mobile v56) ═══
   Mobile positioned these inside the .phone frame; here they are viewport-
   fixed. Class names match the mobile build so the Pass-2 mobile shell reuses
   these rules unchanged. */
.pmodal{position:fixed;inset:0;z-index:120;display:flex;align-items:center;justify-content:center;
  background:rgba(43,46,74,.42);opacity:0;pointer-events:none;transition:opacity .22s ease;padding:20px;}
.pmodal.open{opacity:1;pointer-events:auto;}
.modal-box{background:var(--surface);border-radius:18px;max-width:430px;width:100%;padding:24px 22px 20px;
  box-shadow:0 18px 60px rgba(43,46,74,.28);transform:translateY(8px) scale(.98);transition:transform .22s ease;
  max-height:min(82vh,640px);overflow:auto;}
.pmodal.open .modal-box{transform:none;}
.modal-title{font-family:var(--disp);font-size:20px;font-weight:600;color:var(--navy);margin:0 0 8px;}
.modal-subtitle{font-size:13.5px;line-height:1.55;color:var(--t2);margin:0 0 12px;}
.modal-callout{background:var(--surface2);border:1px solid var(--border);border-radius:12px;
  padding:12px 14px;font-size:13px;line-height:1.5;color:var(--t2);margin:0 0 12px;}
.modal-callout strong{display:block;color:var(--navy);font-size:12.5px;margin-bottom:6px;}
.modal-callout ul{margin:6px 0 0;padding-left:18px;}
.modal-callout li{margin:3px 0;}
.modal-box.warn .modal-callout.warn{background:#FDF6E7;border-color:#EAD9A8;}
.modal-sub-note{font-size:12px;color:var(--t3);line-height:1.5;margin:0 0 4px;}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px;}
.btn-modal-cancel{background:var(--surface2);color:var(--t2);border:1px solid var(--border-md);
  border-radius:10px;padding:10px 16px;font-size:13.5px;font-weight:500;cursor:pointer;}
.btn-modal-confirm{background:var(--navy);color:#fff;border:none;border-radius:10px;
  padding:10px 18px;font-size:13.5px;font-weight:600;cursor:pointer;}
.btn-modal-confirm:hover{background:var(--purple);}
/* consent preview: what will actually print */
.cm-shows{font-family:var(--mono);font-size:13px;color:var(--navy);background:var(--surface);
  border:1px dashed var(--border-md);border-radius:8px;padding:8px 10px;margin:8px 0;}
.cm-why{font-size:12.5px;color:var(--t3);line-height:1.5;}
/* Stage-1→2 gate */
.gate-p{font-size:13.5px;line-height:1.55;color:var(--t2);margin:0 0 10px;}
.gate-actions{display:flex;flex-direction:column;gap:8px;margin-top:14px;}
.gate-all{background:var(--purple);color:#fff;border:none;border-radius:10px;padding:12px 16px;
  font-size:14px;font-weight:600;cursor:pointer;text-align:center;}
.gate-all:hover{filter:brightness(1.05);}
.gate-pick{background:var(--surface);color:var(--purple);border:1.5px solid var(--purple);
  border-radius:10px;padding:11px 16px;font-size:13.5px;font-weight:600;cursor:pointer;text-align:center;}
.gate-skip{background:none;border:none;color:var(--t3);font-size:13px;padding:8px;cursor:pointer;text-align:center;}
.gate-skip:hover{color:var(--navy);}
@media(prefers-reduced-motion:reduce){.pmodal,.modal-box{transition:none;}}


/* ═══ MERGE PASS 3 — MOBILE SHELL LAYER (VERBATIM PORT) ═════════════════════
   Replaces the pass-2 re-derived layer. Source: mobile-stage-v56 stylesheet,
   transformed mechanically, values untouched:
     :root → .mshell (mock tokens scoped to shell roots, desktop palette
             untouched); .phone frame dropped; .scroll → .mw
     .lcard → .lgc · .bar → .mbar · #map → #mmap (established rename map)
     selectors whose lead class ALSO exists in the desktop sheet are prefixed
     .mshell (computed set, not guessed) — everything else stays verbatim
     the whole layer is fenced in @media(max-width:860px)
   If a pixel is wrong on mobile now, it is wrong in the mock too. */
@media(max-width:860px){
.mshell{
  --purple:#7D78E6; --purple-lt:#B9B6F2; --purple-xlt:#F1F0FE;
  --navy:#2B2E4A; --yellow:#F6C94A;
  --bg:#fff; --surface:#fff; --surface2:#F7F7FA; --surface3:#FCFCFD;
  --border:#EBEBF1; --border-md:#DCDCE5;
  --t1:#2B2E4A; --t2:#5C5F73; --t3:#8B8D9C; --t4:#B0B1BC;
  --disp:'Fraunces',Georgia,serif; --body:'DM Sans',system-ui,sans-serif; --mono:'DM Mono',ui-monospace,monospace;
  --r:12px; --r-sm:9px; --r-lg:16px;
  /* Carried over from the production stylesheet so the modal system is a
     straight lift when this ports into app/. */
  --red:#C53030; --red-lt:#FDEDEC;
}
@media(max-width:460px){
.mshell .phone{width:100%;height:100vh;box-shadow:none;}
}
.mw{position:absolute;inset:0 0 var(--barh,92px) 0;overflow-y:auto;-webkit-overflow-scrolling:touch;}
.pad{padding:16px 16px 24px;}
.mast.sub{position:static;flex:none;}
.mast{position:sticky;top:0;z-index:14;background:rgba(255,255,255,.97);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);padding:13px 16px 10px;}
.mast .row{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:8px;}
.mshell .brand{font-family:var(--disp);font-size:17px;font-weight:600;}
.mshell .brand span{color:var(--purple);}
.stepn{font-family:var(--mono);font-size:10px;letter-spacing:.06em;color:var(--t3);}
.pbar{height:3px;background:var(--border);border-radius:2px;overflow:hidden;}
.pbar i{display:block;height:100%;width:25%;background:var(--purple);border-radius:2px;}
.mshell h1{font-family:var(--disp);font-size:26px;line-height:1.14;margin:14px 0 6px;font-weight:600;}
.mshell .sub{font-size:13.5px;line-height:1.5;color:var(--t2);margin:0 0 16px;}
.mshell .kick{font-family:var(--mono);font-size:9.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--t3);}
.fl{flex:none;width:21px;height:15px;border-radius:2px;object-fit:cover;box-shadow:0 0 0 1px rgba(43,46,74,.1);display:block;}
.fl.lg{width:32px;height:23px;border-radius:3px;}
/* ── Multi-city legs ─────────────────────────────────────────────────────
   The airline model: a numbered row per stop, the next one always waiting
   below. Ported from the desktop .leg structure so the two builds share a
   vocabulary instead of each inventing one. */
.mshell .leg{display:flex;align-items:center;gap:9px;margin-bottom:8px;}
.mshell .leg .dot{flex:none;width:24px;height:24px;border-radius:50%;background:var(--purple-xlt);color:var(--purple);
  border:1px solid var(--purple-lt);display:flex;align-items:center;justify-content:center;font-family:var(--mono);font-size:10.5px;}
.mshell .leg .box{position:relative;flex:1;min-width:0;}
.mshell .leg input{width:100%;height:48px;padding:0 12px 0 36px;border:1px solid var(--border-md);border-radius:var(--r);
  font-size:15.5px;font-family:var(--body);background:var(--surface);outline:none;color:var(--t1);}
.mshell .leg input:focus{border-color:var(--purple);box-shadow:0 0 0 3px var(--purple-xlt);}
.mshell .leg .pin{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:17px;color:var(--purple);line-height:1;}
.mshell .leg.done .box{display:flex;align-items:center;gap:9px;background:var(--surface2);border:1px solid var(--border);
  border-radius:var(--r);padding:11px 12px;cursor:pointer;}
.mshell .leg.done .nm{flex:1;min-width:0;font-size:15px;font-weight:500;display:block;}
.mshell .leg.done .meta{font-family:var(--mono);font-size:9px;letter-spacing:.04em;text-transform:uppercase;color:var(--t3);
  display:block;margin-top:2px;font-weight:400;}
.mshell .leg.done .meta em{color:var(--purple);font-style:normal;}
.mshell .leg.done .go{flex:none;color:var(--t4);font-size:15px;}
.mshell .leg .rm{flex:none;width:30px;height:30px;display:flex;align-items:center;justify-content:center;color:var(--t4);font-size:14px;cursor:pointer;}
.mshell .ac{position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:22;background:var(--surface);border:1px solid var(--border-md);
  border-radius:var(--r);overflow:hidden;box-shadow:0 14px 34px rgba(43,46,74,.14);max-height:264px;overflow-y:auto;}
.mshell .ac[hidden]{display:none;}
.ac-row{display:flex;align-items:center;gap:10px;padding:11px 13px;border-bottom:1px solid var(--border);cursor:pointer;}
.ac-row:last-child{border-bottom:none;}
.ac-row.on{background:var(--purple-xlt);}
.ac-row .t{flex:1;min-width:0;font-size:14.5px;}
.ac-row b{color:var(--purple);font-weight:600;}
.ac-row .d{font-family:var(--mono);font-size:8.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--t3);}
.ac-none{padding:12px 13px;font-size:13.5px;color:var(--t3);}
/* Map entry — always present, not gated behind adding a destination first. */
.mapentry{display:flex;align-items:center;gap:11px;width:100%;background:var(--surface);border:1px solid var(--border-md);
  border-radius:var(--r);padding:11px 12px;cursor:pointer;font-family:var(--body);text-align:left;margin-top:10px;}
.mapentry .mini{flex:none;width:52px;height:38px;border-radius:var(--r-sm);background:var(--purple-xlt);
  border:1px solid var(--purple-lt);overflow:hidden;}
.mapentry .mini svg{width:100%;height:100%;display:block;}
.mapentry .mm{fill:var(--purple-lt);stroke:none;}
.mapentry .m{flex:1;min-width:0;}
.mapentry .a{font-size:14px;font-weight:500;}
.mapentry .b{font-size:12px;color:var(--t3);margin-top:1px;line-height:1.35;}
.mapentry .go{flex:none;color:var(--t4);font-size:15px;}
.sec{margin-top:22px;}
.sec>.kick{display:block;margin-bottom:9px;}
/* Derived language rows — provenance is the point, so it's on the row. */
.lrow{display:flex;align-items:center;gap:10px;background:var(--purple-xlt);border:1px solid var(--purple-lt);
  border-radius:var(--r);padding:10px 11px;margin-bottom:7px;}
.lrow .m{flex:1;min-width:0;}
.lrow .n{display:block;font-size:14.5px;font-weight:500;}
.lrow .why{display:block;font-size:11.5px;color:var(--t2);margin-top:2px;}
.lrow .why b{color:var(--navy);font-weight:500;}
.lrow .tag{flex:none;font-family:var(--mono);font-size:8px;letter-spacing:.04em;text-transform:uppercase;color:var(--t3);
  border:1px solid var(--border-md);background:var(--surface);border-radius:4px;padding:2px 5px;}
.lrow .x{flex:none;width:28px;height:28px;display:flex;align-items:center;justify-content:center;color:var(--t3);font-size:13px;cursor:pointer;}
.eng{display:flex;align-items:center;gap:9px;background:var(--surface2);border:1px solid var(--border);
  border-radius:var(--r);padding:10px 11px;margin-bottom:7px;font-size:12.5px;color:var(--t2);}
/* Desktop surfaces uncovered languages on the main step, not behind a click
   into a country — you can't request something you don't know exists. Same
   here: it appears the moment a destination has languages we don't produce. */
.mshell .uncov{margin-top:12px;border:1px solid var(--border-md);border-radius:var(--r);background:var(--surface3);}
.mshell .uncov[hidden]{display:none;}
.uc-head{padding:12px 13px;cursor:pointer;}
.uc-t{display:block;font-size:13px;color:var(--t2);line-height:1.45;}
.uc-t b{color:var(--navy);font-weight:600;}
.uc-req{display:block;margin-top:6px;font-size:12.5px;font-weight:500;color:var(--purple);}
.uc-body{padding:0 13px 13px;}
.uc-body[hidden]{display:none;}
.uc-chips{display:flex;flex-wrap:wrap;gap:6px;}
.mshell .uchip{background:var(--surface);border:1px solid var(--border-md);border-radius:15px;padding:7px 12px;
  font-size:12.5px;font-family:var(--body);color:var(--t1);cursor:pointer;}
.mshell .uchip.on{background:var(--purple);border-color:var(--purple);color:#fff;font-weight:500;}
.uc-fine{font-size:11.5px;color:var(--t3);margin:10px 0 0;line-height:1.4;}
.mshell .hint{font-size:12px;color:var(--t3);line-height:1.45;margin:6px 0 0;}
/* Local allergens — the safety join, on screen without any tap. */
/* Listing a handful of local allergens here was a spoiler for Step 2 without
   being useful in Step 1 — you see all of them, selectable, on the next
   screen. What belongs here is the invitation to go read about the place. */
.learn{display:flex;align-items:center;gap:11px;width:100%;margin-top:12px;background:var(--surface);
  border:1px solid var(--border-md);border-radius:var(--r);padding:11px 12px;cursor:pointer;
  font-family:var(--body);text-align:left;}
.learn[hidden]{display:none;}
.learn .li{flex:none;width:34px;height:34px;border-radius:var(--r-sm);background:var(--surface2);
  display:flex;align-items:center;justify-content:center;font-size:15px;}
.learn .lt{flex:1;min-width:0;}
.learn .a{display:block;font-size:13.5px;font-weight:500;}
.learn .b{display:block;font-size:11.5px;color:var(--t3);margin-top:1px;}
.learn .go{flex:none;color:var(--t4);font-size:15px;}
/* ── Language family cards ───────────────────────────────────────────────
   Same shape as desktop's .allergen-cat: icon, name, badge, then an
   always-present hint row so plain cards and family cards are the same
   height. Families expand IN PLACE to variant chips — Spanish opens to
   Mexico, Peru, Argentina rather than sending you somewhere else. */
/* The name is the content, so the name gets the size. Earlier passes put a
   14px label in a tall card and left half the tile empty; these are the
   height of their text plus padding, and nothing more. Family cards earn
   their extra line by actually carrying information. */
.lgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:start;}
.lgc{background:var(--surface);border:1px solid var(--border-md);border-radius:var(--r);padding:11px;
  cursor:pointer;min-width:0;display:flex;flex-direction:column;justify-content:center;min-height:62px;}
.lgc.on{border-color:var(--purple);background:var(--purple-xlt);}
.lgc.open{grid-column:1/-1;}
.lch{display:flex;align-items:center;gap:9px;}
.lch .nm{flex:1;min-width:0;font-size:14px;font-weight:500;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.lch .bdg{flex:none;min-width:19px;height:19px;border-radius:10px;background:var(--purple);color:#fff;
  font-family:var(--mono);font-size:10px;display:flex;align-items:center;justify-content:center;padding:0 6px;}
.lch .bdg.off{display:none;}
.lhint{font-size:10.5px;color:var(--t3);margin-top:5px;display:flex;align-items:center;gap:5px;min-height:14px;}
.lhint .ct{color:var(--purple);font-weight:500;flex:1;}
.lhint .cv{flex:none;color:var(--t4);}
.lvars{display:none;margin-top:10px;padding-top:9px;border-top:1px solid var(--border);}
.lgc.open .lvars{display:block;}
.lvtop{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;font-size:11px;color:var(--t3);}
.lvall{background:none;border:none;color:var(--purple);font-size:12px;font-weight:500;font-family:var(--body);
  padding:4px 0;cursor:pointer;}
.lvchips{display:flex;flex-wrap:wrap;gap:6px;}
/* The picker is a fallback, not the main event — collapsed it costs one row
   instead of a third of the screen. It auto-opens only when there are no
   destinations to derive from. */
.pkhead{display:flex;align-items:center;gap:8px;width:100%;background:none;border:none;padding:0 0 9px;
  cursor:pointer;font-family:var(--body);text-align:left;}
.pkhead .kick{flex:1;}
.pkhead .n{font-family:var(--mono);font-size:9.5px;color:var(--t4);}
.pkhead .cv{color:var(--t4);font-size:11px;transition:transform .25s;}
.pkhead[aria-expanded="true"] .cv{transform:rotate(180deg);}
.pkbody[hidden]{display:none;}
/* v4 accidentally cut the last row of tiles in half, which told you more
   existed. That only worked on one screen height. This does it on purpose: a
   short fade over the bottom of the grid plus a full-width expander that
   names the number, so the signal survives any viewport. */
.lwrap{position:relative;}
.lfade{position:absolute;left:0;right:0;bottom:-6px;height:30px;pointer-events:none;
  background:linear-gradient(to bottom,rgba(255,255,255,0),#fff);}
.lfade[hidden]{display:none;}
/* Filled purple pulled the eye down here, away from the destination field
   that should get it. Quiet surface, purple text only, and set further below
   the fade so the cut-off row does the "there's more" work on its own. */
.lgc.custom{border-style:dashed;}
.lgc.custom.on{border-style:solid;border-color:var(--purple);}
.cplus{flex:none;width:21px;height:15px;display:flex;align-items:center;justify-content:center;
  color:var(--purple);font-size:17px;font-weight:600;line-height:1;}
.chip.rel{border-color:var(--purple-lt);background:var(--purple-xlt);}
.chip .rl{display:block;font-family:var(--mono);font-size:8px;letter-spacing:.05em;text-transform:uppercase;
  color:var(--t3);margin-top:2px;}
.chip.sel .rl{color:rgba(255,255,255,.75);}
.showall{width:100%;margin-top:26px;position:relative;z-index:1;background:var(--surface);
  border:1px solid var(--border-md);border-radius:var(--r);padding:14px;font-size:13.5px;font-weight:500;
  font-family:var(--body);color:var(--purple);cursor:pointer;}
.showall:active{background:var(--surface2);}
/* Desktop puts this label and its search field on one line (.exp-head). Two
   full-width search bars stacked read as two competing entry points; inline,
   the language field is clearly subordinate to the destination one above. */
.pkrow{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.pkrow .kick{flex:1;min-width:0;}
.lsearch{position:relative;flex:none;width:132px;}
.lsearch input{width:100%;height:38px;padding:0 10px 0 30px;border:1px solid var(--border-md);border-radius:var(--r);
  font-size:13.5px;font-family:var(--body);background:var(--surface);outline:none;color:var(--t1);}
.lsearch input:focus{border-color:var(--purple);width:100%;}
.lsearch .ic{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:11px;opacity:.45;}
/* Breathing room between "where you're going" and "or just pick a language" —
   they were butting into each other with nothing marking the change of mode. */
.secsplit{height:1px;background:var(--border);margin:26px 0 22px;}
.chip{background:var(--surface);border:1px solid var(--border-md);border-radius:15px;padding:7px 11px;font-size:12.5px;
  font-family:var(--body);color:var(--t1);cursor:pointer;}
.chip.sel{background:var(--purple);border-color:var(--purple);color:#fff;font-weight:500;}
/* ── Bottom bar ──────────────────────────────────────────────────────────
   One primary action that names where it goes, and a price line that never
   lets the per-language multiplication be a surprise at checkout. */
.mbar{position:absolute;left:0;right:0;bottom:0;z-index:18;background:var(--surface);border-top:1px solid var(--border);
  border-radius:16px 16px 0 0;box-shadow:0 -5px 22px rgba(43,46,74,.11);}
/* Step 1 has nothing behind it, so no Back. And no price: formats are two
   steps away, so any number here is either wrong or a caveat, and a caveated
   price on the first screen reads as a warning rather than information. */
/* Scrolling to the bottom of 43 languages put every selection off-screen, so
   adding one felt like it went nowhere. This strip is always visible and
   opens to the full list — the card's contents are never more than a tap
   away, wherever you are on the page. */
/* This strip is a door. As plain text on white it read as a caption on the
   button below it, and the preview behind it went unopened — the one control
   that answers "what am I actually buying" looked like a status line. Tinted,
   with a purple chevron and a verb in the label. */
.cardrow{border-radius:16px 16px 0 0;
  display:flex;align-items:center;gap:9px;width:100%;background:var(--purple-xlt);border:none;
  border-bottom:1px solid var(--purple-lt);padding:12px 16px;font-family:var(--body);cursor:pointer;text-align:left;}
.cr-l{flex:1;min-width:0;font-size:12.5px;color:var(--t2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cr-l b{color:var(--navy);font-weight:600;}
.cr-cv{flex:none;color:var(--purple);font-size:11px;transition:transform .25s;
  width:22px;height:22px;border-radius:50%;background:var(--surface);border:1px solid var(--purple-lt);
  display:flex;align-items:center;justify-content:center;}
.mbar.open .cr-cv{transform:rotate(180deg);}
.cardlist{max-height:186px;overflow-y:auto;padding:10px 16px 4px;border-bottom:1px solid var(--border);}
.cardlist[hidden]{display:none;}
.cl{display:flex;align-items:center;gap:9px;padding:7px 0;border-bottom:1px solid var(--border);}
.cl:last-child{border-bottom:none;}
.cl .n{flex:1;min-width:0;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cl .src{font-family:var(--mono);font-size:8.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--t3);flex:none;}
.mshell button.cl.cl-tap{border:none;font-family:var(--body);text-align:left;cursor:pointer;background:none;}
.mshell button.cl.cl-tap .src{color:var(--purple);}
.lslink.rm{color:#C4573F;border-color:#E8B5A8;background:#FBECE8;}
.cl .x{flex:none;width:28px;height:28px;display:flex;align-items:center;justify-content:center;
  color:var(--t3);font-size:13px;cursor:pointer;}
.cl.eng .n{color:var(--t3);}
.cardrow[hidden]{display:none;}
.cl-eo{display:block;width:100%;margin-top:8px;background:none;border:1px dashed var(--border-md);
  border-radius:var(--r);padding:11px;font-size:12.5px;font-family:var(--body);color:var(--purple);cursor:pointer;}
.mbar .act{display:flex;align-items:center;gap:12px;padding:11px 16px calc(env(safe-area-inset-bottom) + 12px);}
.mbar .status{flex:1;min-width:0;font-size:12.5px;color:var(--t2);line-height:1.35;}
.mbar .warn{display:block;color:#C4573F;font-weight:500;}
.mbar .warn[hidden], .mbar .status[hidden]{display:none;}
.mbar .next{flex:none;background:var(--navy);color:#fff;border:none;border-radius:var(--r);padding:14px 22px;
  font-size:14.5px;font-weight:600;font-family:var(--body);cursor:pointer;}
.mbar .next.idle{background:var(--surface2);color:var(--t3);}
@keyframes shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-6px)}
  40%{transform:translateX(5px)}60%{transform:translateX(-3px)}80%{transform:translateX(2px)}}
.shake{animation:shake .42s ease;}
.mbar .next:disabled{background:var(--surface2);color:var(--t4);}
/* ── Map screen ──────────────────────────────────────────────────────────── */
.mapscr{position:absolute;inset:0;z-index:34;background:var(--bg);transform:translateX(100%);
  transition:transform .36s cubic-bezier(.22,.61,.36,1);display:flex;flex-direction:column;}
.mapscr.open{transform:translateX(0);}
.ms-top{flex:none;display:flex;align-items:center;gap:9px;padding:11px 12px;border-bottom:1px solid var(--border);}
.ms-back{flex:none;width:40px;height:40px;border-radius:var(--r-sm);border:1px solid var(--border-md);background:var(--surface);
  font-size:16px;color:var(--t1);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.ms-ttl{flex:1;min-width:0;font-size:14.5px;font-weight:500;}
.ms-ttl .s{display:block;font-family:var(--mono);font-size:9px;letter-spacing:.06em;text-transform:uppercase;color:var(--t3);font-weight:400;margin-top:1px;}
.ms-world{flex:none;background:none;border:1px solid var(--border-md);border-radius:var(--r-sm);padding:8px 11px;
  font-size:12px;font-family:var(--body);color:var(--t2);cursor:pointer;}
/* A world map on a 430px screen is a microscope slide. Regions give the map
   a scale where countries are actually tappable, and the world is still one
   button away for anyone who wants it. */
/* Two-up thumbnails read as abstract cut-outs — you can't tell Africa from
   South America at 90px without already knowing the shape. The name leads,
   the thumbnail supports it. */
.rgrid{flex:1;overflow-y:auto;min-height:0;padding:12px 14px calc(env(safe-area-inset-bottom) + 16px);}
.worldtop{display:flex;align-items:center;gap:12px;width:100%;background:var(--surface);
  border:1px solid var(--purple-lt);border-radius:var(--r);cursor:pointer;font-family:var(--body);
  text-align:left;padding:10px 11px;}
.wt-map{flex:none;width:86px;height:56px;background:var(--purple-xlt);border-radius:var(--r-sm);
  border:1px solid var(--purple-lt);overflow:hidden;}
.wt-map svg{width:100%;height:100%;display:block;}
.wt-l{flex:1;min-width:0;}
.wt-l .a{display:block;font-size:15px;font-weight:600;}
.wt-l .b{display:block;font-size:12px;color:var(--t3);margin-top:2px;}
.rcard{display:flex;align-items:center;gap:12px;width:100%;background:var(--surface);border:1px solid var(--border-md);
  border-radius:var(--r);cursor:pointer;font-family:var(--body);text-align:left;padding:9px 11px;margin-bottom:8px;}
.rcard .thumb{flex:none;width:66px;height:46px;background:var(--surface2);border-radius:var(--r-sm);
  border:1px solid var(--border);overflow:hidden;}
.rcard .thumb svg{width:100%;height:100%;display:block;}
.rt{fill:#DEDCF3;stroke:#fff;stroke-width:.3px;}
.rt.hasdata{fill:var(--purple-lt);}
.rt.sel{fill:var(--purple);}
.rcard .lb{flex:1;min-width:0;}
.rcard .lb .n{display:block;font-size:15px;font-weight:500;}
.rcard .lb .c{display:block;font-family:var(--mono);font-size:9px;letter-spacing:.04em;text-transform:uppercase;
  color:var(--t3);margin-top:3px;}
.rcard .lb .c em{color:var(--purple);font-style:normal;}
.rcard .rgo{flex:none;color:var(--t4);font-size:16px;}
#mmap{flex:1;position:relative;background:var(--surface2);min-height:0;}
#mmap svg{width:100%;height:100%;display:block;touch-action:none;}
.cty{fill:#DEDCF3;stroke:#fff;stroke-width:.35px;cursor:pointer;}
.cty.sel{fill:var(--purple);}
.cty.hasdata{fill:#BEB9EA;}
.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--mono);
  font-size:10.5px;color:var(--t3);letter-spacing:.08em;}
.ctip{position:absolute;z-index:44;background:var(--navy);color:#fff;border-radius:var(--r-sm);
  padding:8px 11px;font-size:12.5px;pointer-events:none;box-shadow:0 8px 22px rgba(43,46,74,.3);
  max-width:74%;transform:translate(-50%,-118%);}
.ctip[hidden]{display:none;}
/* ── Stage 2 ─────────────────────────────────────────────────────────────
   Same structure as desktop — category grid, expand in place, item chips,
   local terms merged into the category they belong to. The one mobile
   departure is the preview: a peek line above the bar that expands, rather
   than a side panel there's no room for. */
.stage2{position:absolute;inset:0;z-index:20;background:var(--bg);transform:translateX(100%);
  transition:transform .38s cubic-bezier(.22,.61,.36,1);display:flex;flex-direction:column;}
/* `none`, not `translateX(0)`. A transform of any value \u2014 including the
   identity \u2014 makes the element a containing block, and that is what stopped
   position:sticky on the open tile's header from resolving against the
   scroller. Interpolating to `none` still animates the slide, because CSS
   treats it as the identity matrix for the purposes of the transition.

   This is the fix. Three previous attempts scrolled the tile to the top
   instead, which is a position rather than a guarantee: the moment you scroll
   down through thirteen tree nuts the header is gone again. */
.stage2.open{transform:none;}
/* Explicit ladder. All three pushed stages share the .stage2 rules, so they
   also shared its z-index \u2014 and which one painted on top came down to source
   order. Stage 4 was emitted first and disappeared under Stage 3: the class
   flipped, currentStep() said 4, and nothing moved on screen. */
.stage3{z-index:21;}
.stage4{z-index:22;}
/* The bar is in normal flow inside a column flexbox, so the scroller gets
   exactly the leftover height — no fixed overlay guessing at its own size,
   which is what clipped the last tiles and the custom card. */
/* Positioned so a tile's offsetTop is measured from the scroll content rather
   than from .stage2 \u2014 which makes the scroll-to-top arithmetic independent of
   where the masthead happens to sit. */
.s2scroll{position:relative;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;min-height:0;}
.s2scroll .pad{padding-bottom:20px;}
.s2search{position:relative;margin-bottom:14px;}
.s2search input{width:100%;height:46px;padding:0 12px 0 38px;border:1px solid var(--border-md);
  border-radius:var(--r);font-size:15px;font-family:var(--body);background:var(--surface);outline:none;color:var(--t1);}
.s2search input:focus{border-color:var(--purple);}
.s2search .ic{position:absolute;left:13px;top:50%;transform:translateY(-50%);font-size:13px;opacity:.5;}
.agrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:start;}
/* Shorter tiles: at 64px the last rows fell below the fold on a 932pt screen
   and the grid looked truncated rather than scrollable. The hint row only
   reserves space when it has something to say. */
.acat{background:var(--surface);border:1px solid var(--border-md);border-radius:var(--r);padding:9px 10px;
  cursor:pointer;min-width:0;display:flex;flex-direction:column;justify-content:center;min-height:44px;}
.acat.on{border-color:var(--purple);background:var(--purple-xlt);}
.acat.open{grid-column:1/-1;}
/* Lifted from .allergen-cat.has-local in styles.css: purple rule, purple name
   and a 5px dot, so the signal is visible while the tile is COLLAPSED. Kept
   lighter than the selected state so the traveller's own choices still win. */
.acat.haslocal{border-color:var(--purple-lt);}
.acat.haslocal .acn{color:var(--purple);}
.acat.haslocal .acn::after{content:'';display:inline-block;width:5px;height:5px;
  border-radius:50%;background:var(--purple);margin-left:6px;vertical-align:middle;}
.acat.haslocal.on{border-color:var(--purple);}
/* Desktop puts this in a hover tooltip. There is no hover here, so it becomes
   a line inside the opened tile \u2014 same sentence, no gesture to discover. */
.acat-localnote{font-size:11.5px;line-height:1.45;color:var(--purple);
  background:var(--purple-xlt);border-radius:var(--r-sm);padding:7px 9px;margin-top:9px;}
/* Tap-fired equivalent of .local-tip. Same navy bubble, same copy source. */
.ltip{position:absolute;z-index:70;transform:translate(-50%,-100%);
  background:var(--navy);color:#fff;font-size:11.5px;line-height:1.4;
  padding:7px 11px;border-radius:8px;max-width:230px;text-align:center;
  box-shadow:0 8px 24px rgba(43,46,74,.24);pointer-events:none;
  opacity:0;transition:opacity .18s;}
.ltip[hidden]{display:none;}
.ltip.on{opacity:1;}
.ach{display:flex;align-items:center;gap:8px;}
.aci{flex:none;font-size:15px;}
.acn{flex:1;min-width:0;font-size:13px;font-weight:500;line-height:1.25;}
.acb{flex:none;min-width:19px;height:19px;border-radius:10px;background:var(--purple);color:#fff;
  font-family:var(--mono);font-size:10px;display:flex;align-items:center;justify-content:center;padding:0 6px;}
.acb.off{display:none;}
.ahint{font-size:10px;color:var(--t4);margin-top:3px;}
.ahint:empty, .ahint.none{display:none;}
.aitems{display:none;flex-wrap:wrap;gap:6px;margin-top:11px;padding-top:10px;border-top:1px solid var(--border);}
.acat.open .aitems{display:flex;
  /* Capped so a thirteen-item category scrolls inside the tile instead of
     extending the page past its own header. See the note at .acat.open. */
  max-height:46vh;overflow-y:auto;-webkit-overflow-scrolling:touch;}
.ichip{background:var(--surface);border:1px solid var(--border-md);border-radius:15px;padding:7px 11px;
  font-size:12.5px;font-family:var(--body);color:var(--t1);cursor:pointer;}
.ichip.sel{background:var(--purple);border-color:var(--purple);color:#fff;font-weight:500;}
.ichip.loc{border-color:var(--purple-lt);background:var(--purple-xlt);}
.ichip.loc.sel{background:var(--purple);border-color:var(--purple);}
/* Same shape as .lvtop/.lvall in the language picker — one pattern for
   "expanded group header with a bulk action", not two. */
.atop{display:flex;align-items:center;justify-content:flex-end;width:100%;margin-bottom:8px;
  font-family:var(--mono);font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--t3);}
/* Section label variant — left-aligned, no bulk action. */
.atop.lbl{justify-content:flex-start;margin-top:2px;}
/* Pill, not a link. Same shape as .btn-select-all on the production build:
   mono, uppercase, bordered, and it carries its own selected state so the
   control reads as a toggle rather than a one-way action. */
.aall{background:none;border:1px solid var(--border-md);border-radius:12px;padding:4px 10px;
  font-family:var(--mono);font-size:10px;letter-spacing:.04em;text-transform:uppercase;
  color:var(--t3);cursor:pointer;transition:all .15s ease;}
.aall.on{border-color:var(--purple);color:var(--purple);background:var(--purple-xlt);}
/* A peer tile, not a promoted full-width row. It earns its distinction from
   colour (the desktop .custom-cat gradient) rather than from occupying its own
   line, which made it read as a footnote to the grid instead of a member. */
.acat.cust{background:linear-gradient(180deg,var(--purple-xlt),var(--surface));
  border-color:var(--purple-lt);}
.acat.cust .acn{color:var(--purple);}
.acat.cust.on{border-color:var(--purple);}
/* Expands full width like every other tile — and like .custom-cat.expanded. */
.acat.cust.open{grid-column:1/-1;background:var(--surface);}
/* The scroll-on-expand puts the tile at the top; this keeps its name there
   once you start scrolling through a long item list. A one-shot scroll is a
   position, not a guarantee \u2014 you asked for the tile to stay visible. */
/* Two belts, because the sticky one alone did not hold. .stage2 carries a
   transform (translateX for the slide-in), and a transformed ancestor is
   enough to make position:sticky resolve against the wrong box in Blink \u2014
   the header simply scrolled away with the tile.

   The reliable half is capping the tile: a tile that never grows past the
   screen cannot push its own header off the top of it. Thirteen tree nuts now
   scroll INSIDE the chip area instead of extending the page. */
.acat.open{position:relative;}
/* Opaque, and lifted just enough that chips read as passing underneath it. */
.acat.open .ach{position:sticky;top:0;z-index:3;background:var(--surface);
  margin:0 -10px;padding:2px 10px 6px;
  box-shadow:0 6px 8px -8px rgba(43,46,74,.35);}
.acat.on.open .ach{background:var(--purple-xlt);}
.acat.cust.open .ach{background:var(--surface);}
/* Custom card: free text first, then the global browse list — the same two
   affordances desktop promotes out of the grid. */
.cust-body{display:none;flex-direction:column;width:100%;}
.acat.cust.open .cust-body{display:flex;}
.cust-in{display:flex;gap:7px;width:100%;margin-bottom:8px;}
.cust-in input{flex:1;min-width:0;height:40px;padding:0 11px;border:1px solid var(--border-md);
  border-radius:var(--r-sm);font-size:14px;font-family:var(--body);outline:none;}
.cust-in input:focus{border-color:var(--purple);}
.cust-in button{flex:none;background:var(--navy);color:#fff;border:none;border-radius:var(--r-sm);
  padding:0 15px;font-size:13.5px;font-weight:500;font-family:var(--body);cursor:pointer;}
.cust-note{font-size:11.5px;color:var(--t3);line-height:1.45;margin-bottom:10px;}
.cust-chips{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 10px;}
.cchip{display:inline-flex;align-items:center;gap:6px;background:var(--purple);color:#fff;
  border-radius:15px;padding:6px 10px;font-size:12.5px;font-weight:500;cursor:pointer;}
.cchip.loc{background:var(--surface);color:var(--t1);border:1px solid var(--purple-lt);}
.cchip .cx{opacity:.7;font-size:11px;}
.cbrowse-h{font-size:12px;color:var(--t2);line-height:1.5;margin-bottom:8px;}
.cbl-note{white-space:nowrap;color:var(--t3);}
.mshell .cbl-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--purple);
  margin-right:3px;vertical-align:middle;}
#custBrowse{width:100%;height:38px;padding:0 11px;border:1px solid var(--border-md);
  border-radius:var(--r-sm);font-size:13.5px;font-family:var(--body);outline:none;margin-bottom:8px;}
#custBrowse:focus{border-color:var(--purple);}
.cbrowse-list{max-height:210px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--r-sm);
  background:var(--surface);}
.crow{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;background:none;
  border:none;border-bottom:1px solid var(--border);padding:10px 11px;font-family:var(--body);
  text-align:left;cursor:pointer;}
.crow:last-child{border-bottom:none;}
.crow.on{background:var(--purple);color:#fff;}
.crow.trip .ct{color:var(--purple);font-weight:600;}
.crow.on .ct, .crow.on .cc{color:#fff;}
.crow .ct{font-size:13.5px;}
.crow .cc{flex:none;font-family:var(--mono);font-size:8.5px;letter-spacing:.04em;text-transform:uppercase;
  color:var(--t3);}
.cbrowse-none{padding:14px 11px;font-size:13px;color:var(--t3);}
/* Open, the preview is the screen. At 40\u201362vh it was a letterbox you had to
   scroll inside while the grid sat half-visible behind it competing for the
   same attention. */
.s2bar.open{position:absolute;inset:0;z-index:24;display:flex;flex-direction:column;
  border-radius:0;}
.s2bar.open .pvbody{flex:1;min-height:0;max-height:none;display:flex;flex-direction:column;}
/* The tab strip keeps its height; the card takes everything left. */
.s2bar.open .pvbody .pvtabs{flex:none;}
.s2bar.open .pvcard.card{flex:1;justify-content:space-evenly;}
.s2bar.open .pvdis{flex:none;}
.s2bar.open .pvrow{border-radius:0;}
.s2bar{flex:none;background:var(--surface);border-top:1px solid var(--border);
  border-radius:16px 16px 0 0;box-shadow:0 -5px 22px rgba(43,46,74,.11);}
.s2bar .act{display:flex;align-items:center;gap:10px;padding:11px 16px calc(env(safe-area-inset-bottom) + 12px);}
/* Geometry copied from .bar .next in Stage 1 — same padding, same font size,
   same weight — so the primary action doesn't change shape between steps.
   Back sits left, next is pushed right by margin-left:auto rather than by a
   flex:1 next, which is what made Stage 2's button a different button. */
.s2bar .back{flex:none;background:var(--surface);border:1px solid var(--border-md);border-radius:var(--r);
  padding:14px 18px;font-size:14.5px;font-weight:500;font-family:var(--body);color:var(--t2);cursor:pointer;}
.s2bar .next{flex:none;margin-left:auto;background:var(--navy);color:#fff;border:none;border-radius:var(--r);
  padding:14px 22px;font-size:14.5px;font-weight:600;font-family:var(--body);cursor:pointer;}
.s2bar .next:disabled{background:var(--surface2);color:var(--t4);}
.pvrow{border-radius:16px 16px 0 0;
  display:flex;align-items:center;gap:9px;width:100%;background:var(--purple-xlt);border:none;
  border-bottom:1px solid var(--purple-lt);padding:12px 16px;font-family:var(--body);cursor:pointer;text-align:left;}
.pvrow[hidden]{display:none;}
.pv-l{flex:1;min-width:0;font-size:12.5px;color:var(--t2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pv-l b{color:var(--navy);font-weight:600;}
.pv-cv{flex:none;color:var(--purple);font-size:11px;transition:transform .25s;
  width:22px;height:22px;border-radius:50%;background:var(--surface);border:1px solid var(--purple-lt);
  display:flex;align-items:center;justify-content:center;}
.s2bar.open .pv-cv{transform:rotate(180deg);}
.pvbody{max-height:62vh;overflow-y:auto;padding:14px 16px;border-bottom:1px solid var(--border);
  background:var(--surface2);}
.pvbody[hidden]{display:none;}
.pvtabs{display:flex;gap:6px;margin-bottom:11px;flex-wrap:wrap;}
.pvtab{background:var(--surface);border:1px solid var(--border-md);border-radius:14px;padding:5px 11px;
  font-size:12px;font-family:var(--body);cursor:pointer;}
.pvtab.on{background:var(--purple);border-color:var(--purple);color:#fff;font-weight:500;}
.pvcard{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
.pvh{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--t3);
  padding-bottom:7px;border-bottom:2px solid var(--yellow);margin-bottom:10px;}
.pvl{font-size:13.5px;line-height:1.55;margin-bottom:8px;}
.pvl:last-child{margin-bottom:0;}
.pvl b{font-weight:600;}
.pvl.sub2{font-size:12.5px;color:var(--t3);}
/* The one authentic sentence on a foreign tab carries the tab. */
.pvl.lg{font-size:16px;line-height:1.6;}
.pvfoot{font-family:var(--mono);font-size:9.5px;letter-spacing:.04em;color:var(--t3);
  margin-top:11px;padding-top:9px;border-top:1px solid var(--border);}
.pvdiv{height:1px;background:var(--border);margin:14px 0;}
.pvdis{font-size:11px;color:var(--t4);margin-top:8px;font-style:italic;}
.mshell .pv-empty{text-align:center;padding:20px 10px;}
.mshell .pv-empty-ic{font-size:26px;margin-bottom:8px;}
.mshell .pv-empty-t{font-size:13px;color:var(--t3);}
/* The counter is silent until it matters. A number that sits there from the
   first selection reads as a budget to spend; one that appears near the limit
   reads as the warning it is. */
/* ── Modal ────────────────────────────────────────────────────────────────
   Same class names, same shape and type scale as the production modals
   (English-Only Card, Custom Language Request, Card is Full), so this ports
   across as a lift rather than a rebuild. A banner wedged into the footer was
   competing with the preview for the same strip of screen; a modal stops the
   world, says one thing, and gets out of the way. */
/* Visibility, not display \u2014 an element that is display:none cannot transition
   out, which is why closing used to be a jump cut. The state flips
   synchronously; only the pixels lag. */
.modal-backdrop{position:absolute;inset:0;background:rgba(43,46,74,.32);
  -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:300;
  display:flex;align-items:center;justify-content:center;padding:20px;
  visibility:hidden;opacity:0;pointer-events:none;
  transition:opacity .18s ease, visibility 0s linear .18s;}
.modal-backdrop.open{visibility:visible;opacity:1;pointer-events:auto;
  transition:opacity .18s ease, visibility 0s;}
.modal-box{background:var(--surface);border-radius:var(--r-lg);padding:24px 22px 20px;
  width:100%;max-width:400px;max-height:80%;overflow-y:auto;
  box-shadow:0 20px 60px rgba(43,46,74,.25);
  transform:scale(.94) translateY(10px);opacity:0;
  transition:transform .26s cubic-bezier(.2,.8,.3,1), opacity .2s ease;}
.modal-backdrop.open .modal-box{transform:none;opacity:1;}
/* The live container is .pmodal (index.html), not .modal-backdrop (dead
   prototype markup). This rule's opacity:0 was never undone for it, so on
   the phone every popup (stage 1 gate, card-is-full, English-only, consent)
   showed its backdrop with an invisible box. */
.pmodal.open .modal-box{transform:none;opacity:1;}
@media (prefers-reduced-motion:reduce){
.modal-backdrop, .modal-box, .fmodal, .mshell .fmodal-inner{transition:none;}
}
/* Leads the modal when there is a product to show. Tinted plate underneath so
   a missing file reads as \u201cimage\u201d rather than as breakage. */
.modal-img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;
  border-radius:12px;margin:0 0 16px;
  background:linear-gradient(160deg,#FFF0C4,#FFF6DE);}
.modal-img.missing{content-visibility:auto;}
.mshell .modal-title{font-family:var(--disp);font-size:20px;font-weight:700;color:var(--navy);
  letter-spacing:-.02em;margin:0 0 6px;}
.mshell .modal-subtitle{font-size:13.5px;color:var(--t2);line-height:1.55;margin:0 0 16px;}
.mshell .modal-sub-note{font-size:12px;color:var(--t3);line-height:1.5;margin:-8px 0 16px;}
.mshell .modal-callout{background:var(--surface3);border:1px solid var(--border);
  border-left:3px solid var(--purple);border-radius:var(--r-sm);padding:12px 14px;
  margin-bottom:16px;font-size:12.5px;color:var(--t2);line-height:1.65;}
.mshell .modal-callout strong{color:var(--t1);display:block;margin-bottom:4px;font-size:13px;}
.mshell .modal-callout ul{padding-left:16px;margin:4px 0 0;}
.mshell .modal-callout li{margin-bottom:2px;}
.mshell .modal-callout.warn{background:var(--red-lt);border-color:#F5C6C2;border-left-color:var(--red);color:var(--red);}
.mshell .modal-callout.warn strong{color:var(--red);}
/* A stop is a different kind of message from a confirmation, and should not
   have to say so in words. Light enough to read as a caution, not an error. */
.modal-box.warn{background:#FFFBFA;border:1px solid #F3D6D2;}
.modal-box.warn .modal-title{color:var(--red);}
.modal-box.warn .modal-callout{background:var(--surface);border-left-color:var(--red);}
/* Local endonyms are purple in the grid; the card preview should agree. */
/* ── Card preview ─────────────────────────────────────────────────────────
   Shaped after the printed card: purple pill header, centred lines, purple
   substitutions against dark template text, underlined question, brand foot. */
/* --cd-fs is set by fitCard() at run time. Every dimension on the card is a
   multiple of it, so one number shrinks the whole thing together \u2014 which is
   how render-phone-image.js works too: fit the type, derive the rest. */
.pvcard.card{--cd-fs:19px;overflow:hidden;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r);
  padding:calc(var(--cd-fs) * .9) calc(var(--cd-fs) * .8);text-align:center;
  /* Even distribution instead of four hand-set margins. The renderer's own
     BASE_GAPS are [16,14,14,18] \u2014 near-uniform \u2014 so one gap is honest, and
     it shrinks with the type rather than eating the space the type needs. */
  display:flex;flex-direction:column;gap:calc(var(--cd-fs) * .8);}
/* Type scale taken off render-phone-image.js at preview width. The renderer
   fits the intro block at 64px on a ~1080px canvas; at ~400px that is ~24px,
   and the other blocks land within a couple of px of each other \u2014 which is
   why one size for every row is faithful rather than a simplification. */
.cd-pill{align-self:center;background:var(--purple-lt);color:var(--navy);
  border-radius:999px;padding:calc(var(--cd-fs) * .6) calc(var(--cd-fs) * 1);
  font-size:calc(var(--cd-fs) * 1.05);font-weight:700;line-height:1.35;}
.cd-pill .cd-seg{color:var(--navy);}
/* One size for every text row. At phone-preview scale the renderer's per-block
   scaling reads as inconsistency rather than as hierarchy. */
.cd-row{font-size:var(--cd-fs);font-weight:700;color:var(--t1);line-height:1.45;}
.cd-row.cross{font-weight:500;color:var(--t3);}
.cd-qu{border-bottom:1.5px solid var(--t1);padding-bottom:2px;}
/* The one rule the printed card lives by: substitutions are purple, the
   sentence that holds them is not. */
.cd-hi{color:var(--purple);}
/* Icon strip \u2014 lavender tile, glyph, red strike, label under. Mirrors the
   renderer's wallet-style tile grid. */
.cd-icons{display:flex;flex-wrap:wrap;justify-content:center;
  gap:calc(var(--cd-fs) * .7);
  background:var(--purple-xlt);border-radius:var(--r);padding:calc(var(--cd-fs) * .8);}
.cd-tile{position:relative;width:calc(var(--cd-fs) * 5.5);background:var(--purple-lt);
  border-radius:14px;padding:calc(var(--cd-fs) * .7) calc(var(--cd-fs) * .4) calc(var(--cd-fs) * .5);
  display:flex;flex-direction:column;align-items:center;gap:calc(var(--cd-fs) * .4);}
.cd-ic{font-size:calc(var(--cd-fs) * 2.1);line-height:1;}
/* Sized to the emoji it replaces, so a card that falls back mid-strip does
   not change height. */
.cd-ic-img{width:calc(var(--cd-fs) * 2.4);height:calc(var(--cd-fs) * 2.4);
  object-fit:contain;display:block;}
/* Top-left down to bottom-right, as on the printed card. A negative rotation
   put it the other way round \u2014 rising to the right instead of falling. */
.cd-slash{position:absolute;left:10px;right:10px;top:50%;height:4px;background:#E06A5B;
  transform:rotate(38deg);transform-origin:center;border-radius:2px;}
.cd-lbl{font-size:calc(var(--cd-fs) * .63);font-weight:700;color:var(--navy);line-height:1.2;}
/* Skeleton rows for a card that genuinely has not been written yet. */
.sk{display:block;height:11px;border-radius:5px;margin:0 auto 6px;
  background:linear-gradient(90deg,var(--surface2),#EFEFF4,var(--surface2));
  background-size:200% 100%;animation:skwave 1.6s ease-in-out infinite;}
.sk:last-child{margin-bottom:0;}
.sk-w100{width:100%;}
.sk-w95{width:95%;}
.sk-w90{width:90%;}
.sk-w85{width:85%;}
.sk-w70{width:70%;}
.sk-w60{width:60%;}
.sk-w45{width:45%;}
.sk-lbl{width:70%;height:8px;margin-bottom:0;}
.cd-pill.sk-pill{width:80%;padding:14px 20px;}
.cd-pill.sk-pill .sk{height:14px;background:linear-gradient(90deg,#CFCCF6,#E4E2FB,#CFCCF6);
  background-size:200% 100%;}
@keyframes skwave{0%{background-position:200% 0}100%{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){
.sk{animation:none;}
}
/* What the card will actually say, quoted back. Describing the rule made
   people work out the consequence themselves; showing the line removes the
   step. */
.mshell .cm-shows{font-family:var(--body);font-size:15px;font-weight:600;color:var(--t1);
  background:var(--surface);border:1px solid var(--border-md);border-radius:var(--r-sm);
  padding:9px 12px;margin:6px 0 8px;}
.mshell .cm-why{font-size:12.5px;color:var(--t2);line-height:1.6;}
/* Step jump. The step marker already told you where you were; it may as well
   also take you there. */
.stepn{background:none;border:none;padding:2px 0 2px 4px;font-family:var(--mono);
  font-size:10.5px;letter-spacing:.06em;color:var(--t3);cursor:pointer;}
.stepn i{font-style:normal;color:var(--purple);font-weight:500;}
.stepn .sv{font-size:9px;}
.stepmenu{position:absolute;top:54px;right:16px;z-index:310;width:230px;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r);
  box-shadow:0 14px 40px rgba(43,46,74,.18);overflow:hidden;padding:4px;}
.stepmenu[hidden]{display:none;}
.stepmenu button{display:flex;align-items:center;gap:9px;width:100%;background:none;border:none;
  padding:10px 10px;font-family:var(--body);font-size:13.5px;color:var(--t1);
  text-align:left;cursor:pointer;border-radius:var(--r-sm);}
.stepmenu button b{flex:none;width:20px;height:20px;border-radius:50%;background:var(--surface2);
  color:var(--t3);font-family:var(--mono);font-size:10.5px;font-weight:500;
  display:flex;align-items:center;justify-content:center;}
.stepmenu button.here{background:var(--purple-xlt);}
.stepmenu button.here b{background:var(--purple);color:#fff;}
.stepmenu button[disabled]{color:var(--t4);cursor:default;}
.stepmenu .sm-s{margin-left:auto;font-family:var(--mono);font-size:9px;letter-spacing:.04em;
  text-transform:uppercase;color:var(--t4);}
.mshell .modal-actions{display:flex;gap:10px;justify-content:flex-end;}
.mshell .btn-modal-cancel{background:none;border:1px solid var(--border);color:var(--t2);border-radius:20px;
  padding:10px 18px;font-family:var(--body);font-size:13.5px;cursor:pointer;}
.mshell .btn-modal-confirm{background:var(--navy);color:#fff;border:none;border-radius:20px;
  padding:10px 20px;font-family:var(--body);font-size:13.5px;font-weight:600;cursor:pointer;}
/* Keeps the panel from collapsing when you switch to a foreign tab, which
   made the whole footer jump under your thumb. */
.pvbody{min-height:290px;}
.toast .tm{display:block;}
.toast .ta{display:block;width:100%;margin-top:9px;padding-top:9px;border:none;
  border-top:1px solid var(--border);
  background:none;color:var(--purple);font-size:13px;font-weight:600;font-family:var(--body);
  text-align:left;cursor:pointer;}
/* Was navy on navy, sitting directly on top of the card strip \u2014 the same
   colour as the Continue button and covering the control people reach for
   next. Light sheet, purple accent, and clear of the strip. */
.toast{position:absolute;left:16px;right:16px;bottom:calc(var(--barh,92px) + 58px);z-index:60;
  background:var(--surface);color:var(--t1);border:1px solid var(--purple-lt);
  border-left:3px solid var(--purple);
  border-radius:var(--r);padding:13px 15px;font-size:13.5px;
  box-shadow:0 12px 34px rgba(43,46,74,.18);opacity:0;transform:translateY(8px);
  transition:opacity .22s,transform .22s;pointer-events:auto;}
.toast.on{opacity:1;transform:translateY(0);}
.toast[hidden]{display:none;}
.ctip .n{display:block;font-weight:600;}
.ctip .m{display:block;font-family:var(--mono);font-size:9px;letter-spacing:.05em;text-transform:uppercase;
  color:var(--purple-lt);margin-top:2px;}
.ctip .go{display:block;font-size:10.5px;color:#C9C7E8;margin-top:4px;}
.ms-legend{flex:none;width:100%;padding:14px 16px calc(env(safe-area-inset-bottom) + 14px);
  border-top:1px solid var(--border);background:var(--surface);font-size:13.5px;font-family:var(--body);
  color:var(--purple);font-weight:500;cursor:pointer;text-align:center;}
.ms-legend[hidden]{display:none;}
/* ── Language sheet ──────────────────────────────────────────────────────
   Tapping a language should answer "why is this on my card and what will it
   look like", not just remove it. Script matters: a traveller handing over a
   card in Peru wants to know Quechua is written in Latin script, and one
   going to Morocco wants to know Darija is spoken but often written in
   Arabic script. */
.sheetbd{position:absolute;inset:0;z-index:40;background:rgba(43,46,74,.4);}
.sheetbd[hidden]{display:none;}
/* Belt and braces: a closed sheet must not be hit-testable. transform alone
   moves it off-screen visually but leaves it in the hit-test tree on some
   engines once a transition is interrupted. */
.lsheet{pointer-events:none;}
.lsheet.open{pointer-events:auto;}
.lsheet{position:absolute;left:0;right:0;bottom:0;z-index:41;padding-top:2px;background:var(--surface);
  border-radius:16px 16px 0 0;box-shadow:0 -12px 40px rgba(43,46,74,.22);transform:translateY(102%);
  transition:transform .34s cubic-bezier(.22,.61,.36,1);max-height:74%;overflow-y:auto;}
.lsheet.open{transform:translateY(0);}
.lsgrab{width:38px;height:4px;border-radius:2px;background:var(--border-md);margin:10px auto 2px;cursor:grab;}
.lsbody{padding:10px 18px calc(env(safe-area-inset-bottom) + 20px);}
.lsh{display:flex;align-items:center;gap:11px;margin-bottom:14px;}
.lsh h3{font-family:var(--disp);font-size:21px;margin:0;font-weight:600;flex:1;min-width:0;}
.lsrow{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--border);font-size:13.5px;}
.lsrow:last-child{border-bottom:none;}
.lsrow .k{flex:none;width:96px;font-family:var(--mono);font-size:9.5px;letter-spacing:.05em;
  text-transform:uppercase;color:var(--t3);padding-top:2px;}
.lsrow .v{flex:1;min-width:0;}
/* Primary action is navy like every other primary in the flow; declining is a
   plain link, not a competing purple button. */
.mshell .gate-all{width:100%;background:var(--navy);color:#fff;border:none;border-radius:var(--r);
  padding:15px;font-size:14.5px;font-weight:600;font-family:var(--body);cursor:pointer;margin-bottom:9px;}
.mshell .gate-pick{width:100%;background:var(--surface);color:var(--t1);border:1px solid var(--border-md);
  border-radius:var(--r);padding:14px;font-size:14px;font-weight:500;font-family:var(--body);
  cursor:pointer;margin-bottom:9px;}
.mshell .gate-skip{width:100%;background:none;border:none;padding:13px 0 2px;font-size:13.5px;
  font-family:var(--body);color:var(--t2);cursor:pointer;}
.lslink{width:100%;margin-top:14px;background:var(--purple-xlt);border:1px solid var(--purple-lt);
  border-radius:var(--r);padding:13px;font-size:13.5px;font-family:var(--body);color:var(--purple);
  font-weight:500;cursor:pointer;text-align:left;}
/* One way to close (✕ or drag), one way to remove (the ✕ on the row itself).
   Two remove affordances for the same object made the sheet feel like a
   settings screen rather than an explanation. */
.lsx{position:absolute;top:12px;right:14px;width:34px;height:34px;border-radius:50%;border:1px solid var(--border);
  background:var(--surface2);color:var(--t2);font-size:13px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.lsp{font-size:14px;line-height:1.55;color:var(--t2);margin:0 0 14px;}
.lsp b{color:var(--navy);font-weight:600;}
.lsx2{display:block;margin-top:6px;font-size:13px;color:var(--t3);font-style:italic;}
.eo-for{background:var(--surface2);border:1px solid var(--border);border-radius:var(--r);padding:12px 13px;}
.eo-for .k{display:block;font-family:var(--mono);font-size:9.5px;letter-spacing:.07em;text-transform:uppercase;
  color:var(--t3);margin-bottom:8px;}
.eo-li{font-size:13.5px;color:var(--t2);padding:4px 0 4px 14px;position:relative;line-height:1.4;}
.eo-li::before{content:'·';position:absolute;left:3px;color:var(--purple);font-weight:700;}
.lsheet{position:absolute;}
/* ── Country brief ───────────────────────────────────────────────────────── */
/* Above the sheet layer (40/41), not below it. Opening the brief from the
   gate slid it in UNDERNEATH a sheet that was still mid-transition, and since
   .lsheet is a full-width element pinned to the bottom with no pointer-events
   guard, it kept swallowing taps across the lower half of the page. That was
   the freeze. */
.brief{position:absolute;inset:0;z-index:46;background:var(--bg);transform:translateX(100%);
  transition:transform .36s cubic-bezier(.22,.61,.36,1);display:flex;flex-direction:column;}
.brief.open{transform:translateX(0);}
.bf-scroll{flex:1;overflow-y:auto;min-height:0;}
.bf-map{height:180px;background:var(--surface2);border-bottom:1px solid var(--border);}
.bf-map svg{width:100%;height:100%;display:block;}
.bm{fill:#E2E0F5;stroke:#fff;stroke-width:.3px;}
.bm.nb{fill:#D2CFF0;}
.bm{fill:#E8E7F4;stroke:#fff;stroke-width:.3px;}
.bm.on{fill:var(--purple);stroke:#fff;stroke-width:.5px;}
.bf-body{padding:16px;}
.bf-head{display:flex;align-items:center;gap:11px;margin-bottom:2px;}
.bf-head h2{font-family:var(--disp);font-size:23px;margin:0;font-weight:600;}
.bf-scope{font-family:var(--mono);font-size:9px;letter-spacing:.07em;text-transform:uppercase;color:var(--t3);margin:0 0 18px 43px;}
.bf-sec{margin-bottom:20px;}
.bf-sec>.kick{display:block;margin-bottom:8px;padding-bottom:5px;border-bottom:2px solid var(--yellow);}
.bl{display:flex;align-items:center;gap:9px;padding:8px 0;border-bottom:1px solid var(--border);}
.bl:last-child{border-bottom:none;}
.bl .n{flex:1;min-width:0;font-size:14px;}
.bl .n .sub{display:block;font-family:var(--mono);font-size:9px;letter-spacing:.04em;text-transform:uppercase;color:var(--t3);margin-top:2px;}
.bl .pv{flex:none;width:46px;height:4px;background:var(--border);border-radius:2px;overflow:hidden;}
.bl .pv i{display:block;height:100%;background:var(--purple);}
.bl .tag{flex:none;font-family:var(--mono);font-size:8px;letter-spacing:.04em;text-transform:uppercase;color:var(--t3);
  border:1px solid var(--border-md);border-radius:4px;padding:2px 5px;}
.bl .tag.off{color:var(--purple);border-color:var(--purple-lt);background:var(--purple-xlt);}
.bu{display:flex;align-items:center;gap:9px;padding:9px 0;border-bottom:1px solid var(--border);cursor:pointer;}
.bu:last-of-type{border-bottom:none;}
.bu .n{flex:1;min-width:0;font-size:14px;}
.bu .rq{flex:none;font-size:12px;font-weight:500;color:var(--purple);border:1px solid var(--purple-lt);
  background:var(--purple-xlt);border-radius:14px;padding:5px 11px;}
.bu.on .rq{background:var(--purple);border-color:var(--purple);color:#fff;}
.bf-why{margin:14px 16px 0;background:var(--purple-xlt);border:1px solid var(--purple-lt);
  border-radius:var(--r);padding:12px 13px;font-size:13px;line-height:1.5;color:var(--t2);}
.bf-why[hidden]{display:none;}
.bf-why b{color:var(--navy);font-weight:600;}
.bl.cus, .bl.drop{cursor:pointer;}
.cusb{flex:none;font-size:12px;font-weight:500;color:var(--purple);border:1px solid var(--purple-lt);
  background:var(--purple-xlt);border-radius:14px;padding:5px 11px;}
.cusb.on{background:var(--purple);border-color:var(--purple);color:#fff;}
.bd2{padding:7px 0;border-bottom:1px solid var(--border);font-size:13.5px;}
.bd2:last-child{border-bottom:none;}
.ba{display:flex;align-items:center;gap:9px;padding:8px 0;border-bottom:1px solid var(--border);}
.ba:last-child{border-bottom:none;}
.ba .dt{flex:none;width:7px;height:7px;border-radius:50%;}
.ba .n{flex:1;min-width:0;font-size:13.5px;}
.ba .cat{flex:none;font-family:var(--mono);font-size:8px;letter-spacing:.03em;text-transform:uppercase;color:var(--t3);
  border:1px solid var(--border-md);border-radius:4px;padding:2px 5px;}
.bf-foot{flex:none;padding:11px 16px calc(env(safe-area-inset-bottom) + 12px);border-top:1px solid var(--border);}
.bf-add{width:100%;background:var(--purple);color:#fff;border:none;border-radius:var(--r);padding:14px;
  font-size:14.5px;font-weight:600;font-family:var(--body);cursor:pointer;}
.bf-add[hidden]{display:none;}
.bf-in{text-align:center;font-size:13.5px;color:var(--t2);padding:13px;background:var(--surface2);
  border:1px solid var(--border);border-radius:var(--r);}
.bf-in[hidden]{display:none;}
@media(prefers-reduced-motion:reduce){
.mapscr, .brief{transition:none;}
}
/* ── Stage 3 ──────────────────────────────────────────────────────────────
   Ported from .pcard in styles.css rather than reinvented: 14px radius,
   overflow-hidden, 4:3 cream thumb with a dashed IMAGE placeholder behind the
   real photo, meta block under it, and a purple check badge that only appears
   when selected.

   Desktop lays three one-time cards in a row (3fr) with a vertical rule and
   the scanner in its own column (1fr). Its own 900px breakpoint already
   collapses that to two columns and turns .fmt-vdivider off; at 430px the
   next step is one column, so this is that breakpoint continued rather than a
   different design. */
/* 2×2, which is what styles.css itself does below 900px: .fmt-onetime-cards
   and .fmt-scanner-col both go display:contents, .fmt-vdivider goes away, and
   .format-grid3 becomes repeat(2,1fr). Four products, one screen, no divider
   \u2014 the scanner is told apart by colour, not by position. */
.fgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;align-items:start;}
.mshell .pcard{position:relative;display:block;width:100%;text-align:left;padding:0;
  border:1px solid var(--border);border-radius:14px;overflow:hidden;cursor:pointer;
  background:var(--surface);font-family:var(--body);transition:all .15s ease;}
.mshell .pcard.selected{border-color:var(--purple);box-shadow:0 0 0 1px var(--purple);}
.mshell .pcard-check{position:absolute;top:7px;right:7px;z-index:2;width:19px;height:19px;
  border-radius:50%;background:var(--purple);color:#fff;font-size:11px;
  display:none;align-items:center;justify-content:center;}
.mshell .pcard.selected .pcard-check{display:inline-flex;}
.mshell .pcard-thumb{position:relative;aspect-ratio:4/3;overflow:hidden;
  background:linear-gradient(160deg,#FBEFD6,#FAF3E4);
  display:flex;align-items:center;justify-content:center;border-bottom:1px solid var(--border);}
.mshell .pcard-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.mshell .pcard-imgph{position:absolute;inset:8px;border:1.5px dashed var(--border-md);border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  background:repeating-linear-gradient(45deg,transparent,transparent 8px,rgba(0,0,0,.015) 8px,rgba(0,0,0,.015) 16px);}
.mshell .pcard-thumb:not(.media-missing) .pcard-imgph{display:none;}
.mshell .imgph-label{font-family:var(--mono);font-size:8px;letter-spacing:.08em;color:var(--t4);}
.mshell .pcard-meta{display:block;padding:10px 11px 12px;}
.mshell .pcard-title{display:block;font-size:13.5px;font-weight:600;color:var(--t1);line-height:1.25;}
.mshell .pcard-blurb{display:block;font-size:11px;color:var(--t3);margin-top:3px;line-height:1.3;}
.mshell .pcard-price{display:block;font-size:16px;color:var(--navy);margin-top:7px;font-weight:700;letter-spacing:-.01em;}
.mshell .pcard-cta{display:block;margin-top:7px;font-family:var(--mono);font-size:9px;letter-spacing:.03em;
  text-transform:uppercase;color:var(--purple);line-height:1.3;}
.mshell .pcard.selected .pcard-cta{font-weight:600;}
/* Scanner offset colour, straight from .pcard-scanner. */
.mshell .pcard-scanner{background:linear-gradient(180deg,#FFF6E9,var(--surface));border-color:#F0D9A8;}
.mshell .pcard-scanner .pcard-thumb{background:linear-gradient(160deg,#FFF0C4,#FFF6DE);}
.mshell .pcard-scanner .pcard-imgph{border-color:#E5C983;
  background:repeating-linear-gradient(45deg,transparent,transparent 8px,rgba(246,201,74,.08) 8px,rgba(246,201,74,.08) 16px);}
.mshell .pcard-scanner .pcard-price, .mshell .pcard-scanner .pcard-cta{color:#C79A2E;}
.mshell .pcard-scanner.selected{border-color:var(--purple);box-shadow:0 0 0 1px var(--purple);}
/* ── Product modal ────────────────────────────────────────────────────────
   Desktop is a 1340×720 two-pane split: gallery at 1.75fr, body at 1fr.
   At 430px the split turns vertical \u2014 gallery on top, scrolling body under,
   Add pinned to the bottom \u2014 and the whole thing is height-locked so it never
   runs past one screen, which is the property that made the desktop one work. */
.fmodal{position:absolute;inset:0;z-index:320;
  visibility:hidden;opacity:0;pointer-events:none;
  transition:opacity .18s ease, visibility 0s linear .18s;}
.fmodal.open{visibility:visible;opacity:1;pointer-events:auto;
  transition:opacity .18s ease, visibility 0s;}
.fmodal-backdrop{position:absolute;inset:0;background:rgba(43,46,74,.55);
  -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);}
/* Fixed px, not vh. vh measures the browser viewport, and the .phone frame is
   932px centred inside a taller window \u2014 so 4vh resolved against the wrong box
   and, once the page itself scrolled, pushed the modal off the top. Insets
   relative to the frame keep all four corners on screen. */
.mshell .fmodal-inner{position:absolute;left:14px;right:14px;top:22px;bottom:22px;
  background:var(--surface);border-radius:20px;overflow:hidden;
  box-shadow:0 30px 90px rgba(43,46,74,.35);display:flex;flex-direction:column;
  transform:scale(.94) translateY(10px);opacity:0;
  transition:transform .26s cubic-bezier(.2,.8,.3,1), opacity .2s ease;}
.fmodal.open .fmodal-inner{transform:none;opacity:1;}
.mshell .fmodal-close{position:absolute;top:10px;right:10px;z-index:3;width:32px;height:32px;
  border-radius:50%;border:none;background:rgba(255,255,255,.92);color:var(--navy);
  font-size:15px;cursor:pointer;box-shadow:0 2px 8px rgba(43,46,74,.15);}
/* The gallery gets a fixed share so a long description can't squeeze it out
   and a short one can't let it balloon. */
.mshell .fmodal-gallery{position:relative;flex:none;height:38%;
  background:linear-gradient(160deg,#FBEFD6,#FAF3E4);overflow:hidden;}
.fmodal.fmt-scanner .fmodal-gallery{background:linear-gradient(160deg,#FFF0C4,#FFF6DE);}
.mshell .fmodal-slide{position:absolute;inset:0;display:none;flex-direction:column;
  align-items:center;justify-content:center;padding:10px 10px 28px;}
.mshell .fmodal-slide.active{display:flex;}
.mshell .fmodal-img, .mshell .fmodal-vid{max-width:100%;max-height:100%;object-fit:contain;border-radius:10px;
  box-shadow:0 8px 24px rgba(43,46,74,.18);background:#fff;}
.mshell .fmodal-slide.media-missing .fmodal-img, .mshell .fmodal-slide.media-missing .fmodal-vid{display:none;}
.fmodal-fallback{display:none;border:1.5px dashed var(--border-md);border-radius:10px;
  padding:26px 30px;font-family:var(--mono);font-size:9px;letter-spacing:.1em;color:var(--t4);}
.mshell .fmodal-slide.media-missing .fmodal-fallback{display:block;}
.mshell .fmodal-cap{position:absolute;left:0;right:0;bottom:8px;text-align:center;
  font-family:var(--mono);font-size:9.5px;color:var(--t3);padding:0 40px;}
.mshell .fmodal-nav{position:absolute;top:calc(50% - 14px);transform:translateY(-50%);
  width:30px;height:30px;border-radius:50%;border:none;background:rgba(255,255,255,.92);
  color:var(--navy);font-size:18px;cursor:pointer;box-shadow:0 2px 10px rgba(43,46,74,.15);
  display:flex;align-items:center;justify-content:center;z-index:2;}
.mshell .fmodal-nav.prev{left:8px;}
.mshell .fmodal-nav.next{right:8px;}
.mshell .fmodal-dots{position:absolute;left:50%;bottom:26px;transform:translateX(-50%);
  display:flex;gap:5px;z-index:2;}
.mshell .fmodal-dot{width:6px;height:6px;border-radius:50%;background:rgba(43,46,74,.22);cursor:pointer;}
.mshell .fmodal-dot.active{background:var(--purple);}
.mshell .fmodal-body{flex:1;min-height:0;overflow-y:auto;padding:16px 16px 4px;}
.mshell .fmodal-title{font-family:var(--disp);font-size:20px;font-weight:600;color:var(--navy);}
.mshell .fmodal-price{font-family:var(--mono);font-size:12px;color:var(--purple);margin-top:5px;}
.fmodal.fmt-scanner .fmodal-price{color:#C79A2E;}
.mshell .fmodal-desc{font-size:13.5px;color:var(--t2);line-height:1.55;margin-top:11px;}
.mshell .fmodal-bullets{margin:12px 0 0;padding-left:17px;}
.mshell .fmodal-bullets li{font-size:12.5px;color:var(--t2);line-height:1.5;margin-bottom:5px;}
.mshell .fmodal-packs{margin-top:15px;border-top:1px solid var(--border);padding-top:13px;}
.mshell .fmodal-packs-head{font-family:var(--mono);font-size:9.5px;letter-spacing:.05em;
  text-transform:uppercase;color:var(--t4);margin-bottom:9px;}
.mshell .fmodal-pack-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
.mshell .fmodal-pack-lang{font-size:13px;color:var(--t2);min-width:0;}
.mshell .fmodal-pack-sel{flex:none;font-family:var(--body);font-size:12.5px;padding:7px 9px;
  border:1px solid var(--border-md);border-radius:8px;background:var(--surface);color:var(--t1);}
.mshell .fmodal-pack-note{font-family:var(--mono);font-size:9px;color:var(--t4);margin-top:4px;}
.fmodal-perk{margin-top:14px;font-size:13px;color:var(--navy);}
.fmodal-perk b{color:#C79A2E;}
.fmodal-foot{flex:none;padding:10px 16px calc(env(safe-area-inset-bottom) + 12px);
  border-top:1px solid var(--border);background:var(--surface);}
.mshell .fmodal-add{width:100%;background:var(--purple);color:#fff;border:none;border-radius:12px;
  padding:14px;font-size:15px;font-weight:600;cursor:pointer;font-family:var(--body);}
.mshell .fmodal-add.added{background:var(--surface);color:var(--purple);border:1px solid var(--purple);}
/* ── Wallet minimum-pack confirm ──────────────────────────────────────────
   Ported from .wallet-min-ov. Inside the modal, not over the page, so \u201cAdd
   more\u201d returns you to the pack selectors instead of dumping you on the grid. */
.wallet-min-ov{position:absolute;inset:0;z-index:60;border-radius:20px;padding:20px;
  background:rgba(43,46,74,.45);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
  display:flex;align-items:center;justify-content:center;}
.mshell .wmc-card{background:#fff;border-radius:16px;max-width:360px;width:100%;padding:22px;
  box-shadow:0 20px 60px rgba(43,46,74,.35);text-align:center;}
.mshell .wmc-t{font-family:var(--disp);font-size:19px;font-weight:600;color:var(--navy);margin-bottom:8px;}
.mshell .wmc-d{font-size:13px;color:var(--t2);line-height:1.55;margin-bottom:18px;}
.mshell .wmc-btns{display:flex;flex-direction:column;gap:9px;}
.mshell .wmc-more{background:var(--purple);color:#fff;border:none;border-radius:9px;padding:12px;
  font-size:13.5px;font-weight:600;cursor:pointer;font-family:var(--body);}
.mshell .wmc-keep{background:none;border:1px solid var(--border-md);color:var(--t2);border-radius:9px;
  padding:11px;font-size:12.5px;cursor:pointer;font-family:var(--body);}
/* The scanner reads as the subscription everywhere it appears. Desktop tints
   the price and CTA amber and leaves the rest of the type alone; the check
   badge stays purple because \u201cselected\u201d means the same thing on all four. */
.fmodal.fmt-scanner .fmodal-title{color:var(--navy);}
.fmodal.fmt-scanner .fmodal-bullets li::marker{color:#C79A2E;}
.fmodal.fmt-scanner .fmodal-add{background:#C79A2E;}
.fmodal.fmt-scanner .fmodal-add.added{background:var(--surface);color:#C79A2E;border-color:#C79A2E;}
.s3total{display:flex;align-items:baseline;gap:8px;padding:11px 16px 0;}
.s3total .lbl{font-family:var(--mono);font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--t3);}
.s3total .amt{font-family:var(--disp);font-size:22px;font-weight:600;color:var(--navy);}
.s3total .sv{margin-left:auto;font-family:var(--mono);font-size:9.5px;letter-spacing:.04em;
  text-transform:uppercase;color:#C79A2E;}
/* ── Stage 4 ──────────────────────────────────────────────────────────────
   Same blocks as renderReview, stacked: cart, trip, allergens, what happens
   next. .rv-side moves above .rv-main because on a phone the total is the
   thing you opened this screen to see. */
.mshell .rv-cart{border:1px solid var(--border);border-radius:14px;background:var(--surface);
  padding:14px;margin-bottom:14px;}
.mshell .rv-cart-h{font-family:var(--mono);font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--t3);margin-bottom:10px;}
.mshell .rv-cart-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--border);}
.mshell .rv-cart-row:last-of-type{border-bottom:none;}
.mshell .rv-pimg{flex:none;width:46px;height:46px;border-radius:9px;overflow:hidden;position:relative;
  background:linear-gradient(160deg,#FBEFD6,#FAF3E4);}
.mshell .rv-pimg.scanner{background:linear-gradient(160deg,#FFF0C4,#FFF6DE);}
.mshell .rv-pimg img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.mshell .rv-cart-info{flex:1;min-width:0;}
.mshell .rv-cart-nm{font-size:13.5px;font-weight:600;color:var(--t1);}
.mshell .rv-cart-row.rv-tap{cursor:pointer;}
.rv-q{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;
  border-radius:50%;border:1px solid var(--purple-lt);color:var(--purple);
  font-family:var(--mono);font-size:9px;vertical-align:middle;margin-left:4px;}
.mshell .rv-cart-sub{font-size:11px;color:var(--t3);margin-top:2px;line-height:1.35;}
.rv-cart-bd{display:block;font-family:var(--mono);font-size:9px;color:var(--t4);margin-top:3px;}
.mshell .rv-cart-amt{flex:none;font-size:14px;font-weight:600;color:var(--navy);}
.mshell .rv-cart-lines{border-top:1px solid var(--border);margin-top:10px;padding-top:10px;}
.mshell .rv-sumline{display:flex;justify-content:space-between;font-size:12.5px;color:var(--t2);margin-bottom:6px;}
/* .rv-sumline.rv-disc is purple in styles.css. Amber is the scanner's colour
   as a product; inside the cart everything is purple. */
.mshell .rv-sumline.rv-disc{color:var(--purple);}
.mshell .rv-ship-v{font-family:var(--mono);font-size:10px;color:var(--t4);}
.mshell .rv-cart-total{display:flex;justify-content:space-between;align-items:baseline;
  border-top:1px solid var(--border-md);margin-top:8px;padding-top:11px;}
.mshell .rv-ct-lbl{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--t3);}
.mshell .rv-ct-amt{font-family:var(--disp);font-size:24px;font-weight:600;color:var(--navy);}
.mshell .rv-recurring-note{font-size:11px;color:var(--t3);margin-top:8px;line-height:1.45;}
.mshell .rv-recurring-note b{color:var(--purple);}
/* Trial upsell. PURPLE, not amber \u2014 .rv-upsell in styles.css is purple-xlt on
   a dashed purple-lt border with a purple price and button. Amber is the
   scanner's colour as a PRODUCT (its card, its price); the offer to try it
   belongs to the cart, which is purple like everything else there.

   padding-left:0 with margin-left:0 on the image is the detail that matters:
   it puts the upsell thumbnail on exactly the same x as the product thumbs in
   the rows above, so the column reads as one. */
/* Full-bleed band. The card has 14px of padding, so negative margins put the
   upsell's thumbnail on the same x as the product thumbs AND its price on the
   same right edge as their amounts \u2014 a bordered box inset by its own padding
   could never line up with either. */
.mshell .rv-upsell{position:relative;display:flex;gap:10px;align-items:flex-start;
  background:var(--purple-xlt);border:1px dashed var(--purple-lt);
  border-left:none;border-right:none;border-radius:0;
  padding:12px 14px;margin:8px -14px 4px;}
/* Under the thumbnail, not over the price. Sitting above the $1 it read as a
   stray mark on the number. */
.mshell .rv-upsell-x{position:absolute;left:14px;bottom:8px;top:auto;right:auto;width:auto;height:auto;border:none;
  background:none;color:var(--t4);font-family:var(--mono);font-size:9px;letter-spacing:.04em;
  text-transform:uppercase;cursor:pointer;line-height:1;padding:2px 0;}
.mshell .rv-upsell{padding-bottom:26px;}
.mshell .rv-upsell-pimg{flex:none;width:46px;height:46px;margin-left:0;border-radius:9px;
  overflow:hidden;position:relative;background:#fff;border:1px solid var(--purple-lt);}
.mshell .rv-upsell-pimg img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.mshell .rv-upsell-main{flex:1;min-width:0;padding-top:1px;}
.mshell .rv-upsell-t{font-size:13.5px;font-weight:700;color:var(--navy);line-height:1.3;}
.mshell .rv-upsell-d{font-size:11.5px;color:var(--t2);line-height:1.45;margin-top:4px;}
.mshell .rv-upsell-d b{color:var(--purple);}
/* The price sits in the same column, at the same size, as the amounts on the
   rows above \u2014 a 20px $1 next to a 14px $12 read as a promo banner rather
   than a line in the cart. \u201cfirst month\u201d is already in the sentence. */
.rv-upsell-cta{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:8px;}
.mshell .rv-offer-price{font-size:14px;font-weight:600;color:var(--purple);line-height:1.2;}
.mshell .rv-upsell-add{background:var(--purple);color:#fff;border:none;border-radius:999px;padding:8px 18px;
  font-family:var(--body);font-size:12.5px;font-weight:600;cursor:pointer;}
/* What happens next, behind an \u24d8 rather than a block you scroll past. */
.rv-nextbtn{display:inline-flex;align-items:center;gap:6px;background:none;border:none;
  padding:0;font-family:var(--body);font-size:12.5px;color:var(--purple);cursor:pointer;}
.rv-nextbtn i{font-style:normal;width:17px;height:17px;border-radius:50%;
  border:1px solid var(--purple-lt);display:flex;align-items:center;justify-content:center;
  font-family:var(--mono);font-size:10px;}
.rv-foot-actions{display:flex;align-items:center;justify-content:space-between;
  gap:10px;margin:2px 0 4px;}
/* Footer total, tappable for the itemised version. Desktop has room to show
   every line; a phone footer has room for one number, so the detail lives one
   tap away rather than being cut. */
/* \u201cDue today\u201d already sits at the bottom of the order summary a few hundred
   pixels above. Printing it again in the footer was the third appearance of
   the same number, so the footer control just says what it opens. */
.s4tot{display:flex;align-items:center;gap:9px;width:100%;background:var(--purple-xlt);
  border:none;border-bottom:1px solid var(--purple-lt);padding:11px 16px;
  font-family:var(--body);cursor:pointer;text-align:left;}
.s4tot[hidden]{display:none;}
.s4tot .lbl{margin-left:auto;font-size:13px;font-weight:600;color:var(--purple);}
.s4tot .cv{flex:none;width:24px;height:24px;border-radius:50%;
  background:var(--surface);border:1px solid var(--purple-lt);color:var(--purple);
  font-size:11px;display:flex;align-items:center;justify-content:center;transition:transform .25s;}
.s4bar.exp .s4tot .cv{transform:rotate(180deg);}
.s4break{padding:6px 16px 12px;border-bottom:1px solid var(--border);}
.s4break[hidden]{display:none;}
.s4b-row{display:flex;justify-content:space-between;gap:12px;font-size:14px;
  color:var(--t2);padding:10px 0;border-bottom:1px solid var(--border);}
.s4b-row:last-child{border-bottom:none;}
.s4b-row .n{flex:1;min-width:0;color:var(--t1);}
.s4b-row .n small{display:block;font-family:var(--mono);font-size:10.5px;color:var(--t4);margin-top:3px;}
.s4b-row .v{flex:none;font-weight:600;color:var(--navy);}
.s4b-row.disc, .s4b-row.disc .v{color:var(--purple);}
/* With the detail open, Back is noise: the two things you can do are close it
   or buy. Checkout keeps its place in the corner, with a rule above it. */
.s4bar.exp .act .back{display:none;}
.s4bar.exp .act{border-top:1px solid var(--border);padding-top:12px;}
/* Audio demo rows, from styles.css. */
.mshell .fmodal-audio{margin-top:16px;border-top:1px solid var(--border);padding-top:14px;}
.mshell .fa-head{font-family:var(--mono);font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--t3);margin-bottom:9px;}
.mshell .audio-demo-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.mshell .audio-demo{display:flex;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--border);
  border-radius:10px;background:var(--surface);cursor:pointer;text-align:left;font-family:var(--body);}
.mshell .audio-demo.playing{border-color:var(--purple);background:var(--purple-xlt);}
.mshell .ad-play{flex:none;width:20px;height:20px;border-radius:50%;background:var(--purple);color:#fff;
  font-size:8px;display:flex;align-items:center;justify-content:center;padding-left:1px;}
.mshell .audio-demo.playing .ad-play{background:var(--navy);font-size:0;}
.mshell .fa-note.fa-warn{color:var(--t4);font-style:italic;}
.mshell .fa-note.fa-warn[hidden]{display:none;}
.mshell .audio-demo.playing .ad-play::before{content:'\u23f8';font-size:9px;}
.mshell .ad-label{font-size:12px;color:var(--t1);}
.mshell .fa-note{font-size:11px;color:var(--t3);line-height:1.45;margin-top:9px;}
.mshell .fa-note b{color:var(--t1);}
/* Detail blocks */
.mshell .rv-block{border:1px solid var(--border);border-radius:14px;padding:14px;margin-bottom:12px;}
.mshell .rv-block-h{font-family:var(--mono);font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--t3);margin-bottom:10px;}
.mshell .rv-kv{display:flex;gap:10px;padding:6px 0;font-size:13px;}
.mshell .rv-k{flex:none;width:96px;color:var(--t3);}
.mshell .rv-v{flex:1;min-width:0;color:var(--t1);}
.mshell .rv-chips{display:flex;flex-wrap:wrap;gap:5px;}
.mshell .rv-chip{font-size:11.5px;background:var(--surface2);border:1px solid var(--border);
  border-radius:999px;padding:3px 9px;color:var(--t2);}
.mshell .rv-chip-eo{background:var(--purple-xlt);border-color:var(--purple-lt);color:var(--purple);}
.mshell .rv-alg-row{display:flex;gap:10px;padding:7px 0;border-bottom:1px solid var(--border);font-size:12.5px;}
.mshell .rv-alg-row:last-child{border-bottom:none;}
.mshell .rv-alg-cat{flex:none;width:118px;color:var(--t1);font-weight:500;}
.mshell .rv-alg-items{flex:1;min-width:0;color:var(--t3);line-height:1.4;}
.mshell .rv-alg-items .pv-loc{color:var(--purple);font-weight:600;}
.mshell .rv-empty{font-size:12.5px;color:var(--t4);}
.mshell .rv-trust{display:flex;gap:14px;border-top:1px solid var(--border);padding-top:10px;
  font-family:var(--mono);font-size:9px;letter-spacing:.04em;text-transform:uppercase;color:var(--t4);}
.mshell .rv-legal{font-size:10.5px;color:var(--t4);line-height:1.5;margin-top:12px;text-align:center;}
.mshell .rv-legal a{color:var(--t3);text-decoration:underline;text-underline-offset:2px;}
}

/* ── FRAME→VIEWPORT ADAPTATION (hand-written; values untouched) ────────────
   The mock positioned every pushed screen and overlay position:absolute
   against .phone{position:relative;overflow:hidden}. The frame is gone — the
   viewport IS the phone — so those roots become position:fixed, the Stage-1
   scroller returns to normal document flow, and the frame's clipping duty
   moves to html{overflow-x:hidden} (html, never body: body kills
   position:sticky in iOS Safari). Source order wins at equal specificity, so
   these sit AFTER the ported block. */
@media(max-width:860px){
  html{overflow-x:hidden;}
  .mw{position:static;inset:auto;height:auto;overflow:visible;
      padding-bottom:calc(var(--barh,96px) + 12px);}
  .stage2,.mapscr,.brief,.sheetbd,.fmodal{position:fixed;}
  .mbar,.lsheet{position:fixed;}
  .toast,.ctip,.ltip,.stepmenu{position:fixed;}
  /* .pad's big bottom padding was designed for the phone frame's fixed bar;
     .mw already pads by --barh, so the two stacked into the dead zone under
     "Show all N languages". One source of truth: --barh. */
  .mw .pad{padding-bottom:18px;}
  /* Consent + info modals must clear the stage shells (z 20) and the format
     sheet (z 320) — on mobile the "Before you add this" consent rendered
     UNDER the open stage and read as "no popup". */
  .pmodal{z-index:400;}
}

/* ── breakpoint governance (hand-written; everything above is the mock,
   mechanically scoped) ── */
@media(max-width:860px){
  .top{display:none;}
  .layout{display:none !important;}   /* inline style from goStep must not resurrect it */
  #s2wrap,#s3wrap,#s4wrap{display:none !important;}
  .mw{display:block;}
  .mbar{display:block;}
  .site-credit{display:none;}   /* desktop chrome; floated into the shell's gap */
}
@media(min-width:861px){
  .mw,.mbar,.stage2,.mapscr,.brief,.lsheet,.sheetbd,.ctip,.stepmenu,.ltip,.fmodal{display:none !important;}
  /* .toast deliberately NOT hidden ≥861: the language-added toast is a
     desktop citizen too — hiding it here is what ate four rounds of
     'the Catalan toast never fires'. */
}

/* ── UNIFIED COUNTRY PANEL — DESKTOP SHELL (>860px) ─────────────────────────
   countryPanelHtml() renders the same sections into the overlay side panel
   and the mobile brief. The mobile styling lives in the ported mock layer
   (≤860); this block styles the same classes for the desktop overlay, in the
   desktop sheet's own tokens. Without it the panel rendered as bare inline
   spans ("Portuguesenative"). */
.ov-side .bf-sec{margin-top:16px;}
.ov-side .bf-sec>.kick{display:block;margin-bottom:8px;}
.ov-side .bl{display:flex;align-items:center;gap:9px;padding:9px 0;border-bottom:1px solid var(--border);}
.ov-side .bl .n{flex:1;min-width:0;font-size:13.5px;color:var(--t1);}
.ov-side .bl .tag{flex:none;font-family:var(--mono);font-size:8.5px;letter-spacing:.04em;text-transform:uppercase;
  color:var(--t3);border:1px solid var(--border-md);border-radius:9px;padding:2.5px 8px;}
.ov-side .bl .tag.off{color:var(--purple);border-color:#C9C4F2;background:#F1F0FE;}
.ov-side .bl.cus .n,.ov-side .bl.drop .n{color:var(--t2);}
.ov-side .bl .cusb{flex:none;font-size:12px;font-weight:600;color:var(--purple);
  border:1.5px solid var(--purple);border-radius:14px;padding:3.5px 11px;cursor:pointer;background:none;}
.ov-side .bl .cusb.on{background:var(--purple);color:#fff;}
.ov-side .bl.cus,.ov-side .bl.drop{cursor:pointer;}
.ov-side .bd2{display:inline-block;background:var(--surface);border:1px solid var(--border);
  border-radius:13px;padding:5px 11px;font-size:12px;color:var(--t2);margin:0 6px 7px 0;}
.ov-side .ba{display:flex;align-items:center;gap:9px;padding:7.5px 0;border-bottom:1px solid var(--border);}
.ov-side .ba .dt{flex:none;width:9px;height:9px;border-radius:50%;}
.ov-side .ba .n{flex:1;min-width:0;font-size:13px;color:var(--t1);}
.ov-side .ba .cat{flex:none;font-family:var(--mono);font-size:8.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--t3);}
.ov-side .bf-sec .hint{font-size:11px;color:var(--t3);margin:8px 0 0;}


/* ── DESKTOP v4 (≥861px) — THE LOCKED MODEL ─────────────────────────────────
   Contract: stages 1–3 are viewport-locked (the window never scrolls; the
   FRAMES scroll internally). Stage 4 scrolls as a page. Beige. Buttons live
   in-card, stage-2 style, everywhere. Nothing here reverts without Justin
   saying so. */
@media(min-width:861px){
  .top{position:sticky;top:0;z-index:90;height:64px;
    display:grid;grid-template-columns:1fr auto 1fr;align-items:center;
    padding:0 28px;background:var(--cream,#FAF8F4);border-bottom:1px solid var(--border);}
  .top .brand{grid-column:1;grid-row:1;justify-self:start;}
  .top .steps{grid-column:2;grid-row:1;justify-self:center;}
  .top .secure{grid-column:3;grid-row:1;justify-self:end;
    font-family:var(--mono);font-size:11px;letter-spacing:.05em;color:var(--t3);}
  .top .stepdot{cursor:pointer;}
  .s2-back-up{display:none !important;}

  /* the lock */
  body[data-stage="1"],body[data-stage="2"],body[data-stage="3"]{overflow:hidden;}
  body[data-stage="4"]{overflow:auto;}
  .layout,#s2wrap,#s3wrap{height:calc(100vh - 64px);overflow:hidden;}
  #s4wrap{height:auto !important;overflow:visible !important;}
  #s4wrap .rv-card-wrap{height:auto;overflow:visible;}

  /* stage 1 — columns nearly touching, tight gutters, frames scroll inside */
  .layout{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr);
    column-gap:16px;padding:20px 24px 16px;max-width:none;margin:0;}
  .layout>*:first-child{height:100%;overflow-y:auto;min-height:0;}
  .rcol{height:100%;overflow-y:auto;min-height:0;display:flex;flex-direction:column;}
  .rcol .map-card{flex:1;min-height:0;display:flex;flex-direction:column;}
  .rcol .map-card #map{flex:1;min-height:260px;}
  #continue{display:none;}
  .rail-sel{margin-top:14px;padding:16px 16px 14px;flex:none;}
  .rail-sel .rs-h{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;color:var(--t3);margin-bottom:10px;}
  .rail-sel .rs-row{display:flex;justify-content:space-between;gap:10px;padding:7px 0;
    border-bottom:1px solid var(--border);font-size:13px;color:var(--t2);}
  .rail-sel .rs-row b{color:var(--t1);font-weight:600;text-align:right;max-width:60%;}
  .rail-continue{display:flex;width:100%;justify-content:center;margin-top:14px;
    background:var(--purple);color:#fff;border:none;border-radius:12px;
    padding:15px;font-size:15px;font-weight:600;cursor:pointer;
    box-shadow:0 10px 26px rgba(125,120,230,.35);}

  /* stages 2–3 — internal scrollers, breathing room under the header */
  #s2wrap,#s3wrap{display:grid;padding:20px 24px 16px;}
  #s2wrap{grid-template-columns:minmax(0,1fr) minmax(380px,31vw);column-gap:20px;}
  #s3wrap{grid-template-columns:1fr;}
  #s2wrap .s2-main,#s3wrap .s2-main{height:100%;overflow-y:auto;min-height:0;}
  /* preview column: full-height lavender wrapper, letter centered within */
  #s2wrap .s2-preview{height:100%;overflow-y:auto;min-height:0;
    background:#F4F4FF;border:1px solid #E3E2FB;border-radius:16px;padding:16px 16px 14px;}
  .pv-field{background:transparent;border-radius:0;padding:6px 0 0;display:flex;justify-content:center;}
  .pv-cap{margin:10px 0 2px;text-align:center;font-family:var(--mono);
    font-size:9px;letter-spacing:.07em;text-transform:uppercase;color:var(--t3);}

  /* the letter — text AND icon tiles inside one fit system */
  .letter{--lt-fs:13px;background:#fff;width:100%;max-width:380px;aspect-ratio:8.5/11;border-radius:8px;
    box-shadow:0 20px 46px rgba(43,46,74,.15);padding:22px 20px;
    display:flex;flex-direction:column;gap:12px;
    font-size:var(--lt-fs);line-height:1.5;color:#111827;}
  .lt-pill{background:rgba(186,187,255,.28);border:1px solid #BABBFF;color:#2B2E4A;
    border-radius:999px;padding:.6em 1.1em;font-weight:700;text-align:center;font-size:.9em;}
  .lt-pill .cd-seg{color:#7D78E6;}
  .lt-cols{display:grid;grid-template-columns:1.3fr .7fr;gap:12px;flex:1;min-height:0;}
  .lt-left{display:flex;flex-direction:column;gap:.8em;text-align:center;justify-content:center;min-width:0;}
  .lt-left .cd-hi{color:#7D78E6;font-weight:700;}
  .lt-line{margin:0;}
  .lt-cross{color:#6b7280;font-size:.9em;}
  .lt-q{font-weight:600;}
  .lt-right{background:#F4F4FF;border-radius:14px;padding:.6em .5em;overflow:hidden;min-height:0;}
  /* tiles share the column and COMPRESS with it — icons can't overflow */
  .letter .cd-icons{display:flex;flex-direction:column;gap:.5em;height:100%;margin:0;}
  .letter .cd-tile{position:relative;flex:1 1 0;min-height:0;width:100%;background:#fff;border-radius:10px;
    padding:.35em .3em;display:flex;flex-direction:column;align-items:center;justify-content:center;
    box-shadow:0 3px 10px rgba(43,46,74,.07);}
  .letter .cd-ic-img{height:min(2.4em,58%);width:auto;max-width:80%;object-fit:contain;display:block;}
  .letter .cd-ic{font-size:min(2em,1.6em);line-height:1.2;display:block;}
  .letter .cd-slash{position:absolute;left:12%;right:12%;top:42%;height:4px;background:#E06A5B;
    transform:rotate(38deg);transform-origin:center;border-radius:2px;}
  .letter .cd-lbl{font-family:var(--mono);font-size:.58em;letter-spacing:.02em;text-transform:uppercase;
    color:#6b7280;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:.25em;}
  .lt-ghost .pvg-note{font-size:1em;color:var(--t2);margin:0 auto .9em;max-width:34ch;line-height:1.5;}
  .pvg-rows{display:flex;flex-direction:column;gap:.7em;align-items:center;margin-bottom:1em;}
  .sk{display:inline-block;height:.85em;border-radius:5px;background:var(--surface2);}
  .sk-w100{width:100%;}.sk-w95{width:95%;}.sk-w90{width:90%;}.sk-w85{width:85%;}.sk-w70{width:70%;}.sk-w60{width:60%;}.sk-w45{width:45%;}

  /* stage-3 cards + modal: media owns its frame, strip rides the image */
  .pcard-thumb-sm{padding:0;display:block;}
  .pcard-thumb-sm .rv-pimg{width:100%;height:190px;border-radius:14px 14px 0 0;overflow:hidden;background:var(--surface2);}
  .pcard-thumb-sm .rv-pimg img{width:100%;height:100%;object-fit:cover;display:block;}
  #fmt-modal .fmodal-inner{width:min(1140px,94vw);height:min(640px,90vh);max-height:90vh;
    display:grid;grid-template-columns:1.08fr .92fr;overflow:hidden;}
  #fmt-modal .fmodal-gallery{position:relative;height:100%;min-height:0;overflow:hidden;}
  #fmt-modal .fmodal-slide{display:none;}
  #fmt-modal .fmodal-slide.active{display:block;position:absolute;inset:0;}
  #fmt-modal .fmodal-slide.active img,#fmt-modal .fmodal-slide.active video{
    position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
  #fmt-modal .fmodal-cap{display:none;}   /* the "weird shadow" gradient — gone */
  #fmt-modal .fmodal-strip{position:absolute;left:0;right:0;bottom:0;z-index:3;
    display:flex;gap:8px;padding:10px;overflow-x:auto;
    background:linear-gradient(transparent,rgba(43,46,74,.28));}
  #fmt-modal .fmodal-strip-thumb{flex:none;width:88px;height:60px;border-radius:8px;overflow:hidden;
    border:2px solid rgba(255,255,255,.75);padding:0;cursor:pointer;background:var(--surface2);}
  #fmt-modal .fmodal-strip-thumb.active{border-color:var(--purple);}
  #fmt-modal .fmodal-strip-thumb img,#fmt-modal .fmodal-strip-thumb video{width:100%;height:100%;object-fit:cover;display:block;}
  #fmt-modal .fmodal-body{overflow:auto;min-height:0;}

  /* stage 4 — page scroll; existing what-next skinned purple; roomy allergens */
  .rv-next{background:#F4F4FF;border:1px solid #E3E2FB;border-radius:14px;padding:15px 16px;}
  .rv-next-h{font-weight:700;color:var(--navy);margin-bottom:9px;font-size:14px;
    letter-spacing:0;text-transform:none;}
  .rv-next-row{display:flex;gap:10px;align-items:flex-start;padding:5px 0;font-size:13px;color:var(--t2);}
  .rv-next-n{flex:none;width:20px;height:20px;border-radius:50%;background:var(--purple);color:#fff;
    display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;}
  .rv-next .rv-trust{margin-top:8px;font-family:var(--mono);font-size:10px;color:var(--t3);display:flex;gap:14px;}
  .alg-2col{column-count:2;column-gap:28px;}
  .alg-2col .rv-alg-row{break-inside:avoid;}

  @keyframes shake{0%,100%{transform:none}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
  .shake{animation:shake .4s ease;}
}

/* ── DESKTOP v4.1 (≥861px) — width, true lock, breathing room, parity chrome ── */
@media(min-width:861px){
  /* the REAL lock: html scrolls when only body is fenced */
  html[data-stage="1"],html[data-stage="2"],html[data-stage="3"]{overflow:hidden;}
  html[data-stage="4"]{overflow:auto;}
  /* width: .wrap's 1240 cap was the invisible corset */
  .wrap{max-width:1760px;padding:0 22px 0;}
  body[data-stage="4"] .wrap{padding-bottom:56px;}
  /* frames stop shy of the bottom edge */
  .layout,#s2wrap,#s3wrap{height:calc(100vh - 78px);}
  /* stage 1: left panel earns the width; map keeps its size */
  .layout{grid-template-columns:minmax(0,1fr) clamp(430px,33vw,540px);}
  /* stage-3 inner scroller, whatever its class */
  #s3wrap>div{height:100%;overflow-y:auto;min-height:0;}
  /* the white band above the map: paint #map in the ocean's own lavender */
  .map-card #map{background:#EDECFA;}
  /* English-only tile */
  .lang-eng{cursor:pointer;}
  .lang-eng.selected{border-color:var(--purple);background:#F4F3FE;}
  .lang-eng .cat-sub{font-family:var(--mono);font-size:9px;letter-spacing:.05em;
    text-transform:uppercase;color:var(--t3);margin-top:4px;}
  /* on-brand gate rows */
  .modal-callout .gm-row{display:flex;gap:10px;align-items:flex-start;padding:6px 0;font-size:13.5px;color:var(--t2);}
  .modal-callout .gm-row b{flex:none;width:20px;height:20px;border-radius:50%;background:var(--purple);color:#fff;
    display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;}
  /* scanner popup: the image is an icon, not a poster */
  .modal-box .modal-img{width:96px;height:96px;object-fit:contain;display:block;margin:0 auto 12px;
    background:#F4F4FF;border-radius:18px;padding:12px;}
  .rv-q{margin-left:8px;color:var(--purple);font-size:13px;}
  /* stage-4 allergens: row-major grid — headers align, sides balance */
  .alg-2col{display:grid;grid-template-columns:1fr 1fr;column-gap:28px;align-items:start;column-count:unset;}
  /* breathing room before checkout */
  #rv-checkout{margin-top:14px;}
}

/* ── DESKTOP v4.2 (≥861px) — the #s2col discovery + this round's list ─────── */
@media(min-width:861px){
  /* THE stage-2/3 scroll fix: the two-column grid is #s2col/#s3col — a
     wrapper the height chain never reached, so the card grew unbounded and
     the frame clipped it. Height now flows wrap → col → card-scroller. */
  #s2col,#s3col{height:100%;min-height:0;display:grid;gap:20px;}
  #s2col{grid-template-columns:minmax(0,1fr) clamp(440px,35vw,600px);}
  #s3col{grid-template-columns:1fr;}
  .s2screen .s2-main{height:100%;overflow-y:auto;min-height:0;}
  /* the forward button never scrolls away: footer sticks inside the frame */
  .s2screen .s2-main>.footer{position:sticky;bottom:0;z-index:5;
    background:var(--surface);border-top:1px solid var(--border);
    margin-top:16px;padding-top:12px;padding-bottom:2px;}
  /* preview panel hugs its content instead of stretching to the floor;
     wider column above + a bigger sheet */
  #s2wrap .s2-preview{height:auto;max-height:100%;align-self:start;overflow-y:auto;}
  .letter{max-width:440px;}
  /* icon tiles: natural height, centered, compress only when crowded —
     one lonely fish no longer fills the column */
  .letter .cd-icons{justify-content:center;}
  .letter .cd-tile{flex:0 1 auto;max-height:6.4em;}
  /* stage 3: no price until review; bigger cards; footer earns its spot */
  .s3-total-wrap{display:none;}
  #s3wrap .s2-main>div:has(>.pcard){display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;}
  #s3wrap .pcard-thumb-sm .rv-pimg{height:230px;}
  /* modal slides: end the visibility fight — active wins, absolutely */
  #fmt-modal .fmodal-slide{display:none !important;}
  #fmt-modal .fmodal-slide.active{display:block !important;position:absolute !important;inset:0 !important;
    opacity:1 !important;transform:none !important;visibility:visible !important;}
  #fmt-modal .fmodal-slide.active img,#fmt-modal .fmodal-slide.active video{
    position:absolute !important;inset:0 !important;width:100% !important;height:100% !important;
    object-fit:cover !important;opacity:1 !important;visibility:visible !important;display:block !important;}
  /* Secure: a hover that says what it means */
  .top .secure{position:relative;cursor:default;}
  .top .secure:hover::after{content:attr(data-tip);position:absolute;top:135%;right:0;z-index:120;
    width:250px;background:var(--navy);color:#fff;padding:10px 13px;border-radius:11px;
    font-family:var(--body,inherit);font-size:11.5px;line-height:1.5;letter-spacing:0;
    text-transform:none;box-shadow:0 14px 34px rgba(43,46,74,.25);white-space:normal;}
}

/* ── DESKTOP v4.3 (≥861px) — frame anatomy, preview fit, v56 toast ────────── */
@media(min-width:861px){
  /* stage-2: full-width until the first selection */
  #s2col{grid-template-columns:1fr;}
  #s2col.has-preview{grid-template-columns:minmax(0,1fr) clamp(420px,32vw,540px);}
  #s2col:not(.has-preview) .s2-preview{display:none;}
  /* frame anatomy: header + search fixed, GRID scrolls, footer pinned —
     no floating bar drifting through content */
  .s2screen .s2-main{display:flex;flex-direction:column;overflow:hidden;}
  #allergen-grid{flex:1 1 auto;min-height:0;overflow-y:auto;padding-bottom:8px;}
  #s3wrap .s2-main>div:has(>.pcard){flex:1 1 auto;min-height:0;overflow-y:auto;align-content:start;}
  .s2screen .s2-main>.footer{position:static;margin-top:12px;box-shadow:none;
    background:transparent;border-top:1px solid var(--border);padding:12px 0 2px;}
  /* preview panel: fits the view, no scrolling — the sheet sizes itself
     from the panel's height (fixed aspect), right-leaning, letter text
     spread evenly like the renderer */
  #s2wrap .s2-preview{height:100%;overflow:hidden;display:flex;flex-direction:column;}
  .pv-field{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center;padding:6px 0;}
  .letter{height:100%;max-height:100%;width:auto;max-width:100%;}
  .lt-left{justify-content:space-evenly;gap:0;}
  .pv-cap{flex:none;}
  /* v56's toast, in desktop clothes: bottom-right, informational, gone in 6s */
  .toast{position:fixed;left:auto;right:26px;bottom:26px;z-index:150;max-width:400px;
    background:var(--surface);border:1px solid var(--border-md);border-radius:14px;
    box-shadow:0 16px 44px rgba(43,46,74,.18);padding:13px 16px;
    display:flex;align-items:center;gap:12px;font-size:13.5px;color:var(--t1);
    opacity:0;transform:translateY(8px);transition:opacity .22s,transform .22s;}
  .toast.on{opacity:1;transform:none;}
  .toast .tm{flex:1;min-width:0;}
  .toast .ta{flex:none;background:none;border:none;color:var(--purple);
    font-weight:600;font-size:13px;cursor:pointer;padding:4px 2px;text-align:right;}
  .brand{cursor:pointer;}
}

/* v4.4 — footer pins to frame bottom regardless of grid flexing; red exit */
@media(min-width:861px){
  .s2screen .s2-main>.footer{margin-top:auto;}
  .btn-modal-cancel.danger{color:#C4573F;border-color:#E8B5A8;background:#FBECE8;}
}

/* v4.5 — the wallet pack tooltip stays on screen: right-anchored, wrapping */
@media(min-width:861px){
  .rv-bdtip,[data-bd-tip],.pcard-tip{max-width:min(520px,70vw);white-space:normal;line-height:1.5;}
  #s4wrap [title]{cursor:default;}
  .rv-bd-pop{position:fixed;right:24px;left:auto !important;max-width:min(560px,72vw);
    white-space:normal;word-break:normal;}
}
/* the real tooltip class: keep the pack breakdown on screen */
@media(min-width:861px){
  .rv-amt-bd{left:auto !important;right:0 !important;max-width:min(520px,60vw);
    white-space:normal !important;line-height:1.5;text-align:left;}
  .rv-amt-bd.rv-bd-left{right:auto !important;left:0 !important;}
}

/* v4.7 — the language-added toast earns the eye (bottom-center, weighty);
   Antarctica thumb for the consolidated custom row */
@media(min-width:861px){
  .toast{left:50%;right:auto;bottom:34px;transform:translate(-50%,10px) scale(.97);
    max-width:560px;min-width:380px;padding:16px 20px;font-size:14.5px;
    border-left:4px solid var(--purple);
    box-shadow:0 24px 64px rgba(43,46,74,.28);}
  .toast.on{transform:translate(-50%,0) scale(1);}
  .rv-pimg.custom{background:#EAF4FB;display:flex;align-items:center;justify-content:center;}
  .rv-pimg.custom img{width:58%;height:auto;object-fit:contain;}
}

/* ── HELP (pass 1) — header button on both shells + modal rows ─────────── */
.helpbtn{background:none;border:1px solid var(--border-md);border-radius:999px;
  padding:5px 12px;font-family:var(--mono);font-size:11px;letter-spacing:.05em;
  color:var(--t2);cursor:pointer;line-height:1.2;}
.helpbtn:hover{border-color:var(--purple);color:var(--purple);}
.help-rows{display:flex;flex-direction:column;}
.help-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;
  padding:8px 0;border-bottom:1px solid var(--border);}
.help-row:last-child{border-bottom:none;}
.help-row .k{font-family:var(--mono);font-size:10px;letter-spacing:.06em;
  text-transform:uppercase;color:var(--t3);}
.help-row a{color:var(--purple);font-weight:600;font-size:14px;text-decoration:none;}
.help-row a:hover{text-decoration:underline;}
@media(min-width:861px){
  .top .top-r{grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;gap:14px;}
}
@media(max-width:860px){
  .mast .row .helpbtn{margin-left:auto;margin-right:12px;padding:3px 10px;font-size:10px;}
}

/* ── v4.8 (≥861px) — John UX pass 2 ───────────────────────────────────────
   ONE TILE. Recommended-language tiles, the language picker and the allergen
   grid share one column template, one gap and one minimum height, and stage
   2's left column is now exactly as wide as stage 1's (preview column =
   map column, same gutter), so a tile is the same size on both stages.
   The 1200px .s2screen cap is lifted for stage 2: it held the allergen grid
   to three across at every laptop width while stage 1 ran full width.
   Column COUNT is set from the viewport, not auto-fill: the language picker
   sits inside a bordered box 34px narrower than the allergen grid, so
   auto-fill picked different counts on the two stages (4 vs 5 on a 13"
   Air). An explicit shared count keeps both grids in step; the thresholds
   are where a tile would drop under ~150px. Stage 2 before its first pick
   (no preview yet, full width) keeps auto-fill. */
@media(min-width:861px){
  :root{--tile-min:150px;--tile-gap:10px;--tile-h:80px;--tile-cols:2;}
  #s2wrap.s2screen{max-width:none;}
  #s2col.has-preview{grid-template-columns:minmax(0,1fr) clamp(430px,33vw,540px);column-gap:16px;}
  .recs,#directlangs,#s2col.has-preview #allergen-grid{
    grid-template-columns:repeat(var(--tile-cols),minmax(0,1fr));}
  #s2col:not(.has-preview) #allergen-grid{
    grid-template-columns:repeat(auto-fill,minmax(var(--tile-min),1fr));}
  .recs,#directlangs,#allergen-grid{gap:var(--tile-gap);align-items:stretch;align-content:start;}
  #allergen-grid{padding-right:4px;}
  #directlangs>.allergen-cat,#allergen-grid>.allergen-cat{min-height:var(--tile-h);
    display:flex;flex-direction:column;justify-content:space-between;}
  #directlangs>.allergen-cat.expanded,#allergen-grid>.allergen-cat.expanded{justify-content:flex-start;}
  /* Recommended tiles take the category tile's shape: flag beside the name,
     the detail line pinned underneath. */
  .recs>.rec{min-height:var(--tile-h);display:grid;grid-template-columns:auto minmax(0,1fr);
    grid-template-rows:auto 1fr;column-gap:8px;padding:12px 12px 10px;}
  .recs>.rec.on{padding:11.5px 11.5px 9.5px;}
  .recs>.rec .flag{grid-column:1;grid-row:1;font-size:18px;line-height:1;align-self:start;}
  .recs>.rec .flag .flagimg{width:20px;height:20px;}
  .recs>.rec .nm{grid-column:2;grid-row:1;margin:0;font-size:14px;line-height:1.3;padding-right:16px;}
  .recs>.rec.base .nm{padding-right:42px;}
  /* one line, always: a wrapped detail line made these the tallest tiles */
  .recs>.rec .tag{grid-column:1/-1;grid-row:2;align-self:end;margin-top:6px;font-size:10px;line-height:1.35;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .recs>.rec .chk{top:10px;right:11px;}
  .recs>.rec .always{top:12px;right:11px;}
}
@media(min-width:1114px){:root{--tile-cols:3;}}
@media(min-width:1274px){:root{--tile-cols:4;}}
@media(min-width:1500px){:root{--tile-cols:5;}}
@media(min-width:1704px){:root{--tile-cols:6;}}
@media(min-width:861px){

  /* STAGE 3 PRICES. Bigger figure, unit beside it, so "$7" reads as
     "$7 per language" and not as the total. */
  #format-grid3 .pcard-price{font-size:21px;margin-top:10px;letter-spacing:-.015em;line-height:1.2;}
  #format-grid3 .pcard-unit{font-size:12.5px;font-weight:500;color:var(--t3);letter-spacing:0;}
  #format-grid3 .pcard-from{font-size:12.5px;font-weight:500;color:var(--t3);letter-spacing:0;}
  #format-grid3 .pcard-scanner .pcard-unit{color:#B08A2E;}
  /* The scanner sells on its discount: that line leads the card. */
  #format-grid3 .pcard-perk{display:inline-block;margin-top:7px;padding:4px 10px;border-radius:999px;
    background:#FFE9A8;color:#6E5212;font-size:13px;font-weight:700;letter-spacing:-.005em;}
  /* Format modal: price line and scanner perk at reading size */
  #fmt-modal .fmodal-price{font-family:var(--body);font-size:19px;font-weight:700;color:var(--purple);
    margin-top:8px;letter-spacing:-.01em;}
  #fmt-modal.fmt-scanner .fmodal-price,#fmt-modal .fmt-scanner .fmodal-price{color:#B08A2E;}
  #fmt-modal .fmodal-scanner-perk{margin-top:18px;padding:12px 14px;border-radius:12px;
    background:#FFF3CF;border:1px solid #F0D9A8;font-size:15px;line-height:1.45;color:var(--navy);}
  #fmt-modal .fmodal-scanner-perk b{color:#6E5212;font-size:17px;}
  /* Footer summary names formats and languages; let it wrap before it
     pushes the buttons. */
  #s3-hint{flex:1;min-width:0;margin-right:16px;line-height:1.45;}

  /* MAP LABELS now sit off the country, over ocean or a neighbour: navy on
     a light halo reads on both. */
  .clabel{fill:var(--navy);stroke:rgba(255,255,255,.92);stroke-width:3px;stroke-linejoin:round;
    paint-order:stroke;font-size:10px;font-weight:700;}
}

/* ── CATEGORY MODAL (≥861px) — John UX pass 5 ───────────────────────────── */
@media(min-width:861px){
  .cmodal{position:fixed;inset:0;z-index:115;display:none;align-items:center;justify-content:center;padding:4vh 4vw;}
  .cmodal.open{display:flex;}
  .cm-backdrop{position:absolute;inset:0;background:rgba(43,46,74,.5);backdrop-filter:blur(2px);}
  .cm-box{position:relative;z-index:1;background:var(--surface);border-radius:20px;width:min(640px,100%);
    max-height:min(680px,92vh);display:flex;flex-direction:column;padding:26px 26px 18px;
    box-shadow:0 30px 90px rgba(43,46,74,.35);animation:stepOpen 160ms ease both;}
  .cm-x{position:absolute;top:14px;right:14px;width:32px;height:32px;border-radius:50%;border:none;
    background:var(--surface2);color:var(--navy);font-size:14px;cursor:pointer;}
  .cm-x:hover{background:var(--purple-xlt);color:var(--purple);}
  .cm-head{display:flex;gap:14px;align-items:flex-start;padding-right:40px;}
  .cm-icon{font-size:34px;line-height:1;}
  .cm-title{font-family:var(--disp);font-size:24px;font-weight:600;color:var(--navy);margin:0;line-height:1.15;}
  .cm-sub{font-size:13px;color:var(--t3);margin-top:4px;}
  .cm-tools{display:flex;gap:10px;align-items:center;margin-top:16px;}
  .cm-search{flex:1;min-width:0;border:1px solid var(--border-md);border-radius:10px;padding:9px 12px;font-size:14px;font-family:var(--body);}
  .cm-search:focus{outline:none;border-color:var(--purple);box-shadow:0 0 0 3px var(--purple-xlt);}
  .cm-all{flex:none;background:none;border:1px solid var(--border-md);border-radius:10px;padding:8px 12px;
    font-size:12.5px;color:var(--t2);cursor:pointer;font-family:var(--body);}
  .cm-all:hover{border-color:var(--purple);color:var(--purple);}
  .cm-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;overflow-y:auto;min-height:0;padding:2px;}
  .cm-chip{font-size:14px;padding:8px 14px;}
  .cm-chip.local-chip:not(.selected){border-color:var(--purple-lt);color:var(--purple);background:var(--surface);}
  .cm-empty{font-size:13px;color:var(--t3);padding:10px 2px;}
  .cm-wall{margin-top:12px;padding:10px 12px;border-radius:10px;background:#FDF6E7;border:1px solid #EAD9A8;font-size:13px;color:var(--navy);line-height:1.45;}
  .cm-note{margin-top:12px;padding:10px 12px;border-radius:10px;background:var(--purple-xlt);border:1px solid var(--purple-lt);font-size:13px;color:var(--navy);line-height:1.45;}
  .cm-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid var(--border);}
  .cm-count{font-size:13px;color:var(--t2);}
  .cm-done{background:var(--purple);color:#fff;border:none;border-radius:12px;padding:11px 22px;font-size:14px;font-weight:600;cursor:pointer;font-family:var(--body);}
  .cm-done:hover{background:var(--navy);}
  /* tile picks line: the names, not a count, left-aligned and trimmed */
  .cat-toggle-hint.cat-picks{text-align:left;text-transform:none;letter-spacing:0;font-family:var(--body);font-size:11.5px;
    color:var(--purple);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  body.cmodal-open{overflow:hidden;}
}

/* ── CUSTOM + LANGUAGE MODALS (≥861px) — pass 6 ─────────────────────────── */
@media(min-width:861px){
  .cu-list-h,.cu-mine-h{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--t3);margin:14px 0 6px;}
  .cu-list{display:flex;flex-direction:column;gap:4px;max-height:260px;overflow-y:auto;margin-top:6px;}
  .cu-row{display:grid;grid-template-columns:22px minmax(0,1fr) auto auto;gap:10px;align-items:center;text-align:left;
    background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:8px 10px;cursor:pointer;font-family:var(--body);}
  .cu-row:hover{border-color:var(--purple-lt);background:var(--purple-xlt);}
  .cu-row.on{border-color:var(--purple);background:var(--purple-xlt);}
  .cu-row.local .cu-term{color:var(--purple);}
  .cu-check{width:20px;height:20px;border-radius:50%;border:1px solid var(--border-md);display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--t3);}
  .cu-row.on .cu-check{background:var(--purple);border-color:var(--purple);color:#fff;}
  .cu-term{font-size:14px;color:var(--t1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .cu-cat{font-size:11.5px;color:var(--t3);}
  .cu-from{font-family:var(--mono);font-size:10px;color:var(--t4);}
  .cu-add{margin-top:12px;padding:12px;border-radius:12px;background:var(--surface2);border:1px dashed var(--border-md);}
  .cu-add.done{background:var(--purple-xlt);border-style:solid;border-color:var(--purple-lt);}
  .cu-add-h{font-size:13.5px;color:var(--t1);}
  .cu-cats{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;}
  .cu-cat-chip{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:5px 11px;font-size:12.5px;color:var(--t2);cursor:pointer;font-family:var(--body);}
  .cu-cat-chip:hover{border-color:var(--purple-lt);color:var(--purple);}
  .cu-cat-chip.on{background:var(--purple);border-color:var(--purple);color:#fff;}
  .cu-add-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;}
  .cu-add-pv{font-size:12.5px;color:var(--t2);line-height:1.4;}
  .cu-add-btn{flex:none;background:var(--navy);color:#fff;border:none;border-radius:10px;padding:9px 14px;font-size:13px;font-weight:600;cursor:pointer;font-family:var(--body);}
  .cu-add-btn:hover{background:var(--purple);}
  .cu-add-btn[disabled]{background:var(--border-md);cursor:not-allowed;}
  .cu-mine{margin-top:12px;}
  .cu-mine .custom-chip{margin:0 6px 6px 0;}
  .cu-chip-cat{margin-left:6px;font-family:var(--mono);font-size:9px;letter-spacing:.04em;text-transform:uppercase;color:var(--t3);}
  .cu-mine .cx{cursor:pointer;margin-left:6px;color:#fff;background:rgba(255,255,255,.22);width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;}
  .cu-mine .cx:hover{background:rgba(255,255,255,.4);}
  .lm-flag .flagimg{width:34px;height:34px;}
  .lm-sub{margin-top:10px;}
  .lm-facts{margin-top:16px;display:flex;flex-direction:column;}
  .lm-fact{display:flex;gap:14px;padding:9px 0;border-bottom:1px solid var(--border);font-size:13.5px;color:var(--t1);}
  .lm-fact .k{flex:none;width:84px;font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--t3);padding-top:3px;}
  .lm-prices{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;font-size:13px;color:var(--t2);}
  .lm-prices span{background:var(--surface2);border-radius:999px;padding:5px 11px;}
  .lm-prices .lm-per{background:none;color:var(--t3);font-family:var(--mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;padding-left:2px;align-self:center;}
  .lm-primary{background:var(--purple);color:#fff;border:none;border-radius:12px;padding:11px 20px;font-size:14px;font-weight:600;cursor:pointer;font-family:var(--body);}
  .lm-primary:hover{background:var(--navy);}
  .lm-primary.remove{background:var(--surface2);color:#C4573F;border:1px solid #E8B5A8;}
  .lm-primary.remove:hover{background:#FBECE8;}
  .cm-foot .btn-modal-cancel{margin-right:auto;}
}

/* ── PICKERS IN THE PHONE SHEET (≤860px) — pass 7 ─────────────────────── */
@media(max-width:860px){
  .lsheet{max-height:86%;}
  .lsBody.pick,.lsbody.pick{padding-top:6px;}
  .lsbody .cm-x{position:absolute;top:12px;right:14px;width:34px;height:34px;border-radius:50%;border:1px solid var(--border);background:var(--surface);color:var(--t2);font-size:14px;}
  .lsbody .cm-head{display:flex;gap:12px;align-items:flex-start;padding-right:44px;margin-top:4px;}
  .lsbody .cm-icon{font-size:30px;line-height:1;}
  .lsbody .cm-title{font-family:var(--disp);font-size:21px;font-weight:600;color:var(--navy);margin:0;line-height:1.15;}
  .lsbody .cm-sub{font-size:12.5px;color:var(--t3);margin-top:3px;}
  .lsbody .cm-tools{display:flex;gap:8px;align-items:center;margin-top:12px;}
  .lsbody .cm-search{flex:1;min-width:0;border:1px solid var(--border-md);border-radius:10px;padding:10px 12px;font-size:16px;font-family:var(--body);}
  .lsbody .cm-all{flex:none;background:none;border:1px solid var(--border-md);border-radius:10px;padding:9px 11px;font-size:12px;color:var(--t2);font-family:var(--body);}
  .lsbody .cm-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px;}
  .lsbody .cm-chip,.lsbody .lm-chip{background:var(--surface);border:1px solid var(--border-md);border-radius:15px;padding:8px 12px;font-size:13.5px;color:var(--t2);font-family:var(--body);}
  .lsbody .cm-chip.selected,.lsbody .lm-chip.selected{background:var(--purple);border-color:var(--purple);color:#fff;font-weight:500;}
  .lsbody .cm-chip.local-chip:not(.selected){border-color:var(--purple-lt);color:var(--purple);}
  .lsbody .cm-empty{font-size:13px;color:var(--t3);padding:8px 2px;}
  .lsbody .cm-wall{margin-top:10px;padding:10px 12px;border-radius:10px;background:#FDF6E7;border:1px solid #EAD9A8;font-size:12.5px;color:var(--navy);line-height:1.45;}
  .lsbody .cm-note{margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--purple-xlt);border:1px solid var(--purple-lt);font-size:12.5px;color:var(--navy);line-height:1.45;}
  .lsbody .cm-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid var(--border);}
  .lsbody .cm-count{font-size:12.5px;color:var(--t2);}
  .lsbody .cm-done,.lsbody .lm-primary{background:var(--navy);color:#fff;border:none;border-radius:20px;padding:11px 20px;font-size:14px;font-weight:600;font-family:var(--body);}
  .lsbody .lm-primary.remove{background:#FBECE8;color:#C4573F;border:1px solid #E8B5A8;}
  .lsbody .btn-modal-cancel{margin-right:auto;}
  /* custom picker */
  .lsbody .cu-list-h,.lsbody .cu-mine-h{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--t3);margin:12px 0 6px;}
  .lsbody .cu-list{display:flex;flex-direction:column;gap:4px;max-height:38vh;overflow-y:auto;margin-top:6px;}
  .lsbody .cu-row{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:8px;align-items:center;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:9px 10px;font-family:var(--body);}
  .lsbody .cu-row.on{border-color:var(--purple);background:var(--purple-xlt);}
  .lsbody .cu-row.local .cu-term{color:var(--purple);}
  .lsbody .cu-check{width:20px;height:20px;border-radius:50%;border:1px solid var(--border-md);display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--t3);}
  .lsbody .cu-row.on .cu-check{background:var(--purple);border-color:var(--purple);color:#fff;}
  .lsbody .cu-term{font-size:14px;color:var(--t1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .lsbody .cu-cat{font-size:11px;color:var(--t3);}
  .lsbody .cu-from{display:none;}
  .lsbody .cu-add{margin-top:10px;padding:11px;border-radius:12px;background:var(--surface2);border:1px dashed var(--border-md);}
  .lsbody .cu-add.done{background:var(--purple-xlt);border-style:solid;border-color:var(--purple-lt);}
  .lsbody .cu-add-h{font-size:13px;color:var(--t1);}
  .lsbody .cu-cats{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px;}
  .lsbody .cu-cat-chip{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:6px 10px;font-size:12px;color:var(--t2);font-family:var(--body);}
  .lsbody .cu-cat-chip.on{background:var(--purple);border-color:var(--purple);color:#fff;}
  .lsbody .cu-add-row{display:flex;flex-direction:column;gap:8px;margin-top:10px;}
  .lsbody .cu-add-pv{font-size:12px;color:var(--t2);line-height:1.4;}
  .lsbody .cu-add-btn{background:var(--navy);color:#fff;border:none;border-radius:20px;padding:10px 14px;font-size:13.5px;font-weight:600;font-family:var(--body);}
  .lsbody .cu-add-btn[disabled]{background:var(--border-md);}
  .lsbody .cu-mine{margin-top:10px;}
  .lsbody .cu-mine .custom-chip{display:inline-flex;align-items:center;margin:0 6px 6px 0;background:var(--surface2);border:1px solid var(--border);border-radius:14px;padding:5px 10px;font-size:12.5px;}
  .lsbody .cu-mine .custom-chip.local{background:var(--purple-xlt);border-color:var(--purple-lt);}
  .lsbody .chip-local-tag{font-family:var(--mono);font-size:8.5px;letter-spacing:.06em;color:var(--purple);margin-right:6px;}
  .lsbody .cu-chip-cat{margin-left:6px;font-family:var(--mono);font-size:9px;letter-spacing:.04em;text-transform:uppercase;color:var(--t3);}
  .lsbody .cu-mine .cx{margin-left:6px;color:var(--purple);background:#fff;border:1px solid var(--purple-lt);width:18px;height:18px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:10px;}
  /* language picker */
  .lsbody .lm-flag .flagimg{width:30px;height:30px;}
  .lsbody .lm-facts{margin-top:12px;}
  .lsbody .lm-fact{display:flex;gap:12px;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px;color:var(--t1);}
  .lsbody .lm-fact .k{flex:none;width:76px;font-family:var(--mono);font-size:9.5px;letter-spacing:.05em;text-transform:uppercase;color:var(--t3);padding-top:2px;}
  .lsbody .lm-prices{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;font-size:12.5px;color:var(--t2);}
  .lsbody .lm-prices span{background:var(--surface2);border-radius:999px;padding:5px 10px;}
  .lsbody .lm-prices .lm-per{background:none;color:var(--t3);font-family:var(--mono);font-size:9.5px;letter-spacing:.05em;text-transform:uppercase;align-self:center;}
  /* tile picks line */
  .ahint.picks{color:var(--purple);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
}

/* ── pass 8: bigger pickers, custom chip, quiet Done ─────────────────────── */
@media(min-width:861px){
  .cm-box{width:min(960px,94vw);max-height:min(820px,92vh);padding:30px 32px 22px;}
  .cm-title{font-size:28px;}
  .cm-sub{font-size:14px;}
  .cm-hint{flex:1;font-size:13.5px;color:var(--t2);}
  .cm-chips{gap:10px;margin-top:18px;}
  .cm-chip{font-size:15px;padding:10px 16px;}
  .cm-custom-wrap{display:inline-flex;align-items:stretch;gap:10px;}
  .cm-vbar{width:1px;align-self:stretch;background:var(--border-md);margin:0 2px;}
  .cm-custom{border-style:dashed;color:var(--t2);}
  .cm-custom:hover{border-color:var(--purple);color:var(--purple);}
  .cm-done.quiet{background:none;color:var(--t2);border:1px solid var(--border-md);}
  .cm-done.quiet:hover{background:var(--surface2);color:var(--t1);}
  .cu-list{max-height:320px;}
  .cu-row{padding:10px 12px;}
  .cu-term{font-size:15px;}
  .cu-cat-chip{font-size:13.5px;padding:7px 13px;}
}
@media(max-width:860px){
  .lsbody .cm-hint{flex:1;font-size:12.5px;color:var(--t2);}
  .lsbody .cm-custom-wrap{display:inline-flex;align-items:stretch;gap:7px;}
  .lsbody .cm-vbar{width:1px;align-self:stretch;background:var(--border-md);margin:0 2px;}
  .lsbody .cm-custom{border-style:dashed;color:var(--t2);}
  .lsbody .cm-done.quiet{background:none;color:var(--t2);border:1px solid var(--border-md);}
}

/* ── PASS 9 (Oct 27) ──────────────────────────────────────────────────── */
@media(min-width:861px){
  /* 3 Stage 1 language tiles: one column more than stage 2's grid (five on
     a 13" laptop), name and flag centred in the tile, name a size up. The
     empty hint row that padded plain tiles is gone; family tiles keep their
     varieties line directly under the name. */
  :root{--lang-cols:3;}
  #directlangs{grid-template-columns:repeat(var(--lang-cols),minmax(0,1fr));}
  #directlangs>.allergen-cat{justify-content:center;gap:5px;padding:12px 14px;}
  #directlangs .cat-icon{font-size:20px;}
  #directlangs .cat-icon .flagimg{width:22px;height:22px;}
  #directlangs .cat-name{font-size:15.5px;}
  #directlangs .lang-plain .lang-hint-empty{display:none;}
  #directlangs .lang-dial-hint{margin-top:0;font-size:11.5px;flex-wrap:nowrap;}
  #directlangs .lang-eng .cat-name{white-space:nowrap;}
  #directlangs .lang-eng .cat-sub{margin-top:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  /* 2 Custom entries inside a category modal: a selected chip with a tag */
  .cm-mine{font-size:15px;padding:8px 8px 8px 16px;gap:8px;background:var(--purple);border-color:var(--purple);color:#fff;cursor:default;}
  .cm-mine-tag{font-family:var(--mono);font-size:9px;letter-spacing:.08em;text-transform:uppercase;opacity:.8;}
  .cm-mine-x{border:none;background:rgba(255,255,255,.18);color:#fff;width:22px;height:22px;border-radius:50%;font-size:11px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;}
  .cm-mine-x:hover{background:rgba(255,255,255,.34);}
}
@media(min-width:1114px){:root{--lang-cols:4;}}
@media(min-width:1274px){:root{--lang-cols:5;}}
@media(min-width:1500px){:root{--lang-cols:6;}}
@media(min-width:1704px){:root{--lang-cols:7;}}
@media(max-width:860px){
  .lsbody .cm-mine{display:inline-flex;align-items:center;gap:7px;border-radius:15px;padding:7px 7px 7px 12px;font-size:13.5px;font-family:var(--body);background:var(--purple);border:1px solid var(--purple);color:#fff;font-weight:500;}
  .lsbody .cm-mine-tag{font-family:var(--mono);font-size:8.5px;letter-spacing:.08em;text-transform:uppercase;opacity:.8;}
  .lsbody .cm-mine-x{border:none;background:rgba(255,255,255,.18);color:#fff;width:20px;height:20px;border-radius:50%;font-size:10px;display:inline-flex;align-items:center;justify-content:center;padding:0;}
}

/* Pass 10: the category modal's subtitle names countries the way the stage 2 header does */
@media(min-width:861px){ .cm-sub .s2-purple,.cm-sub .s2-country{font-weight:600;} }

/* ── PASS 11: source-countries modal ──────────────────────────────────── */
.s2-src{background:none;border:none;padding:0;font:inherit;color:var(--purple);font-weight:700;cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px;}
.s2-src:hover{text-decoration-style:solid;}
.s2-more{font-weight:700;}
.s2-srclink{background:none;border:1px solid var(--purple-lt);border-radius:999px;padding:2px 9px;font:inherit;font-size:12px;color:var(--purple);margin-right:4px;}
.sr-list{display:flex;flex-direction:column;gap:6px;margin-top:14px;overflow-y:auto;min-height:0;max-height:min(520px,60vh);padding:2px;}
.sr-row{display:grid;grid-template-columns:26px minmax(0,1fr) auto auto auto;gap:10px;align-items:center;
  background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:9px 12px;}
.sr-flag .flagimg{width:22px;height:22px;display:block;}
.sr-name{font-size:14.5px;color:var(--t1);font-weight:600;}
.sr-why{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px;}
.sr-tag{font-size:11px;color:var(--t3);background:var(--surface2);border-radius:999px;padding:2px 8px;}
.sr-tag.stop{color:var(--purple);background:var(--purple-xlt);font-weight:600;}
.sr-n{font-family:var(--mono);font-size:10.5px;color:var(--t4);white-space:nowrap;}
.sr-map,.sr-add{font-family:var(--body);font-size:12.5px;border-radius:999px;padding:6px 12px;cursor:pointer;white-space:nowrap;}
.sr-map{background:none;border:1px solid var(--border-md);color:var(--t2);}
.sr-map:hover{border-color:var(--purple);color:var(--purple);}
.sr-add{background:var(--purple);border:1px solid var(--purple);color:#fff;font-weight:600;}
.sr-add:hover{background:var(--navy);border-color:var(--navy);}
@media(max-width:860px){
  .sr-list{max-height:none;}
  .sr-row{grid-template-columns:22px minmax(0,1fr) auto;row-gap:6px;}
  .sr-n{grid-column:2;}
  .sr-map,.sr-add{grid-column:3;}
  .sr-add{grid-row:1;} .sr-map{grid-row:2;}
}

/* ── PASS 12 ──────────────────────────────────────────────────────────── */
/* 1 custom chip: the category tag reads */
.custom-chip .cu-chip-cat{margin-left:2px;font-family:var(--mono);font-size:8.5px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--purple);background:#fff;border-radius:999px;padding:2px 7px;line-height:1.3;}
.cm-mine .cm-mine-tag{color:var(--purple);background:#fff;border-radius:999px;padding:2px 7px;opacity:1;line-height:1.3;}
.lsbody .cm-mine .cm-mine-tag{color:var(--purple);background:#fff;border-radius:999px;padding:2px 6px;opacity:1;}
/* 2 header: only the links carry a dotted underline; the count is quiet */
.s2-n{font-weight:500;color:var(--t3);font-size:.9em;}
.s2p.s2-src{background:none;border:none;padding:0;font:inherit;font-weight:700;color:var(--purple);text-decoration:underline dotted;text-underline-offset:3px;}
.sr-all{background:none;border:none;padding:0;margin-left:6px;font:inherit;color:var(--purple);font-weight:600;cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px;}
/* 3 stage 4 back beside checkout */
/* 4 Your selections: the "also spoken" line */
.rs-also-row{display:flex;flex-direction:column;gap:4px;padding:8px 0 10px;border-top:1px solid var(--border);font-size:12.5px;}
.rs-also-k{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--t3);}
.rs-also{background:none;border:none;padding:0;text-align:left;font:inherit;font-size:12.5px;color:var(--t2);cursor:pointer;line-height:1.4;}
.rs-also:hover{color:var(--purple);}

/* ── PASS 13 ──────────────────────────────────────────────────────────── */
/* 3 custom modal: the local list behind one row */
.cu-list-toggle{display:flex;align-items:center;gap:8px;width:100%;margin-top:12px;padding:10px 12px;border-radius:12px;
  background:var(--surface2);border:1px solid var(--border);cursor:pointer;font-family:var(--body);text-align:left;}
.cu-list-toggle .cu-list-h{margin:0;flex:1;}
.cu-list-n{font-family:var(--mono);font-size:10px;color:var(--t3);background:#fff;border:1px solid var(--border);border-radius:999px;padding:2px 7px;}
.cu-list-caret{color:var(--purple);font-weight:700;transition:transform .15s;}
.cu-list-toggle.open .cu-list-caret{transform:rotate(90deg);}
.cu-list.collapsed{display:none;}
.lsbody .cu-list-toggle{margin-top:10px;padding:9px 11px;}