/* Lifted Cannabis – Media Library
 * One stylesheet. Brand tokens come from the supplied logo (charcoal, gold,
 * teal) and the Rainier/Tacoma photograph. Fonts are linked from index.html.
 */

/* ---------- fonts (self-hosted, SIL OFL; see fonts/LICENSE-*.txt) ---------- */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/dm-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/dm-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/space-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }

/* ---------- tokens ---------- */
:root {
  --ink: #242020;        /* logo charcoal */
  --muted: #5d5a57;      /* 7.0:1 on paper */
  --paper: #f5f4f0;
  --white: #fff;
  --line: #dedbd5;
  --tint: #e0f2ef;       /* teal tint for hovers */
  --teal: #087b73;       /* logo leaf teal, 4.9:1 on white */
  --teal-bright: #16b6a9;
  --gold: #ffb544;       /* logo "LIFTED" gold, used on dark only */
  --focus: #0c968b;
  --radius: 6px;
  --font-body: 'DM Sans', Arial, sans-serif;
  --font-display: 'Space Grotesk', Arial, sans-serif;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--font-body);
}
body.dialog-open { overflow: hidden; }          /* no page scroll behind the preview */
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a, select, input { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .35; cursor: default; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.skip { position: absolute; left: 10px; top: -80px; background: var(--white); padding: 12px; z-index: 20; }
.skip:focus { top: 10px; }

/* ---------- header ---------- */
header {
  height: 116px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 17px; }
.brand img { width: 88px; height: 80px; object-fit: contain; }
.brand span { font: 700 10px/1.8 var(--font-body); letter-spacing: 2px; }
nav { display: flex; gap: 34px; height: 100%; align-items: center; }
nav a {
  height: 100%;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  padding-top: 3px;
}
nav a.active { border-color: var(--teal-bright); font-weight: 700; }
.source { border: 1px solid #c6c3bc; padding: 10px 16px; border-radius: 5px; font-size: 13px; }
button, .source { min-height: 44px; }           /* comfortable touch targets */

/* ---------- layout ---------- */
main { max-width: 1500px; margin: auto; padding: 0 5vw 64px; }
.hero { padding: 54px 0 40px; display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: 700; margin: 0 0 14px; }
h1 { font: 600 clamp(36px, 4.6vw, 68px)/1.05 var(--font-display); letter-spacing: -2.8px; margin: 0 0 22px; }
.intro { font-size: 17px; color: var(--muted); margin: 0; line-height: 1.65; }

/* Library hero: supplied Rainier / Tacoma Dome photograph under a charcoal gradient */
.hero-photo {
  margin: 30px 0;
  padding: 42px 36px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(25,23,23,.95), rgba(25,23,23,.85) 43%, rgba(25,23,23,.3)),
    url('rainier-tacoma.jpg') center 50% / cover;
  border-radius: var(--radius);
  min-height: 300px;
  align-items: center;
}
.hero-photo { position: relative; overflow: hidden; isolation: isolate; }
.hero-photo > * { position: relative; z-index: 2; }
/* Brand mark from the Lifted logo (the two rising leaflets), used as a tone-on-tone
   field across the dark panels and once, large and gold, in the library hero.
   Drawn with CSS masks so the one PNG (leaf-mark.png) takes any colour. */
.leaf-field::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: rgba(255,255,255,.06);
  -webkit-mask-image: url('leaf-mark.png'), linear-gradient(100deg, #000 0%, #000 30%, transparent 58%);
  -webkit-mask-size: 104px auto, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat;
  -webkit-mask-position: 14px 18px, 0 0;
  -webkit-mask-composite: source-in;
  mask-image: url('leaf-mark.png'), linear-gradient(100deg, #000 0%, #000 30%, transparent 58%);
  mask-size: 104px auto, 100% 100%;
  mask-repeat: repeat, no-repeat;
  mask-position: 14px 18px, 0 0;
  mask-composite: intersect;
  pointer-events: none;
}
.hero-emblem {
  display: block;
  width: 72px; height: 31px;
  margin: 0 0 18px;
  background: var(--gold);
  -webkit-mask: url('leaf-mark.png') left center / contain no-repeat;
  mask: url('leaf-mark.png') left center / contain no-repeat;
}
footer::after {
  content: '';
  position: absolute; z-index: 1;
  right: 4vw; bottom: -24px;
  width: 380px; height: 161px;
  background: var(--gold);
  opacity: .2;
  -webkit-mask: url('leaf-mark.png') center / contain no-repeat;
  mask: url('leaf-mark.png') center / contain no-repeat;
  pointer-events: none;
}
.hero-photo .eyebrow { color: var(--gold); }
.hero-photo .intro { color: #e8e6e2; }
.hero-note {
  font-size: 12px;
  max-width: 250px;
  padding: 18px;
  border: 1px solid #ffffff55;
  background: #1c1a1ad9;
  border-radius: 4px;
}
.hero-note strong { display: block; font-size: 16px; margin: 4px 0; }
.hero-note small { display: block; color: #e3e0da; font-size: 12px; }
.dot { display: inline-block; width: 7px; height: 7px; background: var(--teal-bright); border-radius: 50%; margin-right: 5px; }

/* ---------- search & filters ---------- */
.search-row { display: flex; gap: 14px; margin-bottom: 22px; }
.mobile-only { display: none; }
.search {
  display: flex;
  align-items: center;
  flex: 1;
  background: var(--white);
  border: 1px solid #bdb8b1;
  border-radius: var(--radius);
  padding: 0 18px;
  gap: 10px;
}
.search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.search span { font-size: 31px; }
.search input { width: 100%; padding: 18px 0; border: 0; outline: none; background: transparent; color: var(--ink); min-width: 0; }
.search input::-webkit-search-cancel-button { -webkit-appearance: searchfield-cancel-button; }
button { border: 1px solid var(--line); border-radius: 5px; background: transparent; padding: 10px 16px; color: var(--ink); }
button:hover, .source:hover { background: var(--tint); }
.filters { display: flex; gap: 14px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.filters label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; flex: 1; min-width: 140px; letter-spacing: .2px; }
.filters select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 32px 11px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font-size: 14px;
  min-height: 44px;
}
.results-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; gap: 20px; font-size: 13px; flex-wrap: wrap; }
.results-head p { margin: 0; }
.results-tools { display: flex; gap: 18px; }
.results-head button { font-size: 12px; border: 0; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; min-height: 36px; }
.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal-bright);
  background: #edf4f1;
  padding: 18px 22px;
  font-size: 13px;
  margin: 0 0 24px;
  line-height: 1.8;
}

/* ---------- home view: category tiles & strain chips ---------- */
.browse { margin-bottom: 8px; }
.browse .section-title { margin: 26px 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile {
  position: relative;
  aspect-ratio: 1.6;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  text-align: left;
  display: block;
  min-height: 0;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .2s, transform .2s; }
.tile video.tile-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; }
/* Logos and wide banners: show the whole picture above the label instead of cropping it. */
.tile-fit img { inset: 10% 8% 36%; width: 84%; height: 54%; object-fit: contain; opacity: .95; }
.tile.tile-fit:hover img, .tile.tile-fit:focus-visible img { opacity: 1; transform: none; }
.tile::before {
  content: '';
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 34px; height: 15px;
  background: var(--gold);
  opacity: .9;
  -webkit-mask: url('leaf-mark.png') center / contain no-repeat;
  mask: url('leaf-mark.png') center / contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
.tile-sm::before { width: 28px; height: 12px; top: 10px; right: 10px; }
.tile:hover img, .tile:focus-visible img { opacity: .75; transform: scale(1.03); }
.tile-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(transparent, rgba(25,23,23,.9));
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tile-name { font: 600 18px/1.2 var(--font-display); }
.tile-count { font-size: 12px; color: var(--gold); letter-spacing: .3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-group { margin-bottom: 14px; }
.chip-group-title { font: 700 11px/1 var(--font-body); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.sub-browse { padding: 4px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sub-browse .section-title { margin: 18px 0 12px; font-size: 20px; }
.older-tag { color: var(--gold); background: var(--ink); padding: 1px 6px; border-radius: 3px; letter-spacing: .5px; }
.live-tag { color: #fff; background: #3f6b3a; padding: 1px 6px; border-radius: 3px; letter-spacing: .5px; }
#toggle-older { font-weight: 700; color: var(--teal); }
.chip {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  min-height: 40px;
}
.chip small { color: var(--muted); font-size: 11px; margin-left: 4px; }
.chip:hover { background: var(--tint); border-color: var(--teal-bright); }
.recent-head { padding: 24px 0 0; border-top: 1px solid var(--line); margin-top: 28px; }
.recent-head .section-title { margin: 0; }
.link-btn { border: 0; background: none; color: var(--teal); font-weight: 700; font-size: 13px; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }
.link-btn:hover { background: none; color: var(--ink); }
#back-home { font-weight: 700; color: var(--teal); }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.visual {
  aspect-ratio: 1.4;
  background: #ebe9e3;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  width: 100%;
  padding: 0;
  overflow: hidden;
  min-height: 0;
}
.visual img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; background: #0b0a0a; }
.visual .symbol { font: 400 32px var(--font-display); color: var(--muted); }
.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #fffffff0;
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: .5px;
  border-radius: 3px;
  z-index: 1;
  color: var(--ink);
}
.card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card .collection { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 7px; }
.card h2, .card h3 { font: 500 17px/1.4 var(--font-display); margin: 0 0 12px; overflow-wrap: anywhere; }
.meta { font-size: 12px; color: var(--muted); margin-top: auto; }
.meta p { margin: 3px 0; }
.card-actions { display: flex; gap: 8px 14px; padding-top: 13px; align-items: center; flex-wrap: wrap; }
.card-actions a { font-size: 13px; font-weight: 700; color: var(--teal); padding: 6px 0; }
.card-actions button { padding: 6px 12px; font-size: 13px; min-height: 36px; }
.card-actions .open { margin-left: auto; font-weight: 500; color: var(--muted); }

.pager { display: flex; justify-content: center; gap: 24px; align-items: center; margin-top: 35px; font-size: 13px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 24px; background: var(--white); border: 1px solid var(--line); }
.empty .primary { margin-top: 16px; }

/* ---------- strain tags ---------- */
.section-title { font: 500 24px var(--font-display); margin: 38px 0 20px; }
.tag-grid { margin-bottom: 42px; }
.tag-art {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--ink);      /* charcoal, like the logo: pale and dark artwork both read on it */
}
.tag-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tag-media { font-size: 13px; }
.muted-inline { color: var(--muted); font-size: 12px; font-weight: 400; }

/* ---------- archive ---------- */
.feature {
  display: flex;
  align-items: center;
  gap: 36px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 40px;
  border-radius: 8px;
  margin-bottom: 24px;
  max-width: 900px;
}
.file-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 110px;
  height: 130px;
  background: var(--ink);
  color: var(--gold);
  font: 42px var(--font-display);
}
.feature h2 { font: 500 27px var(--font-display); margin: 0 0 12px; }
.feature p { color: var(--muted); max-width: 520px; }
.primary {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 4px;
  margin-top: 8px;
  font-size: 13px;
  min-height: 44px;
}
.primary:hover { background: var(--teal); }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.archive-link { border: 1px solid var(--line); padding: 22px; background: var(--white); border-radius: var(--radius); display: flex; justify-content: space-between; }
.archive-link:hover { background: var(--tint); }
.muted { color: var(--muted); font-size: 12px; margin-top: 24px; }

/* ---------- footer ---------- */
footer {
  position: relative; overflow: hidden;
  background: var(--ink);
  color: #cfcac4;
  padding: 36px 5vw 44px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12px;
  line-height: 1.6;
}
footer > * { position: relative; z-index: 2; max-width: 62ch; }
footer.leaf-field::before { -webkit-mask-image: url('leaf-mark.png'), linear-gradient(100deg, transparent 30%, #000 60%); mask-image: url('leaf-mark.png'), linear-gradient(100deg, transparent 30%, #000 60%); background: rgba(255,255,255,.07); }
footer > span { letter-spacing: 1.5px; font-weight: 700; color: var(--gold); }
footer p span { color: var(--white); }
footer p { margin: 0; }

/* ---------- preview dialog ---------- */
dialog {
  width: min(1000px, 94vw);
  height: min(850px, 92vh);
  border: 0;
  border-radius: 9px;
  padding: 20px;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
dialog:not([open]) { display: none; }
dialog::backdrop { background: #1a1818cc; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.dialog-head h2 { font-size: 17px; overflow-wrap: anywhere; margin: 0; }
.frame-wrap { position: relative; flex: 1; min-height: 0; }
dialog iframe { width: 100%; height: 100%; border: 1px solid var(--line); background: var(--white); display: block; }
.preview-media { width: 100%; height: 100%; object-fit: contain; display: block; background: #111; border: 1px solid var(--line); }
img.preview-media { background: var(--white); }
.frame-status {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--white);
  pointer-events: none;
}
.dialog-foot { font-size: 13px; margin: 0; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.dialog-foot a { text-decoration: underline; font-weight: 700; color: var(--teal); }

/* ---------- responsive ---------- */
@media (min-width: 1500px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-note { max-width: 220px; }
}
@media (max-width: 760px) {
  header { height: auto; min-height: 105px; flex-wrap: wrap; padding: 16px 5vw 0; gap: 10px 18px; }
  .brand { gap: 10px; }
  .brand img { width: 68px; height: 61px; }
  .brand span { font-size: 9px; }
  nav { order: 3; width: 100%; height: 46px; gap: 22px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav::-webkit-scrollbar { display: none; }
  nav a { flex: none; }
  .source { font-size: 11px; }
  .hero { padding: 35px 0 28px; display: block; }
  .hero-photo {
    margin: 18px 0;
    padding: 24px 20px;
    min-height: 0;
    background-image:
      linear-gradient(90deg, rgba(25,23,23,.95), rgba(25,23,23,.85) 43%, rgba(25,23,23,.3)),
      url('rainier-tacoma-900.jpg');   /* 70 KB instead of 307 KB on phones */
    background-position: 63% center;
  }
  .hero-photo h1 { font-size: 32px; margin-bottom: 10px; }
  .hero-photo .intro { display: none; }           /* phones: eyebrow, title and snapshot line only */
  .hero-note { max-width: none; margin-top: 14px; padding: 10px 12px; font-size: 12px; }
  .mobile-only { display: inline-block; }
  .filters { display: none; }
  .filters.open { display: flex; }
  .hero-note strong { display: inline; margin-left: 5px; font-size: 13px; }
  .hero-note small { margin-top: 5px; }
  h1 { letter-spacing: -1.6px; }
  .intro { font-size: 15px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile-name { font-size: 15px; }
  .tile-text { padding: 10px 12px; }
  .card-body { padding: 12px; }
  .card h2, .card h3 { font-size: 14px; }
  .card-actions { gap: 6px 10px; }
  .card-actions button, .card-actions a { min-height: 40px; display: inline-flex; align-items: center; }
  .filters { gap: 10px; }
  .filters label { min-width: calc(50% - 10px); }
  .search-row { gap: 8px; }
  .search-row button { font-size: 12px; padding: 8px 10px; }
  .search input { font-size: 16px; }   /* 16px prevents iOS zoom-on-focus */
  .results-head { align-items: start; }
  .feature { padding: 24px; gap: 20px; align-items: start; }
  .file-symbol { width: 50px; height: 65px; font-size: 25px; }
  .feature h2 { font-size: 23px; }
  .archive-grid { grid-template-columns: 1fr 1fr; }
  footer { display: block; }
  footer p { margin-top: 12px; }
  dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; padding: 14px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
  .visual { aspect-ratio: 1.7; }
  .archive-grid { grid-template-columns: 1fr; }
  .card h2, .card h3 { font-size: 16px; }
  .feature { display: block; }
  .file-symbol { margin-bottom: 20px; }
}

/* second-level folder view inside a category */
.tiles-sm { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile-sm { aspect-ratio: 4 / 3; }
.tile-sm .tile-name { font-size: 15px; }
.tile-group { margin-bottom: 18px; }
.tile-group .chip-group-title { margin: 14px 0 10px; }
.sub-head { margin-top: 6px; }
.sibling-strip summary { cursor: pointer; font: 700 11px/1 var(--font-body); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); padding: 6px 0 10px; list-style: none; }
.sibling-strip summary::-webkit-details-marker { display: none; }
.sibling-strip summary::before { content: '▸ '; }
.sibling-strip[open] summary::before { content: '▾ '; }
.chip.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip.active small { color: rgba(255,255,255,.8); }
@media (max-width: 900px) { .tiles-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tile-sm .tile-name { font-size: 14px; } }

/* upload.html — team/photographer page */
.upload-main { max-width: 1100px; margin: 0 auto; padding: 40px 5vw 60px; }
.upload-hero { position: relative; overflow: hidden; background: var(--ink); color: var(--white); border-radius: 10px; padding: 40px 36px; margin-bottom: 28px; }
.upload-hero > * { position: relative; z-index: 2; }
.upload-hero .eyebrow { color: var(--gold); }
.upload-hero h1 { font: 600 clamp(28px, 4vw, 40px)/1.15 var(--font-display); margin: 0 0 14px; }
.upload-hero .lede { font-size: 17px; line-height: 1.6; max-width: 62ch; margin: 0 0 24px; color: rgba(255,255,255,.85); }
.upload-cta { display: inline-block; background: var(--gold); color: var(--ink); font: 600 16px/1 var(--font-body); padding: 16px 24px; border-radius: 6px; text-decoration: none; min-height: 44px; }
.upload-cta:hover, .upload-cta:focus-visible { filter: brightness(1.06); }
.upload-hero .fine { margin: 14px 0 0; font-size: 13px; color: rgba(255,255,255,.7); }
.upload-team { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; padding: 24px; margin-bottom: 20px; line-height: 1.6; }
.upload-team h2 { font: 600 21px/1.3 var(--font-display); margin: 0 0 10px; }
.upload-team p { margin: 0 0 12px; }
.upload-team .fine { font-size: 13px; color: var(--muted); }
.upload-team code { font: 500 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.upload-steps { margin: 0 0 14px; padding-left: 22px; }
.upload-steps li { margin-bottom: 8px; }
.upload-team-actions { display: grid; gap: 12px; }
.upload-team-actions .upload-cta { text-align: center; line-height: 1.3; }
.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.upload-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 24px; line-height: 1.6; }
.upload-card h2 { font: 600 19px/1.3 var(--font-display); margin: 0 0 10px; }
.upload-card h2 + p { margin-top: 0; }
.upload-card h2:not(:first-child) { margin-top: 22px; }
.upload-card p { margin: 0 0 12px; }
.upload-card .fine { font-size: 13px; color: var(--muted); }
.upload-card ul { margin: 0 0 12px; padding-left: 20px; }
.upload-card li { margin-bottom: 6px; }
.upload-card code { font: 500 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.upload-formats { grid-column: 1 / -1; }
.upload-page nav a.active { color: var(--teal); border-bottom: 3px solid var(--teal); }
@media (max-width: 760px) {
  .upload-grid { grid-template-columns: 1fr; }
  .upload-team { grid-template-columns: 1fr; }
  .upload-hero { padding: 28px 20px; }
  .upload-main { padding: 24px 16px 48px; }
}

.nav-upload { color: var(--muted); }

@media (max-width: 760px) {
  footer::after { width: 260px; height: 110px; right: -40px; bottom: -20px; }
  .hero-emblem { width: 56px; height: 24px; margin-bottom: 12px; }
  .leaf-field::before { -webkit-mask-size: 96px auto, 100% 100%; mask-size: 96px auto, 100% 100%; }
}
@media (prefers-reduced-motion: reduce) { .tile img { transition: none; } }

/* ---------- For TVs ---------- */
.tv-hero { min-height: 220px; }
.tv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
.tv-start { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 700; padding: 14px 22px; }
.tv-start:disabled { opacity: .5; }
.tv-count { font-size: 13px; color: var(--muted); }
.tv-tip { font-size: 13px; color: var(--muted); max-width: 75ch; margin: 0 0 20px; line-height: 1.6; }
.tv-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.tv-card label { display: block; cursor: pointer; }
.tv-visual { display: grid; place-items: center; width: 100%; }
.tv-pick { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px 4px; font: 600 14px/1.35 var(--font-body); }
.tv-pick input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--teal); }
.tv-card .card-actions { padding: 8px 14px 14px; margin-top: auto; }
.tv-player { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; align-items: center; justify-content: center; }
.tv-player video, .tv-player img { width: 100%; height: 100%; object-fit: contain; }
.tv-controls { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; gap: 12px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.tv-controls.show, .tv-controls:focus-within { opacity: 1; pointer-events: auto; }
.tv-controls button { background: rgba(36,32,32,.88); color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; padding: 14px 22px; min-height: 52px; font: 700 16px/1 var(--font-body); }
.tv-controls #tv-skip { background: var(--gold); color: var(--ink); border-color: var(--gold); }
body.tv-on { overflow: hidden; }

/* ---------- what's new, drop, how-to, share ---------- */
.whatsnew { margin: 4px 0 6px; }
.whatsnew .section-title { margin: 18px 0 12px; font-size: 20px; }
.drop { position: relative; background: var(--ink); color: var(--white); border-radius: 8px; padding: 22px 24px; margin-bottom: 8px; }
.drop-label { color: var(--gold); font: 700 13px/1 var(--font-body); margin: 0 0 8px; }
.drop-title { font: 600 26px/1.15 var(--font-display); margin: 0 0 8px; }
.drop-blurb { margin: 0 0 14px; color: #e3e0da; max-width: 70ch; line-height: 1.55; }
.set-link { font-size: 13px; font-weight: 700; color: var(--teal); padding: 8px 0; }
#file-link { padding: 6px 12px; font-size: 13px; min-height: 36px; }
.share-main { max-width: 980px; margin: 0 auto; padding: 40px 5vw 60px; }
.share-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 28px; align-items: start; }
.qr-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 24px; text-align: center; }
.qr-card img.qr { width: 100%; height: auto; display: block; }
.qr-card .qr-logo { width: 96px; height: auto; margin: 0 auto 10px; display: block; }
.qr-card p { margin: 12px 0 0; font-weight: 600; }
.qr-card .qr-url { font-weight: 400; font-size: 13px; color: var(--muted); word-break: break-all; }
.share-actions { display: flex; flex-direction: column; gap: 12px; }
.share-actions h1 { font: 600 clamp(28px, 4vw, 40px)/1.15 var(--font-display); margin: 0 0 6px; }
.share-actions p { margin: 0 0 8px; line-height: 1.6; max-width: 56ch; }
.share-actions a.btn, .share-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); font: 600 15px/1 var(--font-body); text-decoration: none; }
.share-actions .primary-share { background: var(--gold); border-color: var(--gold); }
@media (max-width: 760px) { .share-grid { grid-template-columns: 1fr; } }
@media print {
  header, footer, .share-actions, .skip { display: none !important; }
  body { background: #fff; }
  .share-grid { display: block; }
  .qr-card { border: 0; max-width: 4.5in; margin: 1in auto; }
}

/* ---------- share list ---------- */
.pick-box { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 8px; cursor: pointer; min-height: 28px; }
.pick-box input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.share-tray { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 900; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.35); max-width: calc(100vw - 24px); font-size: 14px; }
.share-tray a, .share-tray button { color: var(--ink); background: var(--gold); border: 0; border-radius: 6px; padding: 10px 14px; min-height: 44px; font: 700 14px/1 var(--font-body); text-decoration: none; display: inline-flex; align-items: center; }
.share-tray #tray-clear { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.4); }
.picked-note { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 8px; padding: 14px 18px; margin: 0 0 18px; }
.picked-note p { margin: 0; }

/* ---------- product tiles, strain details, kits, ready-made sizes, newest row ---------- */
.tile-product { background: #000; }
.tile-product img { object-fit: contain; object-position: right center; opacity: .95; }
.tile.tile-product:hover img, .tile.tile-product:focus-visible img { opacity: 1; transform: none; }
.tile-product .tile-text { background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.feature-row .section-title { margin: 18px 0 12px; font-size: 20px; }
.tiles-new { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tiles-new { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles-new { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.strain-info { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px 28px; align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; margin: 6px 0 14px; }
.strain-info[hidden] { display: none; }
.strain-tag { width: 104px; height: 104px; object-fit: contain; }
.strain-facts h2 { margin: 0 0 10px; font: 600 24px/1.15 var(--font-display, inherit); }
.strain-facts dl { margin: 0 0 14px; display: grid; gap: 6px; }
.strain-facts dl div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.strain-facts dt { color: var(--muted); }
.strain-facts dd { margin: 0; }
.strain-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.strain-actions .btn-link { font-size: 13px; }
.strain-kits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.strain-kits .chip-group-title { grid-column: 1 / -1; margin: 2px 0 2px; }
.strain-kits button { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; padding: 10px 12px; min-height: 56px; }
.strain-kits button small { color: var(--muted); font-weight: 400; font-size: 12px; }
@media (max-width: 900px) { .strain-info { grid-template-columns: auto minmax(0, 1fr); } .strain-kits { grid-column: 1 / -1; } }
@media (max-width: 560px) { .strain-info { grid-template-columns: 1fr; padding: 16px; } .strain-tag { width: 84px; height: 84px; } }
.sizes { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sizes[hidden] { display: none; }
.sizes-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.sizes button { font-size: 12px; padding: 5px 9px; }

/* Results view: content first. The hero only belongs to the home view. */
.viewing-results #library > .hero { display: none; }
.viewing-results #library .search-row { margin-top: 6px; }
.frame-wrap { background: #111; }
.frame-wrap .frame-status { color: #cfcac2; }

/* ---------- buyer-facing polish (Dec 2026) ---------- */
.hero-note strong { font-size: 15px; }
.card { transition: box-shadow .18s, transform .18s; }
.card:hover { box-shadow: 0 10px 28px rgba(36,32,32,.14); transform: translateY(-2px); }
.card .visual { background: #0b0a0a; cursor: zoom-in; }
.card h2, .card h3 { margin-bottom: 6px; font-size: 16px; }
.card p.meta { margin: 0; font-size: 12px; color: var(--muted); }
.card-actions { margin-top: auto; padding-top: 14px; gap: 8px; flex-wrap: nowrap; }
.card-actions .download { background: var(--ink); color: var(--white); border-radius: 5px; padding: 0 14px; min-height: 38px; display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.card-actions .download:hover { background: var(--teal); }
.card-actions .preview-btn { min-height: 38px; }
.card-actions .pick-box { margin: 0 0 0 auto; font-weight: 500; }
.badge { background: rgba(11,10,10,.72); color: var(--white); }
.results-head { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.results-tools button, .results-tools a { font-size: 13px; }
.foot-links { margin-top: 10px; font-size: 12px; opacity: .8; }
.foot-links a { color: inherit; text-decoration: underline; }
.preview-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(11,10,10,.55); color: var(--white); font: 400 34px/1 var(--font-display); }
.preview-nav:hover { background: rgba(11,10,10,.85); }
.preview-nav[hidden] { display: none; }
#preview-prev { left: 10px; }
#preview-next { right: 10px; }
.share-tray #tray-zip { background: var(--white); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
@media (max-width: 560px) { .card-actions { flex-wrap: wrap; } .preview-nav { width: 38px; height: 38px; } }
.pager { flex-wrap: wrap; }
.pager [hidden] { display: none; }
#scroll-all { border-color: var(--ink, #1f1c1c); font-weight: 600; }
