/* Nice Drop · Play — premium visual refinement for the case-study demo
   Loads after the app's own nd-paper.css, so it only restyles. No markup, data or behaviour changes live here;
   the few structural touches (logo, hero image, grouping) are in play.js and fall back cleanly without it.

   Bold brand, quiet interface: cream canvas, white working surfaces, ink for text and primary actions,
   and one accent per screen — pistachio for a positive verdict, peach for the palate personality, sky for School.

   Strong 1.5pt ink outlines appear only on each screen's one feature card and on the floating tab bar.

   1. Tokens        5. Navigation (header, floating tab bar)
   2. Token bridge  6. Components (cards, buttons, chips, rows, ratings, forms, sheets)
   3. Fonts         7. Screens: Cellar, Log a bottle, Tasting Tutor, Shelf Check, Palate, School
   4. Type styles   8. Accessibility (Reduce Transparency, Reduce Motion, larger text)                */

/* ===================================================================== 1. Tokens */
:root {
  /* Colour: the Play palette, exact */
  --np-cream: #F3EFE4;           /* app canvas */
  --np-ink: #0F0F0F;             /* text, primary actions        16.7:1 on cream, 19.2:1 on white */
  --np-white: #FFFFFF;           /* functional cards */
  --np-grey: #4A4741;            /* secondary text               8.1:1 on cream, 6.4:1 on peach */
  --np-grey-2: #5C5850;          /* tertiary text, captions      6.2:1 on cream, 4.9:1 on peach */
  --np-pistachio: #D4E89A;       /* go: where you are, things to do, a yes */
  --np-peach: #F6CDBF;           /* you: your palate, your match */
  --np-sky: #CDDBEC;             /* learn: advice, help, School */
  /* Neutrals derived from cream and ink */
  --np-fill: #F2EEE4;            /* quiet fills on white: tracks, wells, segmented controls */
  --np-fill-2: #E9E4D7;          /* quiet fills on cream */
  --np-line: #E6E1D5;            /* hairlines and dividers */
  --np-line-strong: #D3CDBF;     /* control outlines (chips, fields) */
  --np-off: #CFC9BC;             /* unfilled rating drops (non-text) */
  --np-ink-pressed: #2B2A27;
  --np-focus: rgba(15, 15, 15, .55);
  --np-scrim: rgba(15, 15, 15, .32);
  --np-glass: rgba(255, 255, 255, .86);

  /* Type */
  --np-display: "Host Grotesk", "Helvetica Neue", Arial, sans-serif;   /* wordmark companion: titles and rare moments */
  --np-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --np-t-title: 2rem;            /* 32  screen title */
  --np-t-moment: 2.5rem;         /* 40  "Buy it", the phrase of the day */
  --np-t-step: 2.125rem;         /* 34  tasting step */
  --np-t-section: 1.25rem;       /* 20  section heading */
  --np-t-wine: 1.1875rem;        /* 19  wine title */
  --np-t-body: 1rem;             /* 16 */
  --np-t-body-l: 1.0625rem;      /* 17 */
  --np-t-support: .875rem;       /* 14 */
  --np-t-meta: .8125rem;         /* 13 */
  --np-t-caption: .75rem;        /* 12  tab labels only */

  /* Space: 4pt scale */
  --np-1: 4px; --np-2: 8px; --np-3: 12px; --np-4: 16px; --np-5: 20px; --np-6: 24px; --np-7: 28px; --np-8: 32px;
  --np-gutter: 20px;
  --np-section: 32px;
  --np-card-pad: 20px;

  /* Shape */
  --np-r-card: 18px;
  --np-r-hero: 26px;
  --np-r-sm: 12px;
  --np-r-pill: 999px;

  /* Borders: strong ink only on signature components and the floating bar */
  --np-stroke-strong: 1.5px;
  --np-ring: 0 0 0 1px var(--np-line);
  --np-ring-control: inset 0 0 0 1px var(--np-line-strong);
  --np-ring-strong: 0 0 0 var(--np-stroke-strong) var(--np-ink);

  /* Shadow: one, for the floating bar */
  --np-shadow-float: 0 12px 28px -14px rgba(15, 15, 15, .32);

  /* Controls */
  --np-tap: 44px;
  --np-btn-h: 52px;
  --np-chip-h: 40px;

  /* Imagery */
  --np-bottle-shelf: 136px;      /* favourites, standing on one baseline */
  --np-bottle-hero: 188px;       /* tonight's pick */
  --np-bottle-recog: 176px;      /* the recognised bottle in Log a bottle */
  --np-hero-ratio: 1 / 1;        /* tasting hero */
}

/* ===================================================================== 2. Token bridge
   The app's design-system variables now resolve to the Play palette, so every older surface follows. */
:root {
  --nd-paper: var(--np-cream); --nd-surface: var(--np-white); --nd-sunken: var(--np-fill);
  --nd-pinot: var(--np-ink); --nd-pinot-pressed: var(--np-ink-pressed); --nd-pinot-tint: var(--np-fill-2);
  --nd-rose: var(--np-line-strong); --nd-rose-tint: var(--np-fill);
  --nd-ink: var(--np-ink); --nd-ink-2: var(--np-grey); --nd-ink-3: var(--np-grey-2);
  --nd-line: var(--np-line); --nd-line-strong: var(--np-line-strong); --nd-disabled: #B5AFA3; --nd-star-off: var(--np-off);
  --nd-on-pinot: #FFFFFF; --nd-focus: var(--np-focus); --nd-scrim: var(--np-scrim);
  --nd-serif: var(--np-text); --nd-sans: var(--np-text);
  --nd-gutter: var(--np-gutter); --nd-card-pad: var(--np-card-pad); --nd-section: var(--np-section);
  --nd-r-card: var(--np-r-card); --nd-r-hero: var(--np-r-hero); --nd-r-sm: var(--np-r-sm);
  --nd-btn-h: var(--np-btn-h); --nd-tap: var(--np-tap); --nd-chip-h: var(--np-chip-h);
  --nd-ring: var(--np-ring); --nd-ring-strong: 0 0 0 1px var(--np-line-strong);
  --w-red: #7B2335;
}

/* ===================================================================== 3. Fonts
   Host Grotesk 800 (SIL Open Font License) loads from Google Fonts in index.html, with swap, so titles show in the
   fallback until it arrives. Everything else uses the system text face: SF on Apple devices. */
html, html body { background: var(--np-cream); color: var(--np-ink); }
html body { font-family: var(--np-text); font-feature-settings: normal; }
html body ::selection { background: var(--np-pistachio); color: var(--np-ink); }

/* ===================================================================== 4. Type styles */
/* Screen titles: the display face, sentence case, tight */
html body .large-title h1 {
  font-family: var(--np-display); font-weight: 800; font-size: var(--np-t-title); line-height: 1.04; letter-spacing: -.025em;
  color: var(--np-ink); text-wrap: balance; max-width: 15ch;
}
html body .large-title .eyebrow { margin-bottom: var(--np-2); }
/* Section headings */
html body .section-head { margin: var(--np-section) 0 var(--np-3) !important; align-items: baseline; }
html body .section-head h2 { font-family: var(--np-text); font-size: var(--np-t-section); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--np-ink); }
html body .section-head .aside, html body .section-head .o-link, html body .section-head button { font-size: var(--np-t-support); font-weight: 500; color: var(--np-grey); }
/* Wine titles and card titles: the text face, semibold — never the display face */
html body .tn-name, html body .o-head h2, html body .br-name {
  font-family: var(--np-text); font-weight: 650; letter-spacing: -.02em; line-height: 1.2; color: var(--np-ink); font-style: normal;
}
html body .o-head h2 { font-size: 1.625rem; }
html body h3, html body .card h3, html body .dc-t, html body .gi-top b, html body .rc-name, html body .cc-name { font-family: var(--np-text); letter-spacing: -.015em; }
/* Labels: sentence case, quiet */
html body .kicker, html body .eyebrow, html body .tn-k, html body .v-k, html body .r-k, html body .fgroup .label, html body .bm-k, html body .look {
  font-family: var(--np-text) !important; font-size: var(--np-t-meta) !important; font-weight: 500 !important; letter-spacing: 0 !important;
  text-transform: none !important; color: var(--np-grey) !important;
}
html body p, html body .muted { line-height: 1.5; }
html body .card > p.muted, html body .card p.muted { color: var(--np-grey); }
/* Editorial quotes lose the faux italic serif and read as plain, confident text */
html body .snob-line .say, html body p.say { font-family: var(--np-text); font-style: normal; font-weight: 600; letter-spacing: -.015em; }
html body .cc-lbl, html body .colour-card .cc-lbl, html body .map-card .cc-lbl { font-family: var(--np-text); font-weight: 650; font-size: 1.375rem; letter-spacing: -.02em; }

/* ===================================================================== 5. Navigation */
/* Header: the NICE DROP lockup from the brand file, in ink, leading (289×124, sharp at 3× for its 93pt width) */
html body .navbar { height: 64px !important; }
html body .navbar::before { background: var(--np-cream) !important; }
html body .navbar.scrolled::before, html body .navbar.nd-under::before {
  background: rgba(243, 239, 228, .9) !important; border-bottom: 1px solid var(--np-line) !important;
  -webkit-backdrop-filter: saturate(1.3) blur(18px) !important; backdrop-filter: saturate(1.3) blur(18px) !important;
}
html body .navbar .wordmark {
  display: block; width: 93px; height: 40px; background: url(/play/img/nice-drop-wordline.png) left center / contain no-repeat;
}
html body .navbar .wordmark > svg { display: none !important; }
html body .navbar .wordmark { transition: opacity .2s ease; }
html body .navbar.scrolled .wordmark { opacity: 0; }   /* hands over to the page title on scroll, as before */
html body .navbar .compact { font-family: var(--np-text); font-weight: 600; font-size: var(--np-t-body-l); letter-spacing: -.01em; }
html body .me-btn::before { background: var(--np-white) !important; box-shadow: 0 0 0 1px var(--np-line-strong) !important; }
html body .me-btn { color: var(--np-ink) !important; }
html body .nd-add-nav::before { background: var(--np-ink) !important; }

/* Floating tab bar: one capsule, ink outline, the current place on a cream lozenge */
html body .dock {
  left: 16px !important; right: 16px !important; bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  padding: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0 !important; pointer-events: none;
}
html body .dock .inner { max-width: 420px !important; margin: 0 auto !important; padding: 0 !important; }
html body .tabbar {
  pointer-events: auto; height: 64px !important; padding: 6px !important; align-items: stretch !important; gap: 2px;
  border-radius: var(--np-r-pill) !important; background: var(--np-glass) !important;
  -webkit-backdrop-filter: saturate(1.6) blur(20px) !important; backdrop-filter: saturate(1.6) blur(20px) !important;
  box-shadow: var(--np-ring-strong), var(--np-shadow-float) !important; border: 0 !important;
}
html body .tabbar button {
  min-height: 52px !important; height: auto; justify-content: center !important; gap: 3px !important; padding: 0 !important;
  border-radius: var(--np-r-pill) !important; color: var(--np-grey) !important;
  font-family: var(--np-text); font-size: var(--np-t-caption); font-weight: 500; letter-spacing: 0; text-transform: none;
  transition: background-color .2s ease, color .2s ease;
}
html body .tabbar button svg { width: 22px !important; height: 22px !important; stroke-width: 1.7 !important; }
html body .tabbar button[aria-current="page"] { background: var(--np-fill-2) !important; color: var(--np-ink) !important; font-weight: 650; }
html body .tabbar button[aria-current="page"] svg { fill: none !important; stroke-width: 2 !important; }
html body .page { padding-bottom: 128px; }

/* ===================================================================== 6. Components */
/* Cards: white on cream, a soft 1pt hairline, 18 radius, no shadow */
html body .card, html body .wcard, html body .stat, html body .region-card, html body .rec-card, html body .grape-item,
html body .scan, html body .o-place, html body .friends-card, html body .dict-card, html body .dict-card.quiz-card,
html body .scan-buy, html body .look-preview, html body .fields, html body .toggle-row, html body .note-box,
html body .group, html body .facts, html body .notes-list, html body .buy, html body .banner, html body .unlocks, html body .qr-picks, html body details.more, html body .rate-in {
  background: var(--np-white) !important; box-shadow: var(--np-ring) !important; border: 0 !important; border-radius: var(--np-r-card) !important;
}
html body .card { padding: var(--np-card-pad) !important; }
html body .sheet { background: var(--np-cream) !important; border-radius: var(--np-r-hero) var(--np-r-hero) 0 0 !important; }
html body .sheet .card, html body .sheet .facts, html body .sheet .notes-list, html body .sheet .buy { background: var(--np-white) !important; box-shadow: var(--np-ring) !important; }
html body .sheet .tip { background: var(--np-fill-2) !important; box-shadow: none !important; border-radius: var(--np-r-sm) !important; }
html body .verdict, html body .roast, html body .prophecy, html body .fab-move { background: transparent !important; border-radius: 0 !important; }

/* Buttons: ink primary, white secondary with a hairline, plain text tertiary */
html body .btn { font-family: var(--np-text); font-weight: 600; letter-spacing: -.01em; border-radius: var(--np-r-pill);
  background: var(--np-white); color: var(--np-ink); box-shadow: var(--np-ring-control); }
html body .btn.filled { background: var(--np-ink) !important; color: #fff !important; box-shadow: none; min-height: var(--np-btn-h) !important; padding-inline: 24px; }
html body .btn.filled:active { background: var(--np-ink-pressed) !important; }
html body .btn.plain { background: transparent; box-shadow: none; color: var(--np-ink); }
html body .btn:disabled { background: var(--np-fill-2) !important; color: #8E897F !important; box-shadow: none; }
html body .see-more, html body .o-link { color: var(--np-ink) !important; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
html body .section-head .o-link { text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  html body .btn.filled:hover { background: var(--np-ink-pressed) !important; }
  html body .btn:not(.filled):not(.plain):hover { background: var(--np-fill) !important; }
}

/* Chips: hairline, one selected style (ink) */
html body .pill { min-height: var(--np-chip-h) !important; padding: 0 16px; font-family: var(--np-text); font-size: var(--np-t-support); font-weight: 500;
  background: var(--np-white); color: var(--np-ink); box-shadow: var(--np-ring-control); }
html body .pill[aria-pressed="true"], html body .pill[aria-checked="true"], html body .shop-chips .pill[aria-pressed="true"] {
  background: var(--np-ink) !important; color: #fff !important; box-shadow: none !important; }
html body .pill.pair-pill { background: var(--np-fill-2) !important; color: var(--np-ink) !important; }
html body .pill .sw { box-shadow: 0 0 0 1px rgba(15, 15, 15, .08); }
html body .pill[aria-checked="true"] .sw { box-shadow: 0 0 0 1.5px #fff; }
html body .styletabs button[aria-pressed="true"]::after { background: var(--np-ink) !important; }

/* Segmented controls */
html body .segmented, html body .o-segs, html body .scale { background: var(--np-fill-2) !important; }
html body .segmented button[aria-pressed="true"], html body .segmented button[aria-checked="true"], html body .o-segs button[aria-selected="true"], html body .scale span.on {
  background: var(--np-white) !important; color: var(--np-ink) !important; box-shadow: 0 1px 2px rgba(15, 15, 15, .1), 0 0 0 .5px var(--np-line-strong) !important; }

/* List rows: fine dividers inside one white group */
html body .row + .row::before { border-top: 1px solid var(--np-line) !important; }
html body .row .t { font-weight: 600; }
html body .row .s { color: var(--np-grey); }

/* Ratings: ink drops, from the brand system. play.js sets --np-n from each rating's accessible label;
   without it the original star glyphs show in ink. */
html body .stars { color: var(--np-ink) !important; }
html body .stars .off { color: var(--np-off) !important; }
html body .stars[style*="--np-n"] { font-size: 0 !important; letter-spacing: 0 !important; display: inline-flex; align-items: center; gap: 0; line-height: 1; vertical-align: middle; }
html body .stars[style*="--np-n"] .off { display: none; }
html body .stars[style*="--np-n"]::before, html body .stars[style*="--np-n"]::after {
  content: ""; display: block; height: 12px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1S2.2 5.6 2.2 8.2a3.8 3.8 0 0 0 7.6 0C9.8 5.6 6 1 6 1z'/%3E%3C/svg%3E") left center / 12px 12px repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1S2.2 5.6 2.2 8.2a3.8 3.8 0 0 0 7.6 0C9.8 5.6 6 1 6 1z'/%3E%3C/svg%3E") left center / 12px 12px repeat-x;
}
html body .stars[style*="--np-n"]::before { width: calc(var(--np-n) * 12px); background: var(--np-ink); }
html body .stars[style*="--np-n"]::after { width: calc((5 - var(--np-n)) * 12px); background: var(--np-off); }
/* the favourites shelf shows one drop and the score */
html body .shelf .wcard .stars[data-score]::before {
  content: ""; width: 12px; height: 12px; background: var(--np-ink); font-size: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1S2.2 5.6 2.2 8.2a3.8 3.8 0 0 0 7.6 0C9.8 5.6 6 1 6 1z'/%3E%3C/svg%3E") center / 12px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1S2.2 5.6 2.2 8.2a3.8 3.8 0 0 0 7.6 0C9.8 5.6 6 1 6 1z'/%3E%3C/svg%3E") center / 12px no-repeat;
}
html body .shelf .wcard .stars[data-score]::after {
  content: attr(data-score); width: auto; height: auto; -webkit-mask: none; mask: none; background: none;
  font-size: var(--np-t-meta); font-weight: 600; color: var(--np-ink);
}
/* Rating input: five drops, ink when chosen */
html body .rate-in { padding: 6px 12px !important; gap: 2px !important; }
html body .rate-in button i {
  width: 22px !important; height: 22px !important; border: 0 !important; border-radius: 0 !important; background: var(--np-off) !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 .6S1.6 5.8 1.6 8.6a4.4 4.4 0 0 0 8.8 0C10.4 5.8 6 .6 6 .6z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 .6S1.6 5.8 1.6 8.6a4.4 4.4 0 0 0 8.8 0C10.4 5.8 6 .6 6 .6z'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body .rate-in button.on i { background: var(--np-ink) !important; }
html body .rate-in .lbl { color: var(--np-grey); font-size: var(--np-t-support); }
/* the wine page's rating control draws the same drops */
html body .rate-stars button { font-size: 0 !important; display: grid; place-items: center; }
html body .rate-stars button::before {
  content: ""; width: 22px; height: 22px; background: var(--np-off);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 .6S1.6 5.8 1.6 8.6a4.4 4.4 0 0 0 8.8 0C10.4 5.8 6 .6 6 .6z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 .6S1.6 5.8 1.6 8.6a4.4 4.4 0 0 0 8.8 0C10.4 5.8 6 .6 6 .6z'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body .rate-stars button.on::before { background: var(--np-ink); }

/* Forms */
html body .sheet-body > .fgroup, html body .sheet-body > .steps, html body .sheet-body > .step-title { margin-top: 0 !important; margin-bottom: 0 !important; }   /* the sheet's own 24pt rhythm spaces them */
html body .fgroup .label { display: block; margin: 0 4px var(--np-2) !important; }
html body .fields .frow { grid-template-columns: 5.25em minmax(0, 1fr) !important; }
html body .fields .frow + .frow::before { border-top: 1px solid var(--np-line) !important; }
html body .frow label, html body .frow > span:first-child { color: var(--np-grey) !important; font-size: var(--np-t-body); }
html body .frow input { color: var(--np-ink); font-weight: 500; }
html body .switch[aria-checked="true"] { background: var(--np-ink) !important; }
html body .search input, html body .dish-in { background: var(--np-white); box-shadow: var(--np-ring-control); }
html body .sheet-head .title { font-family: var(--np-text); font-weight: 600; }
html body .sheet-head .btn.plain { color: var(--np-ink) !important; }
html body .grabber { background: var(--np-line-strong) !important; }
html body .scrim { background: var(--np-scrim) !important; }
html body .ai-note { color: var(--np-grey-2); font-size: var(--np-t-meta); }

/* Icon wells */
html body .scan .ic, html body .scan-buy .ic, html body .o-place .ic { background: var(--np-fill) !important; color: var(--np-ink) !important; border-radius: var(--np-r-sm); }
html body .scan b { color: var(--np-ink) !important; font-weight: 600; }

/* ===================================================================== 7. Screens */

/* --- Cellar --------------------------------------------------------- */
html body .nd-quick { margin-top: var(--np-6) !important; }
html body .nd-quick-all { box-shadow: var(--np-ring-control) !important; background: var(--np-white) !important; height: var(--np-btn-h); }
html body .nd-add.log-fab.nd-add-inline { background: var(--np-ink) !important; width: var(--np-btn-h); height: var(--np-btn-h); }
/* Tonight's pick: the screen's anchor — one feature card, a larger authentic bottle, concise text */
html body .tonight {
  margin-top: var(--np-6) !important; padding: var(--np-5) var(--np-5) var(--np-5) var(--np-3) !important;
  display: grid !important; grid-template-columns: 112px minmax(0, 1fr) !important; gap: var(--np-4) !important; align-items: center !important;
  background: var(--np-white) !important; box-shadow: var(--np-ring-strong) !important; border-radius: var(--np-r-hero) !important; text-align: left;
}
html body .tonight .tn-art { width: 112px !important; height: var(--np-bottle-hero) !important; display: flex !important; align-items: flex-end; justify-content: center; position: relative; margin: 0 !important; }
html body .tonight .tn-circle, html body .tonight .gart { display: none !important; }
html body .tonight .tn-art img.nd-bottle { position: static !important; height: var(--np-bottle-hero) !important; width: auto !important; max-width: 100%; margin: 0 !important; object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 10px 10px rgba(15, 15, 15, .14)); }
html body .tonight .tn-text { min-width: 0; }
html body .tonight .tn-k { margin: 0 0 var(--np-2) !important; }
html body .tonight .tn-name { font-size: 1.375rem !important; line-height: 1.15 !important; text-wrap: balance; display: block !important; -webkit-line-clamp: unset !important; overflow: visible !important; overflow-wrap: break-word; }
html body .tonight .tn-sub { font-size: var(--np-t-support) !important; color: var(--np-grey) !important; margin-top: var(--np-2) !important; line-height: 1.4; }
html body .tonight .tn-food { margin-top: var(--np-4) !important; padding-top: var(--np-4); border-top: 1px solid var(--np-line); display: flex; align-items: center; gap: var(--np-3);
  font-size: var(--np-t-support) !important; line-height: 1.35; color: var(--np-ink); }
html body .tonight .tn-food img.food-photo { width: 36px !important; height: 36px !important; border-radius: 50% !important; object-fit: cover; flex: none; }

/* Favourites: three across with the fourth peeking, one bottle height, one baseline, room for the words */
html body .shelf:has(> .wcard) { gap: var(--np-4) !important; padding-bottom: var(--np-1); }
html body .shelf .wcard { width: 100px !important; min-width: 100px !important; }
html body .shelf .wcard .art { height: calc(var(--np-bottle-shelf) + 8px) !important; }
html body .shelf .wcard .art img.nd-bottle { height: var(--np-bottle-shelf) !important; filter: drop-shadow(0 6px 6px rgba(15, 15, 15, .12)); }
html body .shelf .wcard .t { font-size: var(--np-t-body) !important; margin-top: var(--np-3) !important; line-height: 1.25; -webkit-line-clamp: 1 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block !important; }
html body .shelf .wcard .s { font-size: var(--np-t-meta) !important; color: var(--np-grey) !important; overflow: hidden; text-overflow: ellipsis; }
html body .shelf .wcard .foot { flex-direction: row !important; gap: var(--np-2) !important; margin-top: var(--np-1) !important; }
html body .shelf .wcard .foot b { font-size: var(--np-t-meta) !important; color: var(--np-grey-2) !important; font-weight: 500 !important; }
html body .shelf .wcard .stars[data-score] { gap: 3px !important; }
/* Regions and Cook tonight: quieter, standard cards */
html body .region-card { padding: var(--np-3) var(--np-3) var(--np-4) !important; }
html body .rc-map { border-radius: var(--np-r-sm); overflow: hidden; }
html body .shelf .cook-card { border-radius: var(--np-r-card) !important; }
html body .shelf .cook-card::after { border-radius: var(--np-r-sm); background: rgba(255, 255, 255, .95); }
html body .wdot.nd-wdot { box-shadow: 0 0 0 1px var(--np-line) !important; }

/* --- Log a bottle --------------------------------------------------- */
/* The recognised bottle (play.js shows the matching authentic photo once the label is read; never a stand-in) */
html body .np-recog { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--np-4); align-items: center;
  padding: var(--np-4) var(--np-5) var(--np-4) var(--np-3); background: var(--np-white); border-radius: var(--np-r-hero); box-shadow: var(--np-ring-strong); }
html body .np-recog img { height: var(--np-bottle-recog); width: 96px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 8px 8px rgba(15, 15, 15, .14)); }
html body .np-recog .np-recog-t { font-size: var(--np-t-wine); font-weight: 650; letter-spacing: -.02em; line-height: 1.2; margin-top: var(--np-1); }
html body .np-recog .np-recog-s { font-size: var(--np-t-support); color: var(--np-grey); margin-top: var(--np-2); line-height: 1.4; }
html body #wine-form .scan { min-height: 64px; padding: var(--np-3) var(--np-4) !important; }
html body #wine-form .status { color: var(--np-grey); font-size: var(--np-t-support); margin: var(--np-2) 4px 0; }
html body #wine-form .choice { gap: var(--np-2) !important; }
html body .note-box { padding: var(--np-3) var(--np-4) !important; }
html body .note-box .prompts button { background: var(--np-fill) !important; box-shadow: none !important; color: var(--np-ink) !important; border-radius: var(--np-r-pill) !important; }
html body .toggle-row { min-height: 52px; padding: 0 var(--np-4) !important; margin-top: var(--np-2); }

/* --- Tasting Tutor -------------------------------------------------- */
html body .steps { gap: 6px !important; }
html body .steps span { height: 4px !important; border-radius: 2px !important; background: var(--np-fill-2) !important; }
html body .steps span.on { background: var(--np-ink) !important; }
html body .step-title { font-family: var(--np-display) !important; font-weight: 800 !important; font-size: var(--np-t-step) !important; line-height: 1 !important; letter-spacing: -.03em !important; color: var(--np-ink); }
/* The glass is the hero: full width, cream stage, no frame */
html body .sheet .look-preview {
  display: grid !important; grid-template-columns: 1fr !important; justify-items: center; text-align: center; gap: var(--np-2) !important;
  padding: 0 0 var(--np-2) !important; background: transparent !important; box-shadow: none !important; border-radius: 0 !important;
}
html body .sheet .look-preview img.nd-photo, html body .sheet .look-preview .np-hero {
  width: 100% !important; max-width: 248px !important; aspect-ratio: var(--np-hero-ratio); height: auto; display: block; margin: 0 auto;
}
html body .sheet .look-preview .np-hero { object-fit: cover; border-radius: 0 !important; padding: 0 !important; max-width: 256px !important; margin-top: -12px !important;
  -webkit-mask: radial-gradient(closest-side, #000 82%, transparent 100%); mask: radial-gradient(closest-side, #000 82%, transparent 100%); }
html body .sheet .look-preview .lbl { font-family: var(--np-text) !important; font-size: var(--np-t-wine) !important; font-weight: 650 !important; letter-spacing: -.02em; }
/* Colour swatches: uniform, tactile tiles with a photo, a text label, and a ring + check when chosen */
html body .choice[aria-label="Colour"] { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: var(--np-2) !important; }
html body .choice[aria-label="Colour"] .pill {
  flex-direction: column !important; justify-content: center; gap: var(--np-2) !important; height: auto !important; min-height: 104px !important; padding: var(--np-3) 4px !important;
  border-radius: var(--np-r-card) !important; background: var(--np-white) !important; color: var(--np-ink) !important; box-shadow: var(--np-ring-control) !important;
  font-size: var(--np-t-support); font-weight: 500; position: relative; transition: box-shadow .15s ease, transform .15s ease;
}
html body .choice[aria-label="Colour"] .pill img.sw { width: 52px !important; height: 52px !important; box-shadow: none !important; }
html body .choice[aria-label="Colour"] .pill[aria-pressed="true"] { background: var(--np-white) !important; color: var(--np-ink) !important; font-weight: 650; box-shadow: inset 0 0 0 2px var(--np-ink) !important; }
html body .choice[aria-label="Colour"] .pill[aria-pressed="true"]::before {
  content: ""; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--np-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
html body .choice[aria-label="Colour"] .pill:active { transform: scale(.97); }
/* Intensity: one segmented row */
html body .choice[aria-label="Intensity"] { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: var(--np-2) !important; }
html body .choice[aria-label="Intensity"] .pill { justify-content: center; min-height: 44px !important; }
html body .sheet .nav-row { margin-top: var(--np-2) !important; }
html body .sheet .nav-row .btn.filled { width: 100%; }

/* --- Shelf Check ---------------------------------------------------- */
/* The verdict is the signature: pistachio, an ink outline, "Buy it" in the display face. Only a yes gets pistachio. */
html body .buy-result { padding: var(--np-6) var(--np-5) var(--np-5) !important; border-radius: var(--np-r-hero) !important; box-shadow: var(--np-ring-strong) !important; }
html body .buy-result.buy-yes { background: var(--np-pistachio) !important; }
html body .buy-result .br-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--np-3); margin-bottom: var(--np-4); }
html body .buy-result .br-verdict {
  height: auto !important; padding: 0 !important; background: none !important; color: var(--np-ink) !important; border-radius: 0 !important;
  font-family: var(--np-display) !important; font-weight: 800 !important; font-size: var(--np-t-moment) !important; line-height: .95 !important; letter-spacing: -.035em !important;
}
html body .buy-result .br-price { font-family: var(--np-text) !important; font-size: var(--np-t-support) !important; font-weight: 600; letter-spacing: 0 !important; color: var(--np-ink);
  padding: 6px 12px; border-radius: var(--np-r-pill); box-shadow: inset 0 0 0 1px rgba(15, 15, 15, .22); white-space: nowrap; margin-top: 4px; }
html body .buy-result .br-name { font-size: var(--np-t-wine) !important; }
html body .buy-result .br-meta { color: var(--np-grey) !important; font-size: var(--np-t-support) !important; margin-top: var(--np-1); }
html body .buy-result .br-line { font-family: var(--np-text) !important; font-style: normal !important; font-size: var(--np-t-body) !important; font-weight: 500; margin: var(--np-3) 0 0 !important; color: var(--np-ink); }
/* Two plainly different measures, side by side: is the wine good (critics' quality), is it you (match to your log) */
html body .np-metrics { display: grid; grid-template-columns: 1fr 1fr; margin: var(--np-5) 0 var(--np-5); border-top: 1px solid rgba(15, 15, 15, .14); border-bottom: 1px solid rgba(15, 15, 15, .14); }
html body .np-metric { padding: var(--np-4) var(--np-3) var(--np-4) 0; min-width: 0; }
html body .np-metric + .np-metric { padding-left: var(--np-4); border-left: 1px solid rgba(15, 15, 15, .14); }
html body .np-metric .bm { margin: 0 !important; }
html body .np-metric .bm-top { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 2px; margin: 0 !important; }
html body .np-metric .bm-v { overflow-wrap: anywhere; font-family: var(--np-text) !important; font-size: 1.25rem !important; font-weight: 700 !important; letter-spacing: -.02em !important; line-height: 1.1; color: var(--np-ink) !important; }
html body .np-metric .bm-track { display: none !important; }   /* the number says it; a bar to the percent implied more precision than an estimate has */
html body .np-metric .br-why { font-size: var(--np-t-support) !important; line-height: 1.4; color: var(--np-grey) !important; margin: var(--np-2) 0 0 !important; -webkit-line-clamp: 3 !important; }
html body .buy-result .hstack { gap: var(--np-2) !important; margin-top: 0 !important; }
html body .buy-result .hstack .btn:not(.filled) { background: transparent !important; box-shadow: inset 0 0 0 1px rgba(15, 15, 15, .3) !important; min-height: var(--np-btn-h) !important; }
html body .buy-result .ai-note { margin-top: var(--np-4) !important; }
html body .scan-buy span span, html body .scan span span { color: var(--np-grey) !important; }

/* --- Palate --------------------------------------------------------- */
/* The reading becomes a short page: the personality in peach, then traits and what to try next, then the playful extras */
html body .card.palate.np-split { background: transparent !important; box-shadow: none !important; padding: 0 !important; gap: var(--np-4) !important; display: flex; flex-direction: column; }
html body .np-pal-hero { background: var(--np-peach); border-radius: var(--np-r-hero); box-shadow: var(--np-ring-strong); padding: var(--np-6) var(--np-5) var(--np-6); display: flex; flex-direction: column; gap: var(--np-3); }
html body .np-pal-hero .kicker { color: var(--np-grey) !important; }
html body .np-pal-hero .omen { font-family: var(--np-text) !important; font-style: normal !important; font-size: var(--np-t-support) !important; color: var(--np-grey) !important; margin: 0 !important; }
html body .np-pal-hero .headline, html body .card.palate .headline {
  font-family: var(--np-display) !important; font-weight: 800 !important; font-size: 2.125rem !important; line-height: 1.02 !important; letter-spacing: -.03em !important;
  color: var(--np-ink) !important; text-wrap: balance; margin: var(--np-1) 0 0 !important;
}
html body .np-pal-hero .headline .np-sub { display: block; font-family: var(--np-text); font-weight: 600; font-size: var(--np-t-wine); letter-spacing: -.015em; line-height: 1.25; margin-top: var(--np-2); }
html body .np-pal-hero p:not(.omen) { font-size: var(--np-t-body) !important; color: var(--np-ink) !important; margin: 0 !important; display: block !important; -webkit-line-clamp: unset !important; }
html body .np-pal-hero > p.muted { display: none !important; }   /* the demo keeps the long invitation hidden, as before */
html body .np-pal-hero .hstack { margin-top: var(--np-2); }
html body .np-pal-block { background: var(--np-white); border-radius: var(--np-r-card); box-shadow: var(--np-ring); padding: var(--np-5); }
html body .np-pal-block .pal-sub { display: block; margin: 0 0 var(--np-2) !important; }
html body .np-pal-block ul { margin: 0; padding: 0; list-style: none; gap: 0 !important; }
html body .np-pal-block ul li { display: block !important; padding: var(--np-3) 0; border-top: 1px solid var(--np-line); font-size: var(--np-t-body); }
html body .np-pal-block ul li::before { display: none !important; }
html body .np-pal-block ul li:first-child { border-top: 0; padding-top: var(--np-1); }
html body .np-pal-block .explore { border-top: 0 !important; }
html body .np-pal-block .explore > div { border-bottom: 0 !important; border-top: 1px solid var(--np-line); padding: var(--np-3) 0 !important; }
html body .np-pal-block .explore > div:first-child { border-top: 0; padding-top: var(--np-1) !important; }
html body .np-pal-block .explore b { font-size: var(--np-t-body); }
html body .np-pal-block .explore span { font-size: var(--np-t-support) !important; color: var(--np-grey) !important; }
html body .np-pal-block + .np-pal-block > div:first-child > .pal-sub { margin-top: 0 !important; }
/* The extras: verdict, roast and prophecy, one quiet card, smaller type */
html body .np-pal-extras { background: var(--np-white); border-radius: var(--np-r-card); box-shadow: var(--np-ring); padding: var(--np-1) var(--np-5); }
html body .np-pal-extras > * { padding: var(--np-4) 0 !important; margin: 0 !important; }
html body .np-pal-extras > * + * { border-top: 1px solid var(--np-line) !important; }
html body .np-pal-extras .v-head, html body .np-pal-extras .r-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--np-3); }
html body .np-pal-extras .v-score { font-family: var(--np-text) !important; font-size: var(--np-t-body) !important; font-weight: 700 !important; color: var(--np-ink) !important; }
html body .np-pal-extras .v-bar { margin: var(--np-2) 0 var(--np-2); gap: 3px; }
html body .np-pal-extras .v-bar i { height: 4px !important; border-radius: 2px !important; background: var(--np-fill-2) !important; }
html body .np-pal-extras .v-bar i.on { background: var(--np-ink) !important; }
html body .np-pal-extras .v-label { font-weight: 600; font-size: var(--np-t-body); font-family: var(--np-text) !important; font-style: normal !important; }
html body .np-pal-extras p, html body .np-pal-extras .v-tease { font-size: var(--np-t-support) !important; color: var(--np-grey) !important; margin: var(--np-1) 0 0 !important; font-style: normal !important; }
html body .np-pal-extras .r-line { color: var(--np-ink) !important; font-size: var(--np-t-body) !important; }
html body .np-pal-extras .r-crime { color: var(--np-ink) !important; font-size: var(--np-t-support); font-weight: 600; }
html body .np-pal-extras .prophecy p { color: var(--np-ink) !important; font-size: var(--np-t-body) !important; font-family: var(--np-text) !important; font-style: normal !important; }
html body .card.palate.np-split > .ai-note, html body .card.palate.np-split > .muted { padding: 0 4px; }
html body .card.palate.np-split > .share-row { background: var(--np-white) !important; border-radius: var(--np-r-card); box-shadow: var(--np-ring); padding: var(--np-3) var(--np-4); }
html body .stat b { font-family: var(--np-text); }
html body .fam-tile { background: var(--np-fill) !important; }

html body .dict-card { padding: var(--np-4) !important; }   /* the quiz and dictionary cards on Palate and School */

/* --- School --------------------------------------------------------- */
/* The phrase of the day is the one hero: sky, an ink outline, the phrase in the display face */
html body .snob-school {
  margin-top: var(--np-6) !important; padding: var(--np-6) var(--np-5) var(--np-4) !important; gap: var(--np-3) !important;
  background: var(--np-sky) !important; color: var(--np-ink) !important; box-shadow: var(--np-ring-strong) !important; border-radius: var(--np-r-hero) !important;
}
html body .snob-school .kicker { color: var(--np-grey) !important; }
html body .snob-school .ss-say {
  font-family: var(--np-display) !important; font-weight: 800 !important; font-style: normal !important; font-size: var(--np-t-moment) !important;
  line-height: 1 !important; letter-spacing: -.035em !important; color: var(--np-ink) !important; text-wrap: balance; margin: var(--np-1) 0 var(--np-1) !important;
}
html body .snob-school .ss-means { font-size: var(--np-t-body) !important; line-height: 1.45; color: var(--np-ink) !important; }
html body .snob-school .ss-means b { font-weight: 600; }
html body .snob-school .ss-links { display: flex; flex-wrap: wrap; gap: var(--np-5); margin-top: var(--np-1); }
html body .snob-school .o-link { color: var(--np-ink) !important; }
/* Grapes: one white list with fine dividers and real bottle thumbnails */
html body .grape-list { background: var(--np-white); border-radius: var(--np-r-card); box-shadow: var(--np-ring); overflow: hidden; gap: 0 !important; display: flex; flex-direction: column; }
html body .grape-list .grape-item {
  background: transparent !important; box-shadow: none !important; border-radius: 0 !important; margin: 0 !important;
  display: grid !important; grid-template-columns: 36px minmax(0, 1fr); gap: var(--np-4) !important; align-items: center; padding: var(--np-3) var(--np-4) !important; min-height: 76px; text-align: left;
}
html body .grape-list .grape-item + .grape-item { box-shadow: inset 0 1px 0 var(--np-line) !important; }
html body .grape-item .gi-dot { justify-self: center; width: 14px !important; height: 14px !important; box-shadow: 0 0 0 1px rgba(15, 15, 15, .1); }
html body .grape-item .np-thumb { width: 36px; height: 64px; object-fit: contain; object-position: center bottom; justify-self: center; }
html body .grape-item .gi-top b { font-size: var(--np-t-body-l) !important; font-weight: 600 !important; }
html body .grape-item .gi-top span { color: var(--np-grey-2) !important; font-size: var(--np-t-meta) !important; }
html body .grape-item p { color: var(--np-grey) !important; font-size: var(--np-t-support) !important; margin-top: 2px !important; }

/* ===================================================================== 8. Accessibility */
/* Reduce Transparency: solid surfaces instead of glass */
@media (prefers-reduced-transparency: reduce) {
  html body .tabbar { background: var(--np-white) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  html body .navbar.scrolled::before, html body .navbar.nd-under::before { background: var(--np-cream) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
/* Increased contrast: secondary text darkens, hairlines strengthen */
@media (prefers-contrast: more) {
  :root { --np-grey: #2F2D29; --np-grey-2: #3B3934; --np-line: #BDB6A8; --np-line-strong: #8E887C; }
}
@media (prefers-reduced-motion: reduce) {
  html body .tabbar button, html body .choice[aria-label="Colour"] .pill { transition: none !important; }
}
/* Small phones and large text: the feature card narrows its bottle column, the verdict's metrics stack */
@media (max-width: 359px) {
  html body .tonight { grid-template-columns: 84px minmax(0, 1fr) !important; }
  html body .tonight .tn-art { width: 84px !important; height: 160px !important; }
  html body .tonight .tn-art img.nd-bottle { height: 160px !important; }
  html body .tonight .tn-name { font-size: 1.1875rem !important; }
  html body .np-metrics { grid-template-columns: 1fr; }
  html body .np-metric + .np-metric { padding-left: 0; border-left: 0; border-top: 1px solid rgba(15, 15, 15, .14); }
}
/* Larger text: titles and moments scale with the reader's setting (rem-based), and the long ones may wrap */
html body .large-title h1, html body .snob-school .ss-say, html body .np-pal-hero .headline { overflow-wrap: anywhere; hyphens: manual; }
