@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded.ttf") format("truetype"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0B0B12; --text: #F5F5F7; --accent: #C6FF3D;
  --card: #14141f; --line: rgba(255,255,255,.08); --muted: rgba(245,245,247,.55);
  --radius: 20px; --head: "Unbounded", system-ui, sans-serif; --body: "Montserrat", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 500 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: -20% -10% auto auto; width: 70vw; height: 70vw; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent); filter: blur(40px); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1, h2 { font-family: var(--head); font-weight: 800; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(28px, 5vw, 52px); line-height: 1.05; }
h2 { font-size: 20px; }
em { font-style: normal; color: var(--accent); }
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }

.btn { font: 700 14px var(--head); border: 0; border-radius: 999px; padding: 12px 20px; cursor: pointer; color: var(--text);
  background: rgba(255,255,255,.06); transition: transform .12s, background .2s, opacity .2s; }
.btn:hover { background: rgba(255,255,255,.12); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--bg); box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.sm { padding: 8px 14px; font-size: 12px; }
.btn.lg { padding: 16px 28px; font-size: 16px; }
.chip { font: 700 12px var(--head); padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.06); }

.brandmark { display: flex; align-items: center; gap: 10px; font: 900 13px/1 var(--head); letter-spacing: .02em; }
.brandmark .gear { width: 34px; height: 34px; display: inline-block; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M28 2h8l2 8a22 22 0 0 1 6 3l8-3 5 6-5 7a22 22 0 0 1 2 6l8 2v8l-8 2a22 22 0 0 1-2 6l5 7-5 6-8-3a22 22 0 0 1-6 3l-2 8h-8l-2-8a22 22 0 0 1-6-3l-8 3-5-6 5-7a22 22 0 0 1-2-6l-8-2v-8l8-2a22 22 0 0 1 2-6l-5-7 5-6 8 3a22 22 0 0 1 6-3zm4 17a13 13 0 1 0 0 26 13 13 0 0 0 0-26zm-4 6l11 7-11 7z' fill-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M28 2h8l2 8a22 22 0 0 1 6 3l8-3 5 6-5 7a22 22 0 0 1 2 6l8 2v8l-8 2a22 22 0 0 1-2 6l5 7-5 6-8-3a22 22 0 0 1-6 3l-2 8h-8l-2-8a22 22 0 0 1-6-3l-8 3-5-6 5-7a22 22 0 0 1-2-6l-8-2v-8l8-2a22 22 0 0 1 2-6l-5-7 5-6 8 3a22 22 0 0 1 6-3zm4 17a13 13 0 1 0 0 26 13 13 0 0 0 0-26zm-4 6l11 7-11 7z' fill-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat; }
.brandmark.big { font-size: 18px; gap: 14px; justify-content: center; }
.brandmark.big .gear { width: 56px; height: 56px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login-card { max-width: 520px; text-align: center; display: grid; gap: 22px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-right { display: flex; gap: 8px; align-items: center; }
.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 140px; display: grid; gap: 22px; }
.hero { padding: 18px 0 6px; display: grid; gap: 8px; }

.block { background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(16px, 3vw, 26px); display: grid; gap: 16px; min-width: 0; align-content: start; }
.block-head { display: flex; gap: 16px; align-items: center; }
.block-head p { margin: 2px 0 0; font-size: 13px; }
.num { font: 900 22px var(--head); color: var(--bg); background: var(--accent); border-radius: 14px; min-width: 52px; height: 52px; display: grid; place-items: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.av { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 9/14; background: #1b1b28; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s, border-color .15s; }
.av:hover { transform: translateY(-3px); }
.av.on { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.av img, .av video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av video { opacity: 0; transition: opacity .2s; }
.av:hover video { opacity: 1; }
.av .name { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 10px; font: 700 12px var(--head);
  background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.av .tick { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--bg);
  display: none; place-items: center; font-weight: 900; }
.av.on .tick { display: grid; }
.av.none { display: grid; place-items: center; text-align: center; padding: 12px; border: 2px dashed var(--line); background: transparent; }
.av.none.on { border-style: solid; }
.skeleton { aspect-ratio: 9/14; border-radius: 16px; background: linear-gradient(90deg, #16161f, #1f1f2c, #16161f); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.drop { display: grid; gap: 4px; place-items: center; padding: 30px; border: 2px dashed color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 18px; cursor: pointer; text-align: center; transition: background .2s; }
.drop:hover, .drop.over { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.up { display: grid; gap: 6px; margin-top: 6px; font-size: 13px; }
.bar-p { height: 6px; background: rgba(255,255,255,.08); border-radius: 9px; overflow: hidden; }
.bar-p i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.clip { position: relative; border-radius: 16px; overflow: hidden; background: #1b1b28; border: 2px solid transparent; cursor: pointer; }
.clip.on { border-color: var(--accent); }
.clip .th { aspect-ratio: 9/12; background: #111 center/cover; }
.clip .meta { padding: 10px; display: grid; gap: 4px; font-size: 12px; }
.clip .meta b { font: 700 12px var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip .desc { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clip .check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #fff; background: rgba(0,0,0,.4); display: grid; place-items: center; font-weight: 900; }
.clip .check { color: transparent; }
.clip.on .check { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.badge { display: inline-block; font: 700 10px var(--head); padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.08); }
.badge.acc { background: var(--accent); color: var(--bg); }
.badge.err { background: #ff3d57; color: #fff; }

textarea { width: 100%; resize: vertical; background: rgba(0,0,0,.35); color: var(--text); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; font: 500 15px/1.5 var(--body); outline: none; transition: border-color .2s; }
textarea:focus { border-color: var(--accent); }
.seg { display: inline-flex; background: rgba(255,255,255,.05); border-radius: 999px; padding: 4px; gap: 2px; justify-self: start; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 700 12px var(--head); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--bg); }

.phone { justify-self: center; width: 190px; aspect-ratio: 9/16; border-radius: 26px; padding: 8px; background: #000; border: 1px solid var(--line); }
.phone-screen { height: 100%; border-radius: 20px; background: linear-gradient(160deg, #1b2735, #0b0b12); display: grid; align-items: end; padding: 0 10px 60px; overflow: hidden; }
.cap { text-align: center; font: 800 15px/1.2 var(--head); text-transform: uppercase; text-shadow: 0 2px 0 #000, 0 0 6px #000; min-height: 38px; }
.cap span { display: inline-block; margin: 0 3px; transition: transform .12s; }
.cap span.hot { color: var(--accent); transform: scale(1.15); }
.cap.word { font-size: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips:empty { display: none; }
.chips button { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); border-radius: 999px; padding: 8px 12px;
  font: 600 12px var(--body); cursor: pointer; }
.chips button:hover { border-color: var(--accent); }
.chips button.mine { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chips button .x { margin-left: 6px; opacity: .5; }

.job { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); margin-bottom: 10px; }
.job .st { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.renders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.render { display: grid; gap: 8px; }
.render video { width: 100%; aspect-ratio: 9/16; border-radius: 16px; background: #000; }
.render a { font: 700 12px var(--head); color: var(--accent); text-decoration: none; }
.empty { color: var(--muted); font-size: 14px; }

.bar { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  width: min(1100px, calc(100% - 24px)); display: flex; gap: 16px; justify-content: space-between; align-items: center;
  padding: 10px 10px 10px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, #1a1a26 88%, transparent); backdrop-filter: blur(16px); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
@media (max-width: 640px) { .bar { border-radius: 22px; flex-direction: column; align-items: stretch; padding: 12px; } .bar .btn { width: 100%; } }
.toast { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 30; padding: 12px 18px; border-radius: 14px;
  background: #ff3d57; color: #fff; font-weight: 600; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.ok { background: var(--accent); color: var(--bg); }

@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .top { padding: 10px 14px; gap: 8px; }
  .brandmark { font-size: 11px; gap: 8px; }
  .brandmark .gear { width: 28px; height: 28px; }
  .top-right { gap: 6px; }
  .top-right .btn.sm { padding: 7px 10px; font-size: 11px; }
  #balance { display: none; }
  .clips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .avatars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .num { min-width: 44px; height: 44px; font-size: 18px; }
  .bar { left: 12px; right: 12px; transform: none; width: auto; }
}

/* вход: код сверки */
.login-hint { margin-top: 18px; }
.login-code { font-family: Unbounded, sans-serif; font-size: 40px; letter-spacing: .25em; color: var(--accent); margin: 6px 0; }
/* приветствие */
.welcome { margin-top: 16px; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, transparent); font-size: 14px; line-height: 1.5; }
/* чек расходов */
.spend { margin: 14px 0; padding: 16px 18px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(255,255,255,.03); max-width: 460px; }
.spend h3 { margin: 0 0 10px; font-size: 15px; }
.bill { display: grid; gap: 6px; font-size: 14px; }
.bill-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(255,255,255,.08); padding-bottom: 5px; }
.bill-row.total { border: 0; padding-top: 4px; color: var(--accent); }
/* история */
.history { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-content: start; }
.hp { border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 14px; background: rgba(255,255,255,.03); display: grid; gap: 10px; align-content: start; }
.hp.active { border-color: var(--accent); }
.hp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hp-head .btn, .hp-head .badge.acc { margin-left: auto; }
.hp h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.hp video { width: 100%; max-height: 360px; border-radius: 12px; background: #000; }
.hp .slides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hp .slides img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; display: block; }
.hp details summary { cursor: pointer; font-size: 13px; }
.hp details .bill { margin-top: 8px; font-size: 13px; }
.hp a { color: var(--accent); }

/* образы: сердечко и «▶» на карточке */
.av .heart { position: absolute; top: 8px; left: 8px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(11,11,18,.6); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); }
.av .heart.on { color: #ff4d6d; }
.av .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(11,11,18,.55); color: var(--accent); font-size: 16px; pointer-events: none; backdrop-filter: blur(6px); }
.av:hover .play { opacity: 0; }
.hidden-avatars details { margin-top: 14px; }
.hidden-avatars summary { cursor: pointer; font-size: 13px; color: var(--muted, #9a9aa8); }
.hid-list { display: grid; gap: 8px; margin-top: 10px; }
.hid { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.hid img { width: 36px; height: 48px; object-fit: cover; border-radius: 8px; }
.hid .btn { margin-left: auto; }
/* окно просмотра образа */
body.noscroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(5,5,10,.82); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 16px; }
.vw-card { position: relative; width: min(420px, 100%); max-height: 100%; display: grid; gap: 12px; background: #13131d;
  border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: 14px; }
.vw-media { position: relative; border-radius: 16px; overflow: hidden; background: #000; }
.vw-media video, .vw-media img { display: block; width: 100%; max-height: min(62vh, 640px); object-fit: contain; background: #000; }
.vw-note { position: absolute; left: 10px; bottom: 10px; margin: 0; background: rgba(0,0,0,.6); padding: 4px 8px; border-radius: 8px; }
.vw-x { position: absolute; top: 20px; right: 20px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(11,11,18,.7); color: #fff; font-size: 16px; cursor: pointer; }
.vw-nav { position: absolute; top: 45%; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(11,11,18,.6);
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.vw-nav.prev { left: 8px; } .vw-nav.next { right: 8px; }
.vw-info { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vw-info h3 { margin: 0; font-size: 16px; }
.vw-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vw-actions .primary { grid-column: 1 / -1; }
.vw-actions .fav-on { color: #ff4d6d; border-color: #ff4d6d; }
.vw-actions .danger { color: #ff8a8a; }
.vw-actions .btn { white-space: nowrap; font-size: 14px; padding-left: 10px; padding-right: 10px; }
.warn { color: #ff8a8a; }
