/* Woody Woodpecker UI — Pixel Art Theme (matching old React bot exactly) */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-width: 0;
  min-height: var(--app-viewport-height);
  overflow-x: hidden;
}

html {
  min-width: 0;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  background: var(--bg);
}

/* Every route is mounted directly below #main. Previously those roots grew to
   the full Telegram Desktop viewport (often ~800px) while cards, carousels and
   typography were tuned for a phone. This single shell fixes all customer,
   game and admin routes without introducing a wrapper that could change the
   containing block of position:fixed modals. */
#main {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: var(--app-viewport-height);
  padding-top: var(--safe-top); /* below the Telegram buttons in fullscreen (#117) */
  margin-inline: auto;
  overflow-x: clip;
}

#main > div {
  width: 100%;
  min-width: 0;
  min-height: var(--app-viewport-height) !important;
}

/* App container */
.app-container { min-height: var(--app-viewport-height); display: flex; flex-direction: column; }
.main-content { flex: 1; padding: 12px; padding-bottom: 100px; }

/* Page base */
.page { max-width: 600px; margin: 0 auto; }

/* Page header (from old bot) */
.page-header { padding: 20px 16px 16px; text-align: center; }
.page-icon { font-size: 44px; margin-bottom: 8px; filter: drop-shadow(3px 3px 0 #000); }
.page-title {
  font-size: 24px; font-weight: 800; color: var(--green);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
  letter-spacing: 2px; margin-bottom: 6px;
}
.page-subtitle { font-size: 13px; color: var(--text2); }

/* Section title (from old bot) */
.section-title {
  font-size: 13px; font-weight: 700; color: var(--cyan);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

/* Navigation bar */
.nav-bar {
  position: fixed; bottom: 0; left: 50%; right: auto;
  width: 100%; max-width: var(--app-max-width);
  transform: translateX(-50%);
  display: flex; justify-content: space-around; align-items: center;
  background-color: var(--bg2);
  border-top: 4px solid var(--border);
  padding: 8px 4px calc(8px + var(--safe-bottom));
  z-index: 1000;
}
/* All ten sections live in the bar, so every slot is an equal fraction of
   the viewport (`flex: 1 1 0` + `min-width: 0`) instead of being sized by
   its own content. Without that, the widest labels pushed the row past the
   screen edge and the last tabs were clipped out of reach. */
.bottom-nav > *,
.nav-bar > * { flex: 1 1 0; min-width: 0; }
/* Each slot is a router <a>; strip the default underline and inherited link
   colour so the tab styling below is the only thing that paints it. */
.bottom-nav > a,
.nav-bar > a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }

/* Every other link in the app, which until now had no rule at all.
 *
 * Dioxus `Link` renders a plain `<a href>`, and an `<a>` nobody colours takes
 * the user agent's blue with an underline. On this app's cards — `#16213e`,
 * dark blue — that is blue on blue: the profile's Quick Actions rows read as
 * broken rather than as links. The nav bar had a copy of this fix for its own
 * slots and nothing else did.
 *
 * An element selector, so anything that sets its own colour — the support
 * link, the referral link, a class, an inline style — still wins. This only
 * paints the links that were being left to the browser. */
a { color: var(--green); text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:visited { color: var(--green); }
a:hover, a:focus-visible { color: var(--cyan); }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-width: 0;
  gap: 2px; padding: 2px 0; border: none; background: none;
  color: var(--text2); cursor: pointer;
  transition: all 0.15s; font-size: 10px; font-weight: 600;
}
.nav-item.active { color: var(--text); filter: none; }
.nav-svg { width: 22px; height: 22px; display: block; }
.theme-mark,
.lang-toggle {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
}
.header, .screen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.brand-head { display: block; width: 100%; }
.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.brand-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.brand-mark { width: 64px; height: 64px; display: block; flex: 0 0 64px; }
.brand-words {
  display: flex; flex-direction: column; line-height: 1.05; display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}
.brand-place {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text2);
}
.brand-back {
  display: inline-flex;
  margin: 14px 16px 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
}
.screen-title { padding: 8px 16px 4px; }
.screen-title h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.screen-title p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text2);
}
.givel-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(70px + var(--safe-bottom));
}
.tier-grid, .stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tier-grid { padding: 4px 16px 0; }
.tier-card, .stat-card, .plain-card {
  background: var(--card);
  border: 1px solid var(--border);
}
.tier-card, .stat-card { padding: 12px; }
/* The current tier is a ring, not an inverted fill: the dark theme forces the card
   background with !important, which made the inverted card dark text on dark. */
.tier-card.on { box-shadow: inset 0 0 0 2px var(--text); }
.tier-card.locked { border-style: dashed; }
.tier-name, .stat-value { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.tier-meta, .stat-label { margin-top: 4px; font-size: 12px; color: var(--text2); line-height: 1.3; }
.tier-badge {
  display: inline-block; margin-top: 8px; padding: 2px 8px;
  font-size: 11px; font-weight: 600; line-height: 1.4;
  border: 1px solid var(--border); color: var(--text2);
}
.tier-card.on .tier-badge { background: var(--text); border-color: var(--text); color: var(--card); }
.tier-head { color: var(--text); }
.tier-head-label { font-size: 12px; color: var(--text2); }
.tier-head-name { margin-top: 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.tier-bar { margin-top: 12px; height: 8px; background: var(--bg2); border: 1px solid var(--border); overflow: hidden; }
.tier-bar-fill { height: 100%; background: var(--text); }
.tier-head-sub { margin-top: 8px; font-size: 13px; color: var(--text); line-height: 1.35; }
.tier-head-note { margin-top: 6px; font-size: 12px; color: var(--text2); line-height: 1.35; }
.tier-grid-title { padding: 4px 16px 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.plain-card { margin: 12px 16px; padding: 16px; }
.form-card { background: var(--card); border: 1px solid var(--border); margin: 8px 16px 16px; }
.form-card .form-body { padding: 16px 16px 0; }
.form-card .obj-btn { width: 100%; margin: 16px 0 0; border-radius: 0; }
.field {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 0;
  font-size: 15px;
  margin-bottom: 14px;
  font-family: inherit;
}
.note {
  margin: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-line;
}
.nav-icon { font-size: 20px; line-height: 1.1; }
.nav-label {
  font-size: 9px; font-weight: 600; line-height: 1.1;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Buttons (from old bot) */
.btn {
  font-family: inherit; font-size: 14px; font-weight: 700;
  padding: 12px 20px;
  border: 4px solid var(--border);
  box-shadow: 3px 3px 0 #000;
  cursor: pointer; transition: transform 0.1s, box-shadow 0.1s;
  display: inline-flex; align-items: center; gap: 4px;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--green); color: #000;
  border: 4px solid #2d9e0f;
  box-shadow: 3px 3px 0 #000;
}
.btn-secondary {
  background: var(--bg2); color: var(--text);
  border: 4px solid var(--border);
  box-shadow: 3px 3px 0 #000;
}
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-lg { padding: 16px 24px; font-size: 16px; }

/* Light: black pill on white. Dark: white pill on black. */
.givel-btn,
.obj-btn,
.btn-view,
.btn-submit {
  appearance: none;
  -webkit-appearance: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.022em;
  text-transform: none;
  color: var(--bg);
  background: var(--text);
  border: none;
  border-radius: 980px;
  padding: 11px 18px;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
  width: 100%;
}
.catalog-grid { align-items: stretch; }
.obj-card { height: 100%; }
.obj-info { display: flex; flex-direction: column; flex: 1; padding-bottom: 0 !important; }
.obj-btn {
  width: 100%;
  margin-inline: 0;
  border-radius: 0 0 12px 12px;
  box-sizing: border-box;
}
/* A link styled as a button (profile "Open CRM", #108) is inline by default:
   its vertical padding then overlaps the text above. Make it a block. */
a.givel-btn {
  display: block;
  box-sizing: border-box;
  margin-top: 12px;
  text-align: center;
  text-decoration: none;
}
.givel-btn:hover,
.obj-btn:hover,
.btn-view:hover,
.btn-submit:hover { background: var(--text); }
.givel-btn:active,
.obj-btn:active,
.btn-view:active,
.btn-submit:active { background: var(--text); transform: none; box-shadow: none; }
/* Choices: the picked one is filled (above), the others and Back are outlined. */
.obj-btn.secondary,
.obj-btn.secondary:hover,
.obj-btn.secondary:active {
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--text);
}

.givel-btn-quiet,
.btn-contact {
  appearance: none;
  -webkit-appearance: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.022em;
  text-transform: none;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 980px;
  padding: 11px 18px;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
  width: 100%;
}
.givel-btn-quiet:hover,
.btn-contact:hover { background: rgba(0, 0, 0, 0.06); }

.filter-chip,
.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
}
.filter-chip.on,
.radio-label.on {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}
/* Cards (from old bot — sharp corners, 4px borders, pixel shadow) */
.card {
  background-color: var(--card);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  overflow: hidden;
}
.card.clickable { cursor: pointer; }
.card.clickable:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

/* Cards grid */
.cards-grid { display: flex; flex-direction: column; gap: 12px; }

/* Comet card 3D tilt (from old bot StrainCard) */
.comet-card {
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}
.comet-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--pixel-shadow);
}
.set-card:active,
.strain-card:active,
.comet-card:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

/* Strain card */
.strain-card {
  background: var(--card);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  overflow: hidden;
}

/* Strain visual (category gradient overlay) */
.strain-visual {
  aspect-ratio: 853/1280;
  position: relative;
  overflow: hidden;
}
.strain-visual.sativa {
  background: linear-gradient(135deg, rgba(255,230,0,0.2), transparent);
}
.strain-visual.indica {
  background: linear-gradient(135deg, rgba(179,136,255,0.2), transparent);
}
.strain-visual.hybrid {
  background: linear-gradient(135deg, rgba(57,255,20,0.2), transparent);
}
.strain-visual img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.5s ease;
}

/* Category badges */
.type-badge { display: inline-block; padding: 2px 8px; font-size: 13px; }
.type-badge.sativa { color: var(--yellow); }
.type-badge.indica { color: var(--purple); }
.type-badge.hybrid { color: var(--green); }

/* Strain content */
.strain-content { padding: 12px; }
.strain-name { font-size: 17px; font-weight: 700; text-shadow: 2px 2px 0 rgba(0,0,0,0.1); margin-bottom: 4px; }
.strain-price { font-size: 20px; font-weight: 800; color: var(--yellow); text-shadow: 2px 2px 0 rgba(0,0,0,0.1); }
.strain-thc, .strain-cbd { font-size: 13px; color: var(--text2); margin-bottom: 4px; }
.strain-description { font-size: 13px; color: var(--text2); margin-bottom: 8px; line-height: 1.4; }
.strain-effect { font-size: 13px; color: var(--text2); }

/* Set card */
.set-card {
  background: var(--card);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.set-card.featured-set {
  border-color: var(--green);
  box-shadow: var(--pixel-shadow), 0 0 20px rgba(57,255,20,0.2);
}
.set-visual {
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(57,255,20,0.1), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.set-visual img {
  width: 100%; height: 100%; object-fit: cover;
}
.set-icon {
  font-size: 64px;
  filter: drop-shadow(3px 3px 0 #000);
}
.set-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.set-type {
  font-size: 11px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.set-name {
  font-size: 16px; font-weight: 700; text-shadow: 2px 2px 0 rgba(0,0,0,0.1); margin-bottom: 4px;
}
.set-description {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 12px;
  line-height: 1.4;
  flex: 1;
}
.set-price-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.set-price {
  font-size: 22px; font-weight: 800; color: var(--yellow); text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}
.set-original-price {
  font-size: 14px;
  color: var(--text2);
  text-decoration: line-through;
}
.set-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--green);
  color: #000;
  font-size: 12px;
  padding: 4px 8px;
  font-weight: 700;
  box-shadow: 2px 2px 0 #000;
  z-index: 10;
}
.set-badge.featured {
  background: var(--yellow);
  font-size: 14px;
  padding: 6px 12px;
}
.set-out-of-stock {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
}
.set-card-body { padding: 14px; }
.sets-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.featured-sets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
@media (min-width: 600px) {
  .sets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .featured-sets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Accessory card */
.accessory-visual {
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, rgba(0,255,255,0.1), transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}

/* Filter chips (pill shape from old bot) */
.filter-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 4px; }
.filter-tab {
  padding: 8px 16px; font-size: 12px; font-weight: 600;
  background: var(--bg2); color: var(--text);
  border: 3px solid var(--border);
  border-radius: 20px;
  cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
}
.filter-tab.active {
  border-color: var(--green); color: var(--green);
  background: rgba(57,255,20,0.15);
}
.filter-tab:active { transform: translate(2px, 2px); box-shadow: none; }

/* Cart items */
.cart-items { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex; gap: 12px; padding: 12px;
  background: var(--card); border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
}
.cart-item-remove {
  width: 32px; height: 32px;
  background: rgba(255,71,87,0.2);
  border: 3px solid var(--red);
  color: var(--red); font-size: 18px;
  cursor: pointer;
}
.qty-btn {
  width: 28px; height: 28px;
  background: var(--bg2); border: 3px solid var(--border);
  font-size: 16px; font-weight: 700;
  cursor: pointer; color: var(--text);
}
.cart-summary {
  padding: 16px;
  background: var(--bg2);
  border-top: 4px solid var(--border);
}

/* Checkout */
.form-input {
  width: 100%; padding: 12px 16px;
  font-size: 16px;
  background: var(--bg2);
  border: 4px solid var(--border);
  color: var(--text); font-family: inherit;
}
.form-input:focus { outline: none; border-color: var(--green); }

/* Order card */
.order-card {
  background: var(--card);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  overflow: hidden;
}

/* Order status badges */
.order-status {
  font-size: 13px; padding: 4px 12px;
  border: 2px solid; font-weight: 700;
}
.status-pending { background: rgba(255,230,0,0.2); color: var(--yellow); border-color: var(--yellow); }
.status-confirmed { background: rgba(57,255,20,0.2); color: var(--green); border-color: var(--green); }
.status-ready { background: rgba(0,229,255,0.2); color: var(--cyan); border-color: var(--cyan); }
.status-completed { background: rgba(136,136,170,0.2); color: var(--text2); border-color: var(--text2); }

/* Modal */
.modal-backdrop {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 16px; backdrop-filter: blur(4px);
}
.modal-content {
  background-color: var(--card);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  max-width: 100%; max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
}

/* Loading */
.loading-container {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px;
}

/* Success page */
.success-icon { font-size: 70px; text-align: center; }
.success-title { font-size: 24px; font-weight: 800; color: var(--green); }

/* Strain grid (menu page) */
.strain-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 0 16px;
}

/* Product card */
.product-card {
  background: var(--card);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-image {
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0,229,255,0.1), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.product-placeholder {
  font-size: 48px;
  filter: drop-shadow(3px 3px 0 #000);
}
.product-badge {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--red);
}
.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-name {
  font-size: 15px; font-weight: 700; text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}
.product-description {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}
.product-price {
  font-size: 18px; font-weight: 800; color: var(--yellow); text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px;
}

/* SOTD badge */
.sod-badge {
  display: inline-block; background: var(--yellow); color: #000;
  font-size: 13px; padding: 4px 8px; font-weight: 700;
  box-shadow: 2px 2px 0 #000;
}

/* TZ #2 marketing badges (cycle #132) — colours mirror the inline
   badges in src/ui/screens/menu_screen.rs::render_strain_card so the
   shared `StrainCard` component's visual matches the home menu. */
.new-badge {
  display: inline-block; background: #00e5ff; color: #000;
  font-size: 13px; padding: 4px 8px; font-weight: 700;
  box-shadow: 2px 2px 0 #000;
}
.best-badge {
  display: inline-block; background: #ff9d00; color: #000;
  font-size: 13px; padding: 4px 8px; font-weight: 700;
  box-shadow: 2px 2px 0 #000;
}
.sale-badge {
  display: inline-block; background: #ff4757; color: #fff;
  font-size: 13px; padding: 4px 8px; font-weight: 700;
  box-shadow: 2px 2px 0 #000;
}
/* Sale-price strikethrough vs new-price emphasis. */
.strain-price .price-old {
  text-decoration: line-through;
  color: #888;
  margin-right: 8px;
}
.strain-price .price-sale {
  color: #ff4757;
  font-weight: 800;
}
.sod-card {
  background: var(--card);
  border: 4px solid var(--green);
  box-shadow: var(--pixel-shadow), 0 0 20px rgba(57,255,20,0.2);
  overflow: hidden;
}
.sod-image {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(57,255,20,0.1), transparent);
}
.sod-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.sod-content {
  padding: 12px;
}
.sod-name {
  font-size: 18px; font-weight: 700; text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
  margin-bottom: 4px;
}
.sod-type {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
}

/* QR card (profile) */
.qr-card {
  margin: 20px 0; padding: 28px 16px 24px;
  background: var(--bg2);
  border: 4px solid var(--green);
  box-shadow: 4px 4px 0 #000, 0 0 20px rgba(57,255,20,0.1);
  text-align: center;
}

/* Stats grid (profile) */
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Quick actions */
.quick-action {
  background: var(--bg2);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  padding: 12px 14px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}

/* Progress bar (profile tier) */
.tier-progress {
  background: var(--bg2);
  border: 4px solid var(--border);
  padding: 14px;
}
.progress-bar-track {
  height: 8px; background: rgba(0,0,0,0.4);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--yellow));
  transition: width 0.3s;
}

/* Referral link box */
.referral-box {
  background: var(--bg);
  border: 4px solid var(--border);
  padding: 6px 8px;
}

/* Language switcher */
.lang-btn {
  font-family: inherit;
  font-size: 13px; padding: 8px;
  border: 4px solid var(--border);
  cursor: pointer;
}
.lang-btn.active {
  background: rgba(57,255,20,0.08);
  color: var(--green);
  border-color: var(--green);
}

/* Quest/Adventure cards */
.quest-card {
  box-shadow: var(--pixel-shadow);
  cursor: pointer;
}

/* Admin stat */
.admin-stat {
  text-align: center; padding: 12px;
  background: var(--bg2);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
}
.admin-stat-value { font-size: 24px; font-weight: 800; }

/* Tech tree node */
.tech-node {
  background: var(--card);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  padding: 12px;
}

/* Garden plant card */
.plant-card {
  background: var(--card);
  border: 4px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes pulse { 0%, 80%, 100% { transform: scale(0); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }
@keyframes game-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes game-bounce { from { transform: scale(1); } to { transform: scale(1.1); } }
@keyframes floater-rise {
  0% { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-40px); opacity: 0; }
}

.fade-in { animation: fadeIn 0.15s ease-out; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Bottom nav (pixel art) */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; right: auto;
  width: 100%; max-width: var(--app-max-width);
  transform: translateX(-50%);
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  display: flex; align-items: stretch;
  justify-content: space-between;
  padding: 6px 2px calc(6px + var(--safe-bottom));
  z-index: 100;
}
.cart-badge {
  /* Ten tabs make each slot ~36px wide, so the old -8px overhang bled onto
     the neighbouring tab. Keep the badge inside its own slot. */
  position: absolute; top: -3px; right: 1px;
  background: var(--red); color: #fff;
  border: 1px solid var(--bg2);
  font-size: 9px; min-width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* Deal of day / Strain of day banners (from old bot) */
.deal-banner {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  border: 4px solid #ff6b35;
  box-shadow: 0 4px 15px rgba(255,107,53,0.4), var(--pixel-shadow);
  padding: 16px;
  cursor: pointer;
}

/* Sommelier card */
.sommelier-card {
  background: var(--card);
  border: 4px solid var(--purple);
  box-shadow: var(--pixel-shadow), 0 0 20px rgba(179,136,255,0.2);
  padding: 20px;
}

/* Fact card (home) */
.fact-card {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border: 2px solid var(--green);
  box-shadow: 0 0 12px rgba(16,185,129,0.2);
  padding: 16px;
}

/* Home page */
.home-page { padding: 0; }
.header {
  text-align: center;
  padding: 24px 16px 16px;
}
.logo {
  width: 80px; height: 80px;
  margin-bottom: 12px;
}
.subtitle {
  font-size: 13px; color: var(--text2);
}
.hero {
  padding: 16px;
}
.hero h2 {
  font-size: 16px; font-weight: 700;
  color: var(--green);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.categories {
  padding: 16px;
}
.categories h2 {
  font-size: 16px; font-weight: 700;
  color: var(--cyan);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.category-card {
  background: var(--card);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.category-card:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}
.category-icon {
  width: 48px; height: 48px;
  margin-bottom: 8px;
}
.category-icon.emoji {
  font-size: 40px;
  display: flex; align-items: center; justify-content: center;
}
.category-name {
  font-size: 12px; font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}
.quick-links {
  padding: 0 16px 16px;
}
.quest-banner {
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  border: 4px solid var(--purple);
  box-shadow: var(--pixel-shadow), 0 0 20px rgba(139,92,246,0.2);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.quest-icon {
  font-size: 36px;
}
.quest-text {
  flex: 1;
}
.quest-title {
  font-size: 16px; font-weight: 700; margin-bottom: 4px;
}
.quest-desc {
  font-size: 13px; color: var(--text2);
}

/* Admin tabs — always horizontal scroll, 13 tabs don't fit on any screen */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-radius: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tabs > button {
  flex: 0 0 auto !important; /* override inline flex:1 */
  white-space: nowrap;
  min-height: 44px;
}

@media (max-width: 380px) {
  .admin-tabs > button {
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
}

/* Ten tabs across a narrow phone leave ~36px per slot — too little for a
   readable label, so below 420px the icons carry the bar on their own.
   Above it the labels fit and stay. */
@media (max-width: 420px) {
  .nav-label { display: none; }
  .nav-icon { font-size: 21px; }
}

/* ── Modal (pixel art) ─────────────────────────────────────── */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 16px; backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease-out;
}
.modal {
  background-color: var(--card);
  border: 4px solid var(--border);
  box-shadow: var(--pixel-shadow);
  max-width: 100%; max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
  border-radius: 4px;
  animation: popIn 0.15s ease-out;
}
.modal-sm { max-width: 320px; }
.modal-md { max-width: 480px; }
.modal-lg { max-width: 640px; }
.modal-full { width: 100%; height: 100%; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 2px solid var(--border);
  background: var(--bg2);
}
.modal-title {
  font-size: 15px; font-weight: 700; color: var(--green);
  margin: 0; text-transform: uppercase; letter-spacing: 1px;
}
.modal-close {
  background: none; border: none; color: var(--text2);
  font-size: 20px; cursor: pointer; padding: 0 4px;
  line-height: 1; min-width: 32px; min-height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.modal-body {
  padding: 16px; overflow-y: auto;
  max-height: calc(90vh - 60px);
}

/* ── Toast notifications ───────────────────────────────────── */
.toast-container {
  position: fixed; top: 16px; right: 16px;
  z-index: 3000; display: flex; flex-direction: column; gap: 8px;
  max-width: 360px; width: calc(100% - 32px);
  pointer-events: none;
}
.toast {
  background: var(--card);
  border: 3px solid var(--border);
  box-shadow: var(--pixel-shadow);
  padding: 12px 16px; border-radius: 4px;
  display: flex; align-items: flex-start; gap: 10px;
  animation: fadeIn 0.2s ease-out, popIn 0.2s ease-out;
  pointer-events: auto;
}
.toast-success { border-color: var(--green); }
.toast-error   { border-color: var(--red); }
.toast-warning { border-color: var(--yellow); }
.toast-info    { border-color: var(--cyan); }
.toast-icon {
  font-size: 18px; flex-shrink: 0; margin-top: 1px;
}
.toast-body {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
}
.toast-title {
  font-size: 13px; font-weight: 700; color: var(--text);
}
.toast-message {
  font-size: 12px; color: var(--text2); line-height: 1.4;
}
.toast-close {
  background: none; border: none; color: var(--text2);
  font-size: 16px; cursor: pointer; padding: 0 2px;
  line-height: 1; min-width: 24px; min-height: 24px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 32px 16px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
}
.empty-state-icon { font-size: 40px; }
.empty-state-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin: 0;
}
.empty-state-description {
  font-size: 13px; color: var(--text2); line-height: 1.5;
  max-width: 260px;
}
.empty-state-action { margin-top: 4px; }

/* ── Skeleton loader ───────────────────────────────────────── */
.skeleton-loader {
  display: inline-block;
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
.skeleton-text   { width: 100%; height: 14px; }
.skeleton-text-sm{ width: 60%; height: 12px; }
.skeleton-title  { width: 70%; height: 18px; }
.skeleton-avatar { width: 36px; height: 36px; border-radius: 6px; }
.skeleton-avatar-lg { width: 64px; height: 64px; border-radius: 6px; }
.skeleton-card   { width: 100%; height: 80px; }
.skeleton-btn    { width: 80px; height: 36px; }
/* Content-specific skeleton placeholders (UX loop #2) */
.skeleton-pack    { width: 70%; flex: 0 0 70%; aspect-ratio: 1 / 1.35; border: 4px solid var(--accent); border-radius: 4px; box-shadow: 4px 4px 0 #000; }
.skeleton-sotd    { width: 100%; height: 220px; border: 4px solid #ff6b35; border-radius: 4px; box-shadow: 4px 4px 0 #000; }
.skeleton-event   { width: 100%; height: 120px; border: 4px solid var(--border); border-radius: 4px; box-shadow: 4px 4px 0 #000; }
.skeleton-orders  { width: 100%; height: 96px; border: 4px solid var(--border); border-radius: 4px; box-shadow: 4px 4px 0 #000; margin-bottom: 12px; }
.skeleton-member-card { width: 100%; height: auto; aspect-ratio: 1.586; border: 4px solid var(--border); border-radius: 12px; box-shadow: 4px 4px 0 #000; }
.skeleton-row {
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 0;
}

/* ── Service cards (transport, services): normal flow, no fixed heights ── */
.svc-head { padding: 16px 16px 0; }
.svc-head-title { font-weight: 700; font-size: 20px; color: var(--text); margin-bottom: 6px; }
.svc-head-sub { font-size: 14px; line-height: 1.4; color: var(--text2); margin-bottom: 20px; }
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 16px 24px;
  align-items: stretch;
}
.svc-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  height: auto;
}
.svc-pic { display: block; }
.svc-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  background: var(--bg2);
}
.svc-img.svc-brand { object-fit: contain; padding: 24px; box-sizing: border-box; }
.svc-body { flex: 1; padding: 12px 12px 0; }
.svc-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; line-height: 1.25; }
.svc-desc {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.svc-foot { padding: 12px; }
.svc-card .obj-btn { border-radius: 980px; margin: 0; }
@media (max-width: 420px) {
  .svc-grid { grid-template-columns: 1fr; }
}

/* Manager onboarding (/onboarding): layout only; colours come from the theme variables. */
.onb-card { margin: 12px 16px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.onb-progress { font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.onb-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.onb-text { font-size: 15px; line-height: 1.4; color: var(--text); margin-bottom: 16px; }
.onb-hint { font-size: 13px; color: var(--text2); margin: 8px 0 12px; }
.onb-error { font-size: 14px; color: var(--red); margin: 8px 0; }
.onb-upload { display: block; font-size: 14px; color: var(--text); margin-bottom: 8px; }
.onb-file { display: block; min-height: 44px; width: 100%; margin-top: 6px; color: var(--text); }
.onb-preview { display: block; width: 160px; height: 160px; object-fit: cover; margin: 12px 0; border: 1px solid var(--border); border-radius: 8px; }
.onb-consent { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--text); cursor: pointer; }
.onb-consent input { width: 22px; height: 22px; accent-color: var(--text); }
.onb-actions { display: flex; gap: 12px; margin-top: 16px; }
.onb-actions .givel-btn, .onb-actions .givel-btn-quiet { min-height: 44px; }

/* Training (/training): layout only; colours come from the theme variables.
   Screen sits above the fixed nav-bar, same contract as .main-content. */
.training-screen {
  min-height: 100vh;
  padding: 12px 12px calc(90px + var(--safe-bottom));
  max-width: var(--app-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.training-header { display: flex; flex-direction: column; gap: 10px; }
.training-title { font-size: 24px; font-weight: 700; color: var(--text); margin: 0; }
.header-actions { display: flex; }
.search-input {
  width: 100%; min-height: 44px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 980px;
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.search-input::placeholder { color: var(--text2); }
.filter-controls { display: flex; flex-direction: column; gap: 10px; }
.lesson-count { font-size: 13px; color: var(--text2); }
.lessons-grid { display: flex; flex-direction: column; gap: 12px; }
.lesson-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-sm);
}
.lesson-header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lesson-header h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.lesson-category {
  font-size: 11px; color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 3px 9px;
  white-space: nowrap;
}
.lesson-body { display: flex; flex-direction: column; gap: 4px; }
.lesson-body p { font-size: 13px; color: var(--text2); margin: 0; overflow-wrap: anywhere; }
.lesson-footer { display: flex; }
.lesson-btn {
  min-height: 40px; width: 100%;
  padding: 8px 16px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 980px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.lesson-btn:active { opacity: 0.85; }
.no-results { padding: 24px 8px; text-align: center; }
.no-results p { font-size: 14px; color: var(--text2); margin: 4px 0; }
.filter-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.filter-section h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.filter-section p { font-size: 13px; color: var(--text2); margin: 4px 0; }
.training-footer { padding: 4px 8px 0; }
.training-footer p { font-size: 12px; color: var(--text2); margin: 0; }

/* Lesson detail (/training/:id): layout only; colours from theme variables. */
.lesson-meta { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.meta-row { display: flex; gap: 6px; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.meta-label { color: var(--text2); }
.lesson-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Onboarding flow (/training/:id): cover -> step cards, real saved progress. */
.lesson-cover {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.lesson-cover-badge {
  align-self: flex-start;
  font-size: 11px; font-weight: 700;
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 3px 10px;
}
.lesson-cover-title { font-size: 20px; font-weight: 800; color: var(--text); margin: 0; }
.lesson-cover-desc { font-size: 14px; line-height: 1.5; color: var(--text2); margin: 0; }
.lesson-cover-meta { font-size: 12px; color: var(--text2); }
.lesson-cover-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.lesson-progress-line {
  height: 6px;
  background: var(--bg2);
  border-radius: 980px;
  overflow: hidden;
}
.lesson-progress-fill {
  height: 100%;
  background: var(--text);
  border-radius: 980px;
  transition: width .2s ease;
}
.lesson-progress-note { font-size: 12px; color: var(--text2); }
.lesson-back { display: inline-block; font-size: 13px; color: var(--text2); margin-top: 12px; padding: 8px 0; }

.lesson-steps { display: flex; flex-direction: column; gap: 10px; }
.step-counter { font-size: 12px; font-weight: 700; color: var(--text2); letter-spacing: .04em; text-transform: uppercase; }
.lesson-toc { display: flex; flex-direction: column; gap: 6px; }
.toc-item {
  display: flex; align-items: center; gap: 10px;
  text-align: left; width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--text2);
}
.toc-item.toc-current { border-color: var(--text); color: var(--text); font-weight: 700; }
.toc-num {
  flex: none;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 980px;
  background: var(--bg2);
  font-size: 11px; font-weight: 700;
}
.toc-current .toc-num { background: var(--text); color: var(--card); }
.toc-title { overflow-wrap: anywhere; }

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.step-title { font-size: 17px; font-weight: 800; color: var(--text); margin: 0 0 10px; }
.step-p { font-size: 14px; line-height: 1.55; color: var(--text); margin: 8px 0; overflow-wrap: anywhere; }
.step-sub { font-size: 13px; font-weight: 700; color: var(--text2); margin: 12px 0 4px; }
.step-list { margin: 8px 0; padding-left: 20px; }
.step-list li { font-size: 14px; line-height: 1.5; color: var(--text); margin: 4px 0; overflow-wrap: anywhere; }
.step-nav { display: flex; gap: 10px; justify-content: space-between; }
.step-nav .btn { flex: 1; }

.lesson-card:hover, .lesson-card:active {
  background: #000;
  border-color: #000;
}
.lesson-card:hover .lesson-header h3,
.lesson-card:hover .lesson-body p,
.lesson-card:hover .lesson-footer .lesson-btn {
  color: #fff;
}

/* Training: progress line, category chips, status, skeleton, CTA (colours from theme variables). */
.training-progress { font-size: 14px; font-weight: 600; color: var(--text); }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto; min-height: 36px; padding: 6px 14px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 980px;
  font-size: 13px; white-space: nowrap; cursor: pointer;
}
.cat-chip-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-header h3 { overflow-wrap: anywhere; min-width: 0; }
.lesson-status {
  font-size: 11px; color: var(--text2); white-space: nowrap;
  border: 1px solid var(--border); border-radius: 980px; padding: 3px 9px; flex: 0 0 auto;
}
.lesson-status-done { color: var(--bg); background: var(--text); border-color: var(--text); }
.lesson-skeleton { min-height: 120px; opacity: 0.5; animation: lesson-pulse 1.2s ease-in-out infinite; }
@keyframes lesson-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.7; } }
.training-cta {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; text-align: center;
}
.training-cta p { margin: 0; font-size: 14px; color: var(--text2); }

/* Landing page (specs/turbotbot/landing.t27): black and white, Light and Dark by tokens. */
.lp-page { background: var(--bg); color: var(--text); min-height: 100vh; }
.lp-wrap { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: 16px; }
.lp-narrow { max-width: 560px; }
.lp-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--border); }
.lp-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 1040px; margin-inline: auto; padding: 10px 16px; }
.lp-bar-actions { display: flex; align-items: center; gap: 8px; }
.lp-brand { font-weight: 800; letter-spacing: 0.06em; font-size: 15px; }
.lp-brand-place { font-weight: 400; color: var(--text2); }
.lp-link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.lp-sec { padding: 40px 0; }
.lp-alt { background: var(--bg2); }
.lp-h2 { font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.lp-h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.lp-p, .lp-small { font-size: 14px; color: var(--text2); }
.lp-grid3 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lp-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.lp-num { width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px; }
.lp-objs .obj-card { height: 100%; }
.lp-more { margin-top: 18px; text-align: center; }
.lp-chips { display: flex; gap: 8px; margin-bottom: 12px; }
.lp-chip { flex: 1; width: auto; padding: 9px 10px; }
.lp-field { width: 100%; margin-bottom: 10px; }
.lp-area { min-height: 90px; resize: vertical; }
.lp-err { color: var(--red); font-size: 13px; margin-top: 10px; }
.lp-foot { border-top: 1px solid var(--border); padding: 28px 0 40px; }
.lp-foot-in { display: flex; flex-direction: column; gap: 10px; }
.lp-foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (min-width: 720px) {
  .lp-grid3 { grid-template-columns: repeat(3, 1fr); }
}
/* The landing is a website page: it is not held to the narrow app column. */
html:has(.lp-page) #main { max-width: none; }

/* Landing buttons: one shape for every button (equal height, radius, centred text). */
.lp-btn { appearance: none; -webkit-appearance: none; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; height: 48px; min-width: 0; padding: 0 22px; margin: 0; border: 0; border-radius: 999px; font: 600 15px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none; text-align: center; cursor: pointer; width: auto; }
.lp-btn-fill { background: var(--text); color: var(--bg); box-shadow: inset 0 0 0 1px var(--text); }
.lp-btn-line { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.lp-btn:disabled { opacity: 0.5; cursor: default; }
.lp-chip { flex: 1; padding: 0 10px; height: 44px; }

/* Hero: full-bleed carousel of catalog photos, headline and buttons fixed on top. */
.lp-hero { position: relative; overflow: hidden; height: clamp(540px, 82vh, 700px); background: #0b0b10; color: #fff; outline-offset: -3px; }
.lp-slides, .lp-slide, .lp-par { position: absolute; inset: 0; }
.lp-slide { opacity: 0; transition: opacity 0.9s ease; }
.lp-slide.lp-on { opacity: 1; }
.lp-par { will-change: transform; }
.lp-par img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.2); }
.lp-motion .lp-slide.lp-on .lp-par img { animation: lp-drift 9s ease-in-out infinite alternate; }
@keyframes lp-drift { from { transform: translate3d(0, -8%, 0) scale(1.2); } to { transform: translate3d(0, 8%, 0) scale(1.2); } }
.lp-scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.78) 100%); }
.lp-hero-in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-block: 72px 88px; box-sizing: border-box; }
.lp-hero .lp-h1 { max-width: 880px; font-size: clamp(30px, 7.4vw, 58px); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; color: #fff; margin: 0; }
.lp-hero .lp-lead { margin: 18px 0 0; max-width: 520px; font-size: clamp(16px, 2.4vw, 19px); line-height: 1.45; color: rgba(255,255,255,0.88); }
.lp-cta { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; max-width: 320px; margin-top: 32px; }
.lp-hero .lp-btn-fill { background: #fff; color: #000; box-shadow: none; }
.lp-hero .lp-btn-line { background: rgba(0,0,0,0.25); color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.lp-arrow { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,0.4); color: #fff; font-size: 28px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 0 3px; }
.lp-arrow { top: auto; bottom: 10px; transform: none; }
.lp-arrow.lp-pp { top: 12px; bottom: auto; right: 12px; left: auto; transform: none; font-size: 15px; padding: 0; }
.lp-prev { left: 10px; }
.lp-next { right: 10px; }
.lp-dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 4px; }
.lp-dot { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.lp-dot::after { content: ""; position: absolute; left: 7px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.45); }
.lp-dot[aria-current="true"]::after { background: #fff; }
.lp-cap { position: absolute; z-index: 3; left: 0; right: 0; bottom: 48px; text-align: center; color: rgba(255,255,255,0.8); font-size: 13px; text-decoration: none; padding-inline: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-arrow:focus-visible, .lp-dot:focus-visible, .lp-btn:focus-visible, .lp-cap:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* In-app home (Telegram): shorter hero so the catalog list peeks below; buttons in one row. */
.lp-hero.lp-hero-app { height: clamp(340px, 58vh, 520px); }
.lp-hero-app .lp-hero-in { padding-block: 44px 84px; }
.lp-hero-app .lp-h1 { font-size: clamp(22px, 6.4vw, 34px); }
.lp-hero-app .lp-lead { display: none; }
.lp-hero-app .lp-cta { flex-direction: row; max-width: 360px; margin-top: 18px; }
.lp-hero-app .lp-cta .lp-btn { flex: 1; width: auto; min-width: 0; padding-inline: 8px; }
@media (min-width: 560px) {
  .lp-arrow { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lp-cta { flex-direction: row; justify-content: center; max-width: none; width: auto; }
  .lp-cta .lp-btn { width: 220px; }
  .lp-prev { left: 24px; }
  .lp-next { right: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-slide { transition: opacity 0.2s linear; }
  .lp-par img { animation: none !important; transform: none; }
}
/* Partner screen: colours from theme variables only. */
.partner-screen { padding: 16px; display: flex; flex-direction: column; gap: 12px; padding-bottom: 96px; }
.partner-title { margin: 0; font-size: 22px; font-weight: 700; color: var(--text); }
.partner-note { margin: 0; font-size: 14px; color: var(--text2); }
.partner-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.partner-skeleton { height: 120px; opacity: 0.5; }
.partner-error p, .partner-empty { margin: 0; font-size: 14px; color: var(--text2); text-align: center; }
.partner-label { font-size: 14px; font-weight: 600; color: var(--text); }
.partner-link-name { font-size: 12px; color: var(--text2); }
.partner-link { font-size: 13px; color: var(--text); word-break: break-all; }
.partner-actions { display: flex; gap: 8px; }
.partner-actions button { flex: 1; width: auto; }
.partner-count { display: flex; align-items: baseline; gap: 8px; color: var(--text); }
.partner-count-n { font-size: 28px; font-weight: 700; }
.partner-summary { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text2); }
.partner-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.partner-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--text); }
.partner-date { color: var(--text2); }

/* Landing part 2: five steps, trust cards, FAQ, honeypot, selects, version line. */
.lp-steps5 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.lp-grid4 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) {
  .lp-steps5 { grid-template-columns: repeat(5, 1fr); }
  .lp-grid4 { grid-template-columns: repeat(4, 1fr); }
}
.lp-faq { border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 0 16px; margin-bottom: 10px; }
.lp-faq[open] { padding-bottom: 6px; }
.lp-faq-q { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 15px; color: var(--text); list-style-position: outside; }
.lp-faq-q:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 6px; }
select.lp-field { appearance: none; -webkit-appearance: none; height: 48px; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.lp-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.lp-legal { margin-bottom: 12px; }
.lp-ver { opacity: 0.7; font-variant-numeric: tabular-nums; }
.lp-card[role="status"] { border-color: var(--text); }

/* Landing fixes: form font and radius, how-it-works steps, FAQ disclosure. */
.lp-field, select.lp-field, textarea.lp-field { font: inherit; font-size: 15px; line-height: 1.4; }
textarea.lp-field.lp-area { border-radius: 16px; padding: 10px 14px; min-height: 110px; resize: vertical; display: block; }
.lp-steps5 { list-style: none; margin: 0; padding: 0; }
.lp-steps5 > li { list-style: none; margin: 0; }
.lp-steps5 > li::marker { content: ""; }
.lp-steps5 .lp-card { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; row-gap: 4px; align-items: center; }
.lp-steps5 .lp-num { margin: 0; grid-row: 1; grid-column: 1; flex: none; }
.lp-steps5 .lp-h3 { grid-row: 1; grid-column: 2; margin: 0; font-weight: 800; }
.lp-steps5 .lp-p { grid-column: 1 / -1; margin: 6px 0 0; }
@media (min-width: 720px) {
  .lp-steps5 { gap: 14px; }
  .lp-steps5 .lp-card { display: block; }
  .lp-steps5 .lp-num { margin-bottom: 12px; }
  .lp-steps5 .lp-h3 { margin-bottom: 6px; }
  .lp-steps5 .lp-p { margin: 0; }
}
.lp-faq { padding: 0; overflow: hidden; }
.lp-faq[open] { padding-bottom: 0; }
.lp-faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; list-style: none; cursor: pointer; }
.lp-faq-q::-webkit-details-marker { display: none; }
.lp-faq-q::marker { content: ""; }
.lp-faq-q::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--text2); border-bottom: 2px solid var(--text2); transform: rotate(45deg); transition: transform 0.2s ease; margin-top: -3px; }
.lp-faq[open] > .lp-faq-q::after { transform: rotate(-135deg); margin-top: 3px; }
.lp-faq > .lp-p { padding: 0 22px 20px; margin: 0; }
/* Hero bottom edge: the scrim overlaps the box so a fractional height shows no un-darkened strip. */
.lp-hero { contain: paint; }
.lp-scrim { inset: -2px; }
