/* «Популярное» on the home screen: job cards with a title on top and a small
   composition of finished results below. The grid is as wide as the composer,
   so a card is ~170px on desktop and ~175px on phones and looks the same. */
:root {
  --hj-card: #f2f3f6;
  --hj-card-hover: #eaecf1;
  --hj-paper: #ffffff;
  --hj-ink: #1b1e27;
  --hj-ink-soft: #dfe2ea;
  --hj-bubble: #0a7cff;
  --hj-shadow: 0 10px 22px rgba(17, 24, 39, 0.16);
}
body.dark-theme {
  --hj-card: #1c1c1f;
  --hj-card-hover: #242428;
  --hj-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
}

.welcome-tab-content:has(.hj-grid) { padding: 2px 0 8px; }
.hj-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

.hj-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch;
  width: 100%; height: 212px; padding: 14px 14px 0; border: 0; border-radius: 20px;
  background: var(--hj-card); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
  transition: background 0.2s ease; -webkit-tap-highlight-color: transparent;
}
.hj-card:hover { background: var(--hj-card-hover); }
.hj-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hj-wide { grid-column: span 2; }

.hj-tx { position: relative; z-index: 3; display: grid; gap: 4px; justify-items: start; }
.hj-wide .hj-tx { max-width: 42%; }
.hj-title { font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: -0.005em; text-wrap: balance; }
.hj-wide .hj-title { font-size: 17px; }
.hj-sub { font-size: 12px; line-height: 1.35; color: var(--text-secondary); text-wrap: pretty; }

.hj-art { position: absolute; left: 0; right: 0; top: 38%; bottom: 0; z-index: 1; pointer-events: none; }
.hj-wide .hj-art { top: 0; left: 42%; }
.hj-ph { position: absolute; overflow: hidden; border-radius: 10px; box-shadow: var(--hj-shadow); background: var(--hj-card-hover); }
.hj-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hj-lbl { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: #14161c; font-size: 10px; font-weight: 600; }
.hj-lift { transform: var(--r); transition: transform 0.25s ease; }
.hj-card:hover .hj-lift { transform: var(--r) translateY(-4px); }

/* Marketplace cards fan */
.hj-wb-l { width: 44%; aspect-ratio: 3 / 4; left: 2%; top: 24%; --r: rotate(-10deg); }
.hj-wb-r { width: 44%; aspect-ratio: 3 / 4; right: 0; top: 24%; --r: rotate(10deg); }
.hj-wb-c { width: 52%; aspect-ratio: 3 / 4; left: 23%; top: 9%; z-index: 2; --r: rotate(0deg); }
/* Avito listings */
.hj-av { position: absolute; width: 48%; overflow: hidden; border-radius: 12px; background: var(--hj-paper); color: var(--hj-ink); box-shadow: var(--hj-shadow); }
.hj-av-im { display: block; aspect-ratio: 4 / 3; }
.hj-av-im img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hj-av-meta { display: grid; gap: 1px; padding: 6px 8px 8px; }
.hj-av-pr { font-size: 13px; font-weight: 800; }
.hj-av-nm { font-size: 10px; font-weight: 500; line-height: 1.25; }
.hj-av-gr { font-size: 9px; font-weight: 500; color: #7a8090; }
.hj-av-b { right: 1%; top: 20%; --r: rotate(5deg); }
.hj-av-f { left: 1%; top: 9%; z-index: 2; --r: rotate(-4deg); }
/* Single results */
.hj-bn { width: 64%; aspect-ratio: 1; left: 18%; top: 6%; --r: rotate(-5deg); }
.hj-bp1 { width: 44%; aspect-ratio: 4 / 5; left: 7%; top: 16%; --r: rotate(-8deg); }
.hj-bp2 { width: 54%; aspect-ratio: 1; right: 6%; top: 5%; z-index: 2; --r: rotate(5deg); }
.hj-lg { width: 66%; aspect-ratio: 1; left: 17%; top: 5%; border-radius: 50%; --r: rotate(0deg); }
.hj-in { width: 86%; aspect-ratio: 4 / 3; left: 7%; top: 9%; --r: rotate(-3deg); }
.hj-st1 { width: 44%; aspect-ratio: 4 / 5; left: 7%; top: 16%; --r: rotate(-8deg); }
.hj-st2 { width: 52%; aspect-ratio: 4 / 5; right: 6%; top: 4%; z-index: 2; --r: rotate(6deg); }
/* Post */
.hj-post { position: absolute; width: 66%; left: 17%; top: 6%; display: grid; gap: 6px; padding: 7px; border-radius: 12px; background: var(--hj-paper); box-shadow: var(--hj-shadow); --r: rotate(-5deg); }
.hj-post-hd { display: flex; gap: 5px; align-items: center; }
.hj-post-avt { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, #ff8a5b, #a020f0); }
.hj-post-im { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 7px; }
.hj-post-im img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hj-ln { display: block; height: 5px; border-radius: 3px; background: var(--hj-ink-soft); }
/* Image generator collage */
.hj-g1 { width: 34%; aspect-ratio: 4 / 5; left: 8%; top: 12%; --r: rotate(-8deg); }
.hj-g3 { width: 34%; aspect-ratio: 4 / 5; right: 2%; top: 12%; --r: rotate(8deg); }
.hj-g2 { width: 62%; aspect-ratio: 16 / 9; left: 22%; top: 46%; z-index: 2; --r: rotate(0deg); }
/* Chat bubbles */
.hj-chat { position: absolute; left: 10px; right: 10px; top: 12%; display: grid; gap: 7px; }
.hj-bu { justify-self: end; max-width: 86%; padding: 6px 9px; border-radius: 12px 12px 4px 12px; background: var(--hj-bubble); color: #fff; font-size: 10.5px; font-weight: 500; line-height: 1.3; box-shadow: var(--hj-shadow); }
.hj-ba { justify-self: start; width: 88%; display: grid; gap: 5px; padding: 8px 9px; border-radius: 12px 12px 12px 4px; background: var(--hj-paper); color: var(--hj-ink); box-shadow: var(--hj-shadow); }
.hj-row { display: flex; gap: 5px; align-items: center; font-size: 9px; font-weight: 700; }
/* Remove background */
.hj-checker {
  position: absolute; width: 86%; aspect-ratio: 4 / 3; left: 7%; top: 9%; overflow: hidden; border-radius: 12px; box-shadow: var(--hj-shadow);
  background-color: #fff; background-image: conic-gradient(#e4e7ee 25%, #fff 0 50%, #e4e7ee 0 75%, #fff 0); background-size: 14px 14px; --r: rotate(-4deg);
}
.hj-checker img { position: absolute; left: 6%; top: 18%; width: 88%; height: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.18)); }
.hj-checker .hj-lbl { left: auto; right: 6px; }
/* Enhance: blurred half / sharp half */
.hj-en { width: 86%; aspect-ratio: 4 / 3.3; left: 7%; top: 8%; --r: rotate(3deg); }
.hj-en-blur { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.hj-en-blur img { filter: blur(3px) saturate(0.75) contrast(0.85); }
.hj-en-div { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; }
.hj-en-knob { position: absolute; left: 50%; top: 42%; width: 22px; height: 22px; margin-left: -11px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #14161c; font-size: 10px; font-weight: 700; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); }

.hj-more { display: none; margin: 12px auto 0; padding: 9px 18px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--bg-panel); color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }

@media (max-width: 768px) {
  .hj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-tab-content:not(.hj-expanded) .hj-extra { display: none; }
  .hj-more { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .hj-card, .hj-lift { transition: none; }
}

/* ---- Tabs row: five tabs scroll sideways on phones, centred when they fit ---- */
/* Sticks under the chat header while the cards scroll (2026-11-23). */
.welcome-tabs-container { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; justify-content: flex-start; padding: 8px 2px; margin-top: 8px; margin-bottom: 4px; position: sticky; top: 60px; z-index: 15; background: var(--bg-main); transition: box-shadow .2s ease; }
.welcome-tabs-container.is-stuck { box-shadow: 0 10px 12px -10px rgba(0, 0, 0, 0.18); }
body.dark-theme .welcome-tabs-container.is-stuck { box-shadow: 0 10px 12px -10px rgba(0, 0, 0, 0.7); }
@media (max-width: 768px) { .welcome-tabs-container { top: 56px; } }
.welcome-tabs-container::-webkit-scrollbar { display: none; }
.welcome-tabs-bg { flex: 0 0 auto; margin: 0 auto; }
.welcome-tab-btn { white-space: nowrap; }

/* ---- Video: B (photo → clip) and E (two clips) ---- */
.hj-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #1c1c1f; }
.hj-play { position: absolute; left: 6px; top: 6px; z-index: 2; display: inline-flex; gap: 4px; align-items: center; padding: 2px 7px 2px 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 10px; font-weight: 600; }
.hj-play::before { content: ""; border-left: 6px solid #fff; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.hj-vb1 { width: 42%; aspect-ratio: 3 / 4; left: 6%; top: 18%; --r: rotate(-8deg); }
.hj-vb2 { width: 56%; aspect-ratio: 3 / 4; right: 5%; top: 4%; z-index: 2; --r: rotate(5deg); }
.hj-ve1 { width: 50%; aspect-ratio: 3 / 4; left: 0; top: 14%; --r: none; }
.hj-ve2 { width: 50%; aspect-ratio: 3 / 4; right: 4%; top: 6%; z-index: 2; --r: none; }

/* ---- More single results ---- */
.hj-br1 { width: 66%; aspect-ratio: 4 / 5; left: 8%; top: 6%; --r: rotate(-5deg); }
.hj-br2 { width: 40%; aspect-ratio: 1; right: 6%; top: 34%; z-index: 2; border-radius: 50%; --r: rotate(0deg); }
.hj-nl1 { width: 40%; aspect-ratio: 4 / 5; left: 2%; top: 26%; --r: rotate(-8deg); }
.hj-nl2 { width: 52%; aspect-ratio: 4 / 5; right: 4%; top: 8%; z-index: 2; --r: rotate(5deg); }
.hj-tt { width: 56%; aspect-ratio: 4 / 5; left: 22%; top: 5%; --r: rotate(-4deg); }
.hj-food { width: 86%; aspect-ratio: 1; right: -16%; top: 16%; border-radius: 50%; --r: rotate(0deg); }
.hj-kcal { position: absolute; z-index: 3; left: 2%; top: 46%; display: grid; gap: 5px; justify-items: start; }
.hj-kcal b { padding: 5px 11px; border-radius: 999px; background: var(--hj-paper); color: var(--hj-ink); font-size: 15px; font-weight: 800; box-shadow: var(--hj-shadow); white-space: nowrap; }
.hj-kcal span { padding: 3px 8px; border-radius: 999px; background: var(--hj-paper); color: var(--hj-ink); font-size: 10px; font-weight: 600; box-shadow: var(--hj-shadow); white-space: nowrap; }
.hj-ring { position: absolute; left: 52%; top: 40%; width: 34%; aspect-ratio: 1; border: 2px dashed #fff; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.12); }
.hj-tag { width: 76%; aspect-ratio: 4 / 5; left: 12%; top: 5%; --r: rotate(-3deg); }
.hj-hit { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 6px; background: #ffcf33; color: #1b1e27; font-size: 11px; font-weight: 800; }
.hj-sale { position: absolute; right: 8px; top: 34px; padding: 4px 8px; border-radius: 999px; background: #e5383b; color: #fff; font-size: 13px; font-weight: 800; transform: rotate(8deg); }

/* ---- Paper: documents, resume, trainer, description ---- */
.hj-sheet { position: absolute; display: grid; align-content: start; gap: 6px; padding: 10px; border-radius: 10px; background: var(--hj-paper); color: var(--hj-ink); box-shadow: var(--hj-shadow); }
.hj-sh-t { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; }
.hj-sh-s { margin-top: -4px; font-size: 8px; color: #5b6070; }
.hj-desc, .hj-kp, .hj-cv { width: 80%; left: 10%; top: 6%; --r: rotate(-3deg); }
.hj-keys { display: flex; flex-wrap: wrap; gap: 4px; }
.hj-keys span { padding: 2px 6px; border-radius: 999px; background: #e8efff; color: #2f5fd0; font-size: 9px; font-weight: 600; }
.hj-price { font-size: 15px; font-weight: 800; }
.hj-doc-b { width: 46%; aspect-ratio: 3 / 4; left: 40%; top: 14%; --r: rotate(9deg); }
.hj-doc-f { width: 50%; aspect-ratio: 3 / 4; left: 12%; top: 8%; z-index: 2; --r: rotate(-6deg); }
.hj-sig { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.hj-stamp { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #3a63d8; border-radius: 50%; color: #3a63d8; font-size: 6px; font-weight: 700; opacity: 0.85; }
.hj-cv-hd { display: flex; gap: 6px; align-items: center; }
.hj-cv-av { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, #9ab6ff, #3a63d8); }
.hj-train { width: 82%; left: 9%; top: 6%; gap: 7px; --r: rotate(-3deg); }
.hj-wide .hj-train { top: 22%; }
.hj-tr { display: flex; gap: 6px; align-items: center; font-size: 10px; font-weight: 600; }
.hj-tr i { width: 12px; height: 12px; border: 1.5px solid #c5cad6; border-radius: 50%; }
.hj-tr i.on { border-color: #14845a; background: #14845a; }
.hj-tr b { margin-left: auto; font-weight: 700; }
.hj-menu { position: absolute; width: 70%; left: 15%; top: 5%; display: grid; gap: 5px; padding: 7px 7px 10px; border-radius: 10px; background: var(--hj-paper); color: var(--hj-ink); box-shadow: var(--hj-shadow); --r: rotate(-4deg); }
.hj-menu-im { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; }
.hj-menu-im img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hj-menu .hj-sh-t { text-align: center; }
.hj-menu-row { display: flex; justify-content: space-between; font-size: 9px; }
.hj-names { position: absolute; left: 10px; right: 10px; top: 8%; display: grid; gap: 6px; justify-items: start; }
.hj-names span { padding: 5px 9px; border-radius: 10px; background: var(--hj-paper); color: var(--hj-ink); font-size: 10.5px; font-weight: 600; box-shadow: var(--hj-shadow); }
.hj-names span:nth-child(2) { margin-left: 18%; }
.hj-names span:nth-child(3) { margin-left: 6%; }
.hj-stars { color: #f5a623; font-size: 11px; letter-spacing: 1px; }
.hj-mail { font-size: 9px; font-weight: 700; color: #5b6070; }

/* ---- Natal chart and matrix: drawn, no images ---- */
.hj-natal { position: absolute; width: 68%; aspect-ratio: 1; left: 16%; top: 4%; border-radius: 50%; background: repeating-conic-gradient(#e4e2f4 0 1deg, transparent 1deg 30deg), radial-gradient(circle, #fff 0 54%, #efeafd 55% 100%); border: 2px solid #b7a9ec; box-shadow: var(--hj-shadow); --r: rotate(0deg); }
.hj-natal-in { position: absolute; inset: 22%; border: 1.5px solid #b7a9ec; border-radius: 50%; }
.hj-natal i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #7a4dff; transform: rotate(var(--a)) translate(0, -300%); }
.hj-natal-tag { position: absolute; z-index: 3; left: 8%; bottom: 10%; padding: 3px 8px; border-radius: 999px; background: var(--hj-paper); color: var(--hj-ink); font-size: 10px; font-weight: 700; box-shadow: var(--hj-shadow); }
.hj-matrix { position: absolute; width: 64%; aspect-ratio: 1; left: 18%; top: 6%; --r: rotate(0deg); }
.hj-mx-sq { position: absolute; inset: 14%; border: 2px solid #e07aa8; border-radius: 4px; background: rgba(224, 122, 168, 0.08); }
.hj-mx-rot { transform: rotate(45deg); border-color: #7a8cf0; background: rgba(122, 140, 240, 0.08); }
.hj-matrix b { position: absolute; left: var(--x); top: var(--y); display: grid; place-items: center; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: var(--hj-paper); color: var(--hj-ink); font-size: 10px; box-shadow: var(--hj-shadow); }
.hj-matrix .hj-mx-c { width: 28px; height: 28px; margin: -14px; background: #7a4dff; color: #fff; }

.hj-cv16 { width: 88%; aspect-ratio: 16 / 9; left: 6%; top: 14%; --r: rotate(-4deg); }
/* Cards are links */
a.hj-card { text-decoration: none; box-sizing: border-box; }
