@font-face {
  font-family: 'Onest';
  font-weight: 400 600;
  font-display: swap;
  src: url(/static/fonts/onest-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Onest';
  font-weight: 400 600;
  font-display: swap;
  src: url(/static/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-weight: 400 600;
  font-display: swap;
  src: url(/static/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-weight: 400 600;
  font-display: swap;
  src: url(/static/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Grunge';
  src: url('/static/fonts/display.otf') format('opentype');
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --bg-2: #121214;
  --card: #151517;
  --line: rgba(255, 255, 255, .22);
  --text: #f4f4f4;
  --muted: #9b9b9f;
  --pink: #ff17a8;
  --pink-dark: #c4007d;
  --green: #5cff2e;
  --display: 'Grunge', 'Impact', sans-serif;
  --body: 'Onest', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

/* Зерно поверх всего, как на макете */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Царапины-полосы как на старой плёнке */
.scratches {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(90deg, transparent 0 7.5%, rgba(255,255,255,.07) 7.5% calc(7.5% + 1px), transparent 0),
    linear-gradient(90deg, transparent 0 81%, rgba(255,255,255,.06) 81% calc(81% + 1px), transparent 0),
    linear-gradient(90deg, transparent 0 96%, rgba(255,255,255,.05) 96% calc(96% + 2px), transparent 0);
}

.wrap { width: min(1240px, 100% - 32px); margin: 0 auto; position: relative; z-index: 2; }

/* ---------- Шапка ---------- */
.header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0;
}
.logo {
  font-family: var(--display);
  font-size: 34px; letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 0 1px #fff;
}
.logo span { color: var(--pink); }
.nav { display: flex; gap: 36px; white-space: nowrap; color: #d8d8d8; font-size: 17px; }
.nav a:hover { color: #fff; }
.header-actions { display: flex; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 46px; padding: 0 26px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  transition: transform .15s, background .15s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn-pink { background: var(--pink); color: #120010; }
.btn-pink:hover { box-shadow: 0 0 34px rgba(255, 23, 168, .55); }
.btn-green { background: var(--green); color: #061200; }
.btn-green:hover { box-shadow: 0 0 34px rgba(92, 255, 46, .5); }
.btn-ghost { border: 1.5px solid var(--line); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Граффити-декор ---------- */
.spray {
  position: absolute; pointer-events: none; z-index: 0;
  border-radius: 50%;
  filter: blur(60px);
}
.spray-pink { background: radial-gradient(circle, rgba(255, 23, 168, .55), transparent 65%); }
.spray-green { background: radial-gradient(circle, rgba(92, 255, 46, .45), transparent 65%); }
.ghost-text {
  position: absolute; pointer-events: none; z-index: 0;
  font-family: var(--display);
  color: rgba(255, 255, 255, .045);
  line-height: .9;
  white-space: nowrap;
}
.doodle { position: absolute; pointer-events: none; z-index: 1; }
.doodle path { fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Первый экран ---------- */
.hero { position: relative; padding: 10px 0 60px; text-align: center; }
.hero-title {
  position: relative;
  font-family: var(--display);
  font-weight: normal;
  color: var(--pink);
  font-size: clamp(40px, 9vw, 112px);
  line-height: .86;
  transform: rotate(-5deg);
  text-shadow: 0 0 40px rgba(255, 23, 168, .25);
  margin-top: 24px;
}
.hero-title .l2 { display: block; margin-left: .5em; }
.hero-sub {
  font-family: var(--display);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.05;
  transform: rotate(-4deg);
  margin: 16px auto 0;
  color: #fff;
  position: relative;
  display: inline-block;
}
.hero-sub .arrow { position: absolute; right: -54px; top: 0; width: 50px; }

/* ---------- Зона загрузки ---------- */
.drop-area { position: relative; margin: 40px auto 0; max-width: 720px; }
.drop {
  position: relative;
  background: var(--card);
  padding: 40px 32px 32px;
  text-align: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  transform: rotate(-.6deg);
}
.drop::before {
  content: ''; position: absolute; inset: 18px;
  border: 2px dashed rgba(255, 255, 255, .16);
  border-radius: 6px;
  transition: border-color .2s;
}
.drop:hover::before, .drop.over::before { border-color: var(--pink); }
.drop.over { background: #1d0b17; transform: rotate(0) scale(1.01); }
.drop-title {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 48px);
  line-height: .95;
  position: relative;
}
.drop-title b { color: var(--pink); font-weight: normal; }
.drop-hint { color: var(--muted); margin-top: 10px; position: relative; font-size: 14px; }
.drop-hint kbd {
  font-family: var(--body);
  background: #232326; border-radius: 6px; padding: 2px 8px; color: #fff; font-size: 14px;
}
.drop-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; position: relative; flex-wrap: wrap; }

.life { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; position: relative; }
.life-label { color: var(--muted); font-size: 14px; align-self: center; margin-right: 6px; }
.chip {
  height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 13px; color: #cfcfcf;
}
.chip:hover { border-color: #fff; color: #fff; }
.chip.on { background: #fff; border-color: #fff; color: #000; }
.drop-limits { margin-top: 18px; color: #6c6c70; font-size: 13px; position: relative; }

.drop-crown { position: absolute; top: -34px; right: 40px; width: 76px; transform: rotate(14deg); z-index: 3; }
.drop-x { position: absolute; bottom: -24px; left: 20px; width: 56px; z-index: 3; }

/* ---------- Результаты загрузки ---------- */
.results { max-width: 720px; margin: 28px auto 0; text-align: left; display: grid; gap: 16px; }
.result {
  display: grid; grid-template-columns: 150px 1fr; gap: 22px;
  background: var(--bg-2);
  border: 1px solid #1f1f22;
  border-radius: 18px;
  padding: 16px;
  animation: pop .35s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px); } }
.result-thumb {
  width: 150px; height: 150px; border-radius: 12px; overflow: hidden;
  background: #000 center/cover no-repeat;
  position: relative;
}
.result-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-body { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.result-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.result-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.progress { height: 6px; background: #232326; border-radius: 9px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; width: 0; background: var(--pink); transition: width .15s; }
.result-error { color: #ff6a6a; font-size: 14px; }

.links { display: grid; gap: 6px; }
.link-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: center; }
.link-row span { color: var(--muted); font-size: 13px; }
.link-row input {
  min-width: 0; height: 36px; padding: 0 12px;
  background: #0b0b0c; border: 1px solid #26262a; border-radius: 10px;
  color: #eaeaea; font: 13px ui-monospace, Menlo, monospace;
}
.link-row input:focus { outline: none; border-color: var(--pink); }
.copy {
  height: 36px; padding: 0 14px; border-radius: 10px;
  background: #222225; font-size: 13px; font-weight: 500;
  min-width: 108px;
}
.copy:hover { background: #2c2c30; }
.copy.done { background: var(--green); color: #061200; }

/* ---------- Разделы ---------- */
section { position: relative; }
.section-title {
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(42px, 6.5vw, 86px);
  line-height: .9;
  text-align: center;
  position: relative;
}
.section-title .pink { color: var(--pink); display: block; }
.section-title .green { color: var(--green); display: block; }
.section-lead { color: #d0d0d0; text-align: center; margin-top: 18px; font-size: 16px; }

.why { padding: 170px 0 60px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 70px; }
.card {
  position: relative;
  background: linear-gradient(160deg, #1c1c1f, #0f0f11);
  min-height: 420px;
  padding: 34px 30px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.card:nth-child(1) { transform: rotate(-3deg); }
.card:nth-child(2) { transform: rotate(2deg) translateY(40px); }
.card:nth-child(3) { transform: rotate(-2deg); }
.card-art { position: absolute; inset: 0; display: grid; place-items: center; opacity: .9; }
.card-art svg { width: 64%; max-height: 62%; }
.card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(transparent 35%, rgba(0, 0, 0, .85));
}
.card h3 {
  font-family: var(--display); font-weight: normal;
  font-size: 30px; line-height: 1; position: relative; z-index: 2;
}
.card p { position: relative; z-index: 2; color: #bcbcbf; margin-top: 10px; font-size: 15px; }
.card .mark { position: absolute; z-index: 3; }

/* ---------- Статистика ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 120px auto 0; max-width: 980px; }
.stat { text-align: center; padding: 26px 10px; border-top: 1.5px solid var(--line); }
.stat b { display: block; font-family: var(--display); font-weight: normal; font-size: clamp(40px, 6vw, 70px); color: var(--pink); line-height: 1; }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- Мои загрузки ---------- */
.mine { padding: 140px 0 40px; }
.mine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin-top: 50px; }
.tile {
  position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 14px;
  background: #141416;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s, filter .3s; filter: grayscale(.25); }
.tile:hover img { transform: scale(1.05); filter: none; }
.tile-bar {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  display: flex; gap: 6px; opacity: 0; transform: translateY(6px); transition: .2s;
}
.tile:hover .tile-bar, .tile:focus-within .tile-bar { opacity: 1; transform: none; }
.tile-bar button, .tile-bar a {
  flex: 1; height: 34px; border-radius: 9px; background: rgba(10, 10, 11, .85);
  backdrop-filter: blur(6px); font-size: 13px; display: grid; place-items: center;
}
.tile-bar .del:hover { background: #d0004f; }
.tile-bar a:hover, .tile-bar button:not(.del):hover { background: var(--pink); color: #120010; }
.empty { text-align: center; color: var(--muted); margin-top: 40px; }
.empty b { display: block; font-family: var(--display); font-weight: normal; font-size: 34px; color: #2e2e32; margin-bottom: 6px; }

/* ---------- Правила ---------- */
.rules { padding: 120px 0 40px; }
.rules-list { max-width: 820px; margin: 46px auto 0; display: grid; gap: 14px; counter-reset: r; }
.rules-list li {
  list-style: none; position: relative; padding: 18px 20px 18px 74px;
  background: var(--bg-2); border-radius: 14px; color: #d6d6d8;
}
.rules-list li::before {
  counter-increment: r; content: counter(r, decimal-leading-zero);
  position: absolute; left: 22px; top: 14px;
  font-family: var(--display); font-size: 28px; color: var(--pink);
}

/* ---------- Зелёный призыв ---------- */
.cta { padding: 180px 0 200px; text-align: center; overflow: hidden; }
.cta .section-title { font-size: clamp(48px, 8vw, 110px); }
.cta .btn { margin-top: 44px; }

.footer {
  border-top: 1px solid #1c1c1f; padding: 28px 0 40px;
  display: flex; justify-content: space-between; gap: 20px; color: #6f6f74; font-size: 14px; flex-wrap: wrap;
}

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 30px); opacity: 0;
  background: #fff; color: #000; padding: 12px 22px; border-radius: 999px;
  font-weight: 500; font-size: 15px; transition: .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Страница просмотра ---------- */
.view { padding: 30px 0 100px; display: grid; grid-template-columns: 1fr 380px; gap: 50px; align-items: start; }
.frame {
  position: relative; background: #111113; padding: 26px;
  transform: rotate(-.8deg);
}
.frame img { display: block; max-width: 100%; max-height: 74vh; margin: 0 auto; }
.view-side h1 {
  font-family: var(--display); font-weight: normal; font-size: 46px; line-height: .95;
  word-break: break-word;
}
.view-side h1 b { color: var(--pink); font-weight: normal; display: block; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px 0; }
.fact { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; }
.fact span { display: block; color: var(--muted); font-size: 12px; }
.fact b { font-weight: 600; font-size: 15px; }
.view-side .links .link-row { grid-template-columns: 1fr auto; }
.view-side .links .link-row span { grid-column: 1 / -1; }
.view-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.view-actions .btn { flex: 1; }

.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-family: var(--display); font-weight: normal; font-size: clamp(120px, 26vw, 300px); color: var(--pink); line-height: .8; transform: rotate(-6deg); }
.notfound p { font-family: var(--display); font-size: 32px; margin: 24px 0 36px; }

/* ---------- Мобильные ---------- */
@media (max-width: 1180px) { .nav { display: none; } }
@media (max-width: 1000px) {
  .cards { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
  .card:nth-child(2) { transform: rotate(2deg); }
  .view { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header { padding: 20px 0; }
  .logo { font-size: 26px; }
  .header-actions .btn-ghost { display: none; }
  .header-actions .btn { height: 40px; padding: 0 18px; font-size: 13px; }
  .hero-sub .arrow, .hero-crown { display: none; }
  .drop { padding: 34px 18px 28px; }
  .drop-crown { width: 56px; right: 10px; top: -26px; }
  .btn { height: 44px; padding: 0 22px; }
  .result { grid-template-columns: 1fr; }
  .result-thumb { width: 100%; height: 180px; }
  .link-row { grid-template-columns: 1fr auto; }
  .link-row span { grid-column: 1 / -1; }
  .copy { min-width: 0; }
  .stats { grid-template-columns: 1fr; gap: 0; }
  .why { padding-top: 120px; }
  .card { min-height: 340px; }
  .facts { grid-template-columns: 1fr 1fr; }
}

/* ---------- Страница результата: несколько файлов, удаление ---------- */
.btn-danger { border: 1.5px solid rgba(255, 70, 110, .5); color: #ff6b8e; }
.btn-danger:hover { background: #d0004f; border-color: #d0004f; color: #fff; }
.view-actions .btn { flex: 1 1 auto; }
.view + .view { border-top: 1px solid #1f1f22; padding-top: 50px; }
.batch-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 10px 0 30px;
}
.batch-title { font-family: var(--display); font-weight: normal; font-size: clamp(36px, 5vw, 56px); line-height: 1; }
.batch-title b { color: var(--pink); font-weight: normal; }
.batch-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.batch-bar[hidden] { display: none; }

/* ---------- Страница результата v2: сводка сверху, фото снизу ---------- */
.sum { position: relative; max-width: 860px; margin: 10px auto 0; }
.sum[hidden] { display: none; }
.sum-crown { width: 64px; right: 24px; top: -30px; transform: rotate(14deg); z-index: 3; }
.sum-card { background: var(--card); padding: 30px 32px 28px; transform: rotate(-.4deg); }
.sum-head { display: flex; flex-direction: column; gap: 12px; }
.sum-title { font-family: var(--display); font-weight: normal; font-size: clamp(32px, 4.4vw, 52px); line-height: .95; }
.sum-title b { color: var(--pink); font-weight: normal; }
.sum-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.sum-facts span {
  font-size: 13px; color: #cfcfd2; background: #1f1f22; border-radius: 999px; padding: 5px 12px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.seg { display: inline-flex; margin-top: 22px; background: #0b0b0c; border: 1px solid #26262a; border-radius: 999px; padding: 4px; }
.seg[hidden] { display: none; }
.seg button { height: 34px; padding: 0 16px; border-radius: 999px; font-size: 13px; color: #bdbdc0; }
.seg button.on { background: var(--pink); color: #120010; font-weight: 500; }
.sum-links { display: grid; gap: 8px; margin-top: 18px; }
.sum-row { display: flex; gap: 8px; align-items: center; }
.sum-row input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px;
  background: #0b0b0c; border: 1px solid #26262a; border-radius: 12px;
  color: #fff; font: 14px ui-monospace, Menlo, monospace;
}
.sum-row input:focus { outline: none; border-color: var(--pink); }
.sum-row .copy { height: 42px; border-radius: 12px; }
.sum-thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; background: #000; }
.sum-note { color: var(--muted); font-size: 13px; }
.sum-all { justify-self: start; margin-top: 4px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 40px 0 80px; }
.gallery.single { grid-template-columns: minmax(0, 860px); justify-content: center; }
.shot { background: var(--bg-2); border: 1px solid #1f1f22; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.shot-img { display: grid; place-items: center; background: #0b0b0c; aspect-ratio: 4 / 3; }
.gallery.single .shot-img { aspect-ratio: auto; max-height: 72vh; }
.shot-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.gallery.single .shot-img img { max-height: 72vh; }
.shot figcaption { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.shot-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shot-info b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-info span { color: var(--muted); font-size: 12px; }
.shot-actions { display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; background: #222225; display: grid; place-items: center; color: #e6e6e6; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--pink); color: #120010; }
.icon-btn.del:hover { background: #d0004f; color: #fff; }

@media (max-width: 640px) {
  .sum-card { padding: 24px 18px 22px; }
  .sum-row .copy { min-width: 0; padding: 0 12px; }
  .seg { display: flex; } .seg button { flex: 1; }
}
.gallery { max-width: 860px; margin-left: auto; margin-right: auto; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.shot-img { overflow: hidden; }
.shot-img img { width: 100%; height: 100%; object-fit: contain; }
.gallery.single .shot-img img { width: auto; height: auto; }
html, body { overflow-x: clip; }
.sum-links { grid-template-columns: minmax(0, 1fr); }
.sum-row { min-width: 0; }
.shot-img { position: relative; }
.shot-img img { position: absolute; inset: 0; }
.gallery.single .shot-img img { position: static; }
@media (max-width: 640px) { .sum-row .copy { font-size: 12px; padding: 0 10px; } }
@media (max-width: 640px) { .sum-crown { display: none; } }

/* ---------- Результат v3: общая ссылка сверху, поштучно снизу ---------- */
.sum { margin-bottom: 80px; }
.sum-block { margin-top: 24px; }
.sum-block[hidden] { display: none; }
.sum-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.sum-block + .sum-block { border-top: 1px solid #26262a; padding-top: 22px; }
a.sum-thumb { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; flex: none; background: #000; display: block; }
a.sum-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sum-row .icon-btn { width: 42px; height: 42px; border-radius: 12px; flex: none; }
@media (max-width: 640px) {
  .sum-row { flex-wrap: wrap; }
  .sum-row input { flex-basis: calc(100% - 50px); }
  .sum-row .copy { flex: 1; }
}
body { position: relative; }
@media (max-width: 640px) {
  .sum-row:not(:has(.sum-thumb)) input { flex-basis: 0; }
  .sum-row:not(:has(.sum-thumb)) .copy { flex: none; }
}

/* Кликабельная ссылка вместо поля + иконка копирования */
.sum-link {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px;
  display: flex; align-items: center;
  background: #0b0b0c; border: 1px solid #26262a; border-radius: 12px;
  color: #fff; font: 14px ui-monospace, Menlo, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color .15s, color .15s;
}
.sum-link:hover { border-color: var(--pink); color: var(--pink); }
.icon-btn.cp.done { background: var(--green); color: #061200; }
@media (max-width: 640px) {
  .sum-row { flex-wrap: nowrap; }
  .sum-row .sum-link { flex-basis: 0; padding: 0 10px; font-size: 13px; }
  .sum-row .icon-btn { width: 38px; height: 38px; }
  a.sum-thumb { width: 38px; height: 38px; }
}
@media (max-width: 640px) { .sum-link .host { display: none; } }

/* ---------- Альбом: просто фото одно под другим ---------- */
.album { max-width: 900px; margin: 10px auto 80px; display: grid; gap: 22px; }
.album-photo { position: relative; border-radius: 16px; overflow: hidden; background: #0b0b0c; }
.album-photo img { display: block; width: 100%; height: auto; }
.album-dl {
  position: absolute; right: 14px; bottom: 14px;
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(10, 10, 11, .75); backdrop-filter: blur(6px); color: #fff;
  opacity: 0; transition: opacity .2s, background .2s;
}
.album-dl svg { width: 20px; height: 20px; }
.album-photo:hover .album-dl, .album-dl:focus { opacity: 1; }
.album-dl:hover { background: var(--pink); color: #120010; }
@media (hover: none) { .album-dl { opacity: 1; } }

/* ---------- Настройки заливки: срок + пароль ---------- */
.opts {
  display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap;
  margin-top: 20px; position: relative; cursor: default;
}
/* Переключатель срока: одна «таблетка» */
.keep {
  display: inline-flex; align-items: center; gap: 2px;
  height: 38px; padding: 3px; border-radius: 999px;
  background: #0d0d0e; border: 1px solid #2a2a2e;
}
.keep-label { color: var(--muted); font-size: 13px; padding: 0 8px 0 12px; }
.keep-btn {
  height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; color: #cfcfd2; transition: background .15s, color .15s;
}
.keep-btn:hover { color: #fff; }
.keep-btn.on { background: #fff; color: #000; font-weight: 500; }

/* Пароль: переключатель + поле, которое появляется, когда он включён */
.pw { position: relative; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pw-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 6px 0 14px; border-radius: 999px;
  background: #0d0d0e; border: 1px solid #2a2a2e;
  color: #cfcfd2; font-size: 13px; cursor: pointer; user-select: none;
}
.pw-toggle:hover { color: #fff; }
.pw-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch {
  position: relative; width: 44px; height: 26px; border-radius: 999px;
  background: #2c2c30; transition: background .2s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #8a8a8e;
  transition: transform .2s, background .2s;
}
.pw-toggle input:checked + .switch { background: var(--pink); }
.pw-toggle input:checked + .switch::after { transform: translateX(18px); background: #fff; }
.pw-toggle input:focus-visible + .switch { outline: 2px solid #fff; outline-offset: 2px; }
.pw-lock { width: 15px; height: 15px; flex: none; color: #8a8a8e; }
.pw-field {
  display: none; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px 0 13px; border-radius: 999px;
  background: #0d0d0e; border: 1px solid #fff; cursor: text;
  animation: pw-in .2s ease-out;
}
.pw.open .pw-field { display: inline-flex; }
.pw.set .pw-field { border-color: var(--pink); }
.pw.set .pw-field:focus-within { border-color: #fff; }
.pw.set .pw-lock { color: var(--pink); }
.pw-field input {
  width: 150px; min-width: 0; background: none; border: 0; outline: none;
  color: #fff; font: 13px var(--body);
}
.pw-field input::placeholder { color: #77777c; }
.pw.shake .pw-field { animation: shake .35s; border-color: #ff6b8e; }
@keyframes pw-in { from { opacity: 0; transform: translateX(-6px); } }

/* Файлы, которые не картинки: подпись вместо превью */
.file-badge {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: #1d1d20; color: var(--green);
  font: 600 13px var(--body); letter-spacing: .04em;
}
a.sum-thumb .file-badge { font-size: 11px; }
.album-file {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid #232326; border-radius: 16px; padding: 16px 18px;
}
.album-file .file-badge { width: 56px; height: 56px; border-radius: 12px; flex: none; font-size: 14px; }
.album-file-info { min-width: 0; flex: 1; }
.album-file-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-file-size { color: var(--muted); font-size: 13px; margin-top: 2px; }
.album-file .btn { flex: none; }
@media (max-width: 560px) {
  .album-file .btn span { display: none; }
  .album-file .btn { padding: 0 14px; }
}

.sum-facts .fact-lock { color: var(--pink); background: rgba(255, 23, 168, .14); }

.lock { min-height: 64vh; display: grid; place-items: center; padding: 30px 0 60px; }
.lock-card {
  width: min(440px, 100%); background: var(--card); text-align: center;
  padding: 40px 32px 30px; transform: rotate(-.6deg);
}
.lock-icon { width: 46px; height: 46px; color: var(--pink); margin-bottom: 14px; }
.lock-title { font-family: var(--display); font-weight: normal; font-size: 40px; line-height: 1; }
.lock-title b { color: var(--pink); font-weight: normal; display: block; }
.lock-hint { color: var(--muted); font-size: 14px; margin-top: 12px; }
.lock-form { display: flex; gap: 8px; margin-top: 22px; }
.lock-form input {
  flex: 1; min-width: 0; height: 48px; padding: 0 16px;
  background: #0b0b0c; border: 1.5px solid #2a2a2e; border-radius: 999px;
  color: #fff; font: 15px var(--body); outline: none;
}
.lock-form input:focus { border-color: var(--pink); }
.lock-form .btn { height: 48px; padding: 0 22px; font-size: 14px; }
.lock-form .btn:disabled { opacity: .6; }
.lock-err { color: #ff6b8e; font-size: 14px; min-height: 20px; margin-top: 10px; }
.lock-card.shake { animation: shake .35s; }
@keyframes shake { 0%,100% { translate: 0 } 25% { translate: -8px 0 } 75% { translate: 8px 0 } }
@media (max-width: 560px) {
  .lock-card { padding: 32px 20px 24px; }
  .lock-title { font-size: 32px; }
}

/* Больше воздуха сверху и снизу в блоке загрузки */
.drop { padding: 68px 32px 60px; }
.drop-actions { margin-top: 26px; }
.opts { margin-top: 24px; }
.drop-limits { margin-top: 22px; }
@media (max-width: 560px) { .drop { padding: 50px 18px 44px; } }

/* Слой со свечением: не выходит за страницу и не даёт лишнюю прокрутку */
.bg-glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
