/* Ночная чёрно-белая тема: лунный свет, звёзды, никаких цветных акцентов. Всегда тёмная, независимо от темы Telegram. */
:root {
  --bg: #060708;
  --bg2: rgba(236, 234, 226, 0.055);
  --bg3: rgba(236, 234, 226, 0.09);
  --text: #ecebe5;          /* лунный белый, чуть тёплый */
  --hint: #8d8c87;
  --dim: #5d5c58;
  --link: #f4f2ea;
  --line: rgba(236, 234, 226, 0.09);
  --edge: rgba(236, 234, 226, 0.12);
  --moon: #f3f1e8;
  --accent: var(--moon);
  --on-accent: #0b0c0e;
  --good: var(--moon);
  --card: linear-gradient(180deg, #121316 0%, #0b0c0e 100%);
  --radius: 18px;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--text); font: 15px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { overflow: hidden; height: 100vh; height: var(--tg-viewport-stable-height, 100vh); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
::selection { background: var(--moon); color: var(--on-accent); }

/* ночное небо: звёзды и луна позади всего */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(90% 50% at 50% -15%, rgba(243, 241, 232, 0.06), transparent 70%),
    var(--bg); }
.sky::before, .sky::after { content: ""; position: absolute; inset: -50%; background-repeat: repeat; }
.sky::before {
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1px 1px at 140px 80px, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1.4px 1.4px at 90px 160px, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 230px 210px, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(1px 1px at 300px 40px, rgba(255,255,255,.45), transparent 60%);
  background-size: 340px 260px; opacity: .55; }
.sky::after {
  background-image:
    radial-gradient(1.6px 1.6px at 60px 120px, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 250px 20px, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 400px 190px, rgba(255,255,255,.7), transparent 60%);
  background-size: 470px 330px; animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .15; } to { opacity: .6; } }
/* луна — маленькая, светится рядом с названием */
.moon { display: inline-block; flex: none; width: 22px; height: 22px; border-radius: 50%; vertical-align: -3px; margin-right: 9px;
  background:
    radial-gradient(circle at 35% 42%, rgba(0,0,0,.13) 0 2.5px, transparent 3px),
    radial-gradient(circle at 62% 65%, rgba(0,0,0,.10) 0 3.5px, transparent 4px),
    radial-gradient(circle at 66% 30%, rgba(0,0,0,.09) 0 1.5px, transparent 2px),
    radial-gradient(circle at 40% 35%, #fdfcf6, #dcd9cd 70%, #b6b3a7);
  box-shadow: 0 0 10px rgba(243,241,232,.55), 0 0 34px rgba(243,241,232,.25); animation: glow 5s ease-in-out infinite alternate; }
@keyframes glow { from { box-shadow: 0 0 8px rgba(243,241,232,.45), 0 0 26px rgba(243,241,232,.18); }
                  to { box-shadow: 0 0 12px rgba(243,241,232,.65), 0 0 44px rgba(243,241,232,.30); } }

#app { height: 100%; position: relative; z-index: 1; }
.screen { display: none; height: 100%; overflow-y: auto; padding: 10px 16px 24px; }
.screen.active { display: block; }
#deck.screen.active { display: flex; flex-direction: column; overflow: hidden; }
.hidden { display: none !important; }

/* эмодзи — тоже в лунных тонах */
.chip, .opt, .pill, .round, .mode-title, .secondary, .ghost, .toast, .credits, .refine, .tag, .step-title { filter: grayscale(1); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; margin-bottom: 12px; }
.brand-wrap { display: flex; align-items: center; min-width: 0; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary { flex: 1; font-size: 13px; color: var(--hint); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghost { color: var(--link); font-weight: 500; padding: 6px 2px; white-space: nowrap; opacity: .9; }
.tag { font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--edge); color: var(--hint); white-space: nowrap; letter-spacing: .03em; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mode { text-align: left; padding: 14px 13px; border-radius: var(--radius); background: var(--bg2); border: 1px solid var(--edge);
  transition: border-color .2s, box-shadow .2s, transform .1s; }
.mode:active { transform: scale(.98); }
.mode.on { border-color: rgba(243,241,232,.75); box-shadow: 0 0 0 1px rgba(243,241,232,.25), 0 0 28px rgba(243,241,232,.10); }
.mode-title { font-family: var(--serif); font-weight: 600; font-size: 21px; margin-bottom: 4px; }
.mode-sub { font-size: 12px; color: var(--hint); line-height: 1.35; }

.ask { display: flex; flex-direction: column; gap: 8px; }
textarea { width: 100%; resize: none; border: 1px solid var(--edge); outline: 0; border-radius: 14px; padding: 12px 13px; background: var(--bg2); color: var(--text); font: inherit; transition: border-color .2s; }
textarea:focus { border-color: rgba(243,241,232,.45); }
textarea::placeholder { color: var(--dim); }
.primary { background: var(--moon); color: var(--on-accent); font-weight: 700; padding: 13px; border-radius: 14px; letter-spacing: .02em;
  box-shadow: 0 0 24px rgba(243,241,232,.18); }
.primary:active { transform: scale(.99); }
.secondary { background: var(--bg2); border: 1px solid var(--edge); font-weight: 600; padding: 12px; border-radius: 14px; flex: 1; }
.row { display: flex; gap: 8px; margin-top: 14px; }
.or { text-align: center; color: var(--dim); font-size: 11px; margin: 18px 0 10px; text-transform: uppercase; letter-spacing: .22em;
  display: flex; align-items: center; gap: 10px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.step { margin-bottom: 12px; }
.step-title { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 7px; opacity: .9; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 12px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--edge); font-size: 13px; font-weight: 500; transition: background .15s; }
.chip.on { background: var(--moon); color: var(--on-accent); border-color: var(--moon); font-weight: 700; box-shadow: 0 0 16px rgba(243,241,232,.2); }
.chip.off { opacity: .3; pointer-events: none; }
.foot { margin-top: 20px; font-size: 12px; color: var(--dim); text-align: center; }

/* колода */
.stack { position: relative; flex: 1; min-height: 0; margin: 2px 0 10px; }
.card { position: absolute; inset: 0; border-radius: 22px; background: var(--card); border: 1px solid var(--edge); overflow: hidden; display: flex; flex-direction: column;
        box-shadow: 0 18px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.4); will-change: transform; transition: transform .25s ease, opacity .25s ease; }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(80% 40% at 80% 0%, rgba(243,241,232,.06), transparent 70%); }
.card.next { transform: scale(.95) translateY(10px); opacity: .45; pointer-events: none; }
.card.dragging { transition: none; }
.card .media { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; flex: none; border-bottom: 1px solid var(--line); }
.card .media iframe, .card .media > .yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.card .media .yt-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font-size: 13px; letter-spacing: .05em; }
.card .info { position: relative; z-index: 2; flex: 1; padding: 14px 16px 12px; overflow-y: auto; touch-action: pan-y; user-select: none; }
.free-media { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 14px;
  background: radial-gradient(70% 90% at 75% 10%, #2a2b2e, #0d0e10 70%) !important; }
.free-media .bars { position: absolute; left: 14px; right: 14px; top: 22%; height: 48%; display: flex; align-items: center; gap: 3px; opacity: .5; }
.free-media .bars i { flex: 1; border-radius: 2px; background: linear-gradient(180deg, #f3f1e8, #6d6c68); }
.play { width: 56px; height: 56px; border-radius: 50%; background: var(--moon); color: var(--on-accent); font-size: 20px; font-weight: 800; display: grid; place-items: center;
  position: relative; z-index: 2; align-self: center; box-shadow: 0 0 30px rgba(243,241,232,.35); }
.progress { position: relative; z-index: 2; height: 4px; border-radius: 3px; background: rgba(255,255,255,.14); cursor: pointer; }
.progress .f { height: 100%; width: 0; border-radius: 3px; background: var(--moon); box-shadow: 0 0 8px rgba(243,241,232,.6); }
.progress .seg { position: absolute; top: -3px; height: 10px; border-radius: 3px; background: rgba(243,241,232,.25); }
.time { position: relative; z-index: 2; font-size: 11px; color: #bdbbb4; font-variant-numeric: tabular-nums; }

.t1 { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.1; letter-spacing: .005em; }
.t2 { font-size: 15px; color: color-mix(in srgb, var(--text) 78%, transparent); margin-top: 3px; }
.t3 { font-size: 12.5px; color: var(--hint); margin-top: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pill { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--edge); color: var(--hint); }
.pill.acc { border-color: rgba(243,241,232,.55); color: var(--text); }
.loopbox { display: flex; align-items: center; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.loopbox button { padding: 7px 11px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--edge); font-size: 12.5px; font-weight: 600; }
.loopbox button.on { background: var(--moon); color: var(--on-accent); border-color: var(--moon); }
.loopbox .rng { font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 500; color: var(--hint); margin-left: 4px; font-style: italic; }
.links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13px; font-weight: 600; }
.links a, .links button { color: var(--link); text-decoration: underline; text-decoration-color: rgba(243,241,232,.25); text-underline-offset: 3px; }
.dl { display: flex; gap: 8px; margin-top: 10px; }
.dl button { flex: 1; padding: 10px; border-radius: 12px; font-weight: 700; background: var(--moon); color: var(--on-accent); }
.dl button.alt { background: var(--bg2); color: var(--text); border: 1px solid var(--edge); }
.note { font-size: 11.5px; color: var(--dim); margin-top: 10px; }
.stamp { position: absolute; top: 18px; z-index: 5; font-family: var(--serif); font-weight: 700; font-size: 24px; padding: 2px 12px; border-radius: 10px; border: 2px solid; opacity: 0;
  transform: rotate(-12deg); letter-spacing: .06em; }
.stamp.like { left: 16px; color: var(--moon); border-color: var(--moon); text-shadow: 0 0 14px rgba(243,241,232,.7); box-shadow: 0 0 18px rgba(243,241,232,.25); }
.stamp.nope { right: 16px; color: var(--hint); border-color: var(--hint); transform: rotate(12deg); }

.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 24px; padding-bottom: 2px; }
.round { width: 58px; height: 58px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--edge); font-size: 22px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,.5); display: grid; place-items: center; transition: transform .1s; }
.round.sim { width: 46px; height: 46px; font-size: 20px; color: var(--text); }
.round.no { color: var(--hint); }
.round.yes { background: var(--moon); color: var(--on-accent); border-color: var(--moon); box-shadow: 0 0 26px rgba(243,241,232,.3); }
.round:active { transform: scale(.92); }
.hint { text-align: center; font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--hint); padding: 30px; font-family: var(--serif); font-size: 19px; }

/* ящик */
.tabs { display: flex; gap: 6px; margin-bottom: 10px; padding: 4px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--edge); }
.tab { flex: 1; padding: 8px; border-radius: 10px; font-weight: 600; font-size: 13px; color: var(--hint); }
.tab.active { color: var(--on-accent); background: var(--moon); }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--edge); text-align: left; width: 100%; }
.item .cov { width: 44px; height: 44px; border-radius: 50%; flex: none; background-size: cover; background-position: center; filter: grayscale(1) contrast(1.05);
  background-color: #1a1b1e; background-image: radial-gradient(circle, #d9d6ca 0 4px, #0a0a0b 5px 11px, #222 12px 13px, #0a0a0b 14px); box-shadow: 0 0 0 1px var(--edge); }
.item .tx { flex: 1; min-width: 0; }
.item .a { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .b { font-size: 12px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .lp { font-size: 12px; font-weight: 500; color: var(--hint); font-variant-numeric: tabular-nums; font-style: italic; }
.single { position: relative; height: calc(100% - 50px); }
.single .card { position: relative; inset: auto; height: 100%; }

/* загрузка: луна меняет фазы */
.loading { position: fixed; inset: 0; background: rgba(6,7,8,.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; z-index: 20; color: var(--hint);
  font-family: var(--serif); font-size: 19px; font-style: italic; text-align: center; padding: 30px; }
.disc { position: relative; width: 70px; height: 70px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 38% 38%, #fbfaf4, #d9d6ca 70%, #aeab9f);
  box-shadow: 0 0 30px rgba(243,241,232,.35), 0 0 90px rgba(243,241,232,.15); }
.disc::after { content: ""; position: absolute; top: -6%; width: 112%; height: 112%; border-radius: 50%; background: #060708;
  filter: blur(1.5px); animation: phase 2.4s ease-in-out infinite alternate; }
@keyframes phase { from { left: -118%; } to { left: -42%; } }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: rgba(243,241,232,.95); color: var(--on-accent);
  padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; z-index: 30; max-width: 86%; text-align: center;
  box-shadow: 0 0 30px rgba(243,241,232,.2); }

/* «Больше» */
.chip.more { background: transparent; border: 1px dashed rgba(243,241,232,.35); color: var(--hint); }
.sheet { position: fixed; inset: 0; z-index: 15; background: var(--bg); display: flex; flex-direction: column; padding: 10px 16px 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.sheet-head .summary { font-family: var(--serif); font-size: 18px; color: var(--text); }
#sheet-search { width: 100%; margin: 6px 0 10px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--edge); outline: 0; background: var(--bg2); color: var(--text); font: inherit; }
#sheet-search:focus { border-color: rgba(243,241,232,.45); }
#sheet-search::placeholder { color: var(--dim); }
.sheet-list { flex: 1; overflow-y: auto; padding-bottom: 24px; }
.letter { position: sticky; top: 0; background: var(--bg); font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--hint); padding: 10px 2px 4px; }
.opt { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 12px 6px; border-bottom: 1px solid var(--line); font-size: 15px; }
.opt.on { color: var(--moon); font-weight: 700; }
.opt.off { opacity: .3; pointer-events: none; }
.opt .tick { font-weight: 800; }
.nothing { color: var(--hint); text-align: center; padding: 30px 10px; }

/* редкость и подкрутки */
.rarity { display: flex; gap: 4px; margin: 4px 0 12px; padding: 4px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--edge); }
.rarity button { flex: 1; padding: 8px 4px; border-radius: 10px; font-size: 13px; color: var(--hint); transition: background .2s, color .2s; }
.rarity button.on { background: var(--moon); color: var(--on-accent); font-weight: 700; box-shadow: 0 0 16px rgba(243,241,232,.2); }
.rarity.hidden { display: none; }
.refine { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; flex-shrink: 0; }
.refine::-webkit-scrollbar { display: none; }
.refine button { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; font-size: 13px; background: var(--bg2); border: 1px solid var(--edge); color: var(--text); white-space: nowrap; }
.refine button.on { background: var(--moon); color: var(--on-accent); border-color: var(--moon); font-weight: 700; }
.credits { font-size: 13px; color: var(--hint); margin-top: 4px; }
.credits b { color: var(--text); font-weight: 600; }
.read { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; margin-top: 8px; }
.read span { color: var(--dim); font-style: italic; }
.read a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(243,241,232,.25); text-underline-offset: 3px; }
#deck .summary { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; line-height: 1.25; }

/* ===== Стекло как в iPhone: полупрозрачные панели, размытие того, что позади, светлый блик по краю ===== */
:root {
  --glass: rgba(255, 255, 255, 0.065);
  --glass-strong: rgba(28, 29, 32, 0.55);
  --glass-edge: rgba(255, 255, 255, 0.16);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 -1px 0 rgba(255, 255, 255, 0.05),
              inset 1px 0 0 rgba(255, 255, 255, 0.06), inset -1px 0 0 rgba(255, 255, 255, 0.06);
  --glass-drop: 0 10px 30px rgba(0, 0, 0, 0.45);
  --blur: blur(22px) saturate(160%);
}
/* мягкие пятна света позади — их и размывает стекло */
.sky .orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; will-change: transform; }
.sky .o1 { width: 340px; height: 340px; left: -120px; top: 12%; background: radial-gradient(circle, rgba(255,255,255,.26), transparent 70%);
  animation: drift1 26s ease-in-out infinite alternate; }
.sky .o2 { width: 300px; height: 300px; right: -110px; top: 48%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
  animation: drift2 32s ease-in-out infinite alternate; }
.sky .o3 { width: 260px; height: 260px; left: 25%; bottom: -120px; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
  animation: drift1 38s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { from { transform: translate(0, 0); } to { transform: translate(80px, -60px); } }
@keyframes drift2 { from { transform: translate(0, 0); } to { transform: translate(-70px, 50px); } }

/* крупные панели — настоящее матовое стекло */
.mode, textarea, .rarity, .tabs, .round, .secondary, #sheet-search, .tag {
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--glass-drop);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.mode { border-radius: 24px; }
.mode.on { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5);
  box-shadow: var(--glass-hi), 0 0 0 1px rgba(255,255,255,.12), 0 0 34px rgba(255,255,255,.10), var(--glass-drop); }
textarea { border-radius: 20px; }
textarea:focus { border-color: rgba(255,255,255,.4); }
.rarity, .tabs { border-radius: 999px; }
.rarity button, .tab { border-radius: 999px; }
.secondary { border-radius: 999px; }

/* «жидкое стекло» у главных кнопок: светлое, с бликом сверху */
.primary, .chip.on, .rarity button.on, .tab.active, .refine button.on, .round.yes, .loopbox button.on, .dl button:not(.alt), .play {
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(232,230,222,.86));
  color: var(--on-accent); border-color: rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 6px rgba(0,0,0,.12), 0 0 22px rgba(255,255,255,.18), 0 8px 22px rgba(0,0,0,.4); }
.primary { border-radius: 999px; }

/* мелкие кнопки — лёгкое стекло без размытия (так быстрее на слабых телефонах) */
.chip, .refine button, .loopbox button, .dl button.alt, .item, .pill {
  background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.035));
  border: 1px solid rgba(255,255,255,.13); box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }
.pill { box-shadow: none; }
.item { border-radius: 18px; }

/* карточка — толстое тёмное стекло */
.card { background: var(--glass-strong); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 24px 50px rgba(0,0,0,.6); border-radius: 28px; }
.card::before { background: linear-gradient(160deg, rgba(255,255,255,.07), transparent 40%); }
.card .media { border-radius: 27px 27px 0 0; overflow: hidden; }
.free-media { background: radial-gradient(70% 90% at 75% 10%, rgba(255,255,255,.10), rgba(0,0,0,.35) 70%) !important; }

/* круглые кнопки ленты */
.round { box-shadow: var(--glass-hi), 0 10px 26px rgba(0,0,0,.5); }

/* шапки — стеклянная полоса, которая остаётся сверху при прокрутке */
#home .top, #crate .top, #single .top { position: sticky; top: -10px; z-index: 5; margin: -10px -16px 12px; padding: 10px 16px;
  background: rgba(6,7,8,.45); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255,255,255,.07); }

/* всплывашки и загрузка */
.toast { background: rgba(255,255,255,.14); color: var(--text); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-hi), 0 12px 30px rgba(0,0,0,.5); border-radius: 999px; }
.loading { background: rgba(6,7,8,.55); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.sheet { background: rgba(6,7,8,.72); -webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%); }
.letter { background: transparent; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* если телефон не умеет размытие — делаем панели чуть плотнее, чтобы текст читался */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: #111214; }
  .sheet { background: var(--bg); }
  .mode, textarea, .rarity, .tabs, .round, .secondary, .toast { background: #15161a; }
}
