/* Мини-приложение Lazar — токены и детали по макетам znaniya/lazar_miniapp_dizajn/H*.dc.html. Тема только тёмная. */
:root {
  --bg: #0A0A0B; --bg-golos: #070708; --tile: #121214;
  --line: #24221E; --line2: #2A2620; --line3: #3A3226;
  --gold: #D8B978; --champagne: #EBD9AC; --gold-dark: #9F7B3F;
  --text: #F4EFE3; --text-soft: #CFC7B8; --muted: #9C968A; --muted2: #6E695F;
  --live: #0DE153; --ink: #1A1408;
  --sa-top: 0px; --sa-bottom: 0px;
  --molten: conic-gradient(from 200deg, #FFE8B2, #E0A24B, #6B3A0E, #F6C46A, #FFF3D9, #B57426, #3E1F06, #FFE8B2);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: 'Rubik', system-ui, sans-serif; font-size: 14px; min-height: 100dvh; overscroll-behavior: none; }
body.golos-rezhim { background: var(--bg-golos); }
button { font-family: inherit; cursor: pointer; }
a { color: var(--gold); }
.disp { font-family: 'Unbounded', 'Rubik', sans-serif; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.04em; text-transform: uppercase; }
.skryt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* сцена: сетка 26 px и тёплое свечение */
.setka { position: fixed; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px); background-size: 26px 26px; }
.svet { position: fixed; left: -140px; top: -160px; width: 460px; height: 420px; pointer-events: none; background: radial-gradient(closest-side, rgba(216,160,80,0.22), rgba(216,160,80,0) 75%); }
#app { position: relative; min-height: 100dvh; display: flex; flex-direction: column; padding-top: var(--sa-top); max-width: 520px; margin: 0 auto; }
.ekran { position: relative; flex-grow: 1; display: flex; flex-direction: column; padding-bottom: calc(110px + var(--sa-bottom)); }
.ekran.bez-menu { padding-bottom: calc(22px + var(--sa-bottom)); }

/* шар Lazar */
.shar { position: relative; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; border: none; padding: 0; background: #2A1806; color: #2A1806; }
.shar > i { position: absolute; left: -20%; top: -20%; width: 140%; height: 140%; background: var(--molten); animation: swirl 10s linear infinite; }
.shar > svg { position: relative; }
.shar.dyshit { animation: dyshit 4s ease-in-out infinite; }
.shar.slushaet { animation: pulse 1.4s ease-in-out infinite; }
.shar.bliki::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 32% 26%, rgba(255,250,235,0.8) 0%, rgba(255,250,235,0) 36%); }
@keyframes swirl { to { transform: rotate(360deg); } }
@keyframes dyshit { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes halo { 0%, 100% { box-shadow: 0 0 18px rgba(216,185,120,0.45); } 50% { box-shadow: 0 0 34px rgba(216,185,120,0.8); } }
@keyframes wave { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
@keyframes beg { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes poyavlenie { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.live { animation: blink 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* меню-пилюля */
.menu { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(22px + var(--sa-bottom)); width: calc(100% - 36px); max-width: 484px; height: 66px; border-radius: 33px; background: rgba(18,18,20,0.92); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 18px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.menu button.punkt { min-width: 52px; height: 44px; background: none; border: none; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em; font-size: 10px; color: var(--muted2); padding: 0; }
.menu button.punkt.akt { color: var(--gold); }
.menu .shar { width: 54px; height: 54px; animation: halo 3s ease-in-out infinite; }

/* плитки пульта */
.shapka { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 16px 0; }
.shapka .shar { width: 46px; height: 46px; box-shadow: 0 0 26px rgba(240,170,80,0.5); }
.shapka .kto { flex-grow: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.shapka .privet { font-size: 18px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.status { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.tochka { width: 6px; height: 6px; border-radius: 3px; background: var(--muted2); flex-shrink: 0; }
.tochka.rabotaet { background: var(--live); }
.pilyulya { flex-shrink: 0; white-space: nowrap; font-size: 11px; color: var(--champagne); padding: 7px 10px; border-radius: 12px; border: 1px solid var(--line3); }
.pilyulya.skoro { color: var(--muted); }
.brif { position: relative; margin: 12px 18px 0; font-size: 14px; line-height: 1.45; color: var(--text-soft); }
.na-da { position: relative; margin: 12px 14px 0; padding: 12px; border-radius: 22px; background: linear-gradient(135deg, #2A2116, #141210 75%); border: 1px solid #6B5432; display: flex; gap: 12px; align-items: center; color: var(--text); text-align: left; width: calc(100% - 28px); font-size: inherit; }
.na-da.tiho { background: var(--tile); border-color: var(--line); cursor: default; }
.na-da .mini { display: flex; gap: 4px; flex-shrink: 0; }
.na-da .mini span { width: 30px; height: 52px; border-radius: 7px; background: linear-gradient(180deg, #5C4026, #1B120A); background-size: cover; background-position: center; }
.na-da .mini span:nth-child(2) { background-image: linear-gradient(180deg, #4A3420, #1B120A); }
.na-da .mini span.foto { width: 42px; }
.na-da .chto { flex-grow: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.na-da .chto b { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.knopka-zoloto { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--gold); color: var(--ink); display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; border: none; }
.metka { font-size: 10px; color: var(--muted); }
.metka.zoloto { color: var(--gold); }
.plitki { position: relative; margin: 8px 14px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.plitka { border-radius: 22px; background: var(--tile); border: 1px solid var(--line); padding: 14px; color: var(--text); text-align: left; font-size: inherit; }
.plitka.shirokaya { grid-column: span 2; }
.plitka.reg { padding: 14px 16px; display: flex; justify-content: space-between; align-items: flex-end; height: 112px; }
.plitka.reg .stolb, .plitka.byudzhet .stolb { display: flex; flex-direction: column; gap: 6px; }
.chislo { font-size: 34px; font-weight: 700; line-height: 1; }
.chislo.malo { font-size: 20px; }
.chislo.pusto { color: var(--muted2); }
.skoro-metka { font-size: 10px; color: var(--muted2); }
.plitka.nedelya, .plitka.byudzhet { height: 116px; display: flex; flex-direction: column; justify-content: space-between; }
.kolco { display: flex; align-items: center; gap: 10px; }
.polosa { height: 6px; border-radius: 3px; background: var(--line); display: flex; overflow: hidden; }
.polosa > span { height: 100%; border-radius: 3px; background: var(--champagne); }
.komanda-sejchas { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.komanda-sejchas .ryad { display: flex; gap: 14px; }
.chlen { display: flex; gap: 10px; align-items: center; flex: 1 1 0; min-width: 0; }
.chlen .imya { display: flex; flex-direction: column; gap: 4px; flex-grow: 1; min-width: 0; font-size: 13px; }
.idyot { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; position: relative; }
.idyot::after { content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 100%; border-radius: 2px; background: var(--live); animation: beg 1.8s ease-in-out infinite; }
.idyot.zoloto::after { background: var(--gold); animation: none; width: 100%; }
.idyot.net::after { display: none; }
.tiho-tekst { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* лица */
.lico { flex-shrink: 0; border-radius: 50%; object-fit: cover; border: 2px solid var(--line2); background: #1A1814; display: inline-flex; align-items: center; justify-content: center; color: var(--champagne); font-family: 'Unbounded', sans-serif; font-weight: 600; overflow: hidden; }
.lico.rabotaet { border-color: var(--live); }
.lico.zoloto { border-color: var(--gold); }

/* общие заголовки разделов */
.zag { padding: 22px 18px 0; display: flex; flex-direction: column; gap: 4px; }
.zag h1 { margin: 0; font-size: 24px; font-weight: 700; }
.podpis { padding: 16px 18px 8px; font-size: 10px; color: var(--muted); }
.lica { display: flex; gap: 12px; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
.lica::-webkit-scrollbar, .etapy::-webkit-scrollbar { display: none; }
.lica button { flex-shrink: 0; width: 60px; display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--text-soft); font-size: 10px; text-align: center; background: none; border: none; padding: 0; }
.lica .imya-lica { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etapy { display: flex; gap: 6px; padding: 16px 14px 0; overflow-x: auto; scrollbar-width: none; }
.chip { flex-shrink: 0; font-size: 11px; padding: 8px 11px; border-radius: 14px; border: 1px solid var(--line); color: var(--muted); background: none; min-height: 34px; }
.chip.akt { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.spisok { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 0; }
.kartochka { border-radius: 20px; background: var(--tile); border: 1px solid var(--line); padding: 12px; display: flex; gap: 12px; align-items: center; color: var(--text); animation: poyavlenie .25s ease-out; }
.kartochka .telo { flex-grow: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kartochka .verh { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.kartochka .verh span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pusto-blok { margin: 18px; padding: 22px 18px; border-radius: 22px; border: 1px dashed var(--line2); color: var(--muted); font-size: 14px; line-height: 1.45; text-align: center; }

/* голос */
.golos-shapka { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 20px 18px 0; }
.krug-knopka { width: 38px; height: 38px; border-radius: 19px; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; color: var(--text); background: none; padding: 0; }
.golos-shar { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; }
.golos-shar .shar { width: 112px; height: 112px; box-shadow: 0 0 70px rgba(240,170,80,0.5), inset 0 -18px 36px rgba(50,20,0,0.6); }
.skazal { position: relative; padding: 0 22px; }
.skazal p { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 300; color: var(--champagne); white-space: pre-wrap; overflow-wrap: anywhere; }
.skazal p.tiho { font-size: 17px; color: var(--muted); }
.otvet-lazar { position: relative; margin: 16px 14px 0; padding: 14px; border-radius: 22px; background: var(--tile); border: 1px solid var(--line2); display: flex; flex-direction: column; gap: 12px; }
.otvet-lazar .shapka-karty { display: flex; justify-content: space-between; align-items: baseline; }
.tekst-lazar { font-size: 14px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.tekst-lazar p { margin: 0 0 8px; } .tekst-lazar p:last-child { margin: 0; }
.tekst-lazar h3 { margin: 4px 0 6px; font-size: 14px; font-weight: 600; color: var(--champagne); }
.tekst-lazar ul { margin: 0 0 8px; padding-left: 18px; }
.dve-knopki { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.knopka { min-height: 46px; border-radius: 23px; border: 1px solid var(--line3); background: transparent; color: var(--text); font-size: 15px; padding: 8px 14px; }
.knopka.glavnaya { border: none; background: linear-gradient(180deg, #EBD9AC, #D8B978); color: var(--ink); font-weight: 600; }
.knopka:disabled { opacity: 0.5; }
.varianty { display: flex; flex-direction: column; gap: 8px; }
.stroka-golosa { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(22px + var(--sa-bottom)); width: calc(100% - 28px); max-width: 492px; min-height: 62px; border-radius: 31px; background: var(--tile); border: 1px solid rgba(216,185,120,0.5); box-shadow: 0 0 26px rgba(216,185,120,0.2); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 20px; }
.stroka-golosa .volna { display: flex; gap: 4px; align-items: center; height: 28px; flex-shrink: 0; }
.stroka-golosa .volna span { width: 3px; height: 24px; border-radius: 2px; background: var(--gold); transform: scaleY(0.3); }
.stroka-golosa .volna span:nth-child(even) { background: var(--champagne); }
.stroka-golosa.zapis .volna span { animation: wave 1s ease-in-out infinite; }
.stroka-golosa .volna span:nth-child(2) { animation-delay: .1s; } .stroka-golosa .volna span:nth-child(3) { animation-delay: .2s; }
.stroka-golosa .volna span:nth-child(4) { animation-delay: .3s; } .stroka-golosa .volna span:nth-child(5) { animation-delay: .4s; }
.stroka-golosa .volna span:nth-child(6) { animation-delay: .5s; }
.stroka-golosa .chto { flex-grow: 1; font-size: 14px; color: var(--text-soft); min-width: 0; }
.stroka-golosa input, .list textarea { width: 100%; background: transparent; border: none; color: var(--text); font-family: inherit; font-size: 15px; outline: none; }
.krug-zoloto { flex-shrink: 0; width: 46px; height: 46px; border-radius: 23px; border: none; background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; }
.krug-tiho { flex-shrink: 0; width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--line3); background: none; color: var(--text-soft); display: flex; align-items: center; justify-content: center; padding: 0; }

/* на «да» */
.da-shapka { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 0; }
.shkala { margin: 12px 18px 0; display: flex; gap: 4px; }
.shkala span { flex-grow: 1; height: 3px; border-radius: 2px; background: var(--muted2); }
.shkala span.tut { background: var(--gold); }
.avtor { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px 0; }
.avtor .shar { width: 44px; height: 44px; border: 2px solid var(--gold); }
.avtor .chto { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.avtor .zagolovok { font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.avtor .citata { font-size: 14px; line-height: 1.4; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stopka { position: relative; flex-grow: 1; min-height: 300px; max-height: 420px; margin: 14px 18px 0; }
.stopka .zadnyaya { position: absolute; left: 18px; right: 18px; top: 0; bottom: 10px; border-radius: 26px; background: #16151A; border: 1px solid var(--line); transform: rotate(-3deg); }
.rabota { position: absolute; left: 0; right: 0; top: 10px; bottom: 0; border-radius: 26px; overflow: hidden; background: radial-gradient(120% 80% at 80% 10%, #5A4220 0%, #1A130B 55%, #0B0907 100%); border: 1px solid #4A3A24; box-shadow: 0 24px 50px rgba(0,0,0,0.55); touch-action: pan-y; transition: transform .25s ease-out; }
.rabota img, .rabota video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rabota .krug-fon { position: absolute; right: -60px; top: -40px; width: 240px; height: 240px; border-radius: 50%; border: 16px solid rgba(216,185,120,0.22); }
.rabota .nadpis { position: absolute; left: 22px; bottom: 24px; right: 22px; display: flex; flex-direction: column; gap: 10px; }
.rabota .nadpis .disp { font-size: 30px; line-height: 1.08; font-weight: 700; color: #FFF4E0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.chipy { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 18px 0; }
.chipy span { font-size: 10px; padding: 6px 9px; border-radius: 10px; border: 1px solid var(--line2); color: var(--text-soft); }
.tri-knopki { display: flex; justify-content: center; gap: 30px; padding: 16px 0 10px; }
.tri-knopki button { display: flex; flex-direction: column; align-items: center; gap: 6px; border: none; background: transparent; font-size: 12px; color: var(--text-soft); padding: 0; }
.tri-knopki .krug { width: 60px; height: 60px; border-radius: 30px; border: 1px solid var(--line3); display: flex; align-items: center; justify-content: center; color: var(--text); }
.tri-knopki .krug.zoloto { color: var(--gold); }
.tri-knopki .krug.da { border-color: var(--gold); background: rgba(216,185,120,0.08); }
.podskazka { align-self: center; font-size: 10px; color: var(--muted2); text-align: center; padding: 0 18px; }

/* файлы */
.poisk { position: relative; }
.poisk input { width: 100%; height: 46px; border-radius: 23px; border: 1px solid var(--line2); background: var(--tile); color: var(--text); font-family: inherit; font-size: 15px; padding: 0 50px 0 18px; outline: none; }
.poisk svg { position: absolute; right: 16px; top: 13px; }
.papki { display: flex; gap: 6px; flex-wrap: wrap; }
.mozaika { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 14px 14px 0; }
.mozaika .kolonka { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fajl { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: #121214; padding: 0; color: var(--text); display: flex; align-items: center; justify-content: center; animation: poyavlenie .25s ease-out; }
.fajl img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fajl.video { background: linear-gradient(180deg, #5C4026, #1B120A); border: none; }
.fajl.dokument { background: #16140F; border-color: var(--line3); font-size: 12px; color: var(--muted); padding: 10px 8px 28px; text-align: center; overflow-wrap: anywhere; }
.fajl .tag { position: absolute; left: 7px; bottom: 7px; font-family: 'JetBrains Mono', monospace; font-size: 9px; padding: 3px 6px; border-radius: 7px; background: rgba(10,10,11,0.75); color: var(--champagne); text-transform: uppercase; max-width: calc(100% - 14px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* бренд и документы */
.pasport { margin: 14px 14px 0; padding: 16px; border-radius: 22px; background: var(--tile); border: 1px solid var(--line); }
.pasport h3 { font-family: 'Unbounded', sans-serif; font-size: 14px; font-weight: 600; color: var(--champagne); margin: 14px 0 6px; }
.pasport h3:first-child { margin-top: 0; }
.deystvie { padding: 14px 14px 0; }
.deystvie .knopka { width: 100%; }

/* листы и просмотр */
.zatemnenie { position: fixed; inset: 0; z-index: 40; background: rgba(5,5,6,0.72); display: flex; align-items: flex-end; justify-content: center; animation: poyavlenie .2s ease-out; }
.list { width: 100%; max-width: 520px; border-radius: 28px 28px 0 0; background: #121214; border: 1px solid var(--line2); border-bottom: none; padding: 20px 18px calc(22px + var(--sa-bottom)); display: flex; flex-direction: column; gap: 14px; max-height: 86dvh; overflow-y: auto; }
.list .ruchka { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line3); }
.list textarea { min-height: 110px; border-radius: 18px; border: 1px solid var(--line2); padding: 14px; resize: none; background: #0E0E10; }
.list .master { display: flex; gap: 14px; align-items: center; }
.prosmotr { position: fixed; inset: 0; z-index: 45; background: #050506; display: flex; flex-direction: column; padding-top: var(--sa-top); }
.prosmotr .verh { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.prosmotr .verh span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted); }
.prosmotr .soderzhimoe { flex-grow: 1; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 0 0 calc(18px + var(--sa-bottom)); }
.prosmotr img, .prosmotr video { max-width: 100%; max-height: 100%; object-fit: contain; }
.prosmotr .pasport { align-self: flex-start; width: calc(100% - 28px); }

/* служебное: загрузка, ошибки, вход */
.toast { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); top: calc(14px + var(--sa-top)); padding: 10px 16px; border-radius: 16px; background: #1C1A17; border: 1px solid var(--line3); color: var(--text); font-size: 13px; max-width: calc(100% - 32px); animation: poyavlenie .2s ease-out; }
.zaglushka { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 28px; text-align: center; }
.zaglushka .shar { width: 96px; height: 96px; }
.zaglushka h2 { margin: 0; font-size: 20px; font-weight: 600; }
.zaglushka p { margin: 0; color: var(--muted); line-height: 1.45; }
.skelet { border-radius: 22px; background: linear-gradient(90deg, #121214, #19181A, #121214); background-size: 200% 100%; animation: blik 1.4s linear infinite; }
@keyframes blik { from { background-position: 200% 0; } to { background-position: -200% 0; } }
