/* app.css — Juiced! Herb Kiosk
 * Ported verbatim from design/mockup.html (approved 2026-08-27). The only
 * deltas are: mockup chrome + annotation mode removed, and the stage now
 * scales to the device instead of being letterboxed for review.
 * Design coordinate system is 1920px wide. Do not introduce media queries —
 * this renders on exactly one device in exactly one orientation.
 */
@import url("../assets/fonts/fonts.css");
:root{
  --green:#38a54c;
  --green-light:#5cc070;
  --green-deep:#2b7f3b;
  --orange:#f2811f;
  --orange-deep:#d3690f;
  --gold:#f2811f;
  --yellow:#eebd18;
  --cream:#fdf8f0;
  --paper:#f5ecdc;
  --sage:#cfd9cb;
  --clay:#c9b196;
  --ink:#13110e;
  --ink-soft:#4a423a;
  --ink-faint:#7a6f63;
  --rule:rgba(92,64,51,.18);
  --rule-strong:rgba(92,64,51,.34);

  /* Category hues — Juiced!'s own event colour-coding, applied to concerns */
  --t-sleep:#8e7cc3;      /* violet  */
  --t-stress:#5ac8e8;     /* sky     */
  --t-energy:#f2c94c;     /* yellow  */
  --t-digestion:#f2811f;  /* orange  */
  --t-immunity:#4e9f3d;   /* leaf    */
  --t-skin:#ff7a59;       /* coral   */
  --t-hormones:#d6408f;   /* magenta */
  --t-pain:#141313;       /* black   */

  /* Warning family — from the design system's do/don't blocks.
     Deliberately NOT orange: orange is the action colour now. */
  --warn-bg:#fbeaea;
  --warn-bg2:#f7dede;
  --warn-line:#e3aeae;
  --warn-ink:#7a2323;
  --warn-ico:#a83232;

  --display:"Fredoka","Trebuchet MS",system-ui,sans-serif;
  --body:"Poppins","Helvetica Neue",Arial,sans-serif;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--body);
  -webkit-font-smoothing:antialiased;
  overflow:hidden;
  height:100vh;
}

/* ---------- kiosk stage ---------- */
.stage{
  /* Fixed 1920px design coordinate system. JS sets --stage-h from the real
     viewport aspect and --stage-scale = innerWidth / 1920, so every value in
     this file means exactly what it meant in the approved mockup regardless of
     whether the tablet reports 1920x1200 or 1920x1080. */
  width:1920px; height:var(--stage-h,1200px);
  transform:scale(var(--stage-scale,1)); transform-origin:top left;
  position:fixed; top:0; left:0; overflow:hidden;
  /* The mockup put the column layout on .screen and swapped screens inside a
     block-level stage. The kiosk renders one screen at a time straight into
     the stage, so the stage itself is the column. */
  display:flex; flex-direction:column;
  background:var(--paper);
  font-size:22px; line-height:1.55; color:var(--ink);
  user-select:none; -webkit-tap-highlight-color:transparent;
}
.stage::before{
  content:""; position:absolute; inset:0; pointer-events:none; z-index:1;
  opacity:.5; mix-blend-mode:multiply;
  background-image:
    radial-gradient(circle at 17% 23%, rgba(92,64,51,.05) 0 1.2px, transparent 1.4px),
    radial-gradient(circle at 61% 71%, rgba(92,64,51,.045) 0 1px, transparent 1.2px),
    radial-gradient(circle at 84% 39%, rgba(92,64,51,.04) 0 1.4px, transparent 1.6px);
  background-size:37px 37px, 53px 53px, 71px 71px;
}

.screen{position:absolute; inset:0; display:none; flex-direction:column; z-index:2;}
.screen.active{display:flex;}

/* ---------- shared bars ---------- */
.topbar{
  flex:0 0 auto; height:118px; padding:0 64px;
  display:flex; align-items:center; gap:28px;
  border-bottom:1px solid var(--rule); background:var(--cream);
}
.logo{height:56px; width:auto; display:block;}
.topbar-title{display:flex; flex-direction:column; gap:2px; min-width:0;}
.eyebrow{
  font-family:var(--body); font-size:14px; font-weight:600;
  letter-spacing:.22em; text-transform:uppercase; color:var(--orange-deep);
}
.topbar-title h2{
  margin:0; font-family:var(--display); font-weight:500;
  font-size:30px; line-height:1.1; color:var(--ink);
}
.topbar .spacer{flex:1;}

.backbtn{
  display:flex; align-items:center; gap:14px;
  min-height:72px; padding:0 30px 0 22px;
  background:transparent; border:1.5px solid var(--rule-strong); border-radius:999px;
  font-family:var(--display); font-size:22px; font-weight:500; color:var(--ink-soft);
  cursor:pointer;
}
.backbtn svg{width:22px; height:22px; flex:0 0 auto;}
.backbtn:active{background:rgba(92,64,51,.07);}

.footer{
  flex:0 0 auto; height:74px; padding:0 64px;
  display:flex; align-items:center; justify-content:space-between; gap:40px;
  background:var(--ink); color:#c9bfb2;
  font-size:16px; letter-spacing:.01em;
}
.footer strong{color:var(--cream); font-weight:600;}
.footer .fmark{
  font-family:var(--display); font-size:15px; font-weight:500;
  letter-spacing:.2em; text-transform:uppercase; color:#7d7367; white-space:nowrap;
}

/* ---------- welcome ----------
   Three quarters identity, one quarter action. The split is a flex ratio, not
   a pixel height: the stage is 1920 wide by whatever the device's aspect makes
   it tall, so anything measured from the top would drift on a 1920x1080 panel. */
.welcome{flex:1; display:flex; flex-direction:column; min-height:0; background:var(--cream);}

.hero{
  flex:3; position:relative; min-height:0; overflow:hidden;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
}
/* The bed is real herb photography, laid out by auto columns so it divides
   evenly whether there are two photos in the library or six. */
.bed{position:absolute; inset:0; display:grid; grid-auto-flow:column; grid-auto-columns:1fr;}
.bed img{width:100%; height:100%; object-fit:cover; display:block;}
/* The veil is what keeps the photographs a ground rather than a subject, and
   it closes to solid cream at the bottom so the row of buttons rises out of
   the picture instead of being stamped onto it. */
.veil{
  position:absolute; inset:0;
  background:linear-gradient(to bottom,
    rgba(253,248,240,.74) 0,
    rgba(253,248,240,.68) 46%,
    rgba(253,248,240,.88) 82%,
    var(--cream) 100%);
}
.hero .inner{
  position:relative; z-index:2; padding:0 64px;
  display:flex; flex-direction:column; align-items:center; text-align:center;
}
.hero .mark{height:260px; width:auto; display:block;}
.hero h1{
  margin:40px 0 0; font-family:var(--display); font-weight:600; font-size:132px;
  line-height:.94; letter-spacing:-.035em; color:var(--ink);
}
.hero .lede{margin:26px 0 0; font-size:30px; line-height:1.4; color:var(--ink-soft); max-width:38ch;}
.hero .count{
  display:flex; align-items:center; gap:12px; margin-top:34px; padding:14px 26px;
  border-radius:999px; border:1px solid var(--rule); background:rgba(253,248,240,.8);
  font-size:16px; font-weight:600; letter-spacing:.14em; text-transform:uppercase;
  color:var(--ink-soft);
}
.hero .count i{width:9px; height:9px; border-radius:50%; background:var(--green); display:block;}

.choices{
  flex:1; display:grid; grid-template-columns:repeat(3,1fr); gap:26px;
  padding:0 56px 40px; min-height:0;
}
.choice{
  display:flex; align-items:center; gap:24px; padding:0 30px; border-radius:22px;
  border:none; cursor:pointer; text-align:left; font-family:inherit; min-height:0;
  background:var(--tint); color:var(--on);
}
.choice:active{transform:translateY(2px);}
.choice .glyphwrap{
  flex:0 0 auto; width:84px; height:84px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.2);
}
.choice .glyphwrap svg{width:44px; height:44px; stroke:var(--on); fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;}
.choice .txt{flex:1; min-width:0;}
.choice h3{margin:0; font-family:var(--display); font-weight:600; font-size:38px; line-height:1.05; letter-spacing:-.015em;}
.choice p{margin:6px 0 0; font-size:20px; line-height:1.3; color:var(--on); opacity:.84;}
.choice .arrow{flex:0 0 auto; width:36px; height:36px; stroke:var(--on); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; opacity:.9;}

/* ---------- concern grid ---------- */
.concern-grid{
  flex:1; display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(2,1fr);
  gap:26px; min-height:0;
}
.tile{
  position:relative; display:flex; flex-direction:column; justify-content:space-between;
  padding:30px 30px 28px; border-radius:20px; border:none;
  background:var(--tint); cursor:pointer; overflow:hidden; text-align:left;
  font-family:inherit; color:var(--on);
}
.tile:active{transform:translateY(1px);}
.tile .glyphwrap{
  width:96px; height:96px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.2);
}
.tile .glyphwrap svg{width:50px; height:50px; stroke:var(--on); fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round;}
.tile h3{
  margin:0; font-family:var(--display); font-weight:600; font-size:38px;
  line-height:1.08; letter-spacing:-.01em; text-wrap:balance;
}
.tile .count{margin:8px 0 0; font-size:17px; color:var(--on); opacity:.72; letter-spacing:.02em;}
.tile-foot{display:flex; align-items:flex-end; justify-content:space-between; gap:16px;}
.tile .arrow{width:34px; height:34px; flex:0 0 auto; stroke:var(--on); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; opacity:.85;}


/* ---------- search ----------
   The keyboard is drawn in the page. Android's own carries a settings key and
   a pull-down shade above it — both are ways out of a pinned kiosk — and it
   resizes the viewport, which the fixed coordinate system assumes away. */
.search-body{flex:1; display:flex; flex-direction:column; padding:36px 64px 28px; gap:24px; min-height:0;}

.searchfield{
  flex:0 0 auto; display:flex; align-items:center; gap:22px; height:104px; padding:0 30px;
  border-radius:18px; background:var(--cream); border:2px solid var(--rule-strong);
}
.searchfield > svg{width:34px; height:34px; flex:0 0 auto; stroke:var(--ink-faint); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.searchfield .q{
  font-family:var(--display); font-weight:500; font-size:40px; color:var(--ink);
  white-space:nowrap; overflow:hidden;
}
.searchfield .q.empty{color:var(--ink-faint); font-weight:400;}
.searchfield .spacer{flex:1;}
.caret{
  display:inline-block; width:3px; height:40px; background:var(--orange);
  vertical-align:-7px; margin-left:4px; animation:caret 1.1s steps(1,end) infinite;
}
@keyframes caret{50%{opacity:0;}}
.clearbtn{
  min-height:64px; padding:0 26px; border-radius:999px; border:1.5px solid var(--rule-strong);
  background:transparent; font-family:var(--display); font-size:20px; font-weight:500;
  color:var(--ink-soft); cursor:pointer;
}

/* Two rows of cards, sized by the space the keyboard leaves. */
/* align-content:start on .herb-grid collapses 1fr rows to their content.
   Here the rows must fill the space the keyboard leaves, so that a single
   hit is a full-size card rather than a sliver. */
.herb-grid.results{grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(2,1fr);
  gap:20px; align-content:stretch;}
.results .card{padding:16px; gap:18px;}
.results .card .thumb{width:118px;}
.results .card h3{font-size:27px;}
.results .card .latin{font-size:16px;}
.results .card .tag{font-size:16px;}
.noresult{
  grid-column:1/-1; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:10px; padding:40px 0; color:var(--ink-faint); text-align:center;
}
.noresult h3{margin:0; font-family:var(--display); font-weight:600; font-size:34px; color:var(--ink-soft);}
.noresult p{margin:0; font-size:21px; max-width:44ch;}

.keyboard{flex:0 0 auto; display:flex; flex-direction:column; gap:12px; align-items:center;}
.krow{display:flex; gap:12px;}
.key{
  width:150px; height:88px; border-radius:14px; border:1px solid var(--rule);
  background:var(--cream); font-family:var(--display); font-weight:500; font-size:36px;
  color:var(--ink); cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.key:active{background:var(--paper); transform:translateY(1px);}
.key.wide{width:236px; font-size:26px; color:var(--ink-soft); background:var(--paper);}
.key.space{width:520px; font-size:26px; color:var(--ink-soft);}

/* ---------- herb grid ---------- */
.list-body{flex:1; display:flex; flex-direction:column; padding:44px 64px 34px; gap:30px; min-height:0;}
.list-head{display:flex; align-items:flex-end; justify-content:space-between; gap:50px;}
.list-head h1{
  margin:0; font-family:var(--display); font-weight:600; font-size:60px;
  line-height:1.04; letter-spacing:-.015em;
}
.list-head p{margin:0 0 6px; font-size:23px; color:var(--ink-soft); max-width:46ch;}

.herb-grid{
  flex:1; display:grid; grid-template-columns:repeat(3,1fr);
  gap:24px; min-height:0; align-content:start;
}
.herb-grid.four{grid-template-columns:repeat(2,1fr); grid-template-rows:repeat(2,1fr);}
.four .card .thumb{width:190px;}
.herb-grid.twelve{grid-template-columns:repeat(4,1fr); grid-template-rows:repeat(3,1fr); gap:20px;}

.card{
  display:flex; gap:22px; padding:20px; border-radius:18px;
  background:var(--cream); border:1px solid var(--rule);
  cursor:pointer; text-align:left; font-family:inherit; color:inherit;
  align-items:stretch; overflow:hidden; min-height:0;
}
.card:active{transform:translateY(1px);}
.card .thumb{
  flex:0 0 auto; width:150px; border-radius:12px; overflow:hidden;
  background:var(--sage); position:relative;
}
.twelve .card{padding:16px; gap:18px;}
.twelve .card .thumb{width:118px;}
.card .thumb img{width:100%; height:100%; object-fit:cover; display:block;}
.card-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; justify-content:center;}
.card h3{
  margin:0; font-family:var(--display); font-weight:600; font-size:31px;
  line-height:1.1; letter-spacing:-.01em;
}
.twelve .card h3{font-size:27px;}
.card .latin{margin:0; font-style:italic; font-size:18px; color:var(--ink-faint);}
.twelve .card .latin{font-size:16px;}
.card .tag{
  margin:6px 0 0; font-size:18px; line-height:1.35; color:var(--ink-soft);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.twelve .card .tag{font-size:16px; -webkit-line-clamp:2;}
.card .flags{display:flex; gap:7px; margin-top:9px; flex-wrap:wrap;}

.flag{
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 12px 5px 9px; border-radius:999px;
  background:var(--warn-bg); border:1px solid var(--warn-line);
  font-size:14.5px; font-weight:600; letter-spacing:.01em; color:var(--warn-ink);
  white-space:nowrap;
}
.flag svg{width:15px; height:15px; stroke:var(--warn-ico); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.flag.lg{font-size:17px; padding:8px 16px 8px 12px;}
.flag.lg svg{width:18px; height:18px;}
.flag.empty{background:var(--sage); border-color:var(--rule); color:var(--ink-faint);}
.flag.empty svg{stroke:var(--ink-faint);}

/* ---------- herb detail ---------- */
.detail-body{flex:1; display:grid; grid-template-columns:600px 1fr; gap:56px; padding:44px 64px 0; min-height:0;}
.detail-left{display:flex; flex-direction:column; gap:26px; min-height:0;}
.hero-photo{
  width:100%; height:404px; border-radius:20px; overflow:hidden;
  background:var(--sage); border:1px solid var(--rule); position:relative;
}
.hero-photo img{width:100%; height:100%; object-fit:cover; display:block;}
.identity h1{
  margin:0; font-family:var(--display); font-weight:600; font-size:74px;
  line-height:.98; letter-spacing:-.02em; text-wrap:balance;
}
.identity .latin{margin:8px 0 0; font-style:italic; font-size:27px; color:var(--ink-faint);}
.identity .tagline{
  margin:16px 0 0; font-family:var(--display); font-weight:400; font-size:27px;
  line-height:1.3; color:var(--green-deep);
}
.meta-row{display:flex; flex-wrap:wrap; gap:10px; margin-top:4px;}
.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 17px; border-radius:999px;
  border:1px solid var(--rule-strong); background:transparent;
  font-size:17px; font-weight:500; color:var(--ink-soft); letter-spacing:.01em;
}
.chip.solid{background:var(--orange); border-color:var(--orange); color:#fff; font-weight:600;}
.chip.tintd{background:var(--t-immunity); border-color:rgba(56,165,76,.3); color:var(--green-deep); font-weight:600;}

.carry{
  border:1px solid var(--rule); border-radius:18px; background:var(--cream);
  padding:22px 26px; display:flex; flex-direction:column; gap:13px;
}
.carry .eyebrow{color:var(--green-deep);}
.carry .forms{display:flex; flex-wrap:wrap; gap:10px;}

.detail-right{display:flex; flex-direction:column; gap:34px; min-height:0; overflow:hidden; padding-bottom:8px;}
.sec{display:flex; flex-direction:column; gap:13px;}
.sec > .eyebrow{padding-bottom:11px; border-bottom:1px solid var(--rule);}
.sec p{margin:0; font-size:23px; line-height:1.55; color:var(--ink-soft); max-width:66ch;}
.sec p.lede{font-size:26px; line-height:1.5; color:var(--ink);}
.sec p strong{color:var(--ink); font-weight:600;}

.benefits{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:16px;}
.benefits li{display:flex; gap:16px; align-items:flex-start;}
.benefits .dot{
  flex:0 0 auto; width:13px; height:13px; margin-top:11px; border-radius:50%;
  background:var(--green);
}
.benefits b{display:block; font-family:var(--display); font-weight:500; font-size:24px; color:var(--ink); line-height:1.25;}
.benefits span{display:block; font-size:21px; line-height:1.5; color:var(--ink-soft); max-width:62ch; margin-top:2px;}

.preps{display:flex; flex-wrap:wrap; gap:11px;}

.cautions{
  flex:0 0 auto; margin:34px 64px 26px; padding:26px 32px;
  border-radius:18px; border:1.5px solid var(--warn-line);
  background:linear-gradient(180deg,var(--warn-bg) 0%,var(--warn-bg2) 100%);
  display:flex; gap:24px; align-items:flex-start;
}
.cautions .cico{
  flex:0 0 auto; width:52px; height:52px; border-radius:50%;
  background:rgba(168,50,50,.15); display:flex; align-items:center; justify-content:center;
}
.cautions .cico svg{width:28px; height:28px; stroke:var(--warn-ico); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.cautions .ctext{flex:1; display:flex; flex-direction:column; gap:9px;}
.cautions .eyebrow{color:var(--warn-ico);}
.cautions p{margin:0; font-size:21px; line-height:1.5; color:var(--warn-ink); max-width:none;}
.cautions .flags{display:flex; gap:9px; flex-wrap:wrap; margin-top:3px;}

.empty-note{
  font-size:20px; color:var(--ink-faint); font-style:italic;
  padding:18px 22px; border:1.5px dashed var(--rule-strong); border-radius:14px;
  background:rgba(207,217,203,.28);
}

@media (prefers-reduced-motion:reduce){
  *{animation:none !important; transition:none !important;}
}

/* ---------- kiosk hardening (not in the mockup) ---------- */
html,body{
  width:100%; height:100%; overflow:hidden;
  overscroll-behavior:none; touch-action:manipulation;
}
body{
  -webkit-touch-callout:none; -webkit-user-select:none; user-select:none;
  -webkit-tap-highlight-color:transparent;
}
/* The detail column is the one place a customer may scroll. Keep the bar
   invisible so it never reads as browser chrome, but keep momentum. */
.detail-right{overflow-y:auto; -webkit-overflow-scrolling:touch;}
.detail-right::-webkit-scrollbar{width:0;height:0;}
img{-webkit-user-drag:none;}

/* Cold boot: the shell paints before data resolves. Never a spinner —
   the paper ground is what a customer sees for the ~1 frame it takes. */
.stage[hidden]{display:none;}

/* 5–6 herbs in one concern: two rows of three, sized between .four and .twelve.
   Not exercised by the current 12-herb library, but a concern grows the moment
   the client tags a new herb, and it must not fall back to .four's 2x2. */
.herb-grid.six{grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(2,1fr); gap:22px;}
.six .card{padding:18px; gap:20px;}
.six .card .thumb{width:140px;}
.six .card h3{font-size:29px;}
.six .card .latin{font-size:17px;}

/* The mockup was authored at exactly 1200px tall, where every grid fit by
   coincidence. A tablet reporting 1080 gave the 1fr rows less room than their
   content, and `min-height:auto` on grid items pushed the footer off-screen.
   Letting the items shrink makes the layout hold at any device height. */
.concern-grid > *, .herb-grid > *{min-height:0; min-width:0;}

/* Scroll affordance. The mockup was authored at 1200px tall where Chamomile
   happened to fit; a shorter device clips the right column mid-sentence. A
   walk-up customer will not discover a scroll they can't see, so fade the cut
   edge and show an explicit cue until they've reached the bottom. */
.detail-right.can-scroll{
  -webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 72px),transparent 100%);
          mask-image:linear-gradient(to bottom,#000 calc(100% - 72px),transparent 100%);
}
.detail-right.can-scroll.at-end{-webkit-mask-image:none; mask-image:none;}
.scroll-cue{
  position:absolute; right:64px; bottom:26px; z-index:5;
  display:flex; align-items:center; gap:10px;
  padding:11px 20px; border-radius:999px;
  background:var(--ink); color:var(--cream);
  font-family:var(--body); font-size:16px; font-weight:500; letter-spacing:.02em;
  pointer-events:none; opacity:1; transition:opacity .18s ease;
}
.detail-body:not(:has(.can-scroll)) .scroll-cue,
.detail-body:has(.at-end) .scroll-cue{opacity:0;}
.scroll-cue svg{width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round;}
.detail-body{position:relative;}
