:root {
  --bg: #120b24;
  --bg2: #1c1236;
  --panel: #251a45;
  --panel2: #30235a;
  --line: #3e2f70;
  --text: #f6f1ff;
  --muted: #a99bd0;
  --pink: #ff4d8d;
  --orange: #ff9a3d;
  --yellow: #ffd93d;
  --green: #3ee08f;
  --cyan: #3dd6ff;
  --violet: #9b6bff;
  --red: #ff5470;
  --r: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Nunito, "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, #ff4d8d33, transparent 60%),
    radial-gradient(800px 500px at -10% 20%, #3dd6ff22, transparent 60%),
    radial-gradient(700px 600px at 50% 120%, #9b6bff33, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
#app { max-width: 1040px; margin: 0 auto; padding: 22px 18px 80px; }

/* ---------- кнопки: пухлые, с «дном», проваливаются при нажатии ---------- */
.btn {
  --c: var(--violet); --d: #5b35c9;
  position: relative; border: 0; cursor: pointer; user-select: none;
  padding: 13px 22px; border-radius: 16px; font-weight: 900; letter-spacing: .2px;
  color: #fff; background: var(--c);
  box-shadow: 0 6px 0 var(--d), 0 10px 22px #0006;
  transform: translateY(0);
  transition: transform .07s ease, box-shadow .07s ease, filter .15s;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 7px 0 var(--d), 0 14px 26px #0007; }
.btn:active, .btn.pressed { transform: translateY(5px); box-shadow: 0 1px 0 var(--d), 0 3px 8px #0006; filter: brightness(.97); }
.btn:disabled { opacity: .45; cursor: default; filter: saturate(.5); transform: none; }
.btn.pink { --c: var(--pink); --d: #c2255f; }
.btn.green { --c: #22c97a; --d: #14935a; }
.btn.orange { --c: var(--orange); --d: #d06d14; }
.btn.cyan { --c: #1fb8e6; --d: #0f84a8; }
.btn.red { --c: var(--red); --d: #c22b47; }
.btn.ghost { --c: var(--panel2); --d: #1a1136; color: var(--text); }
.btn.sm { padding: 8px 14px; border-radius: 12px; font-size: 14px; box-shadow: 0 4px 0 var(--d), 0 6px 14px #0005; }
.btn.sm:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--d); }
.btn.icon { padding: 8px 11px; }

/* ---------- шапка ---------- */
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.logo { font-size: 26px; font-weight: 900; letter-spacing: -.5px; margin-right: auto; display: flex; align-items: center; gap: 10px; }
.logo b { background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo span.emo { font-size: 30px; display: inline-block; animation: wob 3s ease-in-out infinite; }
@keyframes wob { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg) scale(1.1); } }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px;
  background: var(--panel); border: 2px solid var(--line); font-weight: 900; font-size: 15px;
}
.chip i { font-style: normal; font-size: 18px; }
.chip.fire { border-color: #ff9a3d88; color: var(--orange); }
.chip.xp { border-color: #ffd93d77; color: var(--yellow); }
.chip.ok { border-color: #3ee08f66; color: var(--green); }
.chip.bump { animation: bump .45s cubic-bezier(.3,2,.5,1); }
@keyframes bump { 40% { transform: scale(1.25) rotate(-3deg); } }

/* ---------- главная ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 30px; padding: 30px;
  background: linear-gradient(120deg, #ff4d8d, #ff7a59 45%, #ffb03d);
  box-shadow: 0 20px 50px #ff4d8d44, inset 0 -8px 0 #0002;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.hero::after { content: "🌮"; position: absolute; right: -14px; bottom: -40px; font-size: 190px; opacity: .22; transform: rotate(-18deg); pointer-events: none; }
.hero h1 { margin: 0 0 6px; font-size: 32px; font-weight: 900; letter-spacing: -.6px; text-shadow: 0 2px 0 #0002; }
.hero p { margin: 0; opacity: .95; font-size: 16px; }
.hero .grow { flex: 1; min-width: 240px; position: relative; z-index: 1; }
.hero .btn { --c: #fff; --d: #d9b6c6; color: #e02a6f; font-size: 20px; padding: 18px 30px; border-radius: 20px; z-index: 1; }
.hero .btn.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 6px 0 var(--d), 0 0 0 14px #ffffff26, 0 10px 22px #0006; } }
.pills { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pill { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; background: #0003; }
.pill.n { background: #3dd6ff2e; color: #9be8ff; }
.pill.l { background: #ff9a3d2e; color: #ffc48a; }
.pill.r { background: #3ee08f2e; color: #8ff0bd; }
.hero .pill { background: #ffffff30; color: #fff; }

.add { display: flex; gap: 10px; margin: 24px 0 8px; }
.add input {
  flex: 1; min-width: 0; padding: 14px 18px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--bg2); outline: none; font-weight: 700; transition: border-color .15s, box-shadow .15s;
}
.add input:focus { border-color: var(--violet); box-shadow: 0 0 0 5px #9b6bff33; }
.add input::placeholder { color: #7f71a8; }
.hint { color: var(--muted); font-size: 13.5px; margin: 0 4px 22px; font-weight: 600; }
h2 { font-size: 20px; font-weight: 900; margin: 26px 4px 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.deck {
  position: relative; border-radius: var(--r); overflow: hidden; background: var(--panel);
  border: 2px solid var(--line); display: flex; flex-direction: column;
  transition: transform .18s cubic-bezier(.3,1.6,.5,1), border-color .15s, box-shadow .2s;
  animation: pop .4s cubic-bezier(.3,1.6,.5,1) backwards;
}
.deck:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--violet); box-shadow: 0 18px 36px #0007; }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(14px); } }
.deck .thumb { height: 190px; background: #0004 center/cover; position: relative; }
.deck .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, var(--panel)); }
.badge { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; background: #000a; backdrop-filter: blur(6px); }
.deck .x { position: absolute; top: 8px; right: 8px; z-index: 1; width: 30px; height: 30px; border-radius: 50%; border: 0; background: #000a; cursor: pointer; opacity: 0; transition: opacity .15s, transform .15s; }
.deck:hover .x { opacity: 1; }
.deck .x:hover { transform: scale(1.15) rotate(90deg); background: var(--red); }
.deck .body { padding: 0 16px 16px; margin-top: -26px; position: relative; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.deck .t { font-size: 17px; font-weight: 900; line-height: 1.2; }
.deck .u { font-size: 13px; color: var(--muted); font-weight: 700; margin-top: -6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck .row { display: flex; gap: 8px; margin-top: auto; }
.deck .row .btn:first-child { flex: 1; }
.deck.busy .thumb { background: linear-gradient(110deg, #30235a 30%, #4a3790 50%, #30235a 70%) 0 0/200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.stage { font-size: 14px; color: var(--cyan); }
.stage::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.err { font-size: 13px; color: #ff9aac; font-weight: 700; }
.empty { text-align: center; padding: 50px 20px; border: 3px dashed var(--line); border-radius: 30px; color: var(--muted); }
.empty .big { font-size: 60px; display: block; margin-bottom: 8px; animation: wob 3s ease-in-out infinite; }

/* ---------- изучение ---------- */
.study { max-width: 720px; margin: 0 auto; }
.sbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.prog { flex: 1; height: 18px; border-radius: 999px; background: var(--panel); border: 2px solid var(--line); overflow: hidden; }
.prog > div { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--cyan)); transition: width .5s cubic-bezier(.3,1.5,.5,1); position: relative; }
.prog > div::after { content: ""; position: absolute; left: 8px; right: 8px; top: 3px; height: 4px; border-radius: 9px; background: #fff6; }
.combo { font-weight: 900; color: var(--orange); min-width: 70px; text-align: right; font-size: 18px; }
.combo.hot { animation: bump .45s cubic-bezier(.3,2,.5,1); }

.card {
  position: relative; background: var(--panel); border: 2px solid var(--line); border-radius: 30px;
  padding: 28px; box-shadow: 0 24px 60px #0008, inset 0 -8px 0 #0003;
  animation: cardin .38s cubic-bezier(.25,1.5,.5,1);
}
@keyframes cardin { from { opacity: 0; transform: translateY(26px) scale(.94) rotate(1.5deg); } }
.card.out { animation: cardout .2s ease-in forwards; }
@keyframes cardout { to { opacity: 0; transform: translateX(-60px) rotate(-5deg); } }
.card.shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translateX(-10px) rotate(-1deg); } 40% { transform: translateX(9px) rotate(1deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.card.win { border-color: var(--green); box-shadow: 0 0 0 6px #3ee08f33, 0 24px 60px #0008, inset 0 -8px 0 #0003; }
.card.lose { border-color: var(--red); box-shadow: 0 0 0 6px #ff547033, 0 24px 60px #0008, inset 0 -8px 0 #0003; }
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.tag { padding: 4px 11px; border-radius: 999px; font-weight: 900; font-size: 12px; background: var(--panel2); color: var(--text); }
.tag.new { background: #3dd6ff2e; color: #9be8ff; }
.tag.learning, .tag.relearning { background: #ff9a3d2e; color: #ffc48a; }
.tag.review { background: #3ee08f2e; color: #8ff0bd; }
.task { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); font-weight: 900; margin-bottom: 8px; }
.ru { font-size: 28px; line-height: 1.3; font-weight: 800; margin: 0 0 18px; }
mark { background: linear-gradient(180deg, transparent 58%, #ffd93d66 58%); color: var(--yellow); padding: 0 2px; border-radius: 4px; }
.cloze { font-size: 20px; line-height: 1.5; color: #d9cffa; margin: 0 0 18px; padding: 14px 18px; border-radius: 16px; background: var(--bg2); border: 2px dashed var(--line); }
.gap { display: inline-block; min-width: 90px; border-bottom: 4px solid var(--yellow); margin: 0 4px; height: 1.1em; vertical-align: baseline; border-radius: 2px; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.ans {
  width: 100%; padding: 18px 20px; font-size: 22px; font-weight: 800; border-radius: 18px;
  border: 3px solid var(--line); background: var(--bg2); outline: none;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.ans:focus { border-color: var(--violet); box-shadow: 0 0 0 6px #9b6bff33; }
.ans.tick { transform: scale(1.006); }
.accents { display: flex; gap: 6px; margin: 10px 0 0; flex-wrap: wrap; }
.accents button { width: 38px; height: 38px; border-radius: 11px; border: 0; background: var(--panel2); cursor: pointer; font-weight: 900; font-size: 17px; box-shadow: 0 3px 0 #1a1136; transition: transform .06s, box-shadow .06s; }
.accents button:active { transform: translateY(3px); box-shadow: none; }
.accents button:hover { background: var(--violet); }
.actions { display: flex; gap: 12px; margin-top: 20px; align-items: center; }
.actions .btn.main { flex: 1; font-size: 19px; padding: 16px; }
kbd { font: inherit; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: #0004; margin-left: 6px; opacity: .8; }

.verdict { font-size: 22px; font-weight: 900; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.verdict.good { color: var(--green); } .verdict.meh { color: var(--yellow); } .verdict.bad { color: var(--red); }
.verdict span { display: inline-block; animation: bump .5s cubic-bezier(.3,2,.5,1); font-size: 30px; }
.es { font-size: 26px; line-height: 1.35; font-weight: 800; margin: 0 0 6px; }
.rusm { color: var(--muted); font-size: 16px; margin: 0 0 16px; }
.yours { font-size: 17px; margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; background: var(--bg2); }
.yours small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.yours .w-bad { color: var(--red); text-decoration: line-through; text-decoration-thickness: 2px; }
.yours .w-ok { color: var(--green); }
.note { font-size: 15px; padding: 12px 16px; border-radius: 14px; background: #ffd93d14; border: 2px solid #ffd93d33; color: #ffe89a; margin: 0 0 16px; font-weight: 700; }
.player { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.play { width: 54px; height: 54px; border-radius: 50%; padding: 0; font-size: 22px; flex: none; }
.play.on { animation: pulse2 .9s ease-in-out infinite; }
@keyframes pulse2 { 50% { box-shadow: 0 6px 0 var(--d), 0 0 0 10px #3dd6ff33; } }
.wave { display: flex; align-items: center; gap: 3px; height: 34px; flex: 1; }
.wave i { flex: 1; max-width: 6px; border-radius: 4px; background: var(--line); height: 30%; transition: background .2s; }
.wave.on i { background: var(--cyan); animation: wv .7s ease-in-out infinite alternate; }
@keyframes wv { to { height: 100%; } }
.rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rates .btn { padding: 12px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 16px; }
.rates .btn small { font-size: 12px; opacity: .85; font-weight: 800; }
.rates .btn.sug { animation: sug 1.3s ease-in-out infinite; }
@keyframes sug { 50% { transform: translateY(-4px); box-shadow: 0 10px 0 var(--d), 0 0 0 5px #ffffff2e, 0 14px 26px #0007; } }
.rates .btn.sug:active { animation: none; }

.done { text-align: center; padding: 40px 20px; }
.done .big { font-size: 96px; display: block; animation: bump .8s cubic-bezier(.3,2,.5,1); }
.done h1 { font-size: 34px; margin: 8px 0; font-weight: 900; }
.done p { color: var(--muted); font-size: 17px; margin: 6px 0 24px; }
.sum { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }

/* ---------- список карточек колоды ---------- */
.modal { position: fixed; inset: 0; background: #0b0618cc; backdrop-filter: blur(8px); z-index: 40; display: grid; place-items: center; padding: 18px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(680px, 100%); max-height: 86vh; overflow: auto; background: var(--panel); border: 2px solid var(--line); border-radius: 26px; padding: 22px; animation: cardin .3s cubic-bezier(.25,1.5,.5,1); }
.sheet h3 { margin: 0 0 4px; font-size: 22px; font-weight: 900; }
.sheet .sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 2px solid #ffffff10; }
.li .btn { flex: none; }
.li .e { font-size: 17px; font-weight: 800; } .li .r { color: var(--muted); font-size: 14px; margin-top: 2px; }

#toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { padding: 12px 20px; border-radius: 16px; background: #fff; color: #23133f; font-weight: 900; box-shadow: 0 12px 30px #000a; animation: toast 2.6s forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(20px) scale(.9); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
.float { position: fixed; z-index: 55; font-weight: 900; font-size: 24px; color: var(--yellow); pointer-events: none; text-shadow: 0 2px 0 #0006; animation: floatup 1s ease-out forwards; }
@keyframes floatup { to { transform: translateY(-80px) scale(1.3); opacity: 0; } }

@media (max-width: 560px) {
  .hero { padding: 22px; } .hero h1 { font-size: 25px; } .hero .btn { width: 100%; }
  .ru { font-size: 23px; } .es { font-size: 22px; } .card { padding: 20px; border-radius: 24px; }
  .rates { grid-template-columns: repeat(2, 1fr); }
  .add { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ---------- лента ---------- */
.topics { display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 0; padding: 4px 2px 8px; scrollbar-width: none; }
.topics::-webkit-scrollbar { display: none; }
.tp { border: 2px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 15px; font-weight: 900; font-size: 14px; white-space: nowrap; cursor: pointer; transition: transform .1s, background .15s, border-color .15s; }
.tp:hover { border-color: var(--violet); transform: translateY(-2px); }
.tp:active { transform: scale(.94); }
.tp.on { background: linear-gradient(120deg, var(--pink), var(--orange)); border-color: transparent; box-shadow: 0 6px 18px #ff4d8d55; }
.top:has(.topics) { margin-bottom: 12px; flex-wrap: nowrap; }
.feedwrap { height: calc(100vh - 170px); min-height: 380px; }
.feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; border-radius: 26px; }
.feed::-webkit-scrollbar { display: none; }
.slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; gap: 26px; padding: 6px 0; }
.frame { height: 100%; aspect-ratio: 9 / 16; max-width: 100%; border-radius: 26px; overflow: hidden; background: #0006 center/cover no-repeat; border: 2px solid var(--line); box-shadow: 0 20px 50px #0009; position: relative; flex: none; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.side { width: 250px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.side .num { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 900; }
.side .vt { font-size: 18px; font-weight: 900; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.side .vv { color: var(--muted); font-size: 14px; }
.side .btn { text-align: center; }
.side .keys { color: #6f6197; font-size: 12px; margin-top: 6px; }
.feed .empty { margin: 40px auto; max-width: 420px; }
.hint.tt { margin: 12px 4px 0; }
.hint.tt a { color: var(--cyan); text-decoration: none; margin-left: 6px; white-space: nowrap; }
.hint.tt a:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .slide { flex-direction: column; gap: 10px; }
  .frame { height: auto; flex: 1; min-height: 0; }
  .side { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .side .vt, .side .num, .side .keys, .side .vv { display: none; }
}

/* карточка из надписи на экране: кадр вместо аудио */
.shot { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.shot img { height: 190px; border-radius: 16px; border: 2px solid var(--line); box-shadow: 0 10px 24px #0007; transition: transform .2s cubic-bezier(.3,1.6,.5,1); transform-origin: left center; }
.shot img:hover { transform: scale(1.6) rotate(-1deg); position: relative; z-index: 5; }

.feedbtn { width: 100%; margin-top: 16px; text-align: center; font-size: 17px; padding: 15px; }
.add { margin-top: 16px; }

/* ---------- вход и кабинет ---------- */
.auth { max-width: 440px; margin: 6vh auto 0; text-align: center; }
.logo.big { justify-content: center; font-size: 34px; margin: 0 0 8px; }
.logo.big .emo { font-size: 42px; }
.lead { color: var(--muted); margin: 0 0 24px; font-size: 16px; }
.authcard { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.authcard label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 900; }
.authcard .ans { font-size: 18px; padding: 14px 16px; text-transform: none; letter-spacing: 0; }
.authcard .hint { margin: -4px 0 0; }
.authcard .btn.main { font-size: 18px; padding: 16px; text-align: center; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: var(--bg2); }
.tabs button { border: 0; background: none; padding: 11px; border-radius: 12px; font-weight: 900; cursor: pointer; color: var(--muted); transition: background .15s, color .15s, transform .08s; }
.tabs button:active { transform: scale(.96); }
.tabs button.on { background: var(--panel2); color: var(--text); box-shadow: 0 3px 0 #1a1136; }
.autherr { color: #ff9aac; font-size: 14px; min-height: 0; }
.autherr:empty { display: none; }
.acc { margin-bottom: 18px; animation-duration: .3s; }
.acc .who { font-size: 26px; font-weight: 900; margin: 2px 0 14px; word-break: break-all; }
.code { font-size: 34px; font-weight: 900; letter-spacing: 6px; text-align: center; padding: 16px; border-radius: 18px; margin: 0 0 10px;
  background: linear-gradient(120deg, #ff4d8d22, #ff9a3d22); border: 2px dashed #ff9a3d88; color: var(--yellow); user-select: all; }
.linkbox { font-size: 13px; color: var(--muted); background: var(--bg2); border-radius: 12px; padding: 10px 12px; word-break: break-all; user-select: all; font-weight: 600; }
.friends { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- телефон ---------- */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
.btn, .tp, .accents button, .tabs button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#app { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
.feedwrap { height: calc(100dvh - 120px); }
.shot img { max-width: 45%; object-fit: cover; }
@media (hover: none) {
  .deck .x { opacity: 1; }
  .deck:hover { transform: none; }
  .btn:hover { transform: none; filter: none; }
  .shot img:hover { transform: none; }
}
@media (max-width: 700px) {
  #app { padding: 14px 12px calc(40px + env(safe-area-inset-bottom)); }
  .top { gap: 8px; margin-bottom: 16px; }
  .logo { font-size: 21px; }
  .logo span.emo { font-size: 24px; }
  .chip { padding: 6px 10px; font-size: 13px; }
  .chip i { font-size: 15px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .deck .thumb { height: 150px; }
  .deck .body { padding: 0 12px 12px; }
  .deck .t { font-size: 15px; }
  .deck .pills .pill { font-size: 11px; padding: 4px 8px; }
  .deck .row .icon { display: none; }
  .sbar { gap: 8px; margin-bottom: 14px; }
  .combo { min-width: 0; font-size: 15px; }
  .rates { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .rates .btn { padding: 12px 2px 10px; font-size: 14px; border-radius: 14px; }
  .rates .btn small { font-size: 10.5px; }
  .actions .btn.ghost { padding: 13px 14px; }
  kbd { display: none; }
  .accents { flex-wrap: nowrap; gap: 4px; }
  .accents button { flex: 1; min-width: 0; width: auto; height: 42px; }
  .cloze { font-size: 18px; padding: 12px 14px; }
  .sheet { padding: 16px; border-radius: 22px; }
  /* лента: ролик сверху, под ним панель. Свайп по самому плееру уходит в YouTube, поэтому листаем кнопками ↑ ↓ */
  .feedwrap { height: calc(100dvh - 86px); min-height: 0; }
  .top:has(.topics) { margin-bottom: 8px; }
  .slide { flex-direction: column; padding: 0; gap: 8px; }
  .frame { height: auto; flex: 1; min-height: 0; width: auto; max-width: 100%; border-radius: 20px; }
  .side { width: 100%; flex: none; flex-direction: row; align-items: stretch; gap: 8px; }
  .side [data-slot] { flex: 1; min-width: 0; }
  .side a.btn { font-size: 0; padding: 12px 13px; display: flex; align-items: center; }
  .side a.btn::before { content: "↗"; font-size: 16px; }
  .slide .side .nav { display: flex; gap: 8px; }
  .side .nav .btn { font-size: 20px; padding: 10px 16px; }
  .code { font-size: 26px; letter-spacing: 4px; }
}
@media (max-width: 380px) { .grid { grid-template-columns: 1fr 1fr; } .ru { font-size: 21px; } .hero h1 { font-size: 22px; } }

.side .nav { display: none; }
@media (hover: none) { .side .nav { display: flex; gap: 8px; } .side .keys { display: none; } }
